Explorar el Código

修改(出库物料信息添加修改、出库搜索栏添加、出库栏目宽度修改)

huang_an hace 2 años
padre
commit
ee014c148a

+ 30 - 30
src/views/warehouseManagement/common.js

@@ -2,33 +2,33 @@ export const tableHeader = (selectEquiType) => {
   switch (+selectEquiType) {
     case 3:
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     case 8:
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     case 4:
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     case 9:
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     case 5: //'周转车'
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' },
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' },
         {
           label: '材质',
           prop: 'texture',
@@ -52,9 +52,9 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 2: //'舟皿'
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' },
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' },
         {
           label: '长宽高',
           prop: '',
@@ -69,15 +69,15 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 1: //'设备'
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     case 6: //'模具'
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' },
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' },
         {
           label: '收缩系数',
           prop: '',
@@ -90,15 +90,15 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 7: //'备品备件'
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
     default:
       return [
-        { label: '型号', prop: 'modelType' },
-        { label: '规格', prop: 'specification' },
-        { label: '牌号', prop: 'brandNum' }
+        { label: '型号', prop: 'modelType', width: '200' },
+        { label: '规格', prop: 'specification', width: '50' },
+        { label: '牌号', prop: 'brandNum', width: '50' }
       ];
   }
 

+ 33 - 14
src/views/warehouseManagement/components/AssetsDialog.vue

@@ -80,6 +80,15 @@
             ></el-input>
           </el-form-item>
         </el-col>
+        <el-col :span="6">
+          <el-form-item label="批次号">
+            <el-input
+              type="text"
+              placeholder="搜索批次号"
+              v-model="searchForm.batchNo"
+            ></el-input>
+          </el-form-item>
+        </el-col>
         <el-col style="text-align: right">
           <el-button type="primary" @click="doSearch">搜索</el-button>
           <el-button icon="el-icon-refresh-left" @click="reset">重置</el-button>
@@ -108,6 +117,14 @@
           :header-cell-style="{ background: '#F0F3F3', border: 'none' }"
           @selection-change="handleSelectionChange"
         >
+          <el-table-column
+            type="selection"
+            :reserve-selection="true"
+            width="55"
+            align="center"
+            :selectable="selectable"
+          >
+          </el-table-column>
           <el-table-column
             prop="assetCode"
             label="编码"
@@ -120,7 +137,7 @@
             label="名称"
           ></el-table-column>
           <el-table-column
-            width="200"
+            :width="item.width"
             :prop="item.prop"
             :label="item.label"
             v-for="(item, index) in tableHeader"
@@ -137,7 +154,7 @@
             v-if="dimension == 2 || dimension == 3 || dimension == 4"
             prop="batchNo"
             label="批次号"
-            min-width="120"
+            min-width="80"
           ></el-table-column>
           <el-table-column
             v-if="dimension == 3 || dimension == 4"
@@ -155,13 +172,13 @@
             v-if="dimension == 4"
             prop="meterielCode"
             label="物料代号"
-            min-width="120"
+            min-width="100"
           ></el-table-column>
           <el-table-column
             v-if="dimension == 4"
             prop="clientCode"
             label="客户代号"
-            min-width="120"
+            min-width="100"
           ></el-table-column>
           <el-table-column
             v-if="dimension == 4"
@@ -226,18 +243,10 @@
           <el-table-column
             prop="pathName"
             label="仓库"
-            min-width="120"
+            min-width="200"
           ></el-table-column>
 
           <!-- <el-table-column prop="pathName" label="仓库"> </el-table-column> -->
-          <el-table-column
-            type="selection"
-            :reserve-selection="true"
-            width="55"
-            align="center"
-            :selectable="selectable"
-          >
-          </el-table-column>
         </el-table>
         <div style="text-align: right; padding: 10px">
           <el-pagination
@@ -301,7 +310,8 @@
         },
         searchForm: {
           code: '',
-          name: ''
+          name: '',
+          batchNo: ''
         },
         selectionList: [],
         materialType: '',
@@ -422,9 +432,17 @@
             return item.recordId;
           });
         }
+        let categoryIds = arr.map((item) => {
+          return item.id;
+        });
+        let batchNo = arr.map((item) => {
+          return item.batchNo;
+        });
         const parmas = {
           categoryLevelId: this.materialType,
           type: this.dimension,
+          categoryIds: categoryIds,
+          batchNo: batchNo,
           ids: ids
         };
         const data = await getDetailById(parmas);
@@ -469,6 +487,7 @@
       reset() {
         this.searchForm.code = '';
         this.searchForm.name = '';
+        this.searchForm.batchNo = '';
         this.doSearch();
       },
       doSearch() {

+ 3 - 2
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -1432,12 +1432,13 @@
         // /
         // const res111 = await warehouseDefinition.list();
         // this.warehouseList = res111.list;
-        // console.log('res=====', res);
+        console.log('res=====', res);
         const info = JSON.parse(localStorage.getItem('info'));
+        console.log('info=====', info);
         let obj = res.find(
           (item) => item.id === info.deptId[info.deptId.length - 1]
         );
-        // console.log('obj=====', obj);
+        console.log('obj=====', obj);
         this.formData.extInfo.deptName = obj.name;
         this.formData.extInfo.deptCode = obj.id;
         this.formData.extInfo.createUserName = info.name;

+ 9 - 1
src/views/warehouseManagement/stockLedger/components/item-list.vue

@@ -65,6 +65,13 @@
           <span slot="reference"> {{ row.batchNo }}</span>
         </el-popover>
       </template>
+      <!-- 最小包装单元 -->
+      <template v-slot:minPackingCount="{ row }">
+        <span v-if="row.minPackingCount">
+          {{ row.minPackingCount }}
+          {{ row.measuringUnit }}/{{ row.minUnit }}
+        </span>
+      </template>
       <!-- 库存保质期 -->
       <template v-slot:expirationDate="{ row }">
         <span v-if="row.expirationDate">
@@ -203,7 +210,8 @@
             showOverflowTooltip: true
           },
           {
-            prop: '',
+            prop: 'minPackingCount',
+            slot: 'minPackingCount',
             label: '最小包装单元',
             showOverflowTooltip: true,
             width: 120

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

@@ -112,6 +112,15 @@
           ></el-input>
         </el-form-item>
       </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="批次号:" prop="assetName">
+          <el-input
+            clearable
+            v-model="params.batchNo"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-col>
       <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
         <div class="ele-form-actions">
           <el-button

+ 23 - 2
src/views/warehouseManagement/stockManagement/add.vue

@@ -893,19 +893,23 @@
             <el-table-column label="质检结果" prop="result" width="120">
               <template slot-scope="{ row }">
                 <DictSelection
+                  v-if="!row.isPack"
+                  @updateVal="changeWrapStatus($event, row)"
                   dictName="质检结果"
                   clearable
                   v-model="row.result"
                 />
+                <span v-else>{{ qualityResults[row.result] }}</span>
               </template>
             </el-table-column>
             <el-table-column label="质检状态" prop="status" width="120">
               <template slot-scope="{ row }">
-                <DictSelection
+                <!-- <DictSelection
                   dictName="质检状态"
                   clearable
                   v-model="row.status"
-                />
+                ></DictSelection> -->
+                <span>{{ qualityStatus[row.status] }}</span>
               </template>
             </el-table-column>
 
@@ -1143,6 +1147,9 @@
     },
     data() {
       return {
+        isSplit: false, // 是否拆分到物料明细
+        qualityStatus: ['未检', '已检'], // 质检状态 0未检 1已检
+        qualityResults: ['合格', '不合格', '让步接收'], // 质检结果 0合格 1不合格 2让步接收
         isWeight: true,
         resultArray: [],
         isDetail: false,
@@ -1235,6 +1242,19 @@
       this.initData();
     },
     methods: {
+      // 选择质检结果改变质检状态
+      changeWrapStatus(resultValue, row) {
+        switch (resultValue) {
+          case '':
+            // 清空质检状态
+            row.status = '0';
+            break;
+          default:
+            // 默认已检质检状态
+            row.status = '1';
+            break;
+        }
+      },
       weightInput(value, row) {
         const newValue = value.replace(/[^\d.]/g, ''); // 保留数字和小数点
         const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
@@ -1251,6 +1271,7 @@
         }
       },
       handleIsDetail(event) {
+        this.isSplit = event;
         if (event) {
           const list = this.materialCodeReqList;
           let resultArray = [];