Browse Source

Merge branch 'master' into 测试

lxf 1 year ago
parent
commit
c3e51befb2

+ 12 - 2
src/views/group/BOM/calculator/basics.vue

@@ -11,7 +11,12 @@
             <el-col :span="12">
               <el-table :data="getData(sourceList.data[item.key], 0)">
                 <template v-for="column in item.table1">
-                  <el-table-column :label="column.label" :prop="column.prop" :width="column.width" />
+                  <el-table-column :label="column.label" v-if="column.prop === 'depletion'" :width="column.width">
+                    <template #default="{ row }">
+                      <span>{{ row.depletion }}%</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column :label="column.label" v-else :prop="column.prop" :width="column.width" />
                 </template>
                 <el-table-column label="操作" align="center" width="80">
                   <template #default="{ row }">
@@ -23,7 +28,12 @@
             <el-col :span="12">
               <el-table :data="getData(sourceList.data[item.key], 1)">
                 <template v-for="column in item.table2">
-                  <el-table-column :label="column.label" :prop="column.prop" :width="column.width" />
+                  <el-table-column :label="column.label" v-if="column.prop === 'depletion'" :width="column.width">
+                    <template #default="{ row }">
+                      <span>{{ row.depletion }}%</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column :label="column.label" v-else :prop="column.prop" :width="column.width" />
                 </template>
                 <el-table-column label="操作" align="center" width="80">
                   <template #default="{ row }">

+ 1 - 1
src/views/group/BOM/calculator/index.vue

@@ -167,7 +167,7 @@ const getDemandData = () => {
       colourPriceList.value = res.map((item) => {
         return {
           dictKey: item.id,
-          dictValue: item.name,
+          dictValue: item.description + item.name,
         };
       });
     }