CRM_26-04-22#story#8495,潜在供应商H5页面提交信息,信息审核,提交补充信息与退回理由的优化与修复(默认停用)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
data() {
|
||||
return {
|
||||
name: '',
|
||||
potentialFlag: '',
|
||||
formPayload: null,
|
||||
qrCodeUrl: '',
|
||||
qrCode: '',
|
||||
@@ -35,6 +36,8 @@
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.potentialFlag = this.$route.query.potentialFlag || urlParams.get('potentialFlag') || '';
|
||||
const cached = localStorage.getItem('supplierAddForm');
|
||||
if (cached) {
|
||||
this.formPayload = JSON.parse(cached);
|
||||
@@ -83,9 +86,9 @@
|
||||
if (res?.code != 0) {
|
||||
Dialog.alert({ title: '提示', message: '该服务商已存在,查看信息' }).then(() => {
|
||||
localStorage.removeItem('supplierAddForm');
|
||||
const target = { name: 'supplierInfo', query: { id: res?.code } };
|
||||
const target = { name: 'supplierInfo', query: { id: res?.code, potentialFlag: this.potentialFlag } };
|
||||
localStorage.setItem('lastRoute', JSON.stringify(target));
|
||||
this.goPage('supplierInfo', { id: res?.code });
|
||||
this.goPage('supplierInfo', { id: res?.code, potentialFlag: this.potentialFlag });
|
||||
});
|
||||
} else {
|
||||
Toast('该服务商已存在');
|
||||
@@ -93,7 +96,8 @@
|
||||
} else {
|
||||
localStorage.removeItem('supplierAddForm');
|
||||
const supplierId = res?.data;
|
||||
const target = { name: 'supplierAddResult', query: { id: supplierId } };
|
||||
const potentialFlag = this.potentialFlag;
|
||||
const target = { name: 'supplierAddResult', query: { id: supplierId, potentialFlag } };
|
||||
localStorage.setItem('lastRoute', JSON.stringify(target));
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
@@ -101,11 +105,11 @@
|
||||
confirmButtonText: '去添加',
|
||||
cancelButtonText: '取消',
|
||||
}).then(() => {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId } }));
|
||||
this.goPage('vehicleManage', { id: supplierId });
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'vehicleManage', query: { id: supplierId, potentialFlag } }));
|
||||
this.goPage('vehicleManage', { id: supplierId, potentialFlag });
|
||||
}).catch(() => {
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: supplierId } }));
|
||||
this.goPage('supplierAddResult', { id: supplierId });
|
||||
localStorage.setItem('lastRoute', JSON.stringify({ name: 'supplierAddResult', query: { id: supplierId, potentialFlag } }));
|
||||
this.goPage('supplierAddResult', { id: supplierId, potentialFlag });
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user