|
@@ -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
|