银行卡私账
continuous-integration/drone/push Build is passing Details

This commit is contained in:
余同学 2024-10-15 18:02:25 +08:00
parent 9e60dfcc0c
commit 37ec774348
4 changed files with 291 additions and 69 deletions

View File

@ -15,7 +15,7 @@ export const password = (password, newPassword) => {
// 退出登录 // 退出登录
export const logout = () => { export const logout = () => {
return $http({ return $http({
url: '/auth/logout', url: '/merchant-api/auth/logout',
method: 'post', method: 'post',
data: $http.adornData() data: $http.adornData()
}) })

View File

@ -9,7 +9,47 @@
> >
<template slot="dialog__content"> <template slot="dialog__content">
<el-form :model="modalData" ref="modalForm"> <el-form :model="modalData" ref="modalForm">
<el-row v-show="process == 1"> <el-row v-show="process == 1 && modalData.bankAcctType == 1">
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡类型:"
prop="bankAcctType"
>
<el-select
@change="handleChange"
style="width: 300px"
v-model="modalData.bankAcctType"
placeholder="请输入银行卡类型"
>
<el-option
v-for="item in [
{ label: '公账', value: 1 },
{ label: '私账', value: 2 },
]"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡对应户名:"
prop="cardName"
>
<el-input
style="width: 300px"
v-model="modalData.cardName"
placeholder="请输入银行卡对应户名"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
@ -244,45 +284,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡对应户名:"
prop="cardName"
>
<el-input
style="width: 300px"
v-model="modalData.cardName"
placeholder="请输入银行卡对应户名"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡类型:"
prop="bankAcctType"
>
<el-select
style="width: 300px"
v-model="modalData.bankAcctType"
placeholder="请输入银行卡类型"
>
<el-option
v-for="item in [
{ label: '公账', value: 1 },
{ label: '私账', value: 2 },
]"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item <el-form-item
@ -300,7 +301,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-row> </el-row>
<el-row v-show="process == 2"> <el-row v-show="process == 2 && modalData.bankAcctType == 1">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
@ -416,6 +417,154 @@
</el-col> </el-col>
</el-row> </el-row>
</el-row> </el-row>
<el-row v-show="modalData.bankAcctType == 2">
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡类型:"
prop="bankAcctType"
>
<el-select
@change="handleChange"
style="width: 300px"
v-model="modalData.bankAcctType"
placeholder="请输入银行卡类型"
>
<el-option
v-for="item in [
{ label: '公账', value: 1 },
{ label: '私账', value: 2 },
]"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡对应户名:"
prop="cardName"
>
<el-input
style="width: 300px"
v-model="modalData.cardName"
placeholder="请输入银行卡对应户名"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行类型:"
prop="bankType"
>
<el-select
style="width: 300px"
v-model="modalData.bankType"
placeholder="请选择"
>
<el-option
v-for="item in [
{ label: '摊主银行卡', value: 1 },
{ label: '代理银行卡', value: 2 },
{ label: '专员银行卡', value: 3 },
{ label: '分销银行卡', value: 4 },
{ label: '用户银行卡', value: 5 },
]"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label=" 身份证号码:"
prop="certId"
>
<el-input
style="width: 300px"
v-model="modalData.certId"
placeholder="请输入身份证号码"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="150px" label="手机号:" prop="telNo">
<el-input
style="width: 300px"
v-model="modalData.telNo"
placeholder="请输入法人手机号"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行卡号:"
prop="cardId"
>
<el-input
style="width: 300px"
v-model="modalData.cardId"
placeholder="请输入银行卡号"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="法人身份证正面国徽:"
prop="bankAcctType"
>
<el-upload
class="upload-demo"
:action="this.$api.mer_admin.uploadFile()"
:on-success="idCardFrontImg"
:file-list="fileList"
list-type="picture"
:headers="{ token: this.$cookie.get('token') }"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="法人身份证背面人像:"
prop="licensePicture"
>
<el-upload
class="upload-demo"
:action="this.$api.mer_admin.uploadFile()"
:on-success="idCardBackImg"
:file-list="fileList"
list-type="picture"
:headers="{ token: this.$cookie.get('token') }"
>
<el-button size="small" type="primary">点击上传</el-button>
</el-upload>
</el-form-item>
</el-col>
</el-row>
</el-row>
</el-form> </el-form>
</template> </template>
</obj-modal> </obj-modal>
@ -486,7 +635,7 @@ export default {
bankLicense: "", bankLicense: "",
handIdCardFront: "", handIdCardFront: "",
handIdCardBack: "", handIdCardBack: "",
bankAcctType: "", bankAcctType: 1,
licenseNumber: "", licenseNumber: "",
}; };
this.$refs.modal.resetFields(); this.$refs.modal.resetFields();
@ -500,8 +649,7 @@ export default {
}, },
init(row) {}, init(row) {},
handleChange(e) { handleChange(e) {
console.log(e); this.modalData.prov = e.join("-");
// this.modalData.prov = e.join("-");
}, },
handleAvatarSuccess(res) { handleAvatarSuccess(res) {
console.log(res); console.log(res);
@ -527,42 +675,112 @@ export default {
console.log(res); console.log(res);
this.modalData.handIdCardBack = res.data; this.modalData.handIdCardBack = res.data;
}, },
handleChange(e) {
if (e == 1) {
this.modalData = {
linkId: JSON.parse(sessionStorage.getItem("userInfo")).managerId
? JSON.parse(sessionStorage.getItem("userInfo")).managerId
: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
bankType: "",
name: "",
prov: "",
area: "",
socialCreditCode: "",
socialCreditCodeExpires: "",
businessScope: "",
legalPerson: "",
legalCertId: "",
legalCertIdExpires: "",
legalMp: "",
address: "",
bankCode: "",
cardNo: "",
cardName: "",
licensePicture: "",
idCardFront: "",
idCardBack: "",
bankLicense: "",
handIdCardFront: "",
handIdCardBack: "",
bankAcctType: 1,
licenseNumber: "",
};
console.log(e);
} else {
this.modalData = {
linkId: JSON.parse(sessionStorage.getItem("userInfo")).managerId
? JSON.parse(sessionStorage.getItem("userInfo")).managerId
: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
bankType: "",
cardId: "",
cardName: "",
certId: "",
telNo: "",
idCardFront: "",
idCardBack: "",
bankAcctType: 2,
};
}
},
}, },
computed: { computed: {
modalHandles() { modalHandles() {
return [ if (this.modalData.bankAcctType == 1) {
{ return [
label: "取消", {
handle: () => { label: "取消",
this.toggle(); handle: () => {
this.toggle();
},
}, },
}, {
{ label: "上一步",
label: "上一步", type: "primary",
type: "primary", disabled: () => this.process == 1,
disabled: () => this.process == 1, handle: () => {
handle: () => { console.log(this.modalData);
console.log(this.modalData); this.process = 1;
this.process = 1; },
}, },
}, {
{ label: this.process == 1 ? "下一步" : "确认添加",
label: this.process == 1 ? "下一步" : "确认添加", type: "primary",
type: "primary", handle: () => {
handle: () => { if (this.process == 1) {
if (this.process == 1) { this.process = 2;
this.process = 2; } else {
} else { console.log(this.modalData);
this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => {
console.log(res);
this.$emit("queryList");
this.toggle();
});
}
},
},
];
} else {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: "确认添加",
type: "primary",
handle: () => {
console.log(this.modalData); console.log(this.modalData);
this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => { this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => {
console.log(res); console.log(res);
this.$emit("queryList"); this.$emit("queryList");
this.toggle(); this.toggle();
}); });
} },
}, },
}, ];
]; }
}, },
}, },
asyncComputed: {}, asyncComputed: {},

View File

@ -288,6 +288,8 @@ export default {
width: "340px", width: "340px",
render: ({ row }) => { render: ({ row }) => {
let edit = () => { let edit = () => {
console.log(row);
this.$refs.addOrUpdate.toggle(row).update(); this.$refs.addOrUpdate.toggle(row).update();
}; };
let priceAdjustment = () => { let priceAdjustment = () => {

View File

@ -208,6 +208,8 @@ export default {
}); });
this.isAdd = true; this.isAdd = true;
console.log('112233');
}, },
update: () => { update: () => {
this.modalConfig.title = "编辑商品"; this.modalConfig.title = "编辑商品";