瀏覽代碼

采购需求处理详情加入部门可以修改

黄梓星 1 年之前
父節點
當前提交
015313cb98
共有 1 個文件被更改,包括 24 次插入1 次删除
  1. 24 1
      src/views/purchase/DemandSummary/add.vue

+ 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="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="expiryUnit" width="100"/>
         <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" prop="businessDeptName"/> -->
         <!-- <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">
         <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="120">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-switch
             <el-switch
@@ -373,6 +379,15 @@ export default {
       this.referCondition.pkOrg = orgId
       this.referCondition.pkOrg = orgId
       this.$refs.refer.init(this.referCondition)
       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) {
     selectionsToInput(selection) {
       if (this.referCondition.title == '收货货位') {
       if (this.referCondition.title == '收货货位') {
         this.tableList[this.tableIndex].deliveryAllocationName = selection[0].name
         this.tableList[this.tableIndex].deliveryAllocationName = selection[0].name
@@ -384,6 +399,10 @@ export default {
         this.tableList[this.tableIndex].deliveryAllocation = ''
         this.tableList[this.tableIndex].deliveryAllocation = ''
         this.tableList[this.tableIndex].deliveryAllocationName = ''
         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 == '选择补单供应商') {
       if (this.referCondition.title == '选择补单供应商') {
         this.tableList[this.tableIndex].additionalSupplierName = selection[0].name
         this.tableList[this.tableIndex].additionalSupplierName = selection[0].name
         this.tableList[this.tableIndex].additionalSupplier = selection[0].id
         this.tableList[this.tableIndex].additionalSupplier = selection[0].id
@@ -413,6 +432,10 @@ export default {
         row.additionalSupplier = ''
         row.additionalSupplier = ''
         row.additionalSupplierName = ''
         row.additionalSupplierName = ''
       }
       }
+      if (title == '需求部门') {
+        row.demandDeptName = ''
+        row.demandDept = ''
+      }
       if (title == '默认采购组织') {
       if (title == '默认采购组织') {
         row.org = ''
         row.org = ''
         row.orgName = ''
         row.orgName = ''