Commit 70542ff1 by chenwq

```

feat(systemConfig): 添加主服务商名称字段并优化服务列表显示

- 新增partnerMerchantName字段用于存储主服务商名称
- 在获取数据时同步设置主服务商名称
- 添加appendCurrentService方法确保当前主服务商在列表中可见
- 当主服务商不在服务列表中时,自动将其添加到下拉选项中
```
1 parent eb5a630f
Pipeline #359 for 70542ff1 skipped in 0 seconds
......@@ -145,6 +145,7 @@ export default {
// partnerType: 1,
serviceList: [], // 服务商数据
partnerMerchantId: "", // 主服务商
partnerMerchantName: "", // 主服务商名称
formData: {
shippingEntityId: "",
},
......@@ -180,7 +181,9 @@ export default {
this.marketingMerchantName = res.marketingMerchantName || "";
this.loginControlList = res.loginControlList || [0, 1];
this.partnerMerchantId = res.partnerMerchantId || "";
this.partnerMerchantName = res.partnerMerchantName || "";
this.formData.shippingEntityId = res.shippingEntityId || "";
this.appendCurrentService();
// this.partnerType = res.partnerType || 1
this.onChange(this.checkList);
});
......@@ -201,8 +204,21 @@ export default {
oParams.yqMerchantId = o.yqMerchantId;
getServiceListAPI(oParams).then((res) => {
this.serviceList = res || [];
this.appendCurrentService();
});
},
// 当前主服务商不在列表时,补充到下拉选项
appendCurrentService() {
const hasCurrentService = this.serviceList.some(
item => item.partnerMerchantId == this.partnerMerchantId,
);
if (this.partnerMerchantId && !hasCurrentService) {
this.serviceList.push({
partnerMerchantId: this.partnerMerchantId,
partnerMerchantName: this.partnerMerchantName,
});
}
},
onChangeByLogin() { },
// 监听支付方式勾选
onChange(list) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!