Explorar el Código

出库管理和库存管理表格新增机型和颜色列并优化相关数据处理逻辑

yusheng hace 9 meses
padre
commit
de22dc7df7

+ 8 - 0
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -275,6 +275,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"
@@ -426,6 +430,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"

+ 8 - 0
src/views/warehouseManagement/outgoingManagement/details.vue

@@ -204,6 +204,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="price"
@@ -332,6 +336,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"

+ 25 - 3
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -143,6 +143,10 @@
           <span slot="reference"> {{ row.batchNo }}</span>
         </el-popover>
       </template>
+      <template v-slot:QRCode="{ row }">
+        <el-link type="primary" @click="openQRCode(row, 3)"> 查看 </el-link>
+      </template>
+
       <!-- 最小包装单元 -->
       <template v-slot:minPackingCount="{ row }">
         <span v-if="row.minPackingCount">
@@ -208,7 +212,10 @@
         >
       </span>
     </el-dialog>
+    <printQRCode
+      ref="printQRCodeRef"
 
+    ></printQRCode>
     <importDialog
       :defModule="moudleName"
       ref="importDialogRef"
@@ -245,10 +252,11 @@
   import { qualityStatus, qualityResults } from '@/utils/dict/index';
   import { parameterGetByCode } from '@/api/sys/index.js';
   import exportButton from '@/components/upload/exportButton.vue';
+  import printQRCode from '@/views/warehouseManagement/stockManagement/components/printQRCode.vue';
 
   export default {
     mixins: [tabMixins],
-    components: { ItemSearch, print, allot, importDialog, exportButton },
+    components: { ItemSearch, print, allot, importDialog, exportButton,printQRCode },
     props: {
       // 机构id
       organizationId: [Number, String],
@@ -321,6 +329,15 @@
             showOverflowTooltip: true,
             fixed: 'left'
           },
+          {
+            width: 80,
+            prop: 'QRCode',
+            slot: 'QRCode',
+            align: 'center',
+            label: '二维码',
+            showOverflowTooltip: true
+          },
+
           this.selectedDime != 1
             ? {
                 prop: 'batchNo',
@@ -582,6 +599,11 @@
       }
     },
     methods: {
+
+     openQRCode(row, type) {
+        this.$refs.printQRCodeRef.open(row, type);
+      },
+
       getFieldModel() {
         storageApi.fieldModel({ relevance: 't_main_category' }).then((res) => {
           let newRes = res.map((m) => {
@@ -688,12 +710,12 @@
             ...order
           };
           this.params = {
-               ...params,
+            ...params,
             pageNum: page,
             size: limit
           };
           console.log('this.params----', this.params);
-          const data = storageApi.getBatchList(  this.params );
+          const data = storageApi.getBatchList(this.params);
           return data;
         } else if (dimension == 4) {
           // 物料维度

+ 2 - 2
src/views/warehouseManagement/stockLedger/components/item-search.vue

@@ -55,7 +55,7 @@
             ></auth-selection>
           </el-form-item>
         </el-col> -->
-        <el-col v-if="type === 'products'" :span="6">
+        <el-col  :span="6">
           <el-form-item label="列表维度:" prop="dimension">
             <template>
               <el-select
@@ -65,7 +65,7 @@
                 v-model="dimension"
                 placeholder="请选择"
               >
-                <el-option label="物品维度" value="1"> </el-option>
+                <el-option label="物品维度" value="1" v-if="type === 'products'"> </el-option>
                 <el-option label="批次维度" value="2"> </el-option>
                 <el-option label="包装维度" value="3"> </el-option>
                 <!-- <el-option

+ 41 - 17
src/views/warehouseManagement/stockManagement/add.vue

@@ -635,7 +635,7 @@
               {{ row.weightUnit }}
             </template>
           </el-table-column>
-          <!-- <el-table-column label="机型" prop="modelKey">
+          <el-table-column label="机型" prop="modelKey" width="300">
             <template slot-scope="{ row }">
               <DictSelection
                 dictName="物品机型"
@@ -650,7 +650,7 @@
               </DictSelection>
             </template>
           </el-table-column>
-         <el-table-column label="颜色" prop="colorKey">
+          <el-table-column label="颜色" prop="colorKey" width="300">
             <template slot-scope="{ row }">
               <DictSelection
                 dictName="物品颜色"
@@ -664,7 +664,7 @@
               >
               </DictSelection>
             </template>
-          </el-table-column> -->
+          </el-table-column>
 
           <el-table-column label="质检结果" prop="result" width="120">
             <template slot-scope="{ row }">
@@ -985,6 +985,7 @@
   import { isBoolean } from 'mathjs';
   import { parameterGetByCode } from '@/api/sys/index.js';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { color } from 'echarts';
 
   export default {
     mixins: [tabMixins],
@@ -1234,20 +1235,22 @@
             width: 300,
             align: 'center'
           },
-          // {
-          //   width: 200,
-          //   prop: 'modelKey',
-          //   label: '机型',
-          //   slot: 'modelKey',
-          //   align: 'center'
-          // },
-          // {
-          //   width: 200,
-          //   prop: 'colorKey',
-          //   label: '颜色',
-          //   slot: 'colorKey',
-          //   align: 'center'
-          // },
+          {
+            minWidth: 300,
+            prop: 'modelKey',
+            showOverflowTooltip: true,
+            label: '机型',
+            slot: 'modelKey',
+            align: 'center'
+          },
+          {
+            minWidth: 300,
+            prop: 'colorKey',
+            showOverflowTooltip: true,
+            label: '颜色',
+            slot: 'colorKey',
+            align: 'center'
+          },
           {
             label: '采购原因',
             prop: 'purpose',
@@ -2220,6 +2223,12 @@
         }
         // 处理包装数据
         this.packingList = this.packingList.map((packingItem) => {
+          if (packingItem.modelKey) {
+            packingItem.modelKey = packingItem.modelKey.toString();
+          }
+          if (packingItem.colorKey) {
+            packingItem.colorKey = packingItem.colorKey.toString();
+          }
           return {
             ...packingItem,
             materialDetailList: this.materialList.filter(
@@ -2231,6 +2240,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: this.packingList.filter(
@@ -2645,6 +2660,9 @@
             categoryCode: item.code, // 物品编码
             categoryModel: item.modelType, // 物品型号
             specification: item.specification, // 规格
+            modelKey: item.modelKey?item.modelKey.split(','):'', // 机型
+            colorKey: item.colorKey?item.colorKey.split(','):'', // 颜色
+            color: item.color,
             brandNum: item.brandNum, // 牌号
             batchNo: batchNo, // 批次号
             supplierListOptions: supplierList[item.id], // 供应商列表
@@ -3033,6 +3051,10 @@
               packingUnit: packingUnit, //包装单位
               measureQuantity: measureQuantity, // 计量数量
               measureUnit: measureUnit, // 计量单位
+              modelKey: row.modelKey, // 机型
+              colorKey: row.colorKey, //颜色
+              measureType: row.measureType,
+              measureUnit: measureUnit, // 计量单位
               weight: 0, // 重量
               packingSpecificationOption: row.packingSpecificationOption, // 包装规格
               weightUnit: row.weightUnit, // 重量单位
@@ -3151,6 +3173,8 @@
               supplierCode: row.supplierCode, // 供应商编码
               brandNum: row.brandNum, // 牌号
               parentIndex: row.index, // 产品索引
+              modelKey: row.modelKey, // 机型
+              colorKey: row.colorKey, //颜色
               batchNo: row.batchNo, // 批次号
               packageNo: packingCodeList[index]?.onlyCode, // 包装编码
               packingQuantity: packingQuantity, // 包装数量

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

@@ -292,6 +292,10 @@
                 }}
               </template>
             </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="warehouseName"
@@ -506,6 +510,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"