Commit 6481becb by 前端

Merge branch 'SAAS+V5.8.2_zls' into 'SAAS+V5.8.2'

Saas+v5.8.2 zls

See merge request !701
2 parents 160bf1ad c85ee4da
...@@ -13,14 +13,24 @@ import { applyDivisionRuleTestGetMock } from "./mockDivisionRuleTestGetResponse" ...@@ -13,14 +13,24 @@ import { applyDivisionRuleTestGetMock } from "./mockDivisionRuleTestGetResponse"
const path = "dj.api."; const path = "dj.api.";
const path2 = "dj.api.smartcarlife."; const path2 = "dj.api.smartcarlife.";
/** 商户管理/关联 - 分页列表 */ /**
* 【新接口】商户管理/关联 - 分页列表
* method: dj.api.servicemerchantref.newpageServiceMerchantRef
* 使用方:merchantManage.vue(商户管理)、storeManage.vue(项目组门店管理)
*/
export function pageServiceMerchantRef(data) { export function pageServiceMerchantRef(data) {
data.method = "dj.api.servicemerchantref.newpageServiceMerchantRef"; data.method = "dj.api.servicemerchantref.newpageServiceMerchantRef";
return request(data); return request(data);
} }
/**
* 【旧接口】4S店远程搜索下拉等通用场景
* method: dj.api.servicemerchantref.pageServiceMerchantRef
* 使用方:ShopConfig 列表/编辑弹窗、BI 事件、客户管理等 getList 调用处
*/
export function getList(data) { export function getList(data) {
return pageServiceMerchantRef(data); data.method = `${path}servicemerchantref.pageServiceMerchantRef`;
return request(data);
} }
// 删除4s门店 // 删除4s门店
......
...@@ -575,6 +575,8 @@ export default { ...@@ -575,6 +575,8 @@ export default {
pagination: {}, pagination: {},
// 多选数组 // 多选数组
mutiSelectArr: {}, mutiSelectArr: {},
/** 请求序列号:防止快速切换时旧请求覆盖新数据 */
_refreshSeq: 0,
}; };
}, },
computed: { computed: {
...@@ -689,6 +691,7 @@ export default { ...@@ -689,6 +691,7 @@ export default {
}, },
refreshTable(clearMuti = false, resetCurrentPage = false) { refreshTable(clearMuti = false, resetCurrentPage = false) {
const seq = ++this._refreshSeq
this.beforeSearchFn().then((res) => { this.beforeSearchFn().then((res) => {
// console.log(res) // console.log(res)
// 清空多选 // 清空多选
...@@ -711,6 +714,7 @@ export default { ...@@ -711,6 +714,7 @@ export default {
} }
this.getListApi(params) this.getListApi(params)
.then((res) => { .then((res) => {
if (seq !== this._refreshSeq) return
this.pagination = { this.pagination = {
currentPage: res.pageNum, currentPage: res.pageNum,
pageSize: res.pageSize, pageSize: res.pageSize,
...@@ -735,9 +739,11 @@ export default { ...@@ -735,9 +739,11 @@ export default {
this.$emit("setTableFinishFun", this.data, this.page.currentPage); this.$emit("setTableFinishFun", this.data, this.page.currentPage);
}) })
.catch(() => { .catch(() => {
if (seq !== this._refreshSeq) return
this.loading = false; this.loading = false;
}) })
.finally(() => { .finally(() => {
if (seq !== this._refreshSeq) return
this.$emit("apiFinish", this.data); this.$emit("apiFinish", this.data);
}); });
}); });
......
...@@ -1030,6 +1030,8 @@ export default { ...@@ -1030,6 +1030,8 @@ export default {
pageSize: 20, pageSize: 20,
currentPage: 1, currentPage: 1,
approvalVisible: false, approvalVisible: false,
/** 请求序列号:防止快速查询时旧请求覆盖新数据 */
_searchSeq: 0,
}; };
}, },
computed: { computed: {
...@@ -1504,11 +1506,13 @@ export default { ...@@ -1504,11 +1506,13 @@ export default {
this.getList(); this.getList();
}, },
getList() { getList() {
const seq = ++this._searchSeq
let params = this.getParams(); let params = this.getParams();
let eventParams = deepClone({ ...this.page, ...params }); let eventParams = deepClone({ ...this.page, ...params });
if (eventParams?.zyVoucherStatus == 1) if (eventParams?.zyVoucherStatus == 1)
eventParams.status = 13; eventParams.status = 13;
getList(eventParams).then((res) => { getList(eventParams).then((res) => {
if (seq !== this._searchSeq) return
this.tableData = res.list.map((item) => { this.tableData = res.list.map((item) => {
item.paySuccessDate = item.paySuccessDate item.paySuccessDate = item.paySuccessDate
? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss") ? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss")
...@@ -1521,11 +1525,13 @@ export default { ...@@ -1521,11 +1525,13 @@ export default {
}); });
}, },
getOrderCount() { getOrderCount() {
const seq = ++this._searchSeq
let params = this.getParams(); let params = this.getParams();
let eventParams = deepClone({ ...params }); let eventParams = deepClone({ ...params });
if (eventParams?.zyVoucherStatus == 1) if (eventParams?.zyVoucherStatus == 1)
eventParams.status = 13; eventParams.status = 13;
getOrderCount(eventParams).then((res) => { getOrderCount(eventParams).then((res) => {
if (seq !== this._searchSeq) return
this.totalCount = res.totalPriceCount; this.totalCount = res.totalPriceCount;
}); });
}, },
......
...@@ -966,6 +966,8 @@ export default { ...@@ -966,6 +966,8 @@ export default {
pageSize: 20, pageSize: 20,
currentPage: 1, currentPage: 1,
approvalVisible: false, approvalVisible: false,
/** 请求序列号:防止快速查询时旧请求覆盖新数据 */
_searchSeq: 0,
}; };
}, },
computed: { computed: {
...@@ -1358,6 +1360,7 @@ export default { ...@@ -1358,6 +1360,7 @@ export default {
this.getList(); this.getList();
}, },
getList() { getList() {
const seq = ++this._searchSeq
let params = this.getParams(); let params = this.getParams();
params = { params = {
...this.page, ...this.page,
...@@ -1365,6 +1368,7 @@ export default { ...@@ -1365,6 +1368,7 @@ export default {
}; };
// console.log(params) // console.log(params)
getList(params).then((res) => { getList(params).then((res) => {
if (seq !== this._searchSeq) return
this.tableData = res.list.map((item) => { this.tableData = res.list.map((item) => {
item.paySuccessDate = item.paySuccessDate item.paySuccessDate = item.paySuccessDate
? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss") ? Util.dateFormate(item.paySuccessDate, "YYYY-MM-DD HH:mm:ss")
...@@ -1383,11 +1387,13 @@ export default { ...@@ -1383,11 +1387,13 @@ export default {
}); });
}, },
getOrderCount() { getOrderCount() {
const seq = ++this._searchSeq
let params = this.getParams(); let params = this.getParams();
params = { params = {
...params, ...params,
}; };
getOrderCount(params).then((res) => { getOrderCount(params).then((res) => {
if (seq !== this._searchSeq) return
this.totalCount = res.totalPriceCount; this.totalCount = res.totalPriceCount;
}); });
}, },
......
...@@ -142,7 +142,9 @@ export default { ...@@ -142,7 +142,9 @@ export default {
light: [] light: []
}, },
/** 路由带入:匹配完成后清空 */ /** 路由带入:匹配完成后清空 */
pendingLegacyLeaf: null pendingLegacyLeaf: null,
/** 请求序列号:防止快速切换时旧请求覆盖新数据 */
_loadScenesSeq: 0
} }
}, },
computed: { computed: {
...@@ -274,11 +276,13 @@ export default { ...@@ -274,11 +276,13 @@ export default {
if (category === "renewal") { if (category === "renewal") {
return return
} }
const seq = ++this._loadScenesSeq
this.scenesLoading = category === "light" this.scenesLoading = category === "light"
this.rightsScenesLoading = category === "rights" this.rightsScenesLoading = category === "rights"
try { try {
if (category === "light") { if (category === "light") {
const res = await sceneListWithOrder({ bizTypeCode: "1" }) const res = await sceneListWithOrder({ bizTypeCode: "1" })
if (seq !== this._loadScenesSeq) return
const arr = normalizeSceneResponse(res) const arr = normalizeSceneResponse(res)
const mapped = arr.map(s => buildSceneLeafItem(s, "light")) const mapped = arr.map(s => buildSceneLeafItem(s, "light"))
this.sceneSubs.light = mapped.length ? mapped : [...FALLBACK_LIGHT] this.sceneSubs.light = mapped.length ? mapped : [...FALLBACK_LIGHT]
...@@ -287,10 +291,12 @@ export default { ...@@ -287,10 +291,12 @@ export default {
sceneListWithOrder({ bizTypeCode: "2", businessType: 1 }), sceneListWithOrder({ bizTypeCode: "2", businessType: 1 }),
sceneListWithOrder({ bizTypeCode: "2", businessType: 2 }) sceneListWithOrder({ bizTypeCode: "2", businessType: 2 })
]) ])
if (seq !== this._loadScenesSeq) return
this.rightsScenesForEquity = normalizeSceneResponse(res1) this.rightsScenesForEquity = normalizeSceneResponse(res1)
this.rightsScenesForWarranty = normalizeSceneResponse(res2) this.rightsScenesForWarranty = normalizeSceneResponse(res2)
} }
} catch (e) { } catch (e) {
if (seq !== this._loadScenesSeq) return
if (category === "light") { if (category === "light") {
this.sceneSubs.light = [...FALLBACK_LIGHT] this.sceneSubs.light = [...FALLBACK_LIGHT]
} else { } else {
...@@ -298,8 +304,10 @@ export default { ...@@ -298,8 +304,10 @@ export default {
this.rightsScenesForWarranty = [] this.rightsScenesForWarranty = []
} }
} finally { } finally {
this.scenesLoading = false if (seq === this._loadScenesSeq) {
this.rightsScenesLoading = false this.scenesLoading = false
this.rightsScenesLoading = false
}
} }
}, },
ensureLeafInCategory() { ensureLeafInCategory() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!