银行卡

This commit is contained in:
余同学 2024-09-28 17:12:06 +08:00
parent 7375f33dcf
commit 0b931ba608
4 changed files with 955 additions and 263 deletions

View File

@ -3,124 +3,148 @@ import city_data from "@/utils/country-level2-data.js";
import qs from "qs";
export const mer_admin = {
/**
* 登录
* @param {object} params LoginParam
* @param {number} params.type
* @param {string} params.role
* @param {string} params.username
* @param {string} params.password
* @param {string} params.mobile
* @param {string} params.code
* @returns
*/
loginByAccount: (params) => {
return $http.post(`/auth/login`, {
...params,
type: 1
})
},
loginByMobile: (params) => {
return $http.post(`/merchant-api/auth/sms/login`, {
...params,
type: 2
})
},
getYZM(mobile) {
return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`);
},
getInfo() {
return $http.get(`/merchant-api/auth/info`);
},
//商品管理
//保存商品信息
saveProduct: (data) => {
return $http.post(`/merchant-api/product/save`, data);
},
//保存商品基本信息
saveProductBase: (data) => {
return $http.post(`/merchant-api/product/save/basic`, data);
},
//返回商品分类以及列表(聚合)
getPolyProduct: (data) => {
return $http.post(`/merchant-api/product/polymerization/list`, data);
},
//商品分页
getProductPage: (data) => {
return $http.post(`/merchant-api/product/page`, data);
},
//商户商品分类
getProductCategory: () => {
return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`);
},
//上架或下架
putOnShelvesProducts: (data) => {
return $http.post(`/merchant-api/product/batch/update/status`, data);
},
//批量删除商品
BatchDeleteProducts: (data) => {
return $http.post(`/merchant-api/product/batch/delete`, data);
},
//打折扣
setDiscounts: (data) => {
return $http.post(`merchant-api/activity/save`, data);
},
//获取销售单位
getSaleUnit: (data) => {
return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data });
},
//文件上传
uploadFile: () => {
return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload`
},
//直接获取城市数据
getCityOptions: () => {
return city_data;
},
//省市县数据
getCity: () => {
return $http.get(`/merchant-api/common/pca`);
},
//添加运费模板
addShippingTemplate: (data) => {
return $http.post(`/merchant-api/shippingTemplates/add`, data);
},
//删除模板
removeShippingTemplate: (id) => {
return $http.post(`/merchant-api/shippingTemplates/delete`, qs.stringify({
id
}), {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
},
//更新模板
updateShippingTemplate: (data) => {
return $http.post(`/merchant-api/shippingTemplates/update`, data);
},
//获取模板分页
getShippingTemplatePage: (data) => {
return $http.request({
method: 'get',
url: '/merchant-api/shippingTemplates/page',
params: data
})
},
//获取配送模板列表
getShippingTemplateList: (data) => {
return $http.request({
method: 'get',
url: '/merchant-api/shippingTemplates/list',
params: data
})
},
//获取模板详情
getShippingTemplateInfo: (id) => {
return $http.request({
method: 'get',
url: '/merchant-api/shippingTemplates/detail',
params: { id }
})
}
}
/**
* 登录
* @param {object} params LoginParam
* @param {number} params.type
* @param {string} params.role
* @param {string} params.username
* @param {string} params.password
* @param {string} params.mobile
* @param {string} params.code
* @returns
*/
loginByAccount: (params) => {
return $http.post(`/auth/login`, {
...params,
type: 1,
});
},
loginByMobile: (params) => {
return $http.post(`/merchant-api/auth/sms/login`, {
...params,
type: 2,
});
},
getYZM(mobile) {
return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`);
},
getInfo() {
return $http.get(`/merchant-api/auth/info`);
},
//商品管理
//保存商品信息
saveProduct: (data) => {
return $http.post(`/merchant-api/product/save`, data);
},
//保存商品基本信息
saveProductBase: (data) => {
return $http.post(`/merchant-api/product/save/basic`, data);
},
//返回商品分类以及列表(聚合)
getPolyProduct: (data) => {
return $http.post(`/merchant-api/product/polymerization/list`, data);
},
//商品分页
getProductPage: (data) => {
return $http.post(`/merchant-api/product/page`, data);
},
//商户商品分类
getProductCategory: () => {
return $http.get(
`/merchant-api/product/category/list?shopId=${
JSON.parse(sessionStorage.getItem("userInfo")).shopId
}`
);
},
//上架或下架
putOnShelvesProducts: (data) => {
return $http.post(`/merchant-api/product/batch/update/status`, data);
},
//批量删除商品
BatchDeleteProducts: (data) => {
return $http.post(`/merchant-api/product/batch/delete`, data);
},
//打折扣
setDiscounts: (data) => {
return $http.post(`merchant-api/activity/save`, data);
},
//获取销售单位
getSaleUnit: (data) => {
return $http.request({
url: `/merchant-api/product/unit/list`,
method: "get",
params: data,
});
},
//文件上传
uploadFile: () => {
return `${window.SITE_CONFIG["baseUrl"]}/merchant-api/file/upload`;
},
//直接获取城市数据
getCityOptions: () => {
return city_data;
},
//省市县数据
getCity: () => {
return $http.get(`/merchant-api/common/pca`);
},
//添加运费模板
addShippingTemplate: (data) => {
return $http.post(`/merchant-api/shippingTemplates/add`, data);
},
//删除模板
removeShippingTemplate: (id) => {
return $http.post(
`/merchant-api/shippingTemplates/delete`,
qs.stringify({
id,
}),
{
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
}
);
},
//更新模板
updateShippingTemplate: (data) => {
return $http.post(`/merchant-api/shippingTemplates/update`, data);
},
//获取模板分页
getShippingTemplatePage: (data) => {
return $http.request({
method: "get",
url: "/merchant-api/shippingTemplates/page",
params: data,
});
},
//获取配送模板列表
getShippingTemplateList: (data) => {
return $http.request({
method: "get",
url: "/merchant-api/shippingTemplates/list",
params: data,
});
},
//获取模板详情
getShippingTemplateInfo: (id) => {
return $http.request({
method: "get",
url: "/merchant-api/shippingTemplates/detail",
params: { id },
});
},
//银行卡分页
bankCardPage: (data) => {
return $http.request({
method: "get",
url: "/merchant-api/bank/page",
params: data,
});
},
//添加商家端银行卡
bankCardAdd: (data) => {
return $http.post(`/merchant-api/bank/com-create`, data);
},
};

View File

@ -1,148 +1,165 @@
import { getUUID } from "@/utils";
export default {
"msg": "success",
"menuList": [
// {
// "menuId": 999,
// url: 'http://localhost:8082/',
// type: 'iframe',
// // isMicroApp: true,
// name: '大屏展示',
// icon: 's-data',
// "type": 1,
// },
// new===
//放到首页
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "数据看板",
// "url": "local-dashboard/dashboard",
// "perms": "",
// "type": 1,
// "elIcon": "el-icon-data-analysis",
// "orderNum": 0,
// "open": null,
// list: []
// },
msg: "success",
menuList: [
// {
// "menuId": 999,
// url: 'http://localhost:8082/',
// type: 'iframe',
// // isMicroApp: true,
// name: '大屏展示',
// icon: 's-data',
// "type": 1,
// },
// new===
//放到首页
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "数据看板",
// "url": "local-dashboard/dashboard",
// "perms": "",
// "type": 1,
// "elIcon": "el-icon-data-analysis",
// "orderNum": 0,
// "open": null,
// list: []
// },
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "商品",
url: "local-course/resources",
perms: "",
type: 0,
elIcon: "el-icon-menu",
orderNum: 0,
open: null,
list: [
{
"menuId": getUUID(),
"parentId": 0,
"parentName": null,
"name": "商品",
"url": "local-course/resources",
"perms": "",
"type": 0,
"elIcon": "el-icon-menu",
"orderNum": 0,
"open": null,
list: [{
"menuId": getUUID(),
"parentId": 0,
"parentName": null,
"name": "商品管理",
"url": "product/index",
"perms": "",
"type": 1,
"elIcon": "el-icon-menu",
"orderNum": 0,
"open": null,
list: []
}]
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "商品管理",
url: "product/index",
perms: "",
type: 1,
elIcon: "el-icon-menu",
orderNum: 0,
open: null,
list: [],
},
],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "运费管理",
url: "",
perms: "",
type: 0,
elIcon: "el-icon-money",
orderNum: 0,
open: null,
list: [
{
"menuId": getUUID(),
"parentId": 0,
"parentName": null,
"name": "运费管理",
"url": "",
"perms": "",
"type": 0,
"elIcon": "el-icon-money",
"orderNum": 0,
"open": null,
list: [{
"menuId": getUUID(),
"parentId": 0,
"parentName": null,
"name": "运费模板",
"url": "logistics-fare/logistics-template/index",
"perms": "",
"type": 1,
"elIcon": "el-icon-postcard",
"orderNum": 0,
"open": null,
list: []
}]
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "运费模板",
url: "logistics-fare/logistics-template/index",
perms: "",
type: 1,
elIcon: "el-icon-postcard",
orderNum: 0,
open: null,
list: [],
},
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "教务管理",
// "url": "local-affairs",
// "perms": "",
// "type": 0,
// "elIcon": "el-icon-office-building",
// "orderNum": 0,
// "open": null,
// list: [
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "年级管理",
// "url": "local-affairs/grade",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "班级管理",
// "url": "local-affairs/class",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "教师管理",
// "url": "local-teacher/teacher",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "学校管理",
// "url": "local-school/school",
// "perms": "",
// "type": 1,
// "elIcon": "el-icon-school",
// "orderNum": 0,
// "open": null,
// list: []
// },
// ]
// },
],
"code": 0,
"permissions": []
}
],
},
{
menuId: getUUID(),
parentId: 0,
parentName: null,
name: "银行卡管理",
url: "bank-card/index",
perms: "",
type: 0,
elIcon: "el-icon-menu",
orderNum: 0,
open: null,
list: [],
},
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "教务管理",
// "url": "local-affairs",
// "perms": "",
// "type": 0,
// "elIcon": "el-icon-office-building",
// "orderNum": 0,
// "open": null,
// list: [
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "年级管理",
// "url": "local-affairs/grade",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "班级管理",
// "url": "local-affairs/class",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 2,
// "parentName": null,
// "name": "教师管理",
// "url": "local-teacher/teacher",
// "perms": "",
// "type": 1,
// "icon": "log",
// "orderNum": 0,
// "open": null,
// "list": []
// },
// {
// "menuId": getUUID(),
// "parentId": 0,
// "parentName": null,
// "name": "学校管理",
// "url": "local-school/school",
// "perms": "",
// "type": 1,
// "elIcon": "el-icon-school",
// "orderNum": 0,
// "open": null,
// list: []
// },
// ]
// },
],
code: 0,
permissions: [],
};

View File

@ -0,0 +1,199 @@
<template>
<div style="height: calc(100vh - 200px)">
<obj-table-plus
ref="oTable"
style="height: 100%"
:tableCols="tableCols"
:tableProp="tableProp"
@query="queryList"
v-model="dataList"
:tableEvent="tableEvent"
>
<template slot="tableTop">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="银行卡状态:">
<el-select v-model="formInline.region" placeholder="请选择">
<el-option label="审核中" value="shanghai"></el-option>
<el-option label="未通过" value="beijing"></el-option>
<el-option label="已通过" value="beijing"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="$refs.oTable.reload()"
>查询</el-button
>
</el-form-item>
</el-form>
<div class="mb-2">
<el-button type="primary" size="small" @click="addProduct"
>添加银行卡</el-button
>
<!-- <el-button
:disabled="selectList.length <= 0"
type="danger"
size="small"
@click="deleteProduct"
>批量删除</el-button
> -->
</div>
</template>
</obj-table-plus>
<!-- 添加或编辑 -->
<add-or-update
@queryList="$refs.oTable.reload()"
ref="addOrUpdate"
></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from "./popup/add-or-update.vue";
export default {
components: { AddOrUpdate,},
data() {
return {
dataList: [],
formInline: {
user: "",
region: "",
},
tableProp: {
"auto-resize": true,
border: true,
height: "auto",
"row-id": "id",
"show-overflow": false,
},
productFilterType: "SALE",
selectList: [],
};
},
methods: {
addProduct() {
this.$refs.addOrUpdate.toggle().add();
},
deleteProduct() {
console.log(this.selectList);
let integers = this.selectList.map((item) => {
return item.id;
});
this.$confirm("此操作将删除该商品, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
console.log("111");
this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => {
this.$refs.oTable.reload();
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
queryList(pageNo, pageSize) {
this.$api.mer_admin
.bankCardPage({
pageNumber: pageNo,
pageSize: pageSize,
linkId: JSON.parse(sessionStorage.getItem("userInfo")).managerId
? JSON.parse(sessionStorage.getItem("userInfo")).managerId
: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
})
.then((res) => {
console.log(res);
this.$refs.oTable.complete(
res.data.data.data,
Number(res.data.data.total)
);
})
.catch((err) => {
this.$refs.oTable.complete(false);
});
},
},
computed: {
tableCols() {
return [
{ type: "checkbox", width: "60px", fixed: "left" },
// { type: "seq", width: "60px", align: "center", title: "" },
{
title: "持卡人",
align: "center",
field: "cardId",
},
{
title: "证件号",
align: "certId",
field: "minSalePrice",
},
{
title: "手机号",
align: "center",
field: "legalMp",
},
{
title: "企业名称",
align: "center",
field: "name",
},
{
title: "状态",
align: "center",
field: "status",
},
{
title: "操作",
fixed: "right",
type: "jsx",
align: "center",
width: "140px",
render: ({ row }) => {
let edit = () => {
this.$refs.addOrUpdate.toggle(row).update();
};
let priceAdjustment = () => {
console.log(row);
this.$refs.AddPrice.toggle(row).update();
};
let changeInventory = () => {
this.$refs.addStock.toggle(row).update();
};
let setDiscounts = () => {
this.$refs.AddDiscount.toggle(row).update();
};
return (
<div>
<el-button
size="mini"
disabled={row.status != "DOWN"}
type="primary"
onClick={edit}
>
编辑
</el-button>
</div>
);
},
},
];
},
tableEvent() {
return {
"checkbox-all": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
"checkbox-change": ({ records, reserves }) => {
this.selectList = [...records, ...reserves];
},
};
},
},
};
</script>
<style lang="scss" scoped></style>

View File

@ -0,0 +1,452 @@
<template>
<div>
<obj-modal
ref="modal"
labelWidth="150px"
:modalConfig="modalConfig"
:modalData="modalData"
:modalHandles="modalHandles"
>
<template slot="dialog__content">
<el-form :model="modalData" ref="modalForm">
<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="cas">
<el-input
style="width: 300px"
v-model="modalData.name"
placeholder="请输入企业名称"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="150px" label="省份" prop="prov">
<el-cascader
v-model="productPlace"
style="width: 300px"
:options="this.$api.mer_admin.getCityOptions()"
@change="handleChange"
clearable
:props="{
value: 'name',
label: 'name',
children: 'children',
}"
></el-cascader>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="150px" label="地区" prop="cas">
<el-input
style="width: 300px"
v-model="modalData.area"
placeholder="请输入地区"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label-width="150px" label="社会信用码" prop="prov">
<el-input
style="width: 300px"
v-model="modalData.socialCreditCode"
placeholder="请输入社会信用码"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="社会信用码有效期"
prop="socialCreditCodeExpires"
>
<el-date-picker
style="width: 300px"
v-model="modalData.socialCreditCodeExpires"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="经营范围"
prop="businessScope"
>
<el-input
style="width: 300px"
v-model="modalData.businessScope"
placeholder="请输入经营范围"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="法人姓名"
prop="legalPerson"
>
<el-input
style="width: 300px"
v-model="modalData.legalPerson"
placeholder="请输入法人姓名"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label=" 法人身份证号码"
prop="legalCertId"
>
<el-input
style="width: 300px"
v-model="modalData.legalCertId"
placeholder="请输入法人身份证号码"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item
label-width="150px"
label="法人身份证有效期"
prop="legalCertIdExpires"
>
<el-date-picker
style="width: 300px"
v-model="modalData.legalCertIdExpires"
type="date"
placeholder="选择日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="法人手机号"
prop="legalMp"
>
<el-input
style="width: 300px"
v-model="modalData.legalMp"
placeholder="请输入法人手机号"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="150px" label="企业地址" prop="address">
<el-input
style="width: 300px"
v-model="modalData.address"
placeholder="请输入企业地址"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item
label-width="150px"
label="银行代码"
prop="bankCode"
>
<el-input
style="width: 300px"
v-model="modalData.bankCode"
placeholder="请输入银行代码"
>
</el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label-width="150px" label="银行卡号" prop="cardNo">
<el-input
style="width: 300px"
v-model="modalData.cardNo"
placeholder="请输入银行卡号"
>
</el-input>
</el-form-item>
</el-col>
</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-col :span="24">
<el-form-item
label-width="150px"
label="营业执照号"
prop="licenseNumber"
>
<el-input
style="width: 300px"
v-model="modalData.licenseNumber"
placeholder="请输入营业执照号"
>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<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="handleAvatarSuccess"
:file-list="fileList"
list-type="picture"
:headers="{ token: 'Bearer' + 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="bankAcctType"
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</template>
</obj-modal>
</div>
</template>
<script>
import { debounce, cloneDeep } from "lodash";
import { Divider } from "element-ui";
export default {
components: {},
data() {
return {
isAdd: true,
//
modalConfig: {
title: "添加银行卡",
show: false,
width: "80%",
},
modalData: {},
value1: [],
ProductData: {},
productPlace: "", //
fileList: [],
};
},
methods: {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true;
} else {
this.modalConfig.show = false;
this.$refs.modal.resetFields();
}
if (e) {
this.init(cloneDeep(e));
}
return {
add: () => {
this.modalConfig.title = "添加银行卡";
this.$nextTick(() => {
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: "",
licenseNumber: "",
};
this.$refs.modal.resetFields();
});
this.isAdd = true;
},
update: () => {
this.isAdd = false;
},
};
},
init(row) {},
handleChange(e) {
console.log(e);
this.modalData.prov = e.join("-");
},
handleAvatarSuccess(res) {
console.log(res);
},
},
computed: {
modalHandles() {
return [
{
label: "取消",
handle: () => {
this.toggle();
},
},
{
label: this.isAdd ? "确认添加" : "确认",
type: "primary",
loading: this.isLoading,
submit: true,
handle: () => {
let data = {
...this.ProductData,
ruleObject: {
discount: this.modalData.discount,
limitCount: this.modalData.limitCount,
},
startTime: this.modalData.DiscountTime[0],
endTime: this.modalData.DiscountTime[1],
};
this.$confirm(
`此操作将 商品折扣=${this.modalData.discount}折 限购数 = ${this.modalData.limitCount}, 是否确认保存此折扣?`,
"提示",
{
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true,
}
)
.then(() => {
this.$api.mer_admin.setDiscounts(data).then((res) => {
this.toggle();
this.$emit("queryList");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消",
});
});
},
},
];
},
},
asyncComputed: {},
};
</script>
<style lang="scss" scoped>
.introduce {
padding: 5px;
background: #fdf6ec;
text-align: center;
}
.introduce-center {
margin-bottom: 10px;
}
</style>