huang_an пре 1 година
родитељ
комит
d893c53b6e

+ 3 - 1
src/utils/dict/warehouse.js

@@ -58,7 +58,9 @@ export const outputSceneState = [
   { code: 7, label: '委外出库' },
   { code: 8, label: '受托退货出库' },
   { code: 9, label: '仓库委外出库' },
-  { code: 10, label: '采购退货出库' }
+  { code: 10, label: '采购退货出库' },
+  { code: 11, label: '自选领用出库' },
+  { code: 12, label: '配料出库' }
 ];
 // 紧急状态
 export const emergencyState = [

+ 21 - 8
src/views/warehouseManagement/warehouseDefinition/add.vue

@@ -563,23 +563,29 @@
               <!-- <el-table-column type="selection" width="55"> </el-table-column> -->
               <el-table-column label="货架编号" prop="goodsShelvesCode">
                 <template slot-scope="{ row }">
-                  {{ row.reservoirAreaCode + '-' + row.goodsShelvesCode }}
+                  {{ row.warehouseAreaCode + '-' + row.warehouseAreaGoodsCode }}
                 </template>
               </el-table-column>
-              <el-table-column label="货位编号" prop="code" min-width="120">
+              <el-table-column
+                label="货位编号"
+                prop="goodsAllocationCode"
+                min-width="120"
+              >
                 <template slot-scope="{ row, $index }">
                   <el-form-item
-                    :prop="'allocationReqList.' + $index + '.code'"
-                    :rules="areaLocationRules.code"
+                    :prop="
+                      'allocationReqList.' + $index + '.goodsAllocationCode'
+                    "
+                    :rules="areaLocationRules.goodsAllocationCode"
                     v-if="row.isEdit"
                   >
                     <el-input
                       placeholder="请输入"
                       clearable
-                      v-model="row.code"
+                      v-model="row.goodsAllocationCode"
                     ></el-input>
                   </el-form-item>
-                  <span v-else>{{ row.code }}</span>
+                  <span v-else>{{ row.goodsAllocationCode }}</span>
                 </template></el-table-column
               >
               <el-table-column label="货位长(cm)" min-width="120">
@@ -984,6 +990,7 @@
         let hjArr = [];
         for (const key in areaGoodsshelvesList) {
           hjArr.push({
+            ...areaGoodsshelvesList[key],
             reservoirAreaCode: areaGoodsshelvesList[key].warehouseAreaCode,
             code: areaGoodsshelvesList[key].goodsshelvesCode,
             extInfo: [
@@ -1002,6 +1009,7 @@
         let hwArr = [];
         for (const key in allocationReqList) {
           hwArr.push({
+            ...allocationReqList[key],
             reservoirAreaCode: allocationReqList[key].warehouseAreaCode,
             goodsShelvesCode: allocationReqList[key].goodsAllocationCode,
             code: allocationReqList[key].warehouseAreaCode,
@@ -1244,6 +1252,7 @@
         }
       },
       generateAllocation(num, obj) {
+        console.log(obj);
         const pre =
           this.areaForm.allocationReqList[
             this.areaForm.allocationReqList.length - 1
@@ -1251,6 +1260,9 @@
 
         for (var i = 0; i < num; i++) {
           this.areaForm.allocationReqList.push({
+            warehouseAreaCode: obj.reservoirAreaCode,
+            warehouseAreaGoodsCode: obj.code,
+            goodsAllocationCode: obj.code + '-' + (i + 1),
             // allocationBarcode: '',
             code: obj.code + '-' + (i + 1),
 
@@ -1668,6 +1680,7 @@
                     //   this.handleNewSource(newObj)
                     // );
                     this.loading = true;
+                    console.log(this.handleNewSource(newObj));
                     try {
                       let res = await warehouseDefinition.warehouseareaSave(
                         this.handleNewSource(newObj)
@@ -1745,14 +1758,14 @@
         let allocationListArr = this.objExit(allocationList).map((item) => {
           return {
             warehouseAreaCode: item.reservoirAreaCode,
-            goodsAllocationCode: item.code,
+            goodsAllocationCode: item.goodsAllocationCode,
             goodsAllocationLength: item.goodsAllocationLength,
             goodsAllocationWide: item.goodsAllocationWide,
             goodsAllocationHigh: item.goodsAllocationHigh,
             weightLimit: item.goodsAllocationHigh,
             inUseAllocationNumber: item.weightLimit,
             volumeUnit: item.volumeUnit,
-            warehouseAreaGoodsCode: item.goodsShelvesCode
+            warehouseAreaGoodsCode: item.warehouseAreaGoodsCode
           };
         });
         let params = {