Commit 060e269c by chenwq

refactor(specialBankAccount): 统一模块命名并优化功能逻辑

- 统一全模块命名为“特殊银行账号”,修正相关注释、弹窗标题和导出配置
- 重构弹窗打开逻辑,提取通用openDialog方法减少代码重复
- 修复获取银行详情的API参数错误,使用正确的id字段
- 将账号类型选项值从字符串调整为数字类型
- 新增编辑模式下禁用修改指定字段的逻辑
1 parent 5fb62356
......@@ -202,13 +202,13 @@ export default {
merchantOpt: [],
accountTypeList: [{
name: "灵工平台",
value: "1",
value: 1,
}, {
name: "个体工商户",
value: "2",
value: 2,
}, {
name: "其他",
value: "3",
value: 3,
}],
accountTypeShow: {
1: "灵工平台",
......@@ -298,8 +298,16 @@ export default {
this.formRules = {};
});
}
if (this.oprType == "edit") {
const notEditList = ["accountType", "bankAccountNo", "remark"];
this.editFormData.forEach((item, idx) => {
if (notEditList.includes(item.name)) {
this.editFormData[idx].type = "showTxt";
}
});
}
this.loading = true;
getBankById({ merchantId: this.merchantRow.merchantId }).then((res) => {
getBankById({ id: this.merchantRow.id }).then((res) => {
this.editData = deepClone(res);
this.editData.createdDate = Util.dateFormate(this.editData.createdDate, "YYYY-MM-DD HH:mm:ss");
this.appendCurrentMerchantOption();
......
<!-- 银企账号 - 列表 -->
<!-- 特殊银行账号 - 列表 -->
<template>
<d2-container>
<div>
......@@ -234,25 +234,24 @@ export default {
});
}
},
handleAdd() {
this.modeDialogConfig.config.title = "新增银企账号";
this.bankOprType = "add";
openDialog(title, type, row = null) {
this.modeDialogConfig.config.title = title;
this.bankOprType = type;
this.merchantRow = row;
this.handleBankClose();
},
handleAdd() {
this.openDialog("新增特殊银行账号", "add");
},
handleDetail(row) {
this.modeDialogConfig.config.title = "查看银企账号";
this.bankOprType = "detail";
this.merchantRow = row;
this.handleBankClose();
this.openDialog("查看特殊银行账号", "detail", row);
},
// 修改银企账号
// 修改特殊银行账号
handleEdit(row) {
this.modeDialogConfig.config.title = "编辑银企账号";
this.bankOprType = "edit";
this.merchantRow = row;
this.handleBankClose();
this.openDialog("修改特殊银行账号", "edit", row);
},
// 修改到账模式确认
......@@ -323,11 +322,11 @@ export default {
handleExport() {
const params = {};
params.method = "dj.api.smartcarlife.merchantBankEnterpriseAccount.export.async";
params.method = "dj.api.smartcarlife.specialBankAccount.export.async";
const list = [
...this.dowloadList,
{
name: "银企账号",
name: "特殊银行账号",
exportParam: JSON.stringify(params),
status: "waiting",
timeid: new Date().getTime(),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!