瀏覽代碼

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!511
黄梓星 1 年之前
父節點
當前提交
7f637cc98b

+ 24 - 1
src/views/purchase/DemandSummary/add.vue

@@ -141,7 +141,13 @@
         <!-- <el-table-column show-overflow-tooltip label="采购组织" align="center" prop="orgName" width="150"/> -->
         <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="100"/>
         <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" prop="businessDeptName"/> -->
-        <el-table-column show-overflow-tooltip label="需求部门" align="center" prop="demandDeptName" width="150"/>
+        <el-table-column show-overflow-tooltip label="需求部门" align="center" prop="demandDeptName" width="150">
+          <template slot-scope="scope">
+              <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.demandDeptName" @clear="clean(scope.row, '需求部门')" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '需求部门', scope.row.org)">
+                <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '需求部门', scope.row.org)"></el-button>
+              </el-input>
+          </template>
+        </el-table-column>
         <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="120">
           <template slot-scope="scope">
             <el-switch
@@ -373,6 +379,15 @@ export default {
       this.referCondition.pkOrg = orgId
       this.$refs.refer.init(this.referCondition)
     },
+    // 明细行选择部门
+    chooseMxBM(index, type, isPage, title, drpOrg) {
+      this.tableIndex = index
+      this.referCondition.type = type
+      this.referCondition.isPage = isPage
+      this.referCondition.title = title
+      this.referCondition.drpOrg = drpOrg
+      this.$refs.refer.init(this.referCondition)
+    },
     selectionsToInput(selection) {
       if (this.referCondition.title == '收货货位') {
         this.tableList[this.tableIndex].deliveryAllocationName = selection[0].name
@@ -384,6 +399,10 @@ export default {
         this.tableList[this.tableIndex].deliveryAllocation = ''
         this.tableList[this.tableIndex].deliveryAllocationName = ''
       }
+      if (this.referCondition.title == '需求部门') {
+        this.tableList[this.tableIndex].demandDeptName = selection[0].name
+        this.tableList[this.tableIndex].demandDept = selection[0].id
+      }
       if (this.referCondition.title == '选择补单供应商') {
         this.tableList[this.tableIndex].additionalSupplierName = selection[0].name
         this.tableList[this.tableIndex].additionalSupplier = selection[0].id
@@ -413,6 +432,10 @@ export default {
         row.additionalSupplier = ''
         row.additionalSupplierName = ''
       }
+      if (title == '需求部门') {
+        row.demandDeptName = ''
+        row.demandDept = ''
+      }
       if (title == '默认采购组织') {
         row.org = ''
         row.orgName = ''

+ 8 - 2
src/views/purchase/purchase-order/add/column.js

@@ -103,6 +103,7 @@ const PurColumns =[
     },
     queryParams: (params) => ({
       pkOrg: params.puOrg,
+      isWms: ['21-Cxx-02','21-Cxx-04','21-Cxx-10'].find(item => item === params.billType) ? 'Y' : 'N',
     }),
     isShow:true,
     
@@ -296,7 +297,9 @@ const PurColumns =[
       puDept: 'id',
       puDeptName: 'name'
     },
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      drpOrg: params.puOrg,
+    }),
     require: true,
     isShow:true,
   },
@@ -845,7 +848,9 @@ const CauseColumns =[
       puDept: 'id',
       puDeptName: 'name'
     },
-    queryParams: () => ({}),
+    queryParams: (params) => ({
+      drpOrg: params.puOrg,
+    }),
     require: true,
     isShow:true,
   },
@@ -924,6 +929,7 @@ const CauseColumns =[
     },
     queryParams: (params) => ({
       pkOrg: params.puOrg,
+      isWms: ['21-Cxx-02','21-Cxx-04','21-Cxx-10'].find(item => item === params.billType) ? 'Y' : 'N',
     }),
     isShow:true,
     

+ 8 - 1
src/views/purchase/purchase-order/add/index.vue

@@ -104,7 +104,13 @@ export default {
     "params.billType":{
       handler(nVal, oVal){
 
-        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10', '21-Cxx-14'];
+
+        this.params.warehouse = '';
+        this.params.warehouseName = '';
+        this.params.goodsAllocation = '';
+        this.params.goodsAllocationName = '';
         
         if(billList.find(item => item === nVal)){
           this.rules.warehouseName = [
@@ -113,6 +119,7 @@ export default {
         }else{
           this.rules.warehouseName = null;
         }
+        this.rules.goodsAllocationName = null;
 
         this.count++;
       }

+ 10 - 5
src/views/purchase/purchase-order/edit/index.vue

@@ -84,8 +84,9 @@ export default {
     "params.billType":{
       handler(nVal, oVal){
 
-        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
-        
+        // let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10','21-Cxx-14','21-Cxx-09','21-Cxx-17','21-Cxx-18'];
+        let billList = ['21-Cxx-02','21-Cxx-04','21-Cxx-10', '21-Cxx-14'];
+
         if(billList.find(item => item === nVal)){
           this.rules.warehouseName = [
             { required: true, message: "WMS入库仓库不能为空", trigger: "change" },
@@ -517,13 +518,17 @@ export default {
 
     },
 
-    // 子表Select改变之后
+    // Select改变之后
      handleSelectChange(val,typeName){
 
       if(val === 'billType'){
 
-       this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
-      
+        this.params['billTypeName'] = this.dict.type[typeName].find(item => item.value == this.params[val]).label;
+        this.params.warehouse = '';
+        this.params.warehouseName = '';
+        this.params.goodsAllocation = '';
+        this.params.goodsAllocationName = '';
+        this.rules.goodsAllocationName = null;
       }
 
     },

+ 1 - 1
src/views/purchase/purchase-order/index.vue

@@ -365,7 +365,7 @@ export default {
           _this.loading = true;
 
           let { code,msg } = await orderApi.submit({ puOrderIds,checkAmount:true});
-          console.log(code,'code');
+
           if (code == 200) {
 
             _this.handleRefreshList();