Просмотр исходного кода

添加物品机型和颜色字段到出入库管理表格,优化表格列显示格式

yusheng 9 месяцев назад
Родитель
Сommit
7f3e82109f

+ 15 - 5
src/views/bpm/outgoingManagement/details.vue

@@ -231,9 +231,15 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
-            <el-table-column label="单价" prop="price" align="center"
-            v-if="isPrice == 1"
-            
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
+            <el-table-column
+              label="单价"
+              prop="price"
+              align="center"
+              v-if="isPrice == 1"
             >
               <template slot-scope="{ row }">
                 <template>
@@ -249,7 +255,7 @@
             >
             </el-table-column>
             <el-table-column
-            v-if="isPrice == 1"
+              v-if="isPrice == 1"
               label="金额"
               align="center"
               prop="contentImage"
@@ -363,6 +369,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               prop="supplierName"
               label="供应商"
@@ -531,7 +541,7 @@
         stepsTitle: '已完成',
         stepsStatus: 'success',
         active: 0,
-        isPrice:1
+        isPrice: 1
       };
     },
     watch: {

+ 10 - 2
src/views/bpm/outgoingManagement/outbound.vue

@@ -261,6 +261,10 @@
                 :show-overflow-tooltip="true"
               >
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="200">
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="200">
+              </el-table-column>
               <el-table-column
                 label="库存"
                 prop="stockNum"
@@ -418,6 +422,10 @@
                 :show-overflow-tooltip="true"
               >
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="200">
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="200">
+              </el-table-column>
               <el-table-column
                 label="质检结果"
                 prop="result"
@@ -1042,7 +1050,7 @@
           let pData4 = {
             //受托退货
             type: 3,
-            ids: this.detailList.map((item) => item.packageId)?.toString(),
+            ids: this.detailList.map((item) => item.packageId)?.toString()
           };
           let api = this.bizType == 8 ? 'getHierarchyList' : 'getHierarchyFifo';
 
@@ -1079,7 +1087,7 @@
               return {
                 categoryId: item.productId || item.categoryId,
                 num: item.totalCount,
-                batchNo: item.batchNo || '',
+                batchNo: item.batchNo || ''
                 // warehouseId: this.bizType == 3 ? item.warehouseId : ''
                 // batchNo: item.batchNo || '',
               };

+ 8 - 0
src/views/bpm/stockManagement/details.vue

@@ -245,6 +245,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               label="单价"
               prop="unitPrice"
@@ -444,6 +448,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               label="供应商"
               prop="supplierName"

+ 92 - 5
src/views/bpm/stockManagement/storage.vue

@@ -397,6 +397,36 @@
                   <template slot="append"> </template>
                 </template>
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="300">
+                <template slot-scope="{ row ,$index}">
+                  <DictSelection
+                    dictName="物品机型"
+                    clearable
+                    v-model="row.modelKey"
+                     :isOne="$index==1"
+                    multiple
+                    filterable
+                    allow-create
+                    default-first-option
+                  >
+                  </DictSelection>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="300">
+                <template slot-scope="{ row,$index }">
+                  <DictSelection
+                    dictName="物品颜色"
+                    clearable
+                    v-model="row.colorKey"
+                    :isOne="$index==1"
+                    multiple
+                    filterable
+                    allow-create
+                    default-first-option
+                  >
+                  </DictSelection>
+                </template>
+              </el-table-column>
               <!-- <el-table-column label="单价" prop="unitPrice" width="200" align="center">
                 <template slot-scope="{ row, $index }">
                   <template v-if="row.isSave">
@@ -856,6 +886,36 @@
               {{ row.weightUnit }}
             </template>
           </el-table-column>
+          <el-table-column label="机型" prop="modelKey" width="300">
+            <template slot-scope="{ row ,$index}">
+              <DictSelection
+                dictName="物品机型"
+                clearable
+                v-model="row.modelKey"
+              :isOne="$index==1"
+                multiple
+                filterable
+                allow-create
+                default-first-option
+              >
+              </DictSelection>
+            </template>
+          </el-table-column>
+          <el-table-column label="颜色" prop="colorKey" width="300">
+            <template slot-scope="{ row,$index }">
+              <DictSelection
+                dictName="物品颜色"
+                clearable
+                v-model="row.colorKey"
+               :isOne="$index==1"
+                multiple
+                filterable
+                allow-create
+                default-first-option
+              >
+              </DictSelection>
+            </template>
+          </el-table-column>
           <el-table-column label="序列号" prop="serialNumber">
           </el-table-column>
           <el-table-column label="质检结果" prop="result" width="120">
@@ -1545,6 +1605,12 @@
                 packingUnit: packingUnit, // 单位
                 measureQuantity: measureQuantity, // 计量数量
                 measureUnit: item.measuringUnit, // 计量单位
+                modelKey: filtersItem.modelKey
+                  ? filtersItem.modelKey.split(',')
+                  : '', // 机型
+                colorKey: filtersItem.colorKey
+                  ? filtersItem.colorKey.split(',')
+                  : '', // 颜色
                 measureType: item.measureType, // 计量方式
                 netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
                 singleWeight: singleWeight, // 单重重量
@@ -1734,7 +1800,10 @@
                 categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
-                batchNo: this.bizType == 1 ? this.detailList[0]?.batchNo || batchNo : batchNo, // 批次号
+                batchNo:
+                  this.bizType == 1
+                    ? this.detailList[0]?.batchNo || batchNo
+                    : batchNo, // 批次号
                 supplierListOptions: supplierList[item.id], // 供应商列表
                 supplierId: '', // 供应商id
                 supplierCode: item.supplierCode,
@@ -2230,6 +2299,12 @@
             _workOrderId = this.detailProductList[0]?.workOrderId;
             _taskId = this.detailProductList[0]?.taskId;
           }
+        if (packingItem.modelKey) {
+            packingItem.modelKey = packingItem.modelKey.toString();
+          }
+          if (packingItem.colorKey) {
+            packingItem.colorKey = packingItem.colorKey.toString();
+          }
           return {
             ...packingItem,
             workOrderId: _workOrderId,
@@ -2244,6 +2319,12 @@
 
         // 处理产品数据
         this.productList = this.productList.map((productItem) => {
+          if (productItem.modelKey) {
+            productItem.modelKey = productItem.modelKey.toString();
+          }
+          if (productItem.colorKey) {
+            productItem.colorKey = productItem.colorKey.toString();
+          }
           return {
             ...productItem,
             outInDetailRecordRequestList: _packingList.filter(
@@ -2611,6 +2692,8 @@
             categoryCode: item.code, // 物品编码
             categoryModel: item.modelType, // 物品型号
             specification: item.specification, // 规格
+            modelKey: item.modelKey?item.modelKey.split(','):'', // 机型
+            colorKey: item.colorKey?item.colorKey.split(','):'', // 颜色
             brandNum: item.brandNum, // 牌号
             batchNo: batchNo, // 批次号
             supplierListOptions: supplierList[item.id], // 供应商列表
@@ -3440,7 +3523,8 @@
             batchNo: row.batchNo, // 批次号
             packageNo: packingCodeList[index]?.onlyCode, // 包装编码
             packingQuantity: packingQuantity, // 包装数量
-
+            modelKey: row.modelKey, // 机型
+            colorKey: row.colorKey, //颜色
             // packingUnit: row.isUnpack ? packingBoolen ? filterArr[0].conversionUnit : measureBoolen ? row.packingSpecificationOption[1]
             //       ? row.packingSpecificationOption[1].conversionUnit
             //       : row.packingSpecificationOption[0].conversionUnit
@@ -3588,10 +3672,13 @@
             (packingItem) => packingItem.packageNo == onlyCode
           );
           this.$set(this.packingList[index], 'measureQuantity', remainder);
-          if(row.singleWeight){
-                this.$set(this.packingList[index], 'weight', row.singleWeight*remainder);
+          if (row.singleWeight) {
+            this.$set(
+              this.packingList[index],
+              'weight',
+              row.singleWeight * remainder
+            );
           }
-        
         }
 
         // 单独点击保存并插入对应位置(物料)