瀏覽代碼

修改弹窗关闭后滚动条会滚动的bug(应该有更好的方式)

yuhan 1 年之前
父節點
當前提交
fc166e9568

+ 3 - 3
src/App.vue

@@ -41,8 +41,8 @@
   #app {
     height: 100%;
     /* 改变框架 */
-    /* overflow: hidden;
-    position: relative;
-    width: calc(100% - 8px); */
+    overflow: hidden;
+    /* position: relative; */
+    /* width: calc(100% - 8px); */
   }
 </style>

+ 38 - 0
src/views/module_kzks/projectCostHuiji/ProjectCostHuijiList.vue

@@ -99,6 +99,7 @@
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ProjectCostHuijiModal from './modules/ProjectCostHuijiModal'
+  import { getAction } from '@/api/manage'
 
   export default {
     name: 'ProjectCostHuijiList',
@@ -374,6 +375,43 @@
       },
     },
     methods: {
+      loadData(arg) {
+        console.log(111)
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          console.log(res)
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.pageList.records||res.result.pageList;
+            // var amount = res.result.projectCostHuijiSum
+            // amount.taskno = '筛选合计:'
+            // amount.id = 'amount'
+            // amount.id = 'amount'+res.result.pageList.current
+            // this.dataSource.unshift(amount)
+            if(res.result.pageList.total)
+            {
+              this.ipagination.total = res.result.pageList.total;
+            }else{
+              this.ipagination.total = 0;
+            }
+            console.log(this.dataSource)
+            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
       initDictConfig(){
       },
       getSuperFieldList(){

+ 85 - 11
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -214,6 +214,33 @@
         </div>
         <a-icon slot="filterIcon" type='setting' :style="{ fontSize:'16px',color:  '#108ee9' }" />
 
+        <span slot="contractfpe" slot-scope="text, record">
+          <!-- <a-button type="link">{{text}}</a-button> -->
+          <a-button type="link" @click="detailClick(text,record,'contractfpe','合同额')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="taskmoney" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'taskmoney','已收款')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="clf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'clf','材料费')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="zyf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'zyf','专用费')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="swf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'swf','事务费')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="wxf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'wxf','外协费')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="zjcb" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'zjcb','装机成本')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        <span slot="workhour" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'workhour','工时')" :style="{color: (record.children || record.id === 'amount') ? 'rgba(0,0,0,.65)' : ''}">{{text}}</a-button>
+        </span>
+        
+
         <span slot="action" slot-scope="text, record">
           <!-- <a @click="handleEdit(record)">编辑</a> -->
           <a-tooltip v-if="record.id !== 'amount' && record.ji === 1">
@@ -442,13 +469,19 @@ import { number } from 'echarts';
             title:'合同额',
             align:"center",
             dataIndex: 'contractfpe',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'contractfpe',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'已收款',
             align:"center",
             dataIndex: 'taskmoney',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'taskmoney',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'总成本',
@@ -464,19 +497,28 @@ import { number } from 'echarts';
             title:'材料费',
             align:"center",
             dataIndex: 'clf',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'clf',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'专用费',
             align:"center",
             dataIndex: 'zyf',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'zyf',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'事务费',
             align:"center",
             dataIndex: 'swf',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'swf',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'外协预算',
@@ -487,7 +529,10 @@ import { number } from 'echarts';
             title:'外协费',
             align:"center",
             dataIndex: 'wxf',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'wxf',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'燃料动力费',
@@ -513,7 +558,10 @@ import { number } from 'echarts';
             title:'装机成本',
             align:"center",
             dataIndex: 'zjcb',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'zjcb',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'内部试验',
@@ -524,7 +572,10 @@ import { number } from 'echarts';
             title:'工时(h)',
             align:"center",
             dataIndex: 'workhour',
-            customCell: this.getClickColumn,
+            scopedSlots: {
+              customRender: 'workhour',
+            },
+            // customCell: this.getClickColumn,
           },
           {
             title:'责任部门',
@@ -671,7 +722,8 @@ import { number } from 'echarts';
             this.dataSource = res.result.pageList.records||res.result.pageList;
             var amount = res.result.projectCostHuijiSum
             amount.taskno = '筛选合计:'
-            amount.id = 'amount'+res.result.pageList.current
+            amount.id = 'amount'
+            // amount.id = 'amount'+res.result.pageList.current
             this.dataSource.unshift(amount)
             if(res.result.pageList.total)
             {
@@ -791,6 +843,28 @@ import { number } from 'echarts';
         this.columns = cols;
         columnsEdit({checkedValues: checkedValues})
       },
+      detailClick(text, record, columnValue, columnTitle){
+        console.log(text, record, columnValue, columnTitle)
+        // 没有值不弹窗
+        if(!text || record.children || record.id === 'amount'){
+          return
+        }
+        this.$refs.proCostDetail.taskno = record.taskno
+        if(record.status === '1'){
+          // 批产参数
+          this.$refs.proCostDetail.pichanInfo = {
+            pccode: record.pccode,
+            proportion: record.proportion,
+            columnValue: columnValue,
+          }
+          this.$refs.proCostDetail.columnValue = 'pichanTask'
+          this.$refs.proCostDetail.title = columnTitle + '批产明细'
+        } else {
+          this.$refs.proCostDetail.columnValue = columnValue
+          this.$refs.proCostDetail.title =  columnTitle + '明细'
+        }
+        this.$refs.proCostDetail.show()
+      },
       getClickColumn(record, index){
         if(record.children || record.id === 'amount'){
           return false
@@ -824,9 +898,9 @@ import { number } from 'echarts';
                 this.$refs.proCostDetail.columnValue = clickColumn
                 this.$refs.proCostDetail.title =  title + '明细'
               }
-              console.log(this.$refs.proCostDetail.columnValue)
+              // console.log(this.$refs.proCostDetail.columnValue)
               this.$refs.proCostDetail.show()
-            }
+            },
           }
         }
       },