黄梓星 1 tahun lalu
induk
melakukan
b14aacc368

+ 4 - 3
src/views/purchase/DemandSummary/index.vue

@@ -45,8 +45,8 @@
             <!-- <el-col :span="1.5"> -->
               <!-- <el-form-item label="" label-width="20px"> -->
                 <div style="position: absolute;top: 3px;right: 10px;">
-                  <el-button type="primary" size="mini" icon="el-icon-search" @click="search">搜索</el-button>
-                  <el-button size="mini" icon="el-icon-refresh" plain @click="reset">重置</el-button>
+                  <el-button type="primary" size="mini" @click="search">搜索</el-button>
+                  <el-button size="mini" plain @click="reset">重置</el-button>
                 </div>
               <!-- </el-form-item> -->
             <!-- </el-col> -->
@@ -343,7 +343,7 @@
 
     <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true"/>
 
-    <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
+    <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="false" />
   </div>
 </template>
 
@@ -781,6 +781,7 @@ export default {
       this.$refs.materialRefer.init()
     },
     selectMaterial(selection) {
+      console.log('选择的物料', selection)
       this.queryParams.materialCode = selection[0].code
       this.queryParams.names = selection[0].name
     },

+ 2 - 2
src/views/purchase/MaterialClassDivision/index.vue

@@ -47,8 +47,8 @@
           <!-- <el-col :span="1.5"> -->
             <!-- <el-form-item label="" label-width="20px"> -->
             <div style="position: absolute;top: 3px;right: 10px;">
-              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
-              <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+              <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
+              <el-button size="mini" plain @click="resetList">重置</el-button>
             </div>
             <!-- </el-form-item> -->
           <!-- </el-col> -->

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

@@ -110,7 +110,7 @@
         </el-col> -->
 
         <el-col :span="1.5">
-          <el-form-item label="编码">
+          <el-form-item label="需求单号">
             <el-input
               v-model="basicForm.code"
               size="mini"
@@ -235,8 +235,8 @@
           <el-table-column show-overflow-tooltip label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
-                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')">
+                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseCangKu(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库', scope.row.puOrg)"></el-button>
                 </el-input>
               </el-form-item>
             </template>
@@ -244,7 +244,7 @@
           <el-table-column show-overflow-tooltip label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')">
                   <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
                 </el-input>
               </el-form-item>
@@ -362,7 +362,7 @@
           <el-table-column show-overflow-tooltip label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @focus="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')">
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAddressName" @clear="clearHang(scope.$index, '选择收货地址')" @paste.native="pasteMe($event, scope, scope.$index)">
                   <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'ADDRESS_PARAM', true, '选择收货地址')"></el-button>
                 </el-input>
               </el-form-item>
@@ -484,7 +484,7 @@
       <el-row style="margin-bottom: 10px;">
         <el-col :span="6" class="pltzTxt">收货地址</el-col>
         <el-col :span="14">
-          <el-input class="pltzIpt" clearable size="mini" v-model="adjust.deliveryAddressName" @focus="chooseOrg('ADDRESS_PARAM', true, '收货地址')">
+          <el-input class="pltzIpt" clearable size="mini" v-model="adjust.deliveryAddressName">
             <el-button size="mini" slot="append" icon="el-icon-more" @click="chooseOrg('ADDRESS_PARAM', true, '收货地址')"></el-button>
           </el-input>
         </el-col>
@@ -899,7 +899,7 @@ export default {
     },
     handleData() {
       console.log('222')
-      // 复制新增把id,编码,创建人置为空,子表去掉id
+      // 复制新增把id,需求单号,创建人置为空,子表去掉id
       this.basicForm.id = ''
       this.basicForm.code = ''
       this.basicForm.createBy = ''
@@ -1213,7 +1213,7 @@ export default {
       })
 
       if (rows.length < 100) {
-
+        // 粘贴物料编码
         if(scope.column.property == 'materialCode') {
           await getRefer({ type: 'MATERIAL_PARAM', materialCodeList: rows }).then(res => {
             this.$modal.closeLoading();
@@ -1265,7 +1265,7 @@ export default {
           }).catch(err => {
             this.$modal.closeLoading();
           })
-
+        // 粘贴实际业务需求量
         }else if(scope.column.property == 'qty') {
           console.log('复制内容:', rows)
           let newLine = []
@@ -1291,7 +1291,7 @@ export default {
             this.$refs.table.doLayout()
             this.$modal.closeLoading();
           }
-
+        // 粘贴补单供应商
         }else if(scope.column.property == 'additionalSupplierName') {
           await getRefer({ type: 'SUPPLIER_PARAM', searchList: rows }).then(res => {
             this.$modal.closeLoading();
@@ -1309,7 +1309,6 @@ export default {
                 newLine.push(line)
                 console.log('临时数组', newLine)
               }
-
               if(this.basicForm.puDemandItemList.length <= 1) {
                 // 删除指定下标
                 this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
@@ -1322,7 +1321,47 @@ export default {
                 this.$refs.table.doLayout()
                 this.$modal.closeLoading();
               }
-
+            }
+          }).then(() => {
+            this.$refs.table.doLayout()
+          }).catch(err => {
+            this.$modal.closeLoading();
+          })
+        }else if(scope.column.property == 'deliveryAddressName') {
+          await getRefer({ type: 'ADDRESS_PARAM', searchList: rows }).then(res => {
+           this.$modal.closeLoading();
+            if (res.code === 200) {
+              let rowList = res.rows
+              let newLine = []
+              for (let i = 0; i<rowList.length; i++) {
+                let line = {...this.sonModel}
+                line.isUrgency = (this.basicForm.billType == 'JJXQ' ? 'Y' : 'N')
+                line.isReplenishment = (this.basicForm.billType == 'BDXQ' ? 'Y' : 'N')
+                line.demandCustomer = this.basicForm.customer
+                line.demandCustomerName = this.basicForm.customerName
+                line.deliveryAddressName = rowList[i].name
+                line.deliveryAddress = rowList[i].code
+                line.contacts = rowList[i].contactsName
+                line.contactsPhone = rowList[i].contactsPhone
+                line.address = rowList[i].address
+                newLine.push(line)
+                console.log('临时数组', newLine)
+              }
+              if(this.basicForm.puDemandItemList.length <= 1) {
+                // 删除指定下标
+                this.basicForm.puDemandItemList.splice(index,this.basicForm.puDemandItemList.length - index,...newLine)
+                this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
+              } else {
+                for(let i = index , j = 0; i < this.basicForm.puDemandItemList.length; i++, j++) {
+                  this.basicForm.puDemandItemList[i].deliveryAddressName = newLine[j].deliveryAddressName
+                  this.basicForm.puDemandItemList[i].deliveryAddress = newLine[j].deliveryAddress
+                  this.basicForm.puDemandItemList[i].contacts = newLine[j].contacts
+                  this.basicForm.puDemandItemList[i].contactsPhone = newLine[j].contactsPhone
+                  this.basicForm.puDemandItemList[i].address = newLine[j].address
+                }
+                this.$refs.table.doLayout()
+                this.$modal.closeLoading();
+              }
             }
           }).then(() => {
             this.$refs.table.doLayout()
@@ -1331,7 +1370,6 @@ export default {
           })
         }
 
-
       } else {
         this.$modal.notifyWarning("复制长度不能超过100!");
         this.$modal.closeLoading();
@@ -1466,7 +1504,7 @@ export default {
         // this.basicForm.puDemandItemList.splice(this.tableIndex,1)
       }
     },
-    // 明细行选择业务部门参照带出业务部门数据
+    // 明细行选择参照
     chooseDept(index, type, isPage, title) {
       this.tableIndex = index
       this.referCondition.type = type
@@ -1474,7 +1512,20 @@ export default {
       this.referCondition.title = title
       this.$refs.refer.init(this.referCondition)
     },
-    // 明细行选择业务部门参照带出业务部门数据
+    // 明细行选择仓库需要先确认采购组织
+    chooseCangKu(index, type, isPage, title, pkOrg) {
+      this.tableIndex = index
+      this.referCondition.type = type
+      this.referCondition.isPage = isPage
+      this.referCondition.title = title
+      if(pkOrg) {
+        this.referCondition.pkOrg = pkOrg
+        this.$refs.refer.init(this.referCondition)
+      } else {
+        this.$modal.notifyWarning("请先确认默认采购组织");
+      }
+    },
+    // 明细行选择货位先确认仓库
     choosehuoWei(index, type, isPage, title, stordocId) {
       this.tableIndex = index
       this.referCondition.type = type

+ 4 - 4
src/views/purchase/PurchaseDemandList/index.vue

@@ -5,7 +5,7 @@
         <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
-              <el-form-item label="单据编码">
+              <el-form-item label="需求单号">
                 <el-input
                   v-model.trim="queryParams.code"
                   size="mini"
@@ -43,8 +43,8 @@
             <!-- <el-col :span="1.5"> -->
               <!-- <el-form-item label="" label-width="20px"> -->
                 <div style="position: absolute;top: 3px;right: 10px;">
-                  <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
-                  <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+                  <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
+                  <el-button size="mini" plain @click="resetList">重置</el-button>
                 </div>
               <!-- </el-form-item> -->
             <!-- </el-col> -->
@@ -177,7 +177,7 @@
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
           <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
-          <el-table-column show-overflow-tooltip label="编码" align="center" width="170" prop="code"/>
+          <el-table-column show-overflow-tooltip label="需求单号" align="center" width="170" prop="code"/>
           <el-table-column show-overflow-tooltip label="需求日期" align="center" width="120" prop="demandDate"/>
           <el-table-column show-overflow-tooltip label="审批结束日期" align="center" width="120" prop="approverFinishTime"/>
           <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="satus" :formatter="formatterStatus"/>

+ 2 - 2
src/views/purchase/deliveryAddress/index.vue

@@ -42,8 +42,8 @@
           <!-- <el-col :span="1.5"> -->
             <!-- <el-form-item label="" label-width="20px"> -->
             <div style="position: absolute;top: 3px;right: 10px;">
-              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
-              <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+              <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
+              <el-button size="mini" plain @click="resetList">重置</el-button>
             </div>
             <!-- </el-form-item> -->
           <!-- </el-col> -->

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

@@ -1902,11 +1902,11 @@ export default {
       }
     },
 
-    chooseRefer(type, isPage, title, drpOrg, isDirectStore, gubFlag) {
+    chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
       this.referCondition.type = type;
       this.referCondition.isPage = isPage;
       this.referCondition.title = title;
-      this.referCondition.drpOrg = drpOrg;
+      this.referCondition.pkOrg = pkOrg;
       this.referCondition.isDirectStore = isDirectStore;
       this.referCondition.gubFlag = gubFlag;
       this.$refs.refer.init(this.referCondition);
@@ -2105,17 +2105,17 @@ export default {
       this.referCondition.type = type;
       this.referCondition.isPage = isPage;
       this.referCondition.title = title;
-      this.referCondition.drpOrg = "";
+      this.referCondition.pkOrg = "";
       this.referCondition.stordocId = stordocId;
       this.$refs.refer.init(this.referCondition);
     },
     // 明细行选择调入部门
-    chooseMxBM(index, type, isPage, title, drpOrg) {
+    chooseMxBM(index, type, isPage, title, pkOrg) {
       this.tableIndex = index;
       this.referCondition.type = type;
       this.referCondition.isPage = isPage;
       this.referCondition.title = title;
-      this.referCondition.drpOrg = drpOrg;
+      this.referCondition.pkOrg = pkOrg;
       this.$refs.refer.init(this.referCondition);
     },
     // 选择框彻底清空

+ 2 - 2
src/views/purchase/transferOrder/index.vue

@@ -39,8 +39,8 @@
               </el-form-item>
             </el-col>
             <div style="position: absolute;top: 3px;right: 10px;">
-              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
-              <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+              <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
+              <el-button size="mini" plain @click="resetList">重置</el-button>
             </div>
           </el-row>