Browse Source

成本模型详情

yuhan 1 year ago
parent
commit
e424e5b0a4

+ 51 - 2
src/views/module_kzks/costModelList/CostModelList.vue

@@ -62,8 +62,27 @@
         class="j-table-force-nowrap"
         @change="handleTableChange">
 
-        <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)' : ''}">{{(Number(text)/10000).toFixed(2)}}</a-button>
+        <span slot="maxWxf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'wxf','max','外协费最大值')">{{ text }}</a-button>
+          <!-- {{Number(text).toFixed(2)}} -->
+        </span>
+        <span slot="minWxf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'wxf','min','外协费最小值')">{{ text }}</a-button>
+        </span>
+        <span slot="aveWxf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'wxf','ave','外协费平均值')">{{ text }}</a-button>
+        </span>
+        <span slot="maxClf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'clf','max','材料费最大值')">{{ text }}</a-button>
+        </span>
+        <span slot="minClf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'clf','min','材料费最小值')">{{ text }}</a-button>
+        </span>
+        <span slot="aveClf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'clf','ave','材料费平均值')">{{ text }}</a-button>
+        </span>
+        <span slot="recentClf" slot-scope="text, record">
+          <a-button type="link" @click="detailClick(text,record,'clf','recent','材料费近期值')">{{ text }}</a-button>
         </span>
 
         <template slot="htmlSlot" slot-scope="text">
@@ -202,12 +221,18 @@ import CostModelDetailModal from './modulesDetail/CostModelDetailModal.vue'
                 title:'最小值',
                 align:"center",
                 dataIndex: 'minWxf',
+                scopedSlots: {
+                  customRender: 'minWxf',
+                },
                 // customCell: this.getClickColumn,
               },
               {
                 title:'平均值',
                 align:"center",
                 dataIndex: 'aveWxf',
+                scopedSlots: {
+                  customRender: 'aveWxf',
+                },
                 // customCell: this.getClickColumn,
               },
             ],
@@ -220,24 +245,36 @@ import CostModelDetailModal from './modulesDetail/CostModelDetailModal.vue'
                 title:'最大值',
                 align:"center",
                 dataIndex: 'maxClf',
+                scopedSlots: {
+                  customRender: 'maxClf',
+                },
                 // customCell: this.getClickColumn,
               },
               {
                 title:'最小值',
                 align:"center",
                 dataIndex: 'minClf',
+                scopedSlots: {
+                  customRender: 'minClf',
+                },
                 // customCell: this.getClickColumn,
               },
               {
                 title:'平均值',
                 align:"center",
                 dataIndex: 'aveClf',
+                scopedSlots: {
+                  customRender: 'aveClf',
+                },
                 // customCell: this.getClickColumn,
               },
               {
                 title:'近期值',
                 align:"center",
                 dataIndex: 'recentClf',
+                scopedSlots: {
+                  customRender: 'recentClf',
+                },
                 // customCell: this.getClickColumn,
               },
             ],
@@ -332,6 +369,18 @@ import CostModelDetailModal from './modulesDetail/CostModelDetailModal.vue'
       },
     },
     methods: {
+      detailClick(text, record, dialogType, columnType, columnTitle){
+        console.log(text, record, columnType, columnTitle)
+        // 没有值不弹窗
+        if(!text){
+          return
+        }
+        this.$refs.costModelListModal.dialogType = dialogType
+        this.$refs.costModelListModal.id = record.id
+        this.$refs.costModelListModal.columnType = columnType
+        this.$refs.costModelListModal.title =  columnTitle + '明细'
+        this.$refs.costModelListModal.show()
+      },
       getClickColumn(record, index){
         return {
           style: {

+ 10 - 5
src/views/module_kzks/costModelList/modulesDetail/CostModelDetailModal.vue

@@ -9,6 +9,8 @@
     @cancel="handleCancel">
     <!-- 合同 -->
     <!-- <contract-detail-list v-if="columnValue === 'contractfpe'" :taskno="taskno"></contract-detail-list> -->
+    <cost-model-xmxq-cl-list v-if="dialogType === 'clf'" :id="id" :type="columnType"></cost-model-xmxq-cl-list>
+    <cost-model-xmxq-wx-list v-if="dialogType === 'wxf'" :id="id" :type="columnType"></cost-model-xmxq-wx-list>
 
     <template slot="footer">
       <a-button @click="handleCancel">关闭</a-button>
@@ -17,18 +19,21 @@
 </template>
 
 <script>
-// import ContractDetailList from './ContractDetailList.vue'
+import CostModelXmxqClList from './CostModelXmxqClList.vue';
+import CostModelXmxqWxList from './CostModelXmxqWxList.vue';
 
   export default {
     name: 'ProjectCostModal',
     components: {
-      // ContractDetailList,
+      CostModelXmxqClList,
+      CostModelXmxqWxList
     },
     data () {
       return {
-        taskno: '',
-        columnValue: '',
-        pichanInfo: {},
+        dialogType: null,
+        id: null,
+        columnType: '',
+        title: '',
         title:'',
         width: '60%',
         visible: false,