yusheng 10 месяцев назад
Родитель
Сommit
6843ed01a2

+ 2 - 1
src/BIZComponents/inventoryTable.vue

@@ -1720,7 +1720,8 @@
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'singleWeight', item.netWeight);
           this.$set(parasm, 'pricingWay', 1);
-          this.$set(parasm, 'goodsLevel', item.level);
+          console.log(item.goodsLevel,'item.goodsLevel')
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(
             parasm,
             'packageDispositionList',

+ 6 - 1
src/BIZComponents/product-list.vue

@@ -140,7 +140,6 @@
             :initLoad="!isFirstRefreshTable"
             @columns-change="handleColumnChange"
             :rowClickChecked="true"
-
             :cache-key="'product-list-cache-key'"
           >
             <!-- 表头工具栏 -->
@@ -196,6 +195,7 @@
   import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
   import { lbjtList } from '@/enum/dict.js';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { levelList } from '@/enum/dict.js';
 
   export default {
     mixins: [tabMixins],
@@ -610,6 +610,11 @@
           item['packageDispositionList'] = packingSpecification
             .filter((ite) => item.id == ite.categoryId && ite.conversionUnit)
             .sort((a, b) => a.sort - b.sort);
+          if (item.level) {
+            item['goodsLevel'] = levelList.find(
+              (val) => val.label == item.level
+            )?.value;
+          }
         });
 
         this.$emit('changeParent', list, this.currentIndex);

+ 1 - 1
src/views/purchasingManage/purchaseNeedManage/components/inventoryTable.vue

@@ -839,7 +839,7 @@
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.componentAttribute);
           this.$set(parasm, 'approvalNumber', item.extField?.approvalNumber);
-          this.$set(parasm, 'goodsLevel', item.level);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'supplierList', item.supplierList);
           this.$set(parasm, 'supplierCode', item.supplierCode);
           this.$set(parasm, 'supplierId', item.supplierId);

+ 2 - 1
src/views/purchasingManage/purchaseOrder/invoice/components/inventoryTable.vue

@@ -1015,7 +1015,8 @@
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'sendTotalWeight', 0);
           this.$set(parasm, 'increaseTotalWeight', 0);
-          this.$set(parasm, 'goodsLevel', item.level);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
+
           this.$set(
             parasm,
             'categoryRootLevelId',

+ 1 - 0
src/views/purchasingManage/purchaseOrder/outSourceSend/components/inventoryTable.vue

@@ -831,6 +831,7 @@
           this.$set(parasm, 'pricingWay', item.pricingWay || 1);
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
 
           this.$set(
             parasm,

+ 1 - 1
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -1024,7 +1024,7 @@
           this.$set(parasm, 'imgCode', item.imgCode);
           this.$set(parasm, 'produceType', item.componentAttribute);
           this.$set(parasm, 'singleWeight', item.roughWeight);
-          this.$set(parasm, 'goodsLevel', item.level);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
           this.$set(parasm, 'approvalNumber', item.extField.approvalNumber);
           this.$set(parasm, 'supplierList', item.supplierList);
           this.$set(parasm, 'supplierCode', item.supplierCode);

+ 3 - 1
src/views/saleManage/saleOrder/entrustedReceive/components/addOrEditDialog.vue

@@ -151,6 +151,7 @@
   import { getInventoryTotalAPI } from '@/api/wms';
   // import fileMain from '@/components/addDoc/index.vue';
   import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import { getCode } from '@/api/login/index';
 
   export default {
     props: {
@@ -275,8 +276,9 @@
               pricingWay
             } = data;
             if (productList && productList.length > 0) {
-              productList.forEach((v) => {
+              productList.forEach(async(v) => {
                 v.orderTotalCount = v.orderTotalCount || v.totalCount;
+                v.batchNo = await getCode('lot_number_code')
               });
             }
             this.form = Object.assign({}, this.form, {

+ 28 - 15
src/views/saleManage/saleOrder/entrustedReceive/components/inventoryTable.vue

@@ -14,19 +14,21 @@
       <!-- 表头工具栏 -->
       <template v-slot:toolbar>
         <div class="headbox" v-if="!contractId && isShowAdd">
-          <el-button
-            size="small"
-            type="primary"
-            icon="el-icon-plus"
-            class="ele-btn-icon"
-            @click="handlAdd('', -1)"
-          >
-            新增
-          </el-button>
-          <warehouseAll
-            @success="warehouseAllChange"
-            :disabled="!selection.length"
-          ></warehouseAll>
+          <div>
+            <el-button
+              size="small"
+              type="primary"
+              icon="el-icon-plus"
+              class="ele-btn-icon"
+              @click="handlAdd('', -1)"
+            >
+              新增
+            </el-button>
+            <warehouseAll
+              @success="warehouseAllChange"
+              :disabled="!selection.length"
+            ></warehouseAll>
+          </div>
         </div>
       </template>
       <template v-slot:technicalDrawings="{ row, $index }">
@@ -94,6 +96,9 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.batchNo'"
+          :rules="[
+            { required: true, message: '请输入批次号', trigger: 'blur' }
+          ]"
         >
           <el-input v-model="scope.row.batchNo" type="number"></el-input>
         </el-form-item>
@@ -169,6 +174,10 @@
       <template v-slot:headerWarehouseId="{ column }">
         <span class="is-required">{{ column.label }}</span>
       </template>
+      <template v-slot:isRequired="{ column }">
+        <span class="is-required">{{ column.label }}</span>
+      </template>
+
       <!-- 操作列 -->
       <template v-slot:action="scope">
         <el-popconfirm
@@ -204,6 +213,7 @@
   import warehouseAll from '@/BIZComponents/warehouseAll.vue';
 
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { getCode } from '@/api/login/index';
 
   export default {
     mixins: [dictMixins, tabMixins],
@@ -239,6 +249,7 @@
         defaultForm,
         cacheKeyUrl: 'eos-saleManage-entrustedReceive-inventoryTable',
         warehouseList: [],
+        selection: [],
         form: {
           datasource: []
         },
@@ -277,6 +288,7 @@
             label: '批次号',
             slot: 'batchNo',
             align: 'center',
+            headerSlot: 'isRequired',
             showOverflowTooltip: true,
             minWidth: 150
           },
@@ -683,7 +695,7 @@
       },
       //选择产品回调
       changeParent(obj, idx) {
-        obj.forEach((item, index) => {
+        obj.forEach(async (item, index) => {
           let i = idx == -1 ? index : idx;
           let row = JSON.parse(JSON.stringify(this.defaultForm));
           row.key = this.form.datasource.length + 1;
@@ -703,7 +715,8 @@
           this.$set(parasm, 'weightUnit', item.weightUnit);
           this.$set(parasm, 'singleWeight', item.netWeight);
           this.$set(parasm, 'pricingWay', 1);
-          this.$set(parasm, 'goodsLevel', item.level);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
+          this.$set(parasm, 'batchNo', await getCode('lot_number_code'));
 
           this.$set(parasm, 'discountSinglePrice', 0);
           this.$set(parasm, 'singlePrice', 0);

+ 1 - 0
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -1176,6 +1176,7 @@
           this.$set(parasm, 'pricingWay', item.pricingWay || 1);
           this.$set(parasm, 'singlePrice', 0);
           this.$set(parasm, 'discountSinglePrice', 0);
+          this.$set(parasm, 'goodsLevel', item.goodsLevel);
 
           this.$set(parasm, 'receiveTotalWeight', 0);
           this.$set(parasm, 'sendTotalWeight', 0);