yusheng 11 kuukautta sitten
vanhempi
commit
5ccb56cc65

+ 4 - 1
src/BIZComponents/seekPage.vue

@@ -189,7 +189,7 @@ export default {
 };
 </script>
 
-<style scoped>
+<style scoped lang="scss" >
 .index_box {
   display: flex;
 }
@@ -197,4 +197,7 @@ export default {
 .padding {
   padding: 20px;
 }
+:deep(.el-form-item){
+ margin-bottom: 5px !important;
+}
 </style>

+ 21 - 4
src/views/purchasingManage/purchasePlanManage/components/detailDialog.vue

@@ -229,6 +229,11 @@
       :purchasePlanId="form.id"
       :sonPurchasePlanIds="sonPurchasePlanList.map((item) => item.id)"
     ></inquiryManageIndex>
+    <!--入库详情-->
+    <innerBoundDetails
+      v-if="activeComp === 'store' && form.status == 2"
+      ref="innerBoundDetailsRef"
+    ></innerBoundDetails>
   </ele-modal>
 </template>
 
@@ -245,6 +250,8 @@
   import { orderSourceType } from '@/enum/dict';
   import tabMixins from '@/mixins/tableColumnsMixin';
   import inquiryManageIndex from '@/views/purchasingManage/inquiryManage/index.vue';
+  import innerBoundDetails from '@/BIZComponents/innerdetails.vue';
+
   export default {
     mixins: [dictMixins, tabMixins],
     components: {
@@ -253,7 +260,7 @@
       bpmDetail,
       timeDialog,
       outsourcing,
-      inquiryManageIndex
+      inquiryManageIndex,innerBoundDetails
     },
     props: {
       isModal: {
@@ -269,7 +276,8 @@
         tabOptions: [
           { key: 'main', name: '计划详情' },
           { key: 'bpm', name: '流程详情' },
-          { key: 'inquiryManage', name: '核价清单' }
+          { key: 'inquiryManage', name: '核价清单' },
+          { key: 'store', name: '入库详情' },
         ],
         activeName: '1',
         fullscreen: false,
@@ -511,13 +519,22 @@
       //   this.loading = true;
       //   const response = await getExport(this.detailId);
       // },
+      handleTag(val) {
+        this.activeComp = val;
+        if (val == 'store') {
+          this.$nextTick(() => {
+            this.$refs.innerBoundDetailsRef._getInfo(this.form.code);
+          });
+        }
+      },
       async open(row) {
         this.activeName = '1';
-        this.sonPurchasePlanList=row.sonPurchasePlanList||[]
+        this.activeComp = 'main';
+        
+        this.sonPurchasePlanList = row.sonPurchasePlanList || [];
         this.visible = true;
         this.getPlanData(row.planId || row.id);
         this.detailId = row.id;
-        
       },
 
       cancel() {

+ 79 - 45
src/views/purchasingManage/purchasePlanManage/components/inventoryTable.vue

@@ -14,15 +14,6 @@
       <template v-slot:toolbar>
         <div class="headbox">
           <div>
-            <!--            <el-button-->
-            <!--              size="small"-->
-            <!--              type="primary"-->
-            <!--              icon="el-icon-plus"-->
-            <!--              class="ele-btn-icon"-->
-            <!--              @click="handlAdd"-->
-            <!--            >-->
-            <!--              新增-->
-            <!--            </el-button>-->
             <el-button
               size="small"
               type="primary"
@@ -353,7 +344,32 @@
           column.label
         }}</span>
       </template>
-
+      <template v-slot:headerWarehouseId="{ column }">
+        <span :class="{ 'is-required': isNeedInquiry === 1 }">{{
+          column.label
+        }}</span>
+      </template>
+      <template v-slot:warehouseId="scope">
+        <el-form-item
+          style="margin-bottom: 20px"
+          :prop="'datasource.' + scope.$index + '.warehouseId'"
+          :rules="[{ required: true, message: '请选择仓库', trigger: 'blur' }]"
+        >
+          <el-select
+            v-model="scope.row.warehouseId"
+            placeholder="请选择"
+            @change="warehouseChange(scope.$index, scope.row)"
+          >
+            <el-option
+              v-for="item in warehouseList"
+              :key="item.id"
+              :label="item.name"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </template>
       <!-- 操作列 -->
       <template v-slot:action="scope">
         <el-popconfirm
@@ -406,6 +422,7 @@
   import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
   import { lbjtList } from '@/enum/dict.js';
   import tabMixins from '@/mixins/tableColumnsMixin';
+  import { getWarehouseList } from '@/api/saleManage/saleorder';
 
   export default {
     mixins: [dictMixins, tabMixins],
@@ -438,33 +455,9 @@
           // })
         }
         return this.needInquiry;
-      }
-    },
-    data() {
-      const defaultForm = {
-        key: null,
-        endTime: '',
-        isFirst: 0,
-        name: '',
-        supplierName: '',
-        weightUnit: ''
-      };
-      return {
-        cacheKeyUrl: 'eos-purchasingManage-purchasePlanManage-inventoryTable',
-        curIndex: null,
-        numberReg,
-        defaultForm,
-        arrivalWayList: [
-          { label: '一次性到货', value: 1 },
-          { label: '分批到货', value: 2 }
-        ],
-        form: {
-          datasource: []
-        },
-        taskinstanceDialogFlag: false,
-        rules: {},
-        dictList: {},
-        columns: [
+      },
+      columns() {
+        return [
           {
             width: 45,
             type: 'index',
@@ -529,6 +522,14 @@
             headerSlot: 'headerTotalCount',
             align: 'center'
           },
+          {
+            width: 200,
+            prop: 'warehouseId',
+            label: '入库仓库',
+            slot: 'warehouseId',
+            headerSlot: 'headerWarehouseId',
+            align: 'center'
+          },
           {
             width: 80,
             prop: 'availableCountBase',
@@ -641,13 +642,7 @@
               }
             }
           },
-          // {
-          //   width: 120,
-          //   prop: 'approvalNumber',
-          //   align: 'center',
-          //   label: '批准文号',
-          //   showOverflowTooltip: true
-          // },
+
           {
             width: 120,
             prop: 'packingSpecification',
@@ -681,11 +676,41 @@
             fixed: 'right',
             showOverflowTooltip: true
           }
-        ]
+        ];
+      }
+    },
+    data() {
+      const defaultForm = {
+        key: null,
+        endTime: '',
+        isFirst: 0,
+        name: '',
+        supplierName: '',
+        weightUnit: ''
+      };
+      return {
+        cacheKeyUrl: 'eos-purchasingManage-purchasePlanManage-inventoryTable',
+        curIndex: null,
+        numberReg,
+        defaultForm,
+        arrivalWayList: [
+          { label: '一次性到货', value: 1 },
+          { label: '分批到货', value: 2 }
+        ],
+        form: {
+          datasource: []
+        },
+        taskinstanceDialogFlag: false,
+        rules: {},
+        dictList: {},
+        warehouseList:[]
       };
     },
     created() {
       this.requestDict('生产类型');
+      getWarehouseList().then((res) => {
+        this.warehouseList = res;
+      });
     },
     methods: {
       // 返回列表数据
@@ -799,6 +824,15 @@
           params.supplierName
         );
       },
+      async warehouseChange(index, row) {
+        const data = this.warehouseList.find(
+          (item) => item.id == row.warehouseId
+        );
+
+        this.$set(this.form.datasource[index], 'warehouseName', data.name);
+        this.$set(this.form.datasource[index], 'warehouseCode', data.code);
+        this.$set(this.form.datasource[index], 'warehouseId', data.id);
+      },
       //选择产品
       handParent(row, index) {
         // let item = {

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

@@ -45,7 +45,7 @@ export default {
         {
           label: '采购需求单名称:',
           value: 'requirementName',
-          labelWidth:120,
+          labelWidth:150,
           width: 340,
           type: 'input',
           placeholder: '请输入',

+ 18 - 9
src/views/purchasingManage/purchasePlanManage/index.vue

@@ -330,7 +330,8 @@
   import {
     getTableList,
     deleteInformation,
-    isPlanPerson
+    isPlanPerson,
+    getplanDetail
   } from '@/api/purchasingManage/purchasePlanManage';
   import splitDialog from './components/splitDialog.vue';
   import { purchasePlanProgressStatusEnum } from '@/enum/dict';
@@ -339,6 +340,8 @@
   import { parameterGetByCode } from '@/api/main/index.js';
   import { orderSourceType } from '@/enum/dict';
   import exportButton from '@/components/upload/exportButton.vue';
+  import { getWarehouseListByIds } from '@/api/purchasingManage/returnGoods';
+
   export default {
     mixins: [dictMixins],
     components: {
@@ -586,22 +589,28 @@
       },
       async submitPlan(row) {
         this.processSubmitDialogFlag = true;
+
+        const data = await getplanDetail(row.id);
+        let storemanIds = '';
+        if (['3', '4', '5'].includes(row.sourceType)) {
+          let ids = data.detailList.map((item) => item.warehouseId);
+          let warehouseList = await getWarehouseListByIds(ids || []);
+          storemanIds = warehouseList.map((item) => item.ownerId);
+        }
+
         this.$nextTick(() => {
           let params = {
             businessId: row.id,
-            businessKey: 'purchase_plan_approve',
+            businessKey: ['3', '4', '5'].includes(row.sourceType)
+              ? 'outsource_purchasePlan_approve'
+              : 'purchase_plan_approve',
             formCreateUserId: row.createUserId,
             variables: {
               businessCode: row.planCode,
               businessName: row.planName,
-              businessType: row.sourceTypeName
+              businessType: row.sourceTypeName,
+              storemanIds: storemanIds.toString()
             }
-            // callBackMethodType : '1',
-            // callBackMethod : 'proTargetPlanApproveApiImpl.updatePlanApprovalStatus',
-            // pcHandle : '/bpm/handleTask/components/project-manage/plan-manage/submit.vue',
-            // pcView : '/bpm/handleTask/components/project-manage/plan-manage/detailDialog.vue',
-            // miniHandle : '',
-            // miniView : '',
           };
 
           this.$refs.processSubmitDialogRef.init(params);