yusheng vor 11 Monaten
Ursprung
Commit
e7a016355b

+ 5 - 94
src/views/purchasingManage/purchasePlanManage/components/addDialog.vue

@@ -166,6 +166,7 @@
         <inventoryTable
           :needInquiry="form.needInquiry"
           ref="inventoryTable"
+          :sourceType="form.sourceType"
         ></inventoryTable>
       </el-tab-pane>
       <el-tab-pane
@@ -327,96 +328,7 @@
             value: 0
           }
         ],
-        columns: [
-          {
-            width: 45,
-            type: 'index',
-            columnKey: 'index',
-            align: 'center',
-            fixed: 'left'
-          },
-          {
-            width: 150,
-            prop: 'productCategoryName',
-            label: '分类',
-            slot: 'productCategoryName'
-          },
-          {
-            width: 140,
-            prop: 'productCode',
-            label: '编码',
-            slot: 'productCode'
-          },
-          {
-            width: 240,
-            prop: 'productName',
-            label: '名称',
-            slot: 'productName'
-          },
-          {
-            width: 150,
-            prop: 'productBrand',
-            label: '牌号',
-            slot: 'productBrand'
-          },
-
-          {
-            width: 80,
-            prop: 'totalCount',
-            label: '数量',
-            slot: 'totalCount'
-          },
-          {
-            width: 100,
-            prop: 'measuringUnit',
-            label: '单位',
-            slot: 'measuringUnit'
-          },
-          {
-            width: 130,
-            prop: 'modelType',
-            label: '型号',
-            slot: 'modelType'
-          },
-
-          {
-            width: 120,
-            prop: 'specification',
-            label: '规格',
-            slot: 'specification'
-          },
-          {
-            width: 130,
-            prop: 'brand',
-            label: '品牌',
-            slot: 'brand'
-          },
-          {
-            width: 130,
-            prop: 'supplierName',
-            label: '供应商',
-            slot: 'supplierName',
-            headerSlot: 'headerSupplierName'
-          },
-          {
-            width: 170,
-            prop: 'expectReceiveDate',
-            label: '到货日期',
-            slot: 'expectReceiveDate'
-          },
-          {
-            width: 140,
-            prop: 'files',
-            label: '附件',
-            slot: 'files'
-          },
-          {
-            width: 220,
-            prop: 'remark',
-            label: '备注',
-            slot: 'remark'
-          }
-        ],
+ 
         rules: {
           responsibleName: [
             { required: true, message: '请选择责任人', trigger: 'change' }
@@ -691,10 +603,9 @@
         }
       },
       async submit(res) {
-        console.log(res);
         let data = await getplanDetail(this.form.id || res);
         let storemanIds = '';
-        if (['3', '4', '5'].includes(row.sourceType)) {
+        if (['3', '4', '5'].includes(data.sourceType)) {
           let ids = data.detailList.map((item) => item.warehouseId);
           let warehouseList = await getWarehouseListByIds(ids || []);
           storemanIds = warehouseList.map((item) => item.ownerId);
@@ -711,14 +622,14 @@
         this.$nextTick(() => {
           let params = {
             businessId: data.id,
-            businessKey: ['3', '4', '5'].includes(row.sourceType)
+            businessKey: ['3', '4', '5'].includes(data.sourceType)
               ? 'outsource_purchasePlan_approve'
               : 'purchase_plan_approve',
             formCreateUserId: data.createUserId,
             variables: {
               businessCode: data.planCode,
               businessName: data.planName,
-              storemanIds,
+              storemanIds:storemanIds.toString(),
               businessType: data.sourceTypeName
             }
             // callBackMethodType : '1',

+ 6 - 0
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -380,6 +380,12 @@
             slot: 'totalCount',
             align: 'center'
           },
+          {
+            width: 200,
+            prop: 'warehouseName',
+            label: '入库仓库',
+            align: 'center'
+          },
           {
             width: 150,
             prop: 'reqTotalCount',

+ 7 - 4
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -344,8 +344,8 @@
           column.label
         }}</span>
       </template>
-      <template v-slot:headerWarehouseId="{ column }">
-        <span :class="{ 'is-required': isNeedInquiry === 1 }">{{
+      <template v-slot:headerWarehouseId="{ column }" >
+        <span :class="{ 'is-required': ['3','4','5'].includes(sourceType) }">{{
           column.label
         }}</span>
       </template>
@@ -353,7 +353,7 @@
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.warehouseId'"
-          :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]"
+          :rules="[{ required:['3','4','5'].includes(sourceType)? true:false, message: '请选择仓库', trigger: 'blur' }]"
         >
           <el-select
             v-model="scope.row.warehouseId"
@@ -434,7 +434,10 @@
       detailType: {
         type: Number,
         default: 0
-      }
+      },
+      sourceType: {
+        default: ''
+      },
     },
     components: {
       taskinstanceDialog,