Commit a211785a by 张立顺

fix bug

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