diff --git a/ruoyi-ui/src/api/szxc/bankinfo.js b/ruoyi-ui/src/api/szxc/bankinfo.js index 4d78fad..1e1eee3 100644 --- a/ruoyi-ui/src/api/szxc/bankinfo.js +++ b/ruoyi-ui/src/api/szxc/bankinfo.js @@ -42,3 +42,12 @@ export function delBankinfo(id) { method: 'delete' }) } + +// 修改银行卡信息 +export function editDefault(data) { + return request({ + url: '/szxc/bankinfo/editDefault', + method: 'put', + data: data + }) +} diff --git a/ruoyi-ui/src/views/szxc/bankinfo/index.vue b/ruoyi-ui/src/views/szxc/bankinfo/index.vue index 44d4782..9be8bbf 100644 --- a/ruoyi-ui/src/views/szxc/bankinfo/index.vue +++ b/ruoyi-ui/src/views/szxc/bankinfo/index.vue @@ -1,13 +1,9 @@ - - - + + + - - - - - - - - - - + style="width:100%" + > + + 搜索 @@ -141,21 +120,23 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + 是 + 设为默认 + + + - + - - - + + + + + - - + + - - + + @@ -207,32 +192,72 @@ - - - - - - - - - - - - + + + + + + + + + + + 搜索 + + + + + + + + + + + + + + + + + + + diff --git a/ruoyi-ui/src/views/szxc/jminfo/index.vue b/ruoyi-ui/src/views/szxc/jminfo/index.vue index 29677fb..40dec37 100644 --- a/ruoyi-ui/src/views/szxc/jminfo/index.vue +++ b/ruoyi-ui/src/views/szxc/jminfo/index.vue @@ -135,7 +135,7 @@ style="width:100%" > - + @@ -403,17 +403,15 @@ 修改 + >信息更新 删除 + >注销 银行卡信息 @@ -439,8 +437,8 @@ - 户信息 - + 户信息 + - 户籍性质信息 + 户籍性质信息 - + - + - - - + - + {{ item.tagName }} @@ -778,6 +776,72 @@ + + + + 添加 + + + + + + + + + + 是 + 设为默认 + + + + + 修改 + 删除 + + + + + + + + + + + + + + + + + + + + + + + + @@ -786,6 +850,7 @@ import { listJminfo, getJminfo, delJminfo, addJminfo, updateJminfo } from "@/api import { listAddress } from "@/api/szxc/address"; import { listJmtag, addAllJmtag } from "@/api/szxc/jmtag"; import { listTag } from "@/api/szxc/tag"; +import { listBankinfo, editDefault, addBankinfo, updateBankinfo, delBankinfo } from "@/api/szxc/bankinfo"; import { deptTreeSelect } from "@/api/system/user"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; @@ -793,7 +858,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { name: "Jminfo", components: { Treeselect }, - dicts: ['szxc_hjxz', 'szxc_gj', 'szxc_head', 'szxc_hzgx', 'szxc_long_live', 'szxc_off', 'szxc_gj', 'sys_user_sex', + dicts: ['szxc_hjxz', 'szxc_gj', 'szxc_head', 'szxc_hzgx', 'szxc_yes_no', 'szxc_off', 'szxc_gj', 'sys_user_sex', 'szxc_brqk', 'szxc_hyzk', 'szxc_xueli', 'szxc_zjxy', 'szxc_jkzk', 'szxc_zzmm'], data() { return { @@ -932,7 +997,7 @@ export default { }, // 户主信息 hzInfo: { - dialogVisible: false, + visible: false, // 遮罩层 loading: false, // 总条数 @@ -955,14 +1020,45 @@ export default { // 人员标签 rybqInfo: { jmId: null, - dialogVisible: false, + visible: false, // 选中人员标签列表 checkList: [], // 选中人员标签列表Ids checkListIds: [], // 人员标签选择列表 checkboxList: [] - } + }, + // 银行卡信息 + bankInfo: { + visible: false, + // 遮罩层 + loading: false, + // 查询列表 + list: [], + // 弹出层标题 + title: '', + // 添加弹出层 + add_open: false, + // 表单参数 + form: {}, + // 居民信息 + jminRow: null, + // 表单校验 + rules: { + cardNum: [ + { required: true, message: "银行卡号不能为空", trigger: "blur" } + ], + bankNum: [ + { required: true, message: "银行行号不能为空", trigger: "blur" } + ], + bankName: [ + { required: true, message: "银行名称不能为空", trigger: "blur" } + ], + bankAddress: [ + { required: true, message: "开户行不能为空", trigger: "blur" } + ], + }, + }, }; }, created() { @@ -981,7 +1077,7 @@ export default { this.form.deptName = node.label; }, acountNoQuery(){ - this.hzInfo.dialogVisible = true; + this.hzInfo.visible = true; this.getlistAddress() }, /** 查询居民信息列表 */ @@ -1136,7 +1232,7 @@ export default { this.form.deptId = row.deptId; this.form.deptName = row.deptName; this.form.hjAddress = row.hjAddress; - this.hzInfo.dialogVisible = false + this.hzInfo.visible = false }, // 与户主关系 relationChange(val){ @@ -1154,7 +1250,7 @@ export default { }, // 点击人员标签 handleJmtag(row){ - this.rybqInfo.dialogVisible = true; + this.rybqInfo.visible = true; this.getlistTag(row); this.getlistJmtag(row); }, @@ -1203,7 +1299,96 @@ export default { szxcJmTags: szxcJmTags }).then(response => { this.$modal.msgSuccess("操作成功"); - this.rybqInfo.dialogVisible = false; + this.rybqInfo.visible = false; + }); + }, + /** 查询银行卡信息列表 */ + handleBankInfo(row){ + this.bankInfo.jminRow = row; + this.bankInfo.visible = true; + this.getlistBankinfo(); + }, + /** 查询关联人员标签列表 */ + getlistBankinfo() { + listBankinfo({ + pageNum: 1, + pageSize: 100000000, + ownerId: this.bankInfo.jminRow.id + }).then(response => { + this.bankInfo.list = response.rows + }); + }, + // 默认卡 + defaultCardChange(row) { + this.$modal.confirm('确认将银行卡号为【"' + row.cardNum + '"】的银行卡设为默认卡吗?').then(()=> { + editDefault({ + id: row.id, + jmId: row.ownerId, + defaultCard: '0' + }).then(() => { + this.$modal.msgSuccess("操作成功"); + this.getlistBankinfo() + }) + }) + }, + // 添加银行卡 + bankInfoAdd(){ + this.resetForm("bankInfoForm"); + this.bankInfo.form = { + id: null, + ownerId: this.bankInfo.jminRow.id, + ownerName: this.bankInfo.jminRow.name, + cardId: this.bankInfo.jminRow.cardId, + cardNum: null, + bankNum: null, + bankName: null, + bankAddress: null, + defaultCard: null, + createBy: null, + createTime: null, + updateBy: null, + updateTime: null, + deptId: this.bankInfo.jminRow.deptId, + deptName: this.bankInfo.jminRow.deptName, + userId: null + }; + this.bankInfo.title = '添加银行卡'; + this.bankInfo.add_open = true; + }, + /** 修改按钮操作 */ + bankInfoUpdate(row) { + this.bankInfo.form = row; + this.bankInfo.title = '修改银行卡'; + this.bankInfo.add_open = true; + }, + /** 删除按钮操作 */ + bankInfoDelete(row) { + this.$modal.confirm('是否确认删除银行卡号为【"' + row.cardNum + '"】的数据项?').then(function() { + return delBankinfo(row.id); + }).then(() => { + this.getlistBankinfo(); + this.$modal.msgSuccess("删除成功"); + }).catch(() => {}); + }, + // 添加提交银行卡 + bankSubmit(){ + this.$refs["bankInfoForm"].validate(valid => { + if (valid) { + if (this.bankInfo.form.id != null) { + updateBankinfo(this.bankInfo.form).then(response => { + this.$modal.msgSuccess("修改成功"); + this.bankInfo.add_open = false; + this.getlistBankinfo(); + }); + } else { + this.bankInfo.form.defaultCard = '1' + addBankinfo(this.bankInfo.form).then(response => { + this.$modal.msgSuccess("新增成功"); + this.bankInfo.add_open = false; + this.getlistBankinfo(); + }); + } + } }); } }