黄梓星 преди 2 години
родител
ревизия
7284dfefa3
променени са 3 файла, в които са добавени 24 реда и са изтрити 14 реда
  1. 8 7
      src/views/purchase/DemandSummary/index.vue
  2. 15 6
      src/views/purchase/PurchaseDemandList/add.vue
  3. 1 1
      src/views/purchase/transferOrder/add.vue

+ 8 - 7
src/views/purchase/DemandSummary/index.vue

@@ -236,7 +236,7 @@
           <el-button type="primary" size="small" @click="confirms">确认</el-button>
           <el-button type="primary" size="small" @click="cancels">取消</el-button>
           <el-button type="primary" size="small" @click="audits">审核</el-button>
-          <!-- <el-button type="primary" size="small" @click="cancelAudits">弃审</el-button> -->
+          <el-button type="primary" size="small" @click="closeLine">行关闭</el-button>
 
           <el-dropdown size="small" @command="handleCommand">
             <el-button size="small" type="primary" style="margin: 0 10px;">
@@ -306,14 +306,14 @@
           <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="150px"/>
           <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="150px">
             <template slot-scope="scope">
-                <el-input :disabled="scope.row.status !== '1' || lineDisable" size="small" v-model="scope.row.buyerName">
+                <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="small" v-model="scope.row.buyerName">
                   <el-button size="small" :disabled="scope.row.status !== '1' || 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 show-overflow-tooltip label="默认采购组织" align="center" prop="purchaseOrgName" width="280px">
             <template slot-scope="scope">
-                <el-input :disabled="scope.row.status !== '1' || lineDisable" size="small" v-model="scope.row.purchaseOrgName">
+                <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="small" v-model="scope.row.purchaseOrgName">
                   <el-button size="small" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$index, 'ORG_PARAM', true, '默认采购组织')"></el-button>
                 </el-input>
             </template>
@@ -374,7 +374,7 @@ import Refers from '@/components/Refers/refers.vue'
 import TreeRefers from '@/components/Refers/treeRefer.vue'
 import popDialog from '@/components/PopDialog/index.vue'
 import CollapseTransition from '@/components/MyCollapse/collapse.vue'
-import {getSummaryList, auditSummary, confirmSummary , cancelSummary , cancelAuditSummary, editSummaryList } from '@/api/purchase/DemandSummary.js'
+import {getSummaryList, auditSummary, confirmSummary , cancelSummary , shutDownSummary, editSummaryList } from '@/api/purchase/DemandSummary.js'
 export default {
   name: 'demandSummary',
   dicts: ['sys_row_status', 'predictive_classify', 'sys_period_unit', 'sys_business', 'sys_bill_source'],
@@ -649,18 +649,19 @@ export default {
         })
       }
     },
-    cancelAudits() {
+    // 行关闭
+    closeLine() {
       if (this.ids.length == 0) {
         this.$modal.msgWarning("请选中至少一条数据");
       } else {
         let param = this.ids.join()
-        cancelAuditSummary(param).then(res => {
+        shutDownSummary(param).then(res => {
           if (res.code === 200) {
             this.$modal.msgSuccess("操作成功");
             this.getList(this.queryParams)
           }
         })
-      } 
+      }
     },
     // 搜索区参照选择
     chooseRefer(type, isPage, title, stordocId) {

+ 15 - 6
src/views/purchase/PurchaseDemandList/add.vue

@@ -671,12 +671,10 @@ export default {
         this.$refs['basic'].validate((valid) => {
           if(valid) {
             if(this.sonPageStu == 'add') {
-              this.$modal.loading("操作中...");
               this.handleData()
               addDemand(this.basicForm).then(res => {
                 console.log(333)
                 if (res.code === 200) {
-                  this.$modal.closeLoading();
                   this.$modal.msgSuccess("保存成功");
                   this.$emit('jugislist', true)
                   let queryParams = {
@@ -687,11 +685,15 @@ export default {
                 }
               })
             } else if (this.sonPageStu == 'edit') {
-              this.$modal.loading("操作中...");
-              this.basicForm.puDemandItemList.push(...this.delDemandItemList)
-              editDemand(this.basicForm).then(res => {
+              let list = []
+              list.push(...this.basicForm.puDemandItemList, ...this.delDemandItemList)
+              // 深拷贝一下参数对象
+              let param = JSON.parse(JSON.stringify(this.basicForm))
+              console.log('深拷贝对象',param);
+              param.puDemandItemList = list
+              // this.basicForm.puDemandItemList.push(...this.delDemandItemList)
+              editDemand(param).then(res => {
                 if (res.code === 200) {
-                  this.$modal.closeLoading();
                   this.$modal.msgSuccess("编辑成功");
                   this.$emit('jugislist', true)
                   let queryParams = {
@@ -1012,6 +1014,12 @@ export default {
       this.basicForm.puDemandItemList[this.tableIndex].lastWarehouse = null
       this.basicForm.puDemandItemList[this.tableIndex].lastAllocation = null
       this.basicForm.puDemandItemList[this.tableIndex].lastAllocationName = null
+      this.basicForm.puDemandItemList[this.tableIndex].materialClassifyOne = null
+      this.basicForm.puDemandItemList[this.tableIndex].materialClassifyTwo = null
+      this.basicForm.puDemandItemList[this.tableIndex].materialClassifyThree = null
+      this.basicForm.puDemandItemList[this.tableIndex].materialClassifyFour = null
+      this.basicForm.puDemandItemList[this.tableIndex].lastStockOrg = null
+      this.basicForm.puDemandItemList[this.tableIndex].lastStockOrgName = null
       // 通过选择物料查询采购员
       queryMan(selection[0].id).then(res => {
         if(res.code === 200 && res.rows.length !== 0) {
@@ -1101,6 +1109,7 @@ export default {
     cleanCustomer() {
       this.basicForm.customer = ''
       this.basicForm.customerName = ''
+      this.basicForm.customerCode = ''
       if (this.basicForm.puDemandItemList.length !== 0) {
         this.basicForm.puDemandItemList.forEach(item => {
           item.demandCustomerName = ''

+ 1 - 1
src/views/purchase/transferOrder/add.vue

@@ -166,7 +166,7 @@
          </el-col>
         <el-col :span="1.5">
             <el-form-item label="调出仓库">
-              <el-select clearable size="small" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg)" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg, 'N', 'N')" style="width: 200px">
                 <el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>