Browse Source

成本模型详情

yuhan 1 year ago
parent
commit
6a2296d6f0

+ 8 - 8
src/views/module_kzks/costModelList/CostModelList.vue

@@ -63,26 +63,26 @@
         @change="handleTableChange">
 
         <span slot="maxWxf" slot-scope="text, record">
-          <a-button type="link" @click="detailClick(text,record,'wxf','max','外协费最大值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
-          <!-- {{Number(text).toFixed(2)}} -->
+          <a-button type="link" @click="detailClick(text,record,'wxf','max','外协费最大值')">{{ text }}</a-button>
+          <!-- {{Number(text).toFixed(2)}}  style="color: rgba(0,0,0,.65);"-->
         </span>
         <span slot="minWxf" slot-scope="text, record">
-          <a-button type="link" @click="detailClick(text,record,'wxf','min','外协费最小值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <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','外协费平均值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <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','材料费最大值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <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','材料费最小值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <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','材料费平均值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <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','材料费近期值')" style="color: rgba(0,0,0,.65);">{{ text }}</a-button>
+          <a-button type="link" @click="detailClick(text,record,'clf','recent','材料费近期值')">{{ text }}</a-button>
         </span>
 
         <template slot="htmlSlot" slot-scope="text">

+ 20 - 18
src/views/module_kzks/costModelList/modulesDetail/CostModelXmxqClList.vue

@@ -279,7 +279,8 @@
       }
     },
     created() {
-    this.getSuperFieldList();
+      this.getSuperFieldList();
+      this.setColumn()
     },
     computed: {
       importExcelUrl: function(){
@@ -305,23 +306,6 @@
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
             this.dataSource = res.result.records||res.result;
 
-            if (this.type == 'max') {
-              this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' })
-              this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
-            }
-            if (this.type == 'min') {
-              this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' })
-              this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
-            }
-            if (this.type == 'ave') {
-              this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' })
-              this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
-            }
-            if (this.type == 'recent') {
-              this.columns.push({ title:'单价(近期值)', align:"center", dataIndex: 'recentDanjia', fixed: 'right' })
-              this.columns.push({ title:'价格(近期值)', align:"center", dataIndex: 'recentPrice', fixed: 'right' })
-            }
-
             if(res.result.total)
             {
               this.ipagination.total = res.result.total;
@@ -336,6 +320,24 @@
           this.loading = false
         })
       },
+      setColumn(){
+        if (this.type == 'max') {
+          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' })
+          this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
+        }
+        if (this.type == 'min') {
+          this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' })
+          this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
+        }
+        if (this.type == 'ave') {
+          this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' })
+          this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
+        }
+        if (this.type == 'recent') {
+          this.columns.push({ title:'单价(近期值)', align:"center", dataIndex: 'recentDanjia', fixed: 'right' })
+          this.columns.push({ title:'价格(近期值)', align:"center", dataIndex: 'recentPrice', fixed: 'right' })
+        }
+      },
       initDictConfig(){
       },
       getSuperFieldList(){

+ 16 - 36
src/views/module_kzks/costModelList/modulesDetail/CostModelXmxqWxList.vue

@@ -251,7 +251,8 @@
       }
     },
     created() {
-    this.getSuperFieldList();
+      this.getSuperFieldList();
+      this.setColumn()
     },
     computed: {
       importExcelUrl: function(){
@@ -277,19 +278,6 @@
             //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
             this.dataSource = res.result.records||res.result;
 
-            if (this.type == 'max') {
-              this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' },
-              { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
-            }
-            if (this.type == 'min') {
-              this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' },
-              { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
-            }
-            if (this.type == 'ave') {
-              this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' },
-              { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
-            }
-
             if(res.result.total)
             {
               this.ipagination.total = res.result.total;
@@ -304,6 +292,20 @@
           this.loading = false
         })
       },
+      setColumn(){
+        if (this.type == 'max') {
+          this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia', fixed: 'right' },
+          { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice', fixed: 'right' })
+        }
+        if (this.type == 'min') {
+          this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia', fixed: 'right' },
+          { title:'价格(最小值)', align:"center", dataIndex: 'minPrice', fixed: 'right' })
+        }
+        if (this.type == 'ave') {
+          this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia', fixed: 'right' },
+          { title:'价格(平均值)', align:"center", dataIndex: 'avePrice', fixed: 'right' })
+        }
+      },
       initDictConfig(){
       },
       getSuperFieldList(){
@@ -319,28 +321,6 @@
         fieldList.push({type:'string',value:'remark',text:'描述',dictCode:''})
         this.superFieldList = fieldList
       },
-      // getList(id,type){
-      //   this.queryParam.id = id
-      //   this.loadData(1)
-      //   if (type == 'max') {
-      //     // this.columns.push({ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia' })
-      //     // this.columns.push({ title:'价格(最大值)', align:"center", dataIndex: 'maxPrice' })
-      //     this.columns.splice(7,0,{ title:'单价(最大值)', align:"center", dataIndex: 'maxDanjia' },
-      //     { title:'价格(最大值)', align:"center", dataIndex: 'maxPrice' })
-      //   }
-      //   if (type == 'min') {
-      //     // this.columns.push({ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia' })
-      //     // this.columns.push({ title:'价格(最小值)', align:"center", dataIndex: 'minPrice' })
-      //     this.columns.splice(7,0,{ title:'单价(最小值)', align:"center", dataIndex: 'minDanjia' },
-      //     { title:'价格(最小值)', align:"center", dataIndex: 'minPrice' })
-      //   }
-      //   if (type == 'ave') {
-      //     // this.columns.push({ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia' })
-      //     // this.columns.push({ title:'价格(平均值)', align:"center", dataIndex: 'avePrice' })
-      //     this.columns.splice(7,0,{ title:'单价(平均值)', align:"center", dataIndex: 'aveDanjia' },
-      //     { title:'价格(平均值)', align:"center", dataIndex: 'avePrice' })
-      //   }
-      // }
     }
   }
 </script>