|
@@ -111,8 +111,8 @@
|
|
<template v-if="logisticsNumber === '001' && mainForm.pickupWay == 2">
|
|
<template v-if="logisticsNumber === '001' && mainForm.pickupWay == 2">
|
|
<el-table-column align="left" label="仓库" prop="invoiceId" min-width="160" show-overflow-tooltip>
|
|
<el-table-column align="left" label="仓库" prop="invoiceId" min-width="160" show-overflow-tooltip>
|
|
<template v-slot="{ row }">
|
|
<template v-slot="{ row }">
|
|
- <el-select v-model="row.warehouseFlag" value-key="" placeholder="" :disabled="flag" clearable filterable size="mini"
|
|
|
|
- @change="storeChange($event, row)">
|
|
|
|
|
|
+ <el-select v-model="row.warehouseFlag" value-key="" placeholder="" :disabled="flag" clearable filterable
|
|
|
|
+ size="mini" @change="storeChange($event, row)">
|
|
<el-option v-for="item in storeList" :key="item.value" :label="item.label" :value="item.value">
|
|
<el-option v-for="item in storeList" :key="item.value" :label="item.label" :value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -120,35 +120,35 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="left" label="收货客户" prop="orderTime" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="left" label="收货客户" prop="orderTime" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
|
+ :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.receivingName" size="mini"
|
|
v-model="scope.row.receivingName" size="mini"
|
|
@input="handleInput($event, scope.row.invoiceId, 1)"></el-input>
|
|
@input="handleInput($event, scope.row.invoiceId, 1)"></el-input>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <el-input
|
|
|
|
- :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.refLinkman" size="mini"></el-input>
|
|
v-model="scope.row.refLinkman" size="mini"></el-input>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="left" label="电话" prop="orderTime" min-width="150" show-overflow-tooltip>
|
|
<el-table-column align="left" label="电话" prop="orderTime" min-width="150" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
|
+ :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.phone" size="mini" @input="handleInput($event, scope.row.invoiceId, 2)"></el-input>
|
|
v-model="scope.row.phone" size="mini" @input="handleInput($event, scope.row.invoiceId, 2)"></el-input>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <el-input
|
|
|
|
- :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.refPhone" size="mini"></el-input>
|
|
v-model="scope.row.refPhone" size="mini"></el-input>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column align="left" label="收货地址" prop="orderTime" min-width="200" show-overflow-tooltip>
|
|
<el-table-column align="left" label="收货地址" prop="orderTime" min-width="200" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')" :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input v-if="!(scope.row.orderType === 'TRADE' || scope.row.orderType === 'HOME')"
|
|
|
|
+ :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.address" size="mini"
|
|
v-model="scope.row.address" size="mini"
|
|
@input="handleInput($event, scope.row.invoiceId, 3)"></el-input>
|
|
@input="handleInput($event, scope.row.invoiceId, 3)"></el-input>
|
|
<template v-else>
|
|
<template v-else>
|
|
- <el-input
|
|
|
|
- :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
|
|
|
|
+ <el-input :disabled="flag || ((scope.row.warehouseFlag == 0 || scope.row.warehouseFlag == null))"
|
|
v-model="scope.row.refInstallAddress" size="mini"></el-input>
|
|
v-model="scope.row.refInstallAddress" size="mini"></el-input>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
</template>
|
|
@@ -342,7 +342,7 @@ export default {
|
|
console.log(e, row);
|
|
console.log(e, row);
|
|
this.deliverList.forEach(item => {
|
|
this.deliverList.forEach(item => {
|
|
if (item.invoiceId === row.invoiceId) {
|
|
if (item.invoiceId === row.invoiceId) {
|
|
- this.$set(item,'warehouseFlag',e)
|
|
|
|
|
|
+ this.$set(item, 'warehouseFlag', e)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
if (e == 0) {
|
|
if (e == 0) {
|
|
@@ -415,34 +415,34 @@ export default {
|
|
const item = this.companyList.find(k => k.id === data.logisticsId)
|
|
const item = this.companyList.find(k => k.id === data.logisticsId)
|
|
this.logisticsNumber = item.logisticsNumber
|
|
this.logisticsNumber = item.logisticsNumber
|
|
}
|
|
}
|
|
- data.invoicePickBeans.forEach(k=>{
|
|
|
|
|
|
+ data.invoicePickBeans.forEach(k => {
|
|
if (k.warehouseFlag == 0) {
|
|
if (k.warehouseFlag == 0) {
|
|
- if (!(k.orderType === 'TRADE' || k.orderType === 'HOME')) {
|
|
|
|
- if ((k.receivingName && k.phone && k.address)) {
|
|
|
|
- k.copyReceivingName = k.receivingName
|
|
|
|
- k.copyPhone = k.phone
|
|
|
|
- k.copyAddress = k.address
|
|
|
|
- k.receivingName = ''
|
|
|
|
- k.phone = ''
|
|
|
|
- k.address = ''
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if ((k.refLinkman && k.refPhone && k.refInstallAddress)) {
|
|
|
|
- k.copyRefLinkman = k.refLinkman
|
|
|
|
- k.copyRefPhone = k.refPhone
|
|
|
|
- k.copyRefInstallAddress = k.refInstallAddress
|
|
|
|
- k.refLinkman = ''
|
|
|
|
- k.refPhone = ''
|
|
|
|
- k.refInstallAddress = ''
|
|
|
|
- }
|
|
|
|
|
|
+ if (!(k.orderType === 'TRADE' || k.orderType === 'HOME')) {
|
|
|
|
+ if ((k.receivingName && k.phone && k.address)) {
|
|
|
|
+ k.copyReceivingName = k.receivingName
|
|
|
|
+ k.copyPhone = k.phone
|
|
|
|
+ k.copyAddress = k.address
|
|
|
|
+ k.receivingName = ''
|
|
|
|
+ k.phone = ''
|
|
|
|
+ k.address = ''
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if ((k.refLinkman && k.refPhone && k.refInstallAddress)) {
|
|
|
|
+ k.copyRefLinkman = k.refLinkman
|
|
|
|
+ k.copyRefPhone = k.refPhone
|
|
|
|
+ k.copyRefInstallAddress = k.refInstallAddress
|
|
|
|
+ k.refLinkman = ''
|
|
|
|
+ k.refPhone = ''
|
|
|
|
+ k.refInstallAddress = ''
|
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
})
|
|
})
|
|
this.deliverList = data.invoicePickBeans
|
|
this.deliverList = data.invoicePickBeans
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -548,7 +548,7 @@ export default {
|
|
getDeliverList({ correspondId: this.mainForm.warehouse }).then(res => {
|
|
getDeliverList({ correspondId: this.mainForm.warehouse }).then(res => {
|
|
this.deliverList = res.data
|
|
this.deliverList = res.data
|
|
this.deliverList.forEach(k => {
|
|
this.deliverList.forEach(k => {
|
|
- this.$set(k,'warehouseFlag',null)
|
|
|
|
|
|
+ this.$set(k, 'warehouseFlag', null)
|
|
if (k.refLinkman || k.refPhone || k.refInstallAddress) {
|
|
if (k.refLinkman || k.refPhone || k.refInstallAddress) {
|
|
this.$set(k, 'warehouseFlag', 1)
|
|
this.$set(k, 'warehouseFlag', 1)
|
|
}
|
|
}
|
|
@@ -578,7 +578,14 @@ export default {
|
|
if (this.tableSelection.length < 1) {
|
|
if (this.tableSelection.length < 1) {
|
|
return this.$errorMsg('请选择发货申请单')
|
|
return this.$errorMsg('请选择发货申请单')
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (this.mainForm.pickupWay == 2 && this.logisticsNumber === '001') {
|
|
|
|
+ for (let i = 0; i < this.tableSelection.length; i++) {
|
|
|
|
+ if (this.tableSelection[i].warehouseFlag == null) {
|
|
|
|
+ this.$errorMsg('仓库必选')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
for (let i = 0; i < this.tableSelection.length; i++) {
|
|
for (let i = 0; i < this.tableSelection.length; i++) {
|
|
if (this.tableSelection[i].warehouseFlag == 2) {
|
|
if (this.tableSelection[i].warehouseFlag == 2) {
|
|
let el = this.tableSelection[i]
|
|
let el = this.tableSelection[i]
|
|
@@ -634,16 +641,12 @@ export default {
|
|
// let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
|
|
// let correspondName = this.warehouseList.find(o => o.id == this.mainForm.warehouse).name;
|
|
|
|
|
|
let orderList = []
|
|
let orderList = []
|
|
- for (let i = 0; i <this.tableSelection.length; i++) {
|
|
|
|
- if (this.tableSelection[i].warehouseFlag == null || this.tableSelection[i].warehouseFlag == '') {
|
|
|
|
- this.$errorMsg('仓库必选')
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+
|
|
this.tableSelection.forEach(item => {
|
|
this.tableSelection.forEach(item => {
|
|
-
|
|
|
|
|
|
+
|
|
if (!(item.orderType === 'TRADE' || item.orderType === 'HOME')) {
|
|
if (!(item.orderType === 'TRADE' || item.orderType === 'HOME')) {
|
|
-
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
if ((item.refLinkman && item.refPhone && item.refInstallAddress)) {
|
|
if ((item.refLinkman && item.refPhone && item.refInstallAddress)) {
|
|
item.receivingName = item.refLinkman
|
|
item.receivingName = item.refLinkman
|
|
@@ -653,7 +656,7 @@ export default {
|
|
|
|
|
|
}
|
|
}
|
|
orderList.push({
|
|
orderList.push({
|
|
- warehouseFlag:item.warehouseFlag,
|
|
|
|
|
|
+ warehouseFlag: item.warehouseFlag,
|
|
address: item.address,
|
|
address: item.address,
|
|
id: this.listItem ? item.id : '',
|
|
id: this.listItem ? item.id : '',
|
|
invoiceOrderId: item.invoiceOrderId,
|
|
invoiceOrderId: item.invoiceOrderId,
|