Переглянути джерело

feat: 所有的颜色机型从多选变成单选

liujt 1 місяць тому
батько
коміт
44c006b7a2

+ 8 - 9
src/BIZComponents/inventoryTable.vue

@@ -833,7 +833,6 @@
             filterable
             allow-create
             default-first-option
-            multiple
           >
           </DictSelection>
         </el-form-item>
@@ -1996,10 +1995,10 @@
             );
           }
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.technicalDrawings = v.technicalDrawings ? v.technicalDrawings : [];
           v.customerReqFiles = v.customerReqFiles || [];
@@ -2246,10 +2245,10 @@
           productList.forEach((item, index) => {
             item['key'] = index + 1;
             if (item.modelKey) {
-              item.modelKey = item.modelKey.split(',');
+              item.modelKey = item.modelKey;
             }
             if (item.colorKey) {
-              item.colorKey = item.colorKey.split(',');
+              item.colorKey = item.colorKey;
             }
 
             item.guaranteePeriodUnitCode = item.guaranteePeriodUnitCode
@@ -2382,10 +2381,10 @@
           );
 
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           if (this.defTaxRate) {
             this.$set(parasm, 'taxRate', parasm.taxRate ? parasm.taxRate : this.isContractBook ? this.defTaxRate : this.isTaxRate == 1 ? this.defTaxRate : undefined);
@@ -2536,10 +2535,10 @@
             this.$set(parasm, 'singlePrice', 0);
           }
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           if (this.isSupplier) {
             this.$set(

+ 2 - 2
src/BIZComponents/inventoryTableDetails.vue

@@ -1058,10 +1058,10 @@
           productList.forEach((item) => {
             // 处理机型/颜色
             if (item.modelKey && typeof item.modelKey === 'string') {
-              item.modelKey = item.modelKey.split(',');
+              item.modelKey = item.modelKey;
             }
             if (item.colorKey && typeof item.colorKey === 'string') {
-              item.colorKey = item.colorKey.split(',');
+              item.colorKey = item.colorKey;
             }
           });
 

+ 8 - 10
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -414,7 +414,6 @@
             clearable
             v-model="scope.row.modelKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -429,7 +428,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -780,10 +778,10 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.files = v.files || [];
@@ -797,10 +795,10 @@
         if (data && data?.length) {
           this.form.datasource = data.map((item, index) => {
             if (item.modelKey) {
-              item.modelKey = item.modelKey.split(',');
+              item.modelKey = item.modelKey;
             }
             if (item.colorKey) {
-              item.colorKey = item.colorKey.split(',');
+              item.colorKey = item.colorKey;
             }
             item.key = index + 1;
             return item;
@@ -921,10 +919,10 @@
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierName', item.supplierName);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(
             parasm,
@@ -1012,10 +1010,10 @@
           let parasm = idx == -1 ? row : this.form.datasource[i];
           this.$set(parasm, 'productId', item.id);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(parasm, 'categoryName', item.name);
           this.$set(parasm, 'productCategoryId', item.categoryLevelId);

+ 6 - 8
src/views/purchasingManage/purchaseOrder/components/inventoryTableNew.vue

@@ -452,7 +452,6 @@
             clearable
             v-model="scope.row.modelKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -467,7 +466,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -1206,10 +1204,10 @@
         comitDatasource.forEach((v, i) => {
           v.detailType = this.detailType;
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.guaranteePeriodUnitName = this.getDictValue(
             '质保期单位',
@@ -1463,10 +1461,10 @@
               ? item.guaranteePeriodUnitCode + ''
               : '';
             if (item.modelKey) {
-              item.modelKey = item.modelKey.split(',');
+              item.modelKey = item.modelKey;
             }
             if (item.colorKey) {
-              item.colorKey = item.colorKey.split(',');
+              item.colorKey = item.colorKey;
             }
             item.taxRate = item.taxRate || 13;
             item.discountRatio = Number(item.discountRatio) || 100; 
@@ -1562,10 +1560,10 @@
             this.$set(parasm, 'purchaseCount', item.saleCount);
           }
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
 
           this.$set(parasm, 'discountRatio', parasm.discountRatio || 100);

+ 6 - 8
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -320,7 +320,6 @@
             clearable
             v-model="scope.row.modelKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -335,7 +334,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -1120,10 +1118,10 @@
           this.$set(parasm, 'increaseTotalWeight', 0);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(
             parasm,
@@ -1190,10 +1188,10 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           if (v.guaranteePeriodUnitCode) {
             v.guaranteePeriodUnitName = this.getDictValue(
@@ -1267,14 +1265,14 @@
               this.$set(
                 this.form.datasource[index],
                 'modelKey',
-                item.modelKey?.split(',')
+                item.modelKey
               );
             }
             if (item.colorKey) {
               this.$set(
                 this.form.datasource[index],
                 'colorKey',
-                item.colorKey?.split(',')
+                item.colorKey
               );
             }
             if (!item.warehouseId && this.isWarehouseId == 1) {

+ 6 - 8
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -192,7 +192,6 @@
             clearable
             v-model="scope.row.modelKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -207,7 +206,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -840,10 +838,10 @@
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(
             parasm,
@@ -927,10 +925,10 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.totalCount = Number(v.totalCount);
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
@@ -958,14 +956,14 @@
               this.$set(
                 this.form.datasource[index],
                 'modelKey',
-                item.modelKey?.split(',')
+                item.modelKey
               );
             }
             if (item.colorKey) {
               this.$set(
                 this.form.datasource[index],
                 'colorKey',
-                item.colorKey?.split(',')
+                item.colorKey
               );
             }
             this.$set(

+ 8 - 10
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -415,7 +415,6 @@
             clearable
             v-model="scope.row.modelKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -430,7 +429,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -885,10 +883,10 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach((v) => {
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.totalPrice = (v.totalCount * v.singlePrice)?.toFixed(2) || 0;
           v.files = v.files || [];
@@ -936,10 +934,10 @@
           this.form.datasource = [];
           data.forEach((row) => {
             if (row.modelKey) {
-              row.modelKey = row.modelKey.split(',');
+              row.modelKey = row.modelKey;
             }
             if (row.colorKey) {
-              row.colorKey = row.colorKey.split(',');
+              row.colorKey = row.colorKey;
             }
             row['reqTotalCount'] = row['reqTotalCount'] || row.totalCount;
             row['arrivalWay'] = row.arrivalWay || 1;
@@ -1133,10 +1131,10 @@
           this.$set(parasm, 'supplierId', item.supplierId);
           this.$set(parasm, 'supplierName', item.supplierName);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(
             parasm,
@@ -1212,10 +1210,10 @@
           this.$set(parasm, 'produceType', item.componentAttribute);
           this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(
             parasm,

+ 6 - 8
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -191,7 +191,6 @@
             filterable
             allow-create
             default-first-option
-            multiple
           >
           </DictSelection>
         </el-form-item>
@@ -225,7 +224,6 @@
             clearable
             v-model="scope.row.colorKey"
             :isOne="scope.$index === 0"
-            multiple
             filterable
             allow-create
             default-first-option
@@ -725,10 +723,10 @@
         comitDatasource.forEach(async (v) => {
           v.totalCount = Number(v.totalCount);
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
             ? v.technicalDrawings
@@ -756,10 +754,10 @@
               this.warehouseChange(index, item);
             }
             if (item.modelKey) {
-              item.modelKey = item.modelKey.split(',');
+              item.modelKey = item.modelKey;
             }
             if (item.colorKey) {
-              item.colorKey = item.colorKey.split(',');
+              item.colorKey = item.colorKey;
             }
             //发货数量因已发货数量被修改需要重新计算金额,总重
             this.changeNum(item, index);
@@ -810,10 +808,10 @@
           this.$set(parasm, 'customerMark', this.customerMark);
 
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'singlePrice', 0);

+ 10 - 12
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -379,7 +379,6 @@
               filterable
               allow-create
               default-first-option
-              multiple
             >
             </DictSelection>
           </el-form-item>
@@ -395,7 +394,6 @@
               filterable
               allow-create
               default-first-option
-              multiple
             >
             </DictSelection>
           </el-form-item>
@@ -1105,7 +1103,7 @@
           warehouseId: data.warehouseId,
           code: row.productCode,
           batchNo: row.batchNo,
-          colorKey: row.colorKey.join(','),
+          colorKey: row.colorKey,
           modelType: row.modelType
         });
         this.$set(
@@ -1156,7 +1154,7 @@
                   warehouseId: row.warehouseId,
                   code: row.productCode,
                   batchNo: row.batchNo,
-                  colorKey: row.colorKey.join(','),
+                  colorKey: row.colorKey,
                   modelType: row.modelType
                 })
               : ''
@@ -1382,10 +1380,10 @@
           this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'orderNo', this.orderNoList[0]?.value || '');
           if (item.modelKey) {
-            this.$set(parasm, 'modelKey', item.modelKey.split(','));
+            this.$set(parasm, 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(parasm, 'colorKey', item.colorKey.split(','));
+            this.$set(parasm, 'colorKey', item.colorKey);
           }
           this.$set(parasm, 'receiveTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
@@ -1467,10 +1465,10 @@
         if (comitDatasource.length === 0) return [];
         comitDatasource.forEach(async (v) => {
           if (v.modelKey) {
-            v.modelKey = v.modelKey.toString();
+            v.modelKey = v.modelKey;
           }
           if (v.colorKey) {
-            v.colorKey = v.colorKey.toString();
+            v.colorKey = v.colorKey;
           }
           v.totalCount = Number(v.totalCount);
           v.technicalDrawings = Array.isArray(v.technicalDrawings)
@@ -1502,10 +1500,10 @@
         let indexS = [];
         data.forEach((item, index) => {
           if (item.modelKey) {
-            this.$set(data[index], 'modelKey', item.modelKey.split(','));
+            this.$set(data[index], 'modelKey', item.modelKey);
           }
           if (item.colorKey) {
-            this.$set(data[index], 'colorKey', item.colorKey.split(','));
+            this.$set(data[index], 'colorKey', item.colorKey);
           }
           item.receiveTotalWeight = item.receiveTotalWeight || 0;
 
@@ -1555,7 +1553,7 @@
                     warehouseId: item.warehouseId,
                     code: item.productCode,
                     batchNo: item.batchNo,
-                    colorKey: item.colorKey.join(','),
+                    colorKey: item.colorKey,
                     modelType: item.modelType
                   })
                 );
@@ -1611,7 +1609,7 @@
                 warehouseId: item.warehouseId,
                 code: item.productCode,
                 batchNo: item.batchNo,
-                colorKey: item.colorKey.join(','),
+                colorKey: item.colorKey,
                 modelType: item.modelType
               })
             );