Jelajahi Sumber

采购需求汇总调整编辑

黄梓星 2 tahun lalu
induk
melakukan
5f3300a15d

+ 10 - 9
src/views/purchase/DemandSummary/index.vue

@@ -308,16 +308,18 @@
           <el-table-column label="三级品类" align="center" prop="materialClassifyThreeName" width="150px"/>
           <el-table-column label="四级品类" align="center" prop="materialClassifyFourName" width="150px"/>
           <el-table-column label="单据状态" align="center" prop="status"/>
-          <el-table-column label="采购员" align="center" prop="buyerName" width="120px">
+          <el-table-column label="采购员" align="center" prop="buyerName" width="150px">
             <template slot-scope="scope">
-                <el-input readonly size="small" v-model="scope.row.buyerName">
+                <el-input :disabled="lineDisable" size="small" v-model="scope.row.buyerName">
                   <el-button size="small" :disabled="lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$index, 'CONTACTS_PARAM', true, '采购员')"></el-button>
                 </el-input>
             </template>
           </el-table-column>
           <el-table-column label="默认采购组织" align="center" prop="purchaseOrgName" width="280px">
             <template slot-scope="scope">
-                <el-input :disabled="lineDisable" v-model="scope.row.purchaseOrgName"/>
+                <el-input :disabled="lineDisable" size="small" v-model="scope.row.purchaseOrgName">
+                  <el-button size="small" :disabled="lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$index, 'ORG_PARAM', true, '默认采购组织')"></el-button>
+                </el-input>
             </template>
           </el-table-column>
           <el-table-column label="有效期" align="center" prop="validityPeriod"/>
@@ -630,8 +632,11 @@ export default {
         console.log('选择进了吗',this.tableList)
         this.tableList[this.tableIndex].buyer = selection[0].code
         this.tableList[this.tableIndex].buyerName = selection[0].name
-        this.isUpdate = !this.isUpdate
-        // this.$set(this.tableList[this.tableIndex - 1],  buyerName, selection[0].name)
+      }
+      if (this.referConditionMx.title == '默认采购组织') {
+        console.log('选择进了吗',this.tableList)
+        this.tableList[this.tableIndex].purchaseOrg = selection[0].id
+        this.tableList[this.tableIndex].purchaseOrgName = selection[0].name
       }
     },
     // 搜索区树形选择
@@ -655,10 +660,6 @@ export default {
     },
         // 明细行选择业务部门参照带出业务部门数据
     chooseSon(index, type, isPage, title) {
-      console.log("🚀 ~ file: index.vue:653 ~ chooseSon ~ index:", index)
-      console.log("🚀 ~ file: index.vue:653 ~ chooseSon ~ index:", type)
-      console.log("🚀 ~ file: index.vue:653 ~ chooseSon ~ index:", isPage)
-      console.log("🚀 ~ file: index.vue:653 ~ chooseSon ~ index:", title)
       this.tableIndex = index
       this.referConditionMx.type = type
       this.referConditionMx.isPage = isPage

+ 2 - 0
src/views/purchase/PurchaseDemandList/add.vue

@@ -579,6 +579,7 @@ export default {
         status: '0',
         customer: '',
         customerName: '',
+        customerCode: '',
         customerPrincipal: '',
         demandPersonal: '',
         demandDept: '',
@@ -871,6 +872,7 @@ export default {
         this.customerOptions = selection
         this.basicForm.customer = selection[0].id
         this.basicForm.customerName = selection[0].name
+        this.basicForm.customerCode = selection[0].code
       }
       if(this.referCondition.type == 'CONTACTS_PARAM') {
         this.personOptions = selection