Compare commits

..

No commits in common. "f5893d6957fcab040dc4943fb5c6b4ec14a2f962" and "b9c0ae1499fee2ae9bafad3e7a07b74f5329eaf5" have entirely different histories.

4 changed files with 263 additions and 955 deletions

View File

@ -3,148 +3,124 @@ import city_data from "@/utils/country-level2-data.js";
import qs from "qs"; import qs from "qs";
export const mer_admin = { export const mer_admin = {
/** /**
* 登录 * 登录
* @param {object} params LoginParam * @param {object} params LoginParam
* @param {number} params.type * @param {number} params.type
* @param {string} params.role * @param {string} params.role
* @param {string} params.username * @param {string} params.username
* @param {string} params.password * @param {string} params.password
* @param {string} params.mobile * @param {string} params.mobile
* @param {string} params.code * @param {string} params.code
* @returns * @returns
*/ */
loginByAccount: (params) => { loginByAccount: (params) => {
return $http.post(`/auth/login`, { return $http.post(`/auth/login`, {
...params, ...params,
type: 1, type: 1
}); })
}, },
loginByMobile: (params) => { loginByMobile: (params) => {
return $http.post(`/merchant-api/auth/sms/login`, { return $http.post(`/merchant-api/auth/sms/login`, {
...params, ...params,
type: 2, type: 2
}); })
}, },
getYZM(mobile) { getYZM(mobile) {
return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`); return $http.get(`/merchant-api/auth/login/code?mobile=${mobile}`);
}, },
getInfo() { getInfo() {
return $http.get(`/merchant-api/auth/info`); return $http.get(`/merchant-api/auth/info`);
}, },
//商品管理 //商品管理
//保存商品信息 //保存商品信息
saveProduct: (data) => { saveProduct: (data) => {
return $http.post(`/merchant-api/product/save`, data); return $http.post(`/merchant-api/product/save`, data);
}, },
//保存商品基本信息 //保存商品基本信息
saveProductBase: (data) => { saveProductBase: (data) => {
return $http.post(`/merchant-api/product/save/basic`, data); return $http.post(`/merchant-api/product/save/basic`, data);
}, },
//返回商品分类以及列表(聚合) //返回商品分类以及列表(聚合)
getPolyProduct: (data) => { getPolyProduct: (data) => {
return $http.post(`/merchant-api/product/polymerization/list`, data); return $http.post(`/merchant-api/product/polymerization/list`, data);
}, },
//商品分页 //商品分页
getProductPage: (data) => { getProductPage: (data) => {
return $http.post(`/merchant-api/product/page`, data); return $http.post(`/merchant-api/product/page`, data);
}, },
//商户商品分类 //商户商品分类
getProductCategory: () => { getProductCategory: () => {
return $http.get( return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`);
`/merchant-api/product/category/list?shopId=${ },
JSON.parse(sessionStorage.getItem("userInfo")).shopId //上架或下架
}` putOnShelvesProducts: (data) => {
); return $http.post(`/merchant-api/product/batch/update/status`, data);
}, },
//上架或下架 //批量删除商品
putOnShelvesProducts: (data) => { BatchDeleteProducts: (data) => {
return $http.post(`/merchant-api/product/batch/update/status`, data); return $http.post(`/merchant-api/product/batch/delete`, data);
}, },
//批量删除商品 //打折扣
BatchDeleteProducts: (data) => { setDiscounts: (data) => {
return $http.post(`/merchant-api/product/batch/delete`, data); return $http.post(`merchant-api/activity/save`, data);
}, },
//打折扣 //获取销售单位
setDiscounts: (data) => { getSaleUnit: (data) => {
return $http.post(`merchant-api/activity/save`, data); return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data });
}, },
//获取销售单位 //文件上传
getSaleUnit: (data) => { uploadFile: () => {
return $http.request({ return `${window.SITE_CONFIG['baseUrl']}/merchant-api/file/upload`
url: `/merchant-api/product/unit/list`, },
method: "get", //直接获取城市数据
params: data, getCityOptions: () => {
}); return city_data;
}, },
//文件上传 //省市县数据
uploadFile: () => { getCity: () => {
return `${window.SITE_CONFIG["baseUrl"]}/merchant-api/file/upload`; return $http.get(`/merchant-api/common/pca`);
}, },
//直接获取城市数据 //添加运费模板
getCityOptions: () => { addShippingTemplate: (data) => {
return city_data; return $http.post(`/merchant-api/shippingTemplates/add`, data);
}, },
//省市县数据 //删除模板
getCity: () => { removeShippingTemplate: (id) => {
return $http.get(`/merchant-api/common/pca`); return $http.post(`/merchant-api/shippingTemplates/delete`, qs.stringify({
}, id
//添加运费模板 }), {
addShippingTemplate: (data) => { headers: {
return $http.post(`/merchant-api/shippingTemplates/add`, data); 'Content-Type': 'application/x-www-form-urlencoded'
}, }
//删除模板 })
removeShippingTemplate: (id) => { },
return $http.post( //更新模板
`/merchant-api/shippingTemplates/delete`, updateShippingTemplate: (data) => {
qs.stringify({ return $http.post(`/merchant-api/shippingTemplates/update`, data);
id, },
}), //获取模板分页
{ getShippingTemplatePage: (data) => {
headers: { return $http.request({
"Content-Type": "application/x-www-form-urlencoded", method: 'get',
}, url: '/merchant-api/shippingTemplates/page',
} params: data
); })
}, },
//更新模板 //获取配送模板列表
updateShippingTemplate: (data) => { getShippingTemplateList: (data) => {
return $http.post(`/merchant-api/shippingTemplates/update`, data); return $http.request({
}, method: 'get',
//获取模板分页 url: '/merchant-api/shippingTemplates/list',
getShippingTemplatePage: (data) => { params: data
return $http.request({ })
method: "get", },
url: "/merchant-api/shippingTemplates/page", //获取模板详情
params: data, getShippingTemplateInfo: (id) => {
}); return $http.request({
}, method: 'get',
//获取配送模板列表 url: '/merchant-api/shippingTemplates/detail',
getShippingTemplateList: (data) => { params: { id }
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,165 +1,148 @@
import { getUUID } from "@/utils"; import { getUUID } from "@/utils";
export default { export default {
msg: "success", "msg": "success",
menuList: [ "menuList": [
// { // {
// "menuId": 999, // "menuId": 999,
// url: 'http://localhost:8082/', // url: 'http://localhost:8082/',
// type: 'iframe', // type: 'iframe',
// // isMicroApp: true, // // isMicroApp: true,
// name: '大屏展示', // name: '大屏展示',
// icon: 's-data', // icon: 's-data',
// "type": 1, // "type": 1,
// }, // },
// new=== // new===
//放到首页 //放到首页
// { // {
// "menuId": getUUID(), // "menuId": getUUID(),
// "parentId": 0, // "parentId": 0,
// "parentName": null, // "parentName": null,
// "name": "数据看板", // "name": "数据看板",
// "url": "local-dashboard/dashboard", // "url": "local-dashboard/dashboard",
// "perms": "", // "perms": "",
// "type": 1, // "type": 1,
// "elIcon": "el-icon-data-analysis", // "elIcon": "el-icon-data-analysis",
// "orderNum": 0, // "orderNum": 0,
// "open": null, // "open": null,
// list: [] // 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(), "menuId": getUUID(),
parentId: 0, "parentId": 0,
parentName: null, "parentName": null,
name: "商品管理", "name": "商品",
url: "product/index", "url": "local-course/resources",
perms: "", "perms": "",
type: 1, "type": 0,
elIcon: "el-icon-menu", "elIcon": "el-icon-menu",
orderNum: 0, "orderNum": 0,
open: null, "open": null,
list: [], 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(), "menuId": getUUID(),
parentId: 0, "parentId": 0,
parentName: null, "parentName": null,
name: "运费模板", "name": "运费管理",
url: "logistics-fare/logistics-template/index", "url": "",
perms: "", "perms": "",
type: 1, "type": 0,
elIcon: "el-icon-postcard", "elIcon": "el-icon-money",
orderNum: 0, "orderNum": 0,
open: null, "open": null,
list: [], 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,
menuId: getUUID(), // "parentName": null,
parentId: 0, // "name": "教务管理",
parentName: null, // "url": "local-affairs",
name: "银行卡管理", // "perms": "",
url: "bank-card/index", // "type": 0,
perms: "", // "elIcon": "el-icon-office-building",
type: 0, // "orderNum": 0,
elIcon: "el-icon-menu", // "open": null,
orderNum: 0, // list: [
open: null, // {
list: [], // "menuId": getUUID(),
}, // "parentId": 2,
// { // "parentName": null,
// "menuId": getUUID(), // "name": "年级管理",
// "parentId": 0, // "url": "local-affairs/grade",
// "parentName": null, // "perms": "",
// "name": "教务管理", // "type": 1,
// "url": "local-affairs", // "icon": "log",
// "perms": "", // "orderNum": 0,
// "type": 0, // "open": null,
// "elIcon": "el-icon-office-building", // "list": []
// "orderNum": 0, // },
// "open": null, // {
// list: [ // "menuId": getUUID(),
// { // "parentId": 2,
// "menuId": getUUID(), // "parentName": null,
// "parentId": 2, // "name": "班级管理",
// "parentName": null, // "url": "local-affairs/class",
// "name": "年级管理", // "perms": "",
// "url": "local-affairs/grade", // "type": 1,
// "perms": "", // "icon": "log",
// "type": 1, // "orderNum": 0,
// "icon": "log", // "open": null,
// "orderNum": 0, // "list": []
// "open": null, // },
// "list": [] // {
// }, // "menuId": getUUID(),
// { // "parentId": 2,
// "menuId": getUUID(), // "parentName": null,
// "parentId": 2, // "name": "教师管理",
// "parentName": null, // "url": "local-teacher/teacher",
// "name": "班级管理", // "perms": "",
// "url": "local-affairs/class", // "type": 1,
// "perms": "", // "icon": "log",
// "type": 1, // "orderNum": 0,
// "icon": "log", // "open": null,
// "orderNum": 0, // "list": []
// "open": null, // },
// "list": [] // {
// }, // "menuId": getUUID(),
// { // "parentId": 0,
// "menuId": getUUID(), // "parentName": null,
// "parentId": 2, // "name": "学校管理",
// "parentName": null, // "url": "local-school/school",
// "name": "教师管理", // "perms": "",
// "url": "local-teacher/teacher", // "type": 1,
// "perms": "", // "elIcon": "el-icon-school",
// "type": 1, // "orderNum": 0,
// "icon": "log", // "open": null,
// "orderNum": 0, // list: []
// "open": null, // },
// "list": [] // ]
// }, // },
// { ],
// "menuId": getUUID(), "code": 0,
// "parentId": 0, "permissions": []
// "parentName": null, }
// "name": "学校管理",
// "url": "local-school/school",
// "perms": "",
// "type": 1,
// "elIcon": "el-icon-school",
// "orderNum": 0,
// "open": null,
// list: []
// },
// ]
// },
],
code: 0,
permissions: [],
};

View File

@ -1,199 +0,0 @@
<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

@ -1,452 +0,0 @@
<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>