Commit 73d2808d authored by 李驰骋's avatar 李驰骋

终端要货渠道类型查询添加条件,限制选择收货地址必须选择渠道类型

parent 48a43f47
...@@ -322,7 +322,8 @@ ...@@ -322,7 +322,8 @@
goTerminal() { goTerminal() {
const params= { const params= {
dealerId: this.orderItem.customerCode, dealerId: this.orderItem.customerCode,
inventoryCode: this.orderItem.brand inventoryCode: this.orderItem.brand,
channelType: this.orderItem.channelsType // 添加渠道类型参数
} }
uni.navigateTo({ uni.navigateTo({
url: `/pages/select-terminal/select-terminal??params=${JSON.stringify(params)}` url: `/pages/select-terminal/select-terminal??params=${JSON.stringify(params)}`
...@@ -370,6 +371,8 @@ ...@@ -370,6 +371,8 @@
case 'channelType': case 'channelType':
this.orderItem.channelsType = this.channelTypeArr[index].value this.orderItem.channelsType = this.channelTypeArr[index].value
this.orderItem.channelTypeName = this.channelTypeArr[index].name this.orderItem.channelTypeName = this.channelTypeArr[index].name
// 渠道类型变化时,如果是终端要货则清空终端信息
this.onChannelsTypeChange(this.orderItem.channelsType)
break; break;
case 'significance': case 'significance':
this.orderItem.significance = this.significanceArr[index].value this.orderItem.significance = this.significanceArr[index].value
...@@ -444,6 +447,21 @@ ...@@ -444,6 +447,21 @@
this.channelTypeArr = [{ value: 'S', name: '社会化渠道' }] this.channelTypeArr = [{ value: 'S', name: '社会化渠道' }]
} }
}, },
// 渠道类型变化处理,参考PC端逻辑
onChannelsTypeChange(value) {
// 当为终端要货时(demandType='ZDZG'),清空已选择收货终端
if (this.orderItem.demandType === 'ZDZG') {
this.orderItem.terminalName = ''
this.orderItem.terminalId = ''
this.orderItem.receiveUnitName = ''
this.orderItem.receiveAddress = ''
this.orderItem.contactNumber = ''
this.orderItem.contacPerson = ''
this.orderItem.province = ''
this.orderItem.city = ''
this.orderItem.district = ''
}
},
getSelectDictDataOrigin(dictcode) { getSelectDictDataOrigin(dictcode) {
querySysDictionaryDetailsByCode({'code': dictcode}) querySysDictionaryDetailsByCode({'code': dictcode})
.then(res => { .then(res => {
......
...@@ -178,7 +178,18 @@ ...@@ -178,7 +178,18 @@
} }
}, },
async getChannelType(){ async getChannelType(){
const res = await getChannelType({'salePlan': this.detail.planType}) const params = {
salePlan: this.detail.planType,
productCode: this.detail.wantGoodsDetailList?.[0]?.productCode || this.orderItem.productCode,
customerCode: this.detail.customerCode
}
// 只有终端要货时才添加isTerminal参数
if (this.demandType == 2) {
params.isTerminal = true
}
const res = await getChannelType(params)
this.channelTypeArr = res.data this.channelTypeArr = res.data
// if (this.detail.acceptUnitType =='V013'|| this .detail.acceptUnitType =='V015'){ // if (this.detail.acceptUnitType =='V013'|| this .detail.acceptUnitType =='V015'){
// this.channelTypeArr = [{ value: 'T', name: '团购渠道' }] // this.channelTypeArr = [{ value: 'T', name: '团购渠道' }]
...@@ -230,6 +241,7 @@ ...@@ -230,6 +241,7 @@
const params = { const params = {
dealerId: this.detail.customerCode, dealerId: this.detail.customerCode,
inventoryCode: this.detail.brand, inventoryCode: this.detail.brand,
channelType: this.detail.channelsType, // 添加渠道类型参数
page: { page: {
current: 1, current: 1,
size: 5000 size: 5000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment