Commit a211785a by 张立顺

fix bug

1 parent edb3570b
...@@ -101,6 +101,12 @@ export function findMerchantListByPage(data) { ...@@ -101,6 +101,12 @@ export function findMerchantListByPage(data) {
return request(data, RequestMethods.POST); return request(data, RequestMethods.POST);
} }
/** 上级商户分页(开放平台 oaapproval 网关)— 客户信息核验等 */
export function findMerchantListByPageOpen(data) {
data.method = `dj.api.oaapproval.open.findMerchantListByPage`;
return request(data, RequestMethods.POST);
}
/** 账户中心校验商户名称是否已存在(method 与请求体以后端文档为准联调) */ /** 账户中心校验商户名称是否已存在(method 与请求体以后端文档为准联调) */
export function checkMerchantNameExists(data) { export function checkMerchantNameExists(data) {
data.method = `merchants.api.open.merchantName.exists`; data.method = `merchants.api.open.merchantName.exists`;
......
import { import {
findMerchantListByPage, findMerchantListByPageOpen,
brandList as getBrandListApi, brandList as getBrandListApi,
getMerchantType as getMerchantTypeApi, getMerchantType as getMerchantTypeApi,
} from "@api/shelfManage"; } from "@api/shelfManage";
...@@ -72,8 +72,8 @@ const ACCOUNT_LEVEL_LABELS = ["工厂", "省代", "市代", "门店"]; ...@@ -72,8 +72,8 @@ const ACCOUNT_LEVEL_LABELS = ["工厂", "省代", "市代", "门店"];
*/ */
const PARENT_MERCHANT_LIST_ACCOUNTTYPE_ID_BY_LABEL = { const PARENT_MERCHANT_LIST_ACCOUNTTYPE_ID_BY_LABEL = {
"4S店": 2, "4S店": 2,
"园区店": 6, 园区店: 6,
"服务商": 7, 服务商: 7,
}; };
/** 上级商户列表接口筛选:仅这几种 accounttypeId */ /** 上级商户列表接口筛选:仅这几种 accounttypeId */
...@@ -509,7 +509,9 @@ export default { ...@@ -509,7 +509,9 @@ export default {
setMerchantNameDuplicateFieldError() { setMerchantNameDuplicateFieldError() {
this.$nextTick(() => { this.$nextTick(() => {
const inner = this.$refs.editFormRef?.$refs[this.editChildRef]; const inner = this.$refs.editFormRef?.$refs[this.editChildRef];
const field = inner?.fields?.find((f) => f.prop === "merchantName"); const field = inner?.fields?.find(
(f) => f.prop === "merchantName"
);
if (field) { if (field) {
field.validateState = "error"; field.validateState = "error";
field.validateMessage = MERCHANT_NAME_DUPLICATE_MESSAGE; field.validateMessage = MERCHANT_NAME_DUPLICATE_MESSAGE;
...@@ -622,7 +624,9 @@ export default { ...@@ -622,7 +624,9 @@ export default {
this.$refs.provinceForm.resetAddressForm(); this.$refs.provinceForm.resetAddressForm();
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.editFormRef?.$refs[this.editChildRef]?.clearValidate(); this.$refs.editFormRef?.$refs[
this.editChildRef
]?.clearValidate();
}); });
}, },
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
...@@ -729,10 +733,7 @@ export default { ...@@ -729,10 +733,7 @@ export default {
PARENT_MERCHANT_LIST_ACCOUNTTYPE_ID_BY_LABEL[label]; PARENT_MERCHANT_LIST_ACCOUNTTYPE_ID_BY_LABEL[label];
if (byLabel != null) return Number(byLabel); if (byLabel != null) return Number(byLabel);
// dictLabel 与约定字面不一致时(含空格、后缀等) // dictLabel 与约定字面不一致时(含空格、后缀等)
if ( if (label.includes("园区店") && !label.includes("虚拟")) {
label.includes("园区店") &&
!label.includes("虚拟")
) {
return 6; return 6;
} }
if (/4\s*[Ss]店/.test(label)) return 2; if (/4\s*[Ss]店/.test(label)) return 2;
...@@ -754,7 +755,7 @@ export default { ...@@ -754,7 +755,7 @@ export default {
get4sAndServiceMerchantList(searchIndex) { get4sAndServiceMerchantList(searchIndex) {
this.merchantLoading = true; this.merchantLoading = true;
return new Promise((resolve) => { return new Promise((resolve) => {
findMerchantListByPage({ findMerchantListByPageOpen({
merchantNoOrName: this.merchantNameKeyword, merchantNoOrName: this.merchantNameKeyword,
pageNum: this[searchIndex + "CurrentPage"] || 1, pageNum: this[searchIndex + "CurrentPage"] || 1,
pageSize: 50, pageSize: 50,
...@@ -886,7 +887,11 @@ export default { ...@@ -886,7 +887,11 @@ export default {
return; return;
} }
const list = ref.getMerchantBrandList() || []; const list = ref.getMerchantBrandList() || [];
this.$set(this.editData, "merchantBrandSlot", list.length ? "1" : ""); this.$set(
this.editData,
"merchantBrandSlot",
list.length ? "1" : ""
);
}, },
clickBrand() { clickBrand() {
if (!this.isFirstBrand) { if (!this.isFirstBrand) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!