Răsfoiți Sursa

入库审批物品类型不显示bug

wsx 10 luni în urmă
părinte
comite
3b97834112
1 a modificat fișierele cu 33 adăugiri și 24 ștergeri
  1. 33 24
      src/views/bpm/stockManagement/details.vue

+ 33 - 24
src/views/bpm/stockManagement/details.vue

@@ -245,9 +245,11 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
-            <el-table-column label="单价" prop="unitPrice" align="center"
-            v-if="isPrice == 1"
-            
+            <el-table-column
+              label="单价"
+              prop="unitPrice"
+              align="center"
+              v-if="isPrice == 1"
             >
               <template slot-scope="{ row }">
                 <template>
@@ -288,22 +290,22 @@
             >
             </el-table-column>
             <el-table-column
-                label="产地"
-                align="center"
-                prop="provenance"
-                v-if="bizType == 2"
-                :show-overflow-tooltip="true"
-                width="120"
-              >
-                <template slot-scope="{ row, $index }">
-                  {{
-                    row.provenance &&
-                    row.provenance
-                      .map((item) => getDictValue('产地', item))
-                      .join(',')
-                  }}
-                </template>
-              </el-table-column>
+              label="产地"
+              align="center"
+              prop="provenance"
+              v-if="bizType == 2"
+              :show-overflow-tooltip="true"
+              width="120"
+            >
+              <template slot-scope="{ row, $index }">
+                {{
+                  row.provenance &&
+                  row.provenance
+                    .map((item) => getDictValue('产地', item))
+                    .join(',')
+                }}
+              </template>
+            </el-table-column>
             <el-table-column
               label="生产日期"
               prop="detailProductionDate"
@@ -666,7 +668,7 @@
         stepsTitle: '已完成',
         stepsStatus: 'success',
         active: 0,
-        isPrice:1
+        isPrice: 1
       };
     },
     watch: {
@@ -707,12 +709,12 @@
     mounted() {
       this.getFieldModel();
       this.requestDict('类型用途');
-     this.requestDict('产地');
+      this.requestDict('产地');
 
       this.getAllCategoryType();
       this._getInfo(this.businessId);
     },
-    created(){
+    created() {
       //仓库出入库是否显示金额(0:不显示 1:显示)
       parameterGetByCode({
         code: 'wms_price'
@@ -775,8 +777,15 @@
       ...mapActions('dict', ['requestDict']),
       getSceneState: useDictLabel(sceneState),
       handleAssetType(r) {
-        const code = this.codeList.find((item) => item.dictCode == r);
-        return code?.dictValue;
+        if (r) {
+          let arr = r.split(',');
+          const filteredData = this.codeList.filter((item) =>
+            arr.includes(item.dictCode)
+          );
+          return filteredData.map((item) => item.dictValue).join(',');
+        }
+        // const code = this.codeList.find((item) => item.dictCode == r);
+        // return code?.dictValue;
       },
       tableRowClassName({ row, rowIndex }) {
         console.log(row);