Commit 060e269c by chenwq

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

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