Bläddra i källkod

提交质检计划页面

PC-202503171525\Administrator 1 år sedan
förälder
incheckning
1f5b017886

+ 10 - 1
src/api/inspectionPlan/index.js

@@ -36,7 +36,7 @@ export async function planIssued(data) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
-// 采购收货单 
+// 采购收货单
 
 
 export async function purchaseorderreceive (params) {
 export async function purchaseorderreceive (params) {
   const res = await request.get(`/eom/purchaseorderreceive/page`, { params });
   const res = await request.get(`/eom/purchaseorderreceive/page`, { params });
@@ -65,3 +65,12 @@ export async function removeItem(data) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+// 采购收货单 详情
+
+export async function getPurchaseWarehouseGoods (id) {
+  const res = await request.get(`/wms/outInDetailRecordTwo/getPurchaseWarehouseGoods/`+id, {  });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 176 - 4
src/views/inspectionPlan/components/edit.vue

@@ -44,7 +44,7 @@
           </el-form-item>
           </el-form-item>
         </el-col>
         </el-col>
         <el-col :span="8">
         <el-col :span="8">
-          <el-form-item label="取样类型:" prop="qualityMode">
+          <el-form-item label="检验方式:" prop="qualityMode">
             <DictSelection
             <DictSelection
               dictName="取样类型"
               dictName="取样类型"
               v-model="form.qualityMode"
               v-model="form.qualityMode"
@@ -240,6 +240,151 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
       </el-table>
       </el-table>
+
+      <el-table
+        ref="showPackingListTable"
+        :data="form.packingList"
+        tooltip-effect="dark"
+        :max-height="300"
+        border
+        :row-class-name="tableRowClassName"
+        :header-cell-style="rowClass"
+      >
+        <el-table-column label="序号" type="index" width="50">
+        </el-table-column>
+        <el-table-column
+          label="编码"
+          prop="categoryCode"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="名称"
+          prop="categoryName"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="批次号"
+          prop="batchNo"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="发货条码"
+          prop="barcodes"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="包装编码"
+          prop="packageNo"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="包装数量"
+          prop="packingQuantity"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="包装单位"
+          prop="packingUnit"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="计量数量"
+          prop="measureQuantity"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="计量单位"
+          prop="measureUnit"
+          :show-overflow-tooltip="true"
+        ></el-table-column>
+        <el-table-column
+          label="物料代号"
+          prop="materielDesignation"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="客户代号"
+          prop="clientCode"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="刻码"
+          prop="engrave"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="重量"
+          prop="weight"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="重量单位"
+          prop="weightUnit"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="质检结果"
+          prop="result"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="{ row }">
+            <span>{{ qualityResults[row.result] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="质检状态"
+          prop="status"
+          :show-overflow-tooltip="true"
+        >
+          <template slot-scope="{ row }">
+            <span>{{ qualityStatus[row.status] }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+          label="仓库"
+          prop="warehouseName"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="货区"
+          prop="areaName"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="货架"
+          prop="goodsShelfName"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="货位"
+          prop="goodsAllocationName"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="生产日期"
+          prop="productionDate"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+        <el-table-column
+          label="采购日期"
+          prop="purchaseDate"
+          :show-overflow-tooltip="true"
+        >
+        </el-table-column>
+      </el-table>
+
+
+
       <div class="add-product" @click="addProduct" v-if="type != 'detail'">
       <div class="add-product" @click="addProduct" v-if="type != 'detail'">
         <i class="el-icon-circle-plus-outline"></i>
         <i class="el-icon-circle-plus-outline"></i>
       </div>
       </div>
@@ -304,6 +449,14 @@
     data() {
     data() {
       const defaultForm = function () {
       const defaultForm = function () {
         return {
         return {
+          qualityStatus: {
+            0: '未质检',
+            1: '已质检'
+          }, // 质检状态 0未检 1已检
+          qualityResults: {
+            1: '合格',
+            2: '不合格'
+          }, // 质检结果 1合格 2不合格
           id: '',
           id: '',
           code: '',
           code: '',
           planSourceId: '',
           planSourceId: '',
@@ -357,7 +510,7 @@
       'form.type'(val) {
       'form.type'(val) {
         this.sourceList =
         this.sourceList =
           val == 1
           val == 1
-            ? [{ label: '采购收货单', value: '1' }]
+            ? [{ label: '采购收货单', value: '1' }]
             : val == 2
             : val == 2
             ? [
             ? [
                 { label: '生产计划', value: '2' },
                 { label: '生产计划', value: '2' },
@@ -466,7 +619,7 @@
             });
             });
         });
         });
       },
       },
-      choose(data) {
+      choose(data,warehouseData) {
         if (Array.isArray(data)) {
         if (Array.isArray(data)) {
           this.form.productList = [];
           this.form.productList = [];
           data.forEach((item) => {
           data.forEach((item) => {
@@ -480,6 +633,9 @@
           });
           });
           return;
           return;
         }
         }
+        if (Array.isArray(warehouseData)){
+          this.form.packingList = warehouseData;
+        }
         this.form.productList = data.productList;
         this.form.productList = data.productList;
         this.form.planSourceId = data.id;
         this.form.planSourceId = data.id;
         this.form.planSourceCode = data.code;
         this.form.planSourceCode = data.code;
@@ -532,7 +688,23 @@
         routeList(params).then((res) => {
         routeList(params).then((res) => {
           this.routeL = res.list || [];
           this.routeL = res.list || [];
         });
         });
-      }
+      },
+      tableRowClassName({ row, rowIndex }) {
+        if (row.result == 2) {
+          return 'warning-row';
+        } else {
+          return '';
+        }
+      },
+      rowClass({ row, column, rowIndex, columnIndex }) {
+        if (rowIndex === 1) {
+          return {
+            display: 'none',
+            background: '#EEEEEE'
+          };
+        }
+        return { background: '#0000' };
+      },
     }
     }
   };
   };
 </script>
 </script>

+ 8 - 1
src/views/inspectionPlan/components/warehousing.vue

@@ -35,6 +35,7 @@
 
 
 <script>
 <script>
 import {
 import {
+  getPurchaseWarehouseGoods,
   purchaseorderreceive,
   purchaseorderreceive,
   purchaseorderreceiveGetById
   purchaseorderreceiveGetById
 } from '@/api/inspectionPlan/index.js';
 } from '@/api/inspectionPlan/index.js';
@@ -148,7 +149,13 @@ export default {
 
 
         return item;
         return item;
       });
       });
-      this.$emit('choose', data);
+      // 根据采购收货单获取物料明细
+      let warehouseData = await getPurchaseWarehouseGoods(data.receiveNo);
+      // 根据产品编号获取方案
+      // let templateList = await getQualityTemplateList({
+      //   productNumber: data.productList[0].productNumber
+      // });
+      this.$emit('choose', data,warehouseData);
       this.handleClose();
       this.handleClose();
     }
     }
   }
   }

+ 1 - 2
src/views/inspectionPlan/index.vue

@@ -114,7 +114,7 @@ export default {
 
 
         },
         },
         {
         {
-          label: '取样类型',
+          label: '检验方式',
           prop: 'qualityMode',
           prop: 'qualityMode',
           slot: 'qualityMode',
           slot: 'qualityMode',
           width: 120
           width: 120
@@ -237,4 +237,3 @@ export default {
   }
   }
 };
 };
 </script>
 </script>
-