Commit 7127745a by 张立顺

fix 联调bug

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