Commit 7127745a by 张立顺

fix 联调bug

1 parent 141b6cea
......@@ -5,19 +5,19 @@
<div class="info-content">
<el-row :gutter="20">
<el-col :span="8"
>调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}</el-col
>调出门店:{{ detailInfo.callOutMerchantName || "-" }}</el-col
>
<el-col :span="8"
>调出门店:{{ detailInfo.callOutMerchantName || "-" }}</el-col
>调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}</el-col
>
<el-col :span="8"
>调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}</el-col
>调入门店:{{ detailInfo.callInMerchantName || "-" }}</el-col
>
</el-row>
<el-row :gutter="20" style="margin-top: 15px">
<el-col :span="8"
>调入门店:{{ detailInfo.callInMerchantName || "-" }}</el-col
>调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}</el-col
>
<el-col :span="16">备注:{{ detailInfo.remark || "-" }}</el-col>
</el-row>
......@@ -523,7 +523,7 @@ export default {
},
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row.goodsId,
upgradeGoodsId: row?.goodsId || row?.id,
yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
......
......@@ -7,13 +7,13 @@
<template v-if="isOperatorReview">
<el-row :gutter="20">
<el-col :span="8"
>调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}</el-col
>调出门店:{{ detailInfo.callOutMerchantName || "-" }}</el-col
>
<el-col :span="8"
>调出门店:{{ detailInfo.callOutMerchantName || "-" }}</el-col
>调出仓库:{{ detailInfo.callOutYqMerchantName || "-" }}</el-col
>
<el-col :span="8"
>调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}</el-col
>调入门店:{{ detailInfo.callInMerchantName || "-" }}</el-col
>
</el-row>
</template>
......@@ -31,9 +31,9 @@
>
<el-option
v-for="item in yqMerchantList"
:key="item.yqMerchantId"
:label="item.yqMerchantName"
:value="item.yqMerchantId"
:key="item.merchantNo"
:label="item.merchantName"
:value="item.merchantNo"
></el-option>
</el-select>
</el-col>
......@@ -54,15 +54,16 @@
></el-option>
</el-select>
</el-col>
<el-col :span="8"
>调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}</el-col
>调入门店:{{ detailInfo.callInMerchantName || "-" }}</el-col
>
</el-row>
</template>
<el-row :gutter="20" style="margin-top: 15px">
<el-col :span="8"
>调入门店:{{ detailInfo.callInMerchantName || "-" }}</el-col
>调入仓库:{{ detailInfo.callInYqMerchantName || "-" }}</el-col
>
<el-col :span="16">备注:{{ detailInfo.remark || "-" }}</el-col>
</el-row>
......@@ -509,34 +510,34 @@ export default {
}
this.auditDetaiList = deepClone(this.originalAuditDetaiList)
// 如果是商务审核,且有调出仓库ID,获取调出门店列表
if (!this.isOperatorReview && this.detailInfo.callOutYqMerchantId) {
this.getMerchantList(this.detailInfo.callOutYqMerchantId)
// 如果是商务审核,获取调出门店列表
if (!this.isOperatorReview) {
this.getMerchantList()
this.getYqMerchantList()
}
this.getYqMerchantList()
})
},
// 获取调出仓库(园区店)列表
getYqMerchantList() {
if (this.isOperatorReview) return
const params = {}
if (
this.detailInfo.callOutMerchantId &&
this.detailInfo.callOutYqMerchantId
) {
params.yqMerchantId = this.detailInfo.callOutYqMerchantId
}
stockAllocateYqMerchantList(params).then((res) => {
this.yqMerchantList = res || []
const params = { returnAll: true }
stockAllocateYqMerchantList({
params
}).then((res) => {
console.log(res, "调出仓库(园区店)列表")
// if
this.yqMerchantList = (res || []).map((item) => {
return {
...item,
merchantNo: Number(item.merchantNo)
}
})
})
},
// 获取调出门店列表
getMerchantList(yqMerchantId) {
if (!yqMerchantId) {
this.merchantList = []
return
}
getServicemerchantrefList({ yqMerchantId }).then((res) => {
getMerchantList() {
const params = { returnAll: true }
params.yqMerchantId = this.detailInfo.callOutYqMerchantId
getServicemerchantrefList(params).then((res) => {
this.merchantList = res || []
})
},
......@@ -549,17 +550,22 @@ export default {
}
this.detailInfo.callOutMerchantId = ""
this.detailInfo.callOutMerchantName = ""
this.getMerchantList(val)
},
changeCallOutMerchant(val) {
const selected = this.merchantList.find((item) => item.merchantId === val)
if (selected) {
this.detailInfo.callOutMerchantName = selected.merchantName
// 选中门店后,自动关联仓库ID并刷新仓库列表
if (selected.yqMerchantId) {
this.detailInfo.callOutYqMerchantId = selected.yqMerchantId
this.detailInfo.callOutYqMerchantName = selected.yqMerchantName
this.getMerchantList()
}
}
},
handleInventoryDetail(row) {
this.stockDetailInfo = {
upgradeGoodsId: row.goodsId,
upgradeGoodsId: row?.goodsId || row?.id,
yqMerchantId: this.detailInfo.callOutYqMerchantId
}
this.stockDetailDialogVisible = true
......@@ -584,6 +590,14 @@ export default {
updatedBy: this.userInfo.detail ? this.userInfo.detail.userName : ""
}
} else {
if (!this.detailInfo.callOutMerchantId) {
this.$message.warning("请选择调出门店")
return
}
if (!this.detailInfo.callOutYqMerchantId) {
this.$message.warning("请选择调出仓库")
return
}
params = {
allocateCode: this.detailInfo.allocateCode,
callOutYqMerchantId: this.detailInfo.callOutYqMerchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!