Merge branch 'master' of http://60.204.229.151:20080/chenkangxu/merchant-web
This commit is contained in:
commit
b6efb172de
31
.drone.yml
31
.drone.yml
|
@ -4,7 +4,7 @@ name: build
|
|||
|
||||
steps:
|
||||
- name: build
|
||||
image: node:18.20.3-alpine
|
||||
image: docker.linbin.site/node:18.20.3-alpine
|
||||
pull: if-not-exists
|
||||
volumes:
|
||||
- name: cache
|
||||
|
@ -12,26 +12,27 @@ steps:
|
|||
- name: node-build
|
||||
path: /app/build
|
||||
commands: ## 此处自己定义项目工程的构建命令
|
||||
- npm install -g pnpm
|
||||
- npm install -g pnpm --registry=https://registry.npmmirror.com
|
||||
- pnpm config set registry https://registry.npmmirror.com
|
||||
- pnpm i
|
||||
- pnpm run build:prod
|
||||
- ls -l
|
||||
- cp -r dist /app/build/
|
||||
when: ## 定义在什么情况下触发构建任务
|
||||
branch: master #定义在哪个分支触发构建任务
|
||||
- name: scp
|
||||
image: appleboy/drone-scp
|
||||
volumes:
|
||||
- name: node-build
|
||||
path: /app/build
|
||||
settings:
|
||||
host: 60.204.138.3
|
||||
username: root
|
||||
password: 5xhqamyZ
|
||||
port: 22
|
||||
target: /data/app/dmjs-merchant-admin
|
||||
source: /app/build/dist
|
||||
overwrite: true
|
||||
# - name: scp
|
||||
# image: appleboy/drone-scp
|
||||
# volumes:
|
||||
# - name: node-build
|
||||
# path: /app/build
|
||||
# settings:
|
||||
# host: 60.204.138.3
|
||||
# username: root
|
||||
# password: 5xhqamyZ
|
||||
# port: 22
|
||||
# target: /data/app/dmjs-merchant-admin
|
||||
# source: /app/build/dist
|
||||
# overwrite: true
|
||||
volumes:
|
||||
- name: node-build
|
||||
host:
|
||||
|
|
|
@ -9,14 +9,15 @@
|
|||
/**
|
||||
* 生产环境
|
||||
*/
|
||||
;(function () {
|
||||
(function () {
|
||||
window.SITE_CONFIG = {};
|
||||
|
||||
// 在线api接口请求地址
|
||||
window.SITE_CONFIG['baseUrl'] ="https://admin-test.damajishi.cn"
|
||||
window.SITE_CONFIG["baseUrl"] = "https://admin-test.damajishi.cn/";
|
||||
|
||||
// cdn地址 = 域名 + 版本号
|
||||
window.SITE_CONFIG['domain'] = './'; // 域名
|
||||
window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)
|
||||
window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
|
||||
window.SITE_CONFIG["domain"] = "./"; // 域名
|
||||
window.SITE_CONFIG["version"] = ""; // 版本号(年月日时分)
|
||||
window.SITE_CONFIG["cdnUrl"] =
|
||||
window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
|
||||
})();
|
||||
|
|
|
@ -9,16 +9,18 @@
|
|||
/**
|
||||
* 开发环境
|
||||
*/
|
||||
;(function () {
|
||||
(function () {
|
||||
window.SITE_CONFIG = {};
|
||||
// api接口请求地址
|
||||
window.SITE_CONFIG['baseUrl'] ="http://admin-test.damajishi.cn:8899"
|
||||
// 在线api接口请求地址
|
||||
window.SITE_CONFIG["baseUrl"] = "https://admin-test.damajishi.cn/";
|
||||
// 在线api接口请求地址
|
||||
// window.SITE_CONFIG['baseUrl'] = 'http://119.29.103.250:8082/red-memory';
|
||||
// 在线api接口请求地址
|
||||
window.SITE_CONFIG['baseUrlComment'] = 'http://123.60.109.11:8081/red-memory-user';
|
||||
// 在线api接口请求地址
|
||||
window.SITE_CONFIG["baseUrlComment"] =
|
||||
"http://123.60.109.11:8081/red-memory-user";
|
||||
// cdn地址 = 域名 + 版本号
|
||||
window.SITE_CONFIG['domain'] = './'; // 域名
|
||||
window.SITE_CONFIG['version'] = ''; // 版本号(年月日时分)
|
||||
window.SITE_CONFIG['cdnUrl'] = window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
|
||||
window.SITE_CONFIG["domain"] = "./"; // 域名
|
||||
window.SITE_CONFIG["version"] = ""; // 版本号(年月日时分)
|
||||
window.SITE_CONFIG["cdnUrl"] =
|
||||
window.SITE_CONFIG.domain + window.SITE_CONFIG.version;
|
||||
})();
|
||||
|
|
|
@ -15,7 +15,7 @@ export const password = (password, newPassword) => {
|
|||
// 退出登录
|
||||
export const logout = () => {
|
||||
return $http({
|
||||
url: '/auth/logout',
|
||||
url: '/merchant-api/auth/logout',
|
||||
method: 'post',
|
||||
data: $http.adornData()
|
||||
})
|
||||
|
|
|
@ -3,124 +3,163 @@ 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(`/merchant-api/auth/login`, {
|
||||
...params,
|
||||
});
|
||||
},
|
||||
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);
|
||||
},
|
||||
//获取银行卡详情
|
||||
bankCardDetail: (id) => {
|
||||
return $http.request({
|
||||
method: "get",
|
||||
url: "/merchant-api/bank/detail",
|
||||
params: { id },
|
||||
});
|
||||
},
|
||||
//获取品牌信息
|
||||
getBrandInfo: () => {
|
||||
return $http.request({
|
||||
method: "get",
|
||||
url: `/merchant-api/brand/info`,
|
||||
params: {},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,148 +1,192 @@
|
|||
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-picture-outline",
|
||||
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: "brand/config/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: [],
|
||||
};
|
||||
|
|
|
@ -35,18 +35,18 @@ http.interceptors.request.use(
|
|||
config => {
|
||||
config.headers["token"] =`Bearer ${Vue.cookie.get("token")}`; // 请求头带上token
|
||||
// 针对post请求加密
|
||||
if (config.method.toLowerCase() === "post" && process.env.NODE_ENV === "production" ) {
|
||||
//如果已经转成字符串了,就不用再转了
|
||||
if (typeof config.data === "string") {
|
||||
config.data = des.encryptByDES(config.data, "u48rE-RlGbua_K_m$*#z99lt");
|
||||
} else {
|
||||
//否则要转一次
|
||||
config.data = des.encryptByDES(
|
||||
JSON.stringify(config.data),
|
||||
"u48rE-RlGbua_K_m$*#z99lt"
|
||||
);
|
||||
}
|
||||
}
|
||||
// if (config.method.toLowerCase() === "post" && process.env.NODE_ENV === "production" ) {
|
||||
// //如果已经转成字符串了,就不用再转了
|
||||
// if (typeof config.data === "string") {
|
||||
// config.data = des.encryptByDES(config.data, "u48rE-RlGbua_K_m$*#z99lt");
|
||||
// } else {
|
||||
// //否则要转一次
|
||||
// config.data = des.encryptByDES(
|
||||
// JSON.stringify(config.data),
|
||||
// "u48rE-RlGbua_K_m$*#z99lt"
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
console.log(`【请求】${config.url}`, config);
|
||||
}
|
||||
|
|
|
@ -7,13 +7,11 @@
|
|||
* @FilePath: \background-front-end\src\views\common\home.vue
|
||||
-->
|
||||
<template>
|
||||
<div class="mod-home">
|
||||
</div>
|
||||
<div class="mod-home"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
}
|
||||
export default {};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
@ -21,19 +19,19 @@ export default {
|
|||
line-height: 1.5;
|
||||
}
|
||||
.el-carousel__item h3 {
|
||||
color: #475669;
|
||||
font-size: 18px;
|
||||
opacity: 0.75;
|
||||
line-height: 300px;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-carousel__item:nth-child(2n) {
|
||||
background-color: #99a9bf;
|
||||
}
|
||||
|
||||
.el-carousel__item:nth-child(2n+1) {
|
||||
background-color: #d3dce6;
|
||||
}
|
||||
color: #475669;
|
||||
font-size: 18px;
|
||||
opacity: 0.75;
|
||||
line-height: 300px;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.el-carousel__item:nth-child(2n) {
|
||||
background-color: #99a9bf;
|
||||
}
|
||||
|
||||
.el-carousel__item:nth-child(2n + 1) {
|
||||
background-color: #d3dce6;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
<div class="site-content__wrapper">
|
||||
<div class="site-content">
|
||||
<div class="brand-info">
|
||||
<h1 class="brand-info__text" style="margin-left: 0px">
|
||||
大妈集市商户端
|
||||
</h1>
|
||||
<h1>大妈集市商户端</h1>
|
||||
<!-- <h1 class="brand-info__text1" style="margin-left: 145px">
|
||||
登录
|
||||
</h1> -->
|
||||
|
@ -13,15 +11,38 @@
|
|||
</div>
|
||||
<div class="login-main">
|
||||
<h3 class="login-title">大妈集市商户端登录</h3>
|
||||
<el-tabs v-if="false" :stretch="true" v-model="loginWay" @tab-click="loginWayClick">
|
||||
<div class="brand-info__text" style="margin-left: 0px">
|
||||
<el-radio-group v-model="value">
|
||||
<el-radio-button :label="true">验证码登入</el-radio-button>
|
||||
<el-radio-button :label="false">账号登录</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<el-tabs
|
||||
v-if="false"
|
||||
:stretch="true"
|
||||
v-model="loginWay"
|
||||
@tab-click="loginWayClick"
|
||||
>
|
||||
<el-tab-pane label="账户登录" name="account_login">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
status-icon>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
status-icon
|
||||
>
|
||||
<el-form-item prop="userName">
|
||||
<el-input v-model="dataForm.userName" placeholder="帐号"></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.userName"
|
||||
placeholder="帐号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.password"
|
||||
type="password"
|
||||
placeholder="密码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="captcha">
|
||||
<el-row :gutter="20">
|
||||
|
@ -35,45 +56,127 @@
|
|||
</el-row>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button>
|
||||
<el-button
|
||||
class="login-btn-submit"
|
||||
type="primary"
|
||||
@click="dataFormSubmit()"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="验证码登录" name="code_login">
|
||||
<el-form :model="loginByYZMForm" :rules="loginByYZMFormRule" ref="loginByYZMRef"
|
||||
@keyup.enter.native="loginByYZMSubmit()" status-icon>
|
||||
<el-form
|
||||
:model="loginByYZMForm"
|
||||
:rules="loginByYZMFormRule"
|
||||
ref="loginByYZMRef"
|
||||
@keyup.enter.native="loginByYZMSubmit()"
|
||||
status-icon
|
||||
>
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="loginByYZMForm.mobile" placeholder="手机号码"></el-input>
|
||||
<el-input
|
||||
v-model="loginByYZMForm.mobile"
|
||||
placeholder="手机号码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code">
|
||||
<el-input v-model="loginByYZMForm.code" placeholder="短信验证码">
|
||||
<el-input
|
||||
v-model="loginByYZMForm.code"
|
||||
placeholder="短信验证码"
|
||||
>
|
||||
<template slot="append">
|
||||
<el-button v-if="mobileCodeCountDown <= 0" @click="getCode">获取验证码</el-button>
|
||||
<el-button
|
||||
v-if="mobileCodeCountDown <= 0"
|
||||
@click="getCode"
|
||||
>获取验证码</el-button
|
||||
>
|
||||
<el-button v-else>{{ mobileCodeCountDown }}s</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="login-btn-submit" type="primary" @click="loginByYZMSubmit()">登录</el-button>
|
||||
<el-button
|
||||
class="login-btn-submit"
|
||||
type="primary"
|
||||
@click="loginByYZMSubmit()"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-form :model="loginByYZMForm" :rules="loginByYZMFormRule" ref="loginByYZMRef"
|
||||
@keyup.enter.native="loginByYZMSubmit()" status-icon>
|
||||
<el-form
|
||||
v-if="value"
|
||||
:model="loginByYZMForm"
|
||||
:rules="loginByYZMFormRule"
|
||||
ref="loginByYZMRef"
|
||||
@keyup.enter.native="loginByYZMSubmit()"
|
||||
status-icon
|
||||
>
|
||||
<el-form-item prop="mobile">
|
||||
<el-input v-model="loginByYZMForm.mobile" placeholder="手机号码"></el-input>
|
||||
<el-input
|
||||
v-model="loginByYZMForm.mobile"
|
||||
placeholder="手机号码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code">
|
||||
<el-input v-model="loginByYZMForm.code" placeholder="短信验证码">
|
||||
<template slot="append">
|
||||
<el-button v-if="mobileCodeCountDown <= 0" @click="getCode">获取验证码</el-button>
|
||||
<el-button v-if="mobileCodeCountDown <= 0" @click="getCode"
|
||||
>获取验证码</el-button
|
||||
>
|
||||
<el-button v-else>{{ mobileCodeCountDown }}s</el-button>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="login-btn-submit" type="primary" @click="loginByYZMSubmit()">登录</el-button>
|
||||
<el-button
|
||||
class="login-btn-submit"
|
||||
type="primary"
|
||||
@click="loginByYZMSubmit()"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-form
|
||||
v-else
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
status-icon
|
||||
>
|
||||
<el-form-item prop="userName">
|
||||
<el-input
|
||||
v-model="dataForm.userName"
|
||||
placeholder="帐号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="dataForm.password"
|
||||
type="password"
|
||||
placeholder="密码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="captcha">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="14">
|
||||
<el-input v-model="dataForm.captcha" placeholder="验证码">
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10" class="login-captcha">
|
||||
<img :src="captchaPath" @click="getCaptcha()" alt="" />
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
class="login-btn-submit"
|
||||
type="primary"
|
||||
@click="handleLogin()"
|
||||
>登录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -87,6 +190,7 @@ import { getUUID } from "@/utils";
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: true,
|
||||
loginWay: "code_login",
|
||||
loginType: "教育局",
|
||||
mobileCodeCountDown: 0,
|
||||
|
@ -125,7 +229,7 @@ export default {
|
|||
this.getCaptcha();
|
||||
},
|
||||
methods: {
|
||||
loginWayClick(tab, event) { },
|
||||
loginWayClick(tab, event) {},
|
||||
// 提交表单
|
||||
dataFormSubmit() {
|
||||
const _loginTypeMapper = {
|
||||
|
@ -199,6 +303,31 @@ export default {
|
|||
});
|
||||
});
|
||||
},
|
||||
handleLogin() {
|
||||
const _loginTypeMapper = {
|
||||
管理员: "ROLE_ADMIN",
|
||||
教育局: "ROLE_EDU",
|
||||
学校: "ROLE_SCHOOL",
|
||||
教师: "ROLE_TEACHER",
|
||||
};
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
console.log("账号密码登录");
|
||||
this.$api.mer_admin
|
||||
.loginByAccount({
|
||||
// role: _loginTypeMapper[this.loginType],
|
||||
mobile: this.dataForm.userName,
|
||||
password: this.dataForm.password,
|
||||
})
|
||||
.then(({ data }) => {
|
||||
console.log("data", data);
|
||||
this.$cookie.set("token", data.data.token);
|
||||
this.$router.replace({ name: "home" });
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
});
|
||||
},
|
||||
//获取短信验证码
|
||||
getCode() {
|
||||
//正则表达式校验手机号是否合法
|
||||
|
@ -344,7 +473,7 @@ export default {
|
|||
.login-captcha {
|
||||
overflow: hidden;
|
||||
|
||||
>img {
|
||||
> img {
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
<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.status" placeholder="请选择">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="审核中" value="0"></el-option>
|
||||
<el-option label="未通过" value="2"></el-option>
|
||||
<el-option label="已通过" value="1"></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>
|
||||
<!-- 查看详情 -->
|
||||
<viewDetails ref="viewDetails"></viewDetails>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AddOrUpdate from "./popup/add-or-update.vue";
|
||||
import viewDetails from "./popup/view-details.vue";
|
||||
export default {
|
||||
components: { AddOrUpdate, viewDetails },
|
||||
data() {
|
||||
return {
|
||||
dataList: [],
|
||||
formInline: {
|
||||
status: "",
|
||||
},
|
||||
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,
|
||||
status: this.formInline.status,
|
||||
})
|
||||
.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: "cardName",
|
||||
},
|
||||
{
|
||||
title: "银行卡号",
|
||||
align: "center",
|
||||
field: "cardId",
|
||||
},
|
||||
{
|
||||
title: "手机号",
|
||||
align: "center",
|
||||
field: "telNo",
|
||||
},
|
||||
{
|
||||
title: "企业名称",
|
||||
align: "center",
|
||||
field: "name",
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
align: "center",
|
||||
field: "status",
|
||||
type: "jsx",
|
||||
render: ({ row }) => {
|
||||
if (row.status == 0) {
|
||||
return <span>审核中</span>;
|
||||
} else if (row.status == 2) {
|
||||
return <span>未通过</span>;
|
||||
} else if (row.status == 1) {
|
||||
return <span>已通过</span>;
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
fixed: "right",
|
||||
type: "jsx",
|
||||
align: "center",
|
||||
width: "140px",
|
||||
render: (row) => {
|
||||
let edit = () => {
|
||||
this.$refs.viewDetails.toggle(row).update();
|
||||
};
|
||||
return (
|
||||
<div>
|
||||
<el-button size="mini" 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>
|
|
@ -0,0 +1,798 @@
|
|||
<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 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-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-select
|
||||
style="width: 300px"
|
||||
@change="handleChange"
|
||||
v-model="modalData.prov"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.$api.mer_admin.getCityOptions()"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <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
|
||||
value-format="yyyy-MM-dd"
|
||||
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
|
||||
value-format="yyyy-MM-dd"
|
||||
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="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-row v-show="process == 2 && modalData.bankAcctType == 1">
|
||||
<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: 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-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-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="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-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="bankLicenseImg"
|
||||
: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-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="handIdCardFrontImg"
|
||||
: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="bankAcctType"
|
||||
>
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:action="this.$api.mer_admin.uploadFile()"
|
||||
:on-success="handIdCardBackImg"
|
||||
: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-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>
|
||||
</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: "1000px",
|
||||
},
|
||||
modalData: {},
|
||||
value1: [],
|
||||
ProductData: {},
|
||||
productPlace: "", //地区
|
||||
fileList: [],
|
||||
process: 1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
queryTableData(pageNo, pageSize) {},
|
||||
toggle(e) {
|
||||
if (this.modalConfig.show == false) {
|
||||
this.modalConfig.show = true;
|
||||
} else {
|
||||
this.modalConfig.show = false;
|
||||
}
|
||||
if (e) {
|
||||
this.init(cloneDeep(e));
|
||||
}
|
||||
return {
|
||||
add: () => {
|
||||
this.modalConfig.title = "添加银行卡";
|
||||
this.process = 1;
|
||||
this.productPlace = "";
|
||||
this.fileList = [];
|
||||
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: 1,
|
||||
licenseNumber: "",
|
||||
};
|
||||
this.$refs.modal.resetFields();
|
||||
});
|
||||
this.isAdd = true;
|
||||
},
|
||||
update: () => {
|
||||
this.isAdd = false;
|
||||
},
|
||||
};
|
||||
},
|
||||
init(row) {},
|
||||
handleChange(e) {
|
||||
this.modalData.prov = e.join("-");
|
||||
},
|
||||
handleAvatarSuccess(res) {
|
||||
console.log(res);
|
||||
this.modalData.licensePicture = res.data;
|
||||
},
|
||||
idCardFrontImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.idCardFront = res.data;
|
||||
},
|
||||
idCardBackImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.idCardBack = res.data;
|
||||
},
|
||||
bankLicenseImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.bankLicense = res.data;
|
||||
},
|
||||
handIdCardFrontImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.handIdCardFront = res.data;
|
||||
},
|
||||
handIdCardBackImg(res) {
|
||||
console.log(res);
|
||||
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: {
|
||||
modalHandles() {
|
||||
if (this.modalData.bankAcctType == 1) {
|
||||
return [
|
||||
{
|
||||
label: "取消",
|
||||
handle: () => {
|
||||
this.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "上一步",
|
||||
type: "primary",
|
||||
disabled: () => this.process == 1,
|
||||
handle: () => {
|
||||
console.log(this.modalData);
|
||||
this.process = 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.process == 1 ? "下一步" : "确认添加",
|
||||
type: "primary",
|
||||
handle: () => {
|
||||
if (this.process == 1) {
|
||||
this.process = 2;
|
||||
} 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);
|
||||
this.$api.mer_admin.bankCardAdd(this.modalData).then((res) => {
|
||||
console.log(res);
|
||||
this.$emit("queryList");
|
||||
this.toggle();
|
||||
});
|
||||
},
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
},
|
||||
asyncComputed: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.introduce {
|
||||
padding: 5px;
|
||||
background: #fdf6ec;
|
||||
text-align: center;
|
||||
}
|
||||
.introduce-center {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,571 @@
|
|||
<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 v-show="process == 1">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="银行类型:"
|
||||
prop="bankType"
|
||||
>
|
||||
<el-select
|
||||
disabled
|
||||
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
|
||||
readonly
|
||||
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-select
|
||||
disabled
|
||||
style="width: 300px"
|
||||
@change="handleChange"
|
||||
v-model="modalData.prov"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in this.$api.mer_admin.getCityOptions()"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.name"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
disabled
|
||||
value-format="yyyy-MM-dd"
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
disabled
|
||||
value-format="yyyy-MM-dd"
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
readonly
|
||||
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
|
||||
disabled
|
||||
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
|
||||
readonly
|
||||
style="width: 300px"
|
||||
v-model="modalData.licenseNumber"
|
||||
placeholder="请输入营业执照号"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row v-show="process == 2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="营业执照图片:"
|
||||
prop="licensePicture"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.licensePicture"
|
||||
:preview-src-list="[modalData.licensePicture]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="法人身份证正面国徽:"
|
||||
prop="idCardFront"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.idCardFront"
|
||||
:preview-src-list="[modalData.idCardFront]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="法人身份证背面人像:"
|
||||
prop="idCardBack"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.idCardBack"
|
||||
:preview-src-list="[modalData.idCardBack]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="开户银行许可证照:"
|
||||
prop="bankLicense"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.bankLicense"
|
||||
:preview-src-list="[modalData.bankLicense]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="手持身份证正面国徽(选传):"
|
||||
prop="handIdCardFront"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.handIdCardFront"
|
||||
:preview-src-list="[modalData.handIdCardFront]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item
|
||||
label-width="150px"
|
||||
label="手持身份证背面人像(选传):"
|
||||
prop="handIdCardBack"
|
||||
>
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="modalData.handIdCardBack"
|
||||
:preview-src-list="[modalData.handIdCardBack]"
|
||||
>
|
||||
</el-image>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</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: "1000px",
|
||||
},
|
||||
modalData: {},
|
||||
ProductData: {},
|
||||
productPlace: "", //地区
|
||||
fileList: [],
|
||||
process: 1,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
queryTableData(pageNo, pageSize) {},
|
||||
toggle(e) {
|
||||
if (this.modalConfig.show == false) {
|
||||
this.modalConfig.show = true;
|
||||
} else {
|
||||
this.modalConfig.show = false;
|
||||
}
|
||||
if (e) {
|
||||
this.init(cloneDeep(e.row));
|
||||
}
|
||||
return {
|
||||
add: () => {
|
||||
this.modalConfig.title = "添加银行卡";
|
||||
this.process = 1;
|
||||
this.productPlace = "";
|
||||
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.process = 1;
|
||||
this.modalData.title = "详情";
|
||||
this.isAdd = false;
|
||||
},
|
||||
};
|
||||
},
|
||||
init(row) {
|
||||
console.log(row);
|
||||
this.modalData = row;
|
||||
},
|
||||
handleChange(e) {
|
||||
console.log(e);
|
||||
// this.modalData.prov = e.join("-");
|
||||
},
|
||||
handleAvatarSuccess(res) {
|
||||
console.log(res);
|
||||
this.modalData.licensePicture = res.data;
|
||||
},
|
||||
idCardFrontImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.idCardFront = res.data;
|
||||
},
|
||||
idCardBackImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.idCardBack = res.data;
|
||||
},
|
||||
bankLicenseImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.bankLicense = res.data;
|
||||
},
|
||||
handIdCardFrontImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.handIdCardFront = res.data;
|
||||
},
|
||||
handIdCardBackImg(res) {
|
||||
console.log(res);
|
||||
this.modalData.handIdCardBack = res.data;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
modalHandles() {
|
||||
return [
|
||||
{
|
||||
label: "取消",
|
||||
handle: () => {
|
||||
this.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "上一页",
|
||||
type: "primary",
|
||||
disabled: () => this.process == 1,
|
||||
handle: () => {
|
||||
console.log(this.modalData);
|
||||
this.process = 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.process == 1 ? "下一页" : "确定",
|
||||
type: "primary",
|
||||
handle: () => {
|
||||
if (this.process == 1) {
|
||||
this.process = 2;
|
||||
} else {
|
||||
this.toggle();
|
||||
}
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
asyncComputed: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.introduce {
|
||||
padding: 5px;
|
||||
background: #fdf6ec;
|
||||
text-align: center;
|
||||
}
|
||||
.introduce-center {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,178 @@
|
|||
<template>
|
||||
<div style="height: calc(100vh - 200px)">
|
||||
<div class="brandPage">
|
||||
<span class="pattern"></span>
|
||||
品牌管理
|
||||
</div>
|
||||
<div class="brandInfo">
|
||||
<span class="pattern"></span>
|
||||
品牌信息
|
||||
<span @click="infoUpdate" class="brandInfo-update">编辑</span>
|
||||
</div>
|
||||
<div class="info-content">
|
||||
<div class="info-item">品牌名称:{{ list.name }}</div>
|
||||
<div class="info-item">品牌ID: {{ list.id }}</div>
|
||||
<div class="info-item" style="display: flex">
|
||||
<div>品牌LOGO:</div>
|
||||
<div v-if="list.logo" style="margin-left: 20px">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="list.logo"
|
||||
:preview-src-list="[list.logo]"
|
||||
>
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item" style="display: flex">
|
||||
<div>品牌背景:</div>
|
||||
<div v-if="list.background" style="margin-left: 20px">
|
||||
<el-image
|
||||
style="width: 100px; height: 100px"
|
||||
:src="list.background"
|
||||
:preview-src-list="[list.background]"
|
||||
>
|
||||
</el-image>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
品牌首页: {{ list.homepageStatus == 0 ? "禁用" : "启用" }}
|
||||
</div>
|
||||
<div class="info-item">宣传语: {{ list.tagline }}</div>
|
||||
<div class="info-item" style="display: flex">
|
||||
<div>宣传视频:</div>
|
||||
<div v-if="list.video" style="margin-left: 20px">
|
||||
<video
|
||||
id="videoPlayer"
|
||||
width="200px"
|
||||
height="100px"
|
||||
object-fit="fill"
|
||||
autoplay="true"
|
||||
muted="muted"
|
||||
loop
|
||||
controls
|
||||
>
|
||||
<source :src="list.video" type="video/mp4" />
|
||||
</video>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="brandInfo">
|
||||
<span class="pattern"></span>
|
||||
账号信息
|
||||
</div>
|
||||
<div class="info-content">
|
||||
<div class="info-item">
|
||||
管理员账号:{{ list.administrator.substr(0, 3) }}****{{
|
||||
list.administrator.substr(7)
|
||||
}}
|
||||
<span @click="passwordUpdate(true)" class="brandInfo-update">修改</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
管理员密码: ******
|
||||
<span @click="passwordUpdate(false)" class="brandInfo-update"
|
||||
>修改</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="brandInfo">
|
||||
<span class="pattern"></span>
|
||||
其他信息
|
||||
</div>
|
||||
<div class="info-content">
|
||||
<div class="info-item">品牌联系人:{{ list.contact }}</div>
|
||||
<div class="info-item">联系方式: {{ list.contactPhone }}</div>
|
||||
</div>
|
||||
<div class="brandInfo">
|
||||
<span class="pattern"></span>
|
||||
推广营销工具
|
||||
</div>
|
||||
<div class="info-content">
|
||||
<div class="info-item">
|
||||
品牌分销推广:
|
||||
<span @click="infoUpdate" class="brandInfo-update">配置</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 编辑品牌信息 -->
|
||||
<addOrUpdate ref="addOrUpdate"></addOrUpdate>
|
||||
<!-- 修改密码 -->
|
||||
<changePassword ref="changePassword"></changePassword>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import changePassword from "./popup/change-password.vue";
|
||||
import addOrUpdate from "./popup/add-or-update.vue";
|
||||
export default {
|
||||
components: { addOrUpdate, changePassword },
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
this.$api.mer_admin.getBrandInfo().then((res) => {
|
||||
console.log(res);
|
||||
this.list = res.data.data;
|
||||
});
|
||||
},
|
||||
infoUpdate() {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.toggle().update(this.list);
|
||||
});
|
||||
console.log("123");
|
||||
},
|
||||
passwordUpdate(state) {
|
||||
console.log("123");
|
||||
if (state) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.changePassword.toggle().add();
|
||||
});
|
||||
} else {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.changePassword.toggle().update();
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.brandPage {
|
||||
width: 100%;
|
||||
font-size: 18px;
|
||||
padding-bottom: 15px;
|
||||
margin-bottom: 20px;
|
||||
border-bottom: 2px solid rgba(28, 146, 152, 1);
|
||||
}
|
||||
.pattern {
|
||||
display: inline-block;
|
||||
width: 2px;
|
||||
height: 15px;
|
||||
background: rgba(28, 146, 152, 1);
|
||||
}
|
||||
.brandInfo {
|
||||
// margin-top: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.brandInfo-update {
|
||||
display: inline-block;
|
||||
font-size: 15px;
|
||||
color: rgba(28, 146, 152, 1);
|
||||
margin-left: 10px;
|
||||
}
|
||||
.info-content {
|
||||
display: flex;
|
||||
// justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
padding: 20px 10px;
|
||||
.info-item {
|
||||
width: 40%;
|
||||
margin-bottom: 20px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,266 @@
|
|||
<template>
|
||||
<div>
|
||||
<obj-modal
|
||||
ref="modal"
|
||||
labelWidth="150px"
|
||||
:modalCols="modalCols"
|
||||
:modalConfig="modalConfig"
|
||||
:modalData="modalData"
|
||||
:modalHandles="modalHandles"
|
||||
>
|
||||
</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: "60%",
|
||||
},
|
||||
modalData: {},
|
||||
value1: "",
|
||||
ProductData: {},
|
||||
fileList: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
queryTableData(pageNo, pageSize) {},
|
||||
toggle(e) {
|
||||
if (this.modalConfig.show == false) {
|
||||
this.modalConfig.show = true;
|
||||
} else {
|
||||
this.modalConfig.show = false;
|
||||
}
|
||||
if (e) {
|
||||
this.init(cloneDeep(e));
|
||||
}
|
||||
return {
|
||||
add: () => {
|
||||
this.$nextTick(() => {
|
||||
this.modalData = {};
|
||||
});
|
||||
this.isAdd = true;
|
||||
},
|
||||
update: () => {
|
||||
this.isAdd = false;
|
||||
},
|
||||
};
|
||||
},
|
||||
init(row) {},
|
||||
},
|
||||
computed: {
|
||||
modalCols() {
|
||||
return [
|
||||
{
|
||||
label: "品牌名称",
|
||||
prop: "discount",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入品牌名称" },
|
||||
},
|
||||
{
|
||||
label: "品牌ID",
|
||||
prop: "limitCount",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入品牌ID" },
|
||||
},
|
||||
{
|
||||
label: "品牌LOGO",
|
||||
prop: "DiscountTi",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请上传品牌LOGO" },
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
const handleChange = (file, fileList) => {
|
||||
// console.log(fileList);
|
||||
};
|
||||
const handleAvatarSuccess = (res, file, fileList) => {
|
||||
console.log(res, fileList);
|
||||
};
|
||||
const handleRemove = (file, fileList) => {
|
||||
console.log(file, fileList);
|
||||
};
|
||||
return (
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action={this.$api.mer_admin.uploadFile()}
|
||||
{...{
|
||||
props: {
|
||||
"on-change": handleChange,
|
||||
"on-success": handleAvatarSuccess,
|
||||
"on-remove": handleRemove,
|
||||
},
|
||||
}}
|
||||
headers={{
|
||||
token: "Bearer " + this.$cookie.get("token"),
|
||||
}}
|
||||
multiple={true}
|
||||
file-list={this.fileList}
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary">
|
||||
<i class="el-icon-upload"></i>点击上传
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
只能上传jpg/png文件,且不超过500kb
|
||||
</div>
|
||||
</el-upload>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "品牌首页:",
|
||||
prop: "limitCoun",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入品牌ID" },
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
return (
|
||||
<el-switch
|
||||
v-model={this.value1}
|
||||
active-text="开启"
|
||||
inactive-text="禁用"
|
||||
></el-switch>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "宣传语",
|
||||
prop: "limitCot",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入宣传语" },
|
||||
},
|
||||
{
|
||||
label: "首页背景",
|
||||
prop: "DiscountTime",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请上传背景图" },
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
const handleChange = (file, fileList) => {
|
||||
// console.log(fileList);
|
||||
};
|
||||
const handleAvatarSuccess = (res, file, fileList) => {
|
||||
console.log(res, fileList);
|
||||
};
|
||||
const handleRemove = (file, fileList) => {
|
||||
console.log(file, fileList);
|
||||
};
|
||||
return (
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action={this.$api.mer_admin.uploadFile()}
|
||||
{...{
|
||||
props: {
|
||||
"on-change": handleChange,
|
||||
"on-success": handleAvatarSuccess,
|
||||
"on-remove": handleRemove,
|
||||
},
|
||||
}}
|
||||
headers={{
|
||||
token: "Bearer " + this.$cookie.get("token"),
|
||||
}}
|
||||
multiple={true}
|
||||
file-list={this.fileList}
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary">
|
||||
<i class="el-icon-upload"></i>点击上传
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
只能上传jpg/png文件,且不超过500kb
|
||||
</div>
|
||||
</el-upload>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "视频",
|
||||
prop: "DiscountTim",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请上传视频" },
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
const handleChange = (file, fileList) => {
|
||||
// console.log(fileList);
|
||||
};
|
||||
const handleAvatarSuccess = (res, file, fileList) => {
|
||||
console.log(res, fileList);
|
||||
};
|
||||
const handleRemove = (file, fileList) => {
|
||||
console.log(file, fileList);
|
||||
};
|
||||
return (
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
action={this.$api.mer_admin.uploadFile()}
|
||||
{...{
|
||||
props: {
|
||||
"on-change": handleChange,
|
||||
"on-success": handleAvatarSuccess,
|
||||
"on-remove": handleRemove,
|
||||
},
|
||||
}}
|
||||
headers={{
|
||||
token: "Bearer " + this.$cookie.get("token"),
|
||||
}}
|
||||
multiple={true}
|
||||
file-list={this.fileList}
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary">
|
||||
<i class="el-icon-upload"></i>点击上传
|
||||
</el-button>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
只能上传jpg/png文件,且不超过500kb
|
||||
</div>
|
||||
</el-upload>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "联系电话(仅用户可见)",
|
||||
prop: "limit",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入联系电话" },
|
||||
},
|
||||
];
|
||||
},
|
||||
modalHandles() {
|
||||
return [
|
||||
{
|
||||
label: "取消",
|
||||
handle: () => {
|
||||
this.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.isAdd ? "确认添加" : "确认",
|
||||
type: "primary",
|
||||
loading: this.isLoading,
|
||||
submit: true,
|
||||
handle: () => {},
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
asyncComputed: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -0,0 +1,141 @@
|
|||
<template>
|
||||
<div>
|
||||
<obj-modal
|
||||
ref="modal"
|
||||
labelWidth="150px"
|
||||
:modalCols="modalCols"
|
||||
:modalConfig="modalConfig"
|
||||
:modalData="modalData"
|
||||
:modalHandles="modalHandles"
|
||||
>
|
||||
</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: "60%",
|
||||
},
|
||||
modalData: {},
|
||||
value1: "",
|
||||
ProductData: {},
|
||||
fileList: [],
|
||||
isAdd: "",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
queryTableData(pageNo, pageSize) {},
|
||||
toggle(e) {
|
||||
if (this.modalConfig.show == false) {
|
||||
this.modalConfig.show = true;
|
||||
} else {
|
||||
this.modalConfig.show = false;
|
||||
}
|
||||
if (e) {
|
||||
this.init(cloneDeep(e));
|
||||
}
|
||||
return {
|
||||
add: () => {
|
||||
this.$nextTick(() => {
|
||||
this.modalData = {};
|
||||
});
|
||||
this.isAdd = true;
|
||||
},
|
||||
update: () => {
|
||||
this.isAdd = false;
|
||||
},
|
||||
};
|
||||
},
|
||||
init(row) {},
|
||||
},
|
||||
computed: {
|
||||
modalCols() {
|
||||
if (this.isAdd) {
|
||||
return [
|
||||
{
|
||||
label: "密码",
|
||||
prop: "discount",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入旧密码" },
|
||||
},
|
||||
{
|
||||
label: "管理员账号",
|
||||
prop: "discoun",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入管理员账号" },
|
||||
type: "jsx",
|
||||
render: () => {
|
||||
return (
|
||||
<div>
|
||||
<div>
|
||||
<el-input style="width:200px;margin-right:20px;margin-bottom:20px" placeholder="请输入管理员账号"></el-input>
|
||||
<el-button type="primary">获取验证码</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-input style="width:300px" placeholder="请输入验证码"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
{
|
||||
label: "旧密码",
|
||||
prop: "discount",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入旧密码" },
|
||||
},
|
||||
{
|
||||
label: "新密码",
|
||||
prop: "limitCount",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入新密码" },
|
||||
},
|
||||
{
|
||||
label: "确认新密码",
|
||||
prop: "limitCot",
|
||||
type: "Input",
|
||||
width: "300px",
|
||||
rules: { required: true, message: "请输入新密码" },
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
modalHandles() {
|
||||
return [
|
||||
{
|
||||
label: "取消",
|
||||
handle: () => {
|
||||
this.toggle();
|
||||
},
|
||||
},
|
||||
{
|
||||
label: this.isAdd ? "保存" : "确认",
|
||||
type: "primary",
|
||||
loading: this.isLoading,
|
||||
submit: true,
|
||||
handle: () => {},
|
||||
},
|
||||
];
|
||||
},
|
||||
},
|
||||
asyncComputed: {},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
|
@ -0,0 +1,13 @@
|
|||
<template>
|
||||
<div>配置</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -1,37 +1,53 @@
|
|||
<template>
|
||||
<div>
|
||||
<obj-table-plus
|
||||
style="height: calc(100vh - 132px)"
|
||||
ref="oTable"
|
||||
mode="flex"
|
||||
:tableCols="tableCols"
|
||||
v-model="dataList"
|
||||
@query="queryList"
|
||||
>
|
||||
<template slot="flexEmpty">
|
||||
<el-empty description="暂无数据"></el-empty>
|
||||
</template>
|
||||
<div slot="tableTop" class="mb-2">
|
||||
<el-form inline>
|
||||
<el-form-item label="模板名称:">
|
||||
<el-input
|
||||
placeholder="请输入模板名称"
|
||||
v-model="searchForm.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||
>搜索</el-button
|
||||
<div v-if="shopId">
|
||||
<obj-table-plus
|
||||
style="height: calc(100vh - 132px)"
|
||||
ref="oTable"
|
||||
mode="flex"
|
||||
:tableCols="tableCols"
|
||||
v-model="dataList"
|
||||
@query="queryList"
|
||||
>
|
||||
<template slot="flexEmpty">
|
||||
<el-empty description="暂无数据"></el-empty>
|
||||
</template>
|
||||
<div slot="tableTop" class="mb-2">
|
||||
<el-form inline>
|
||||
<el-form-item label="模板名称:">
|
||||
<el-input
|
||||
placeholder="请输入模板名称"
|
||||
v-model="searchForm.name"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="marketList.length > 0" label="摊铺">
|
||||
<el-select v-model="searchForm.linkId" placeholder="请选择摊铺">
|
||||
<el-option
|
||||
v-for="item in marketList"
|
||||
:key="item.marketId"
|
||||
:label="item.marketName"
|
||||
:value="item.marketId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button type="primary" @click="Reset">重置</el-button>
|
||||
</el-form>
|
||||
<el-button type="primary" @click="addFareTemplate"
|
||||
>添加运费模板</el-button
|
||||
>
|
||||
</el-form>
|
||||
<el-button type="primary" @click="addFareTemplate"
|
||||
>添加运费模板</el-button
|
||||
>
|
||||
</div>
|
||||
</obj-table-plus>
|
||||
<add-template
|
||||
ref="addTemplate"
|
||||
@refresh="$refs.oTable.refresh()"
|
||||
></add-template>
|
||||
</div>
|
||||
</obj-table-plus>
|
||||
<add-template
|
||||
ref="addTemplate"
|
||||
@refresh="$refs.oTable.refresh()"
|
||||
></add-template>
|
||||
</div>
|
||||
<div style="height: calc(100vh - 200px)" v-else>
|
||||
<el-empty :image-size="200" description="请先去完成认证"></el-empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -44,9 +60,29 @@ export default {
|
|||
dataList: [],
|
||||
searchForm: {
|
||||
name: "",
|
||||
linkId: "",
|
||||
},
|
||||
shopId: "",
|
||||
marketList: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) {
|
||||
this.shopId = true;
|
||||
this.searchForm.linkId = JSON.parse(
|
||||
sessionStorage.getItem("userInfo")
|
||||
).markets[0].marketId;
|
||||
this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets;
|
||||
console.log(this.marketList);
|
||||
} else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) {
|
||||
this.searchForm.linkId = JSON.parse(
|
||||
sessionStorage.getItem("userInfo")
|
||||
).shopId;
|
||||
this.shopId = true;
|
||||
} else {
|
||||
this.shopId = false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
queryList(pageNo, pageSize) {
|
||||
this.$api.mer_admin
|
||||
|
@ -66,8 +102,16 @@ export default {
|
|||
this.$refs.oTable.complete(false);
|
||||
});
|
||||
},
|
||||
Reset() {
|
||||
this.searchForm = {
|
||||
name: "",
|
||||
linkId: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
|
||||
.marketId,
|
||||
};
|
||||
this.$refs.oTable.reload();
|
||||
},
|
||||
addFareTemplate() {
|
||||
this.$refs.addTemplate.toggle().add();
|
||||
this.$refs.addTemplate.toggle().add(this.searchForm.linkId);
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
|
@ -80,7 +124,6 @@ export default {
|
|||
this.$api.mer_admin.getShippingTemplateInfo(row.id).then((res) => {
|
||||
console.log(res);
|
||||
console.log("row.tableData", row.tableData);
|
||||
|
||||
if (!row.tableData) {
|
||||
if (res.data.data.shippingTemplatesRegionResultList) {
|
||||
this.$set(
|
||||
|
@ -144,7 +187,7 @@ export default {
|
|||
}
|
||||
|
||||
// 将所有找到的路径合并成字符串返回
|
||||
return paths.map((path) =><p>{path.join("/")}</p>);
|
||||
return paths.map((path) => <p>{path.join("/")}</p>);
|
||||
};
|
||||
|
||||
const appointMapper = {
|
||||
|
|
|
@ -57,6 +57,7 @@ export default {
|
|||
},
|
||||
fileList: [], //回显图片
|
||||
place: "", //场地
|
||||
linkId: "",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -141,10 +142,11 @@ export default {
|
|||
this.modalData = _data;
|
||||
};
|
||||
return {
|
||||
add: () => {
|
||||
add: (id) => {
|
||||
this.$nextTick(() => {
|
||||
this.modalData = cloneDeep(BASE_DATA);
|
||||
});
|
||||
this.linkId = id;
|
||||
this.isAdd = true;
|
||||
this.modalConfig.title = "添加运费模板";
|
||||
},
|
||||
|
@ -832,7 +834,7 @@ export default {
|
|||
if (this.isAdd) {
|
||||
this.$api.mer_admin
|
||||
.addShippingTemplate({
|
||||
linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId,
|
||||
linkId: this.linkId,
|
||||
defaults: 0, //默认值,待确认
|
||||
sort: 0, //默认值,待确认
|
||||
type: 2, //默认值,待确认
|
||||
|
@ -848,7 +850,7 @@ export default {
|
|||
}[this.modalData.fareConfig],
|
||||
shippingTemplatesRegionList:
|
||||
this.modalData.fareConfig == "全国包邮"
|
||||
? nu
|
||||
? null
|
||||
: [
|
||||
...this.modalData.shippingTemplatesRegionList,
|
||||
...JSON.parse(
|
||||
|
@ -891,7 +893,7 @@ export default {
|
|||
this.$api.mer_admin
|
||||
.updateShippingTemplate({
|
||||
id: this.modalData.id,
|
||||
linkId: JSON.parse(sessionStorage.getItem("userInfo")).shopId,
|
||||
linkId: this.linkId,
|
||||
defaults: 0, //默认值,待确认
|
||||
sort: 0, //默认值,待确认
|
||||
type: 2, //默认值,待确认
|
||||
|
|
|
@ -1,73 +1,89 @@
|
|||
<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-select>
|
||||
</el-form-item>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品搜索">
|
||||
<el-input
|
||||
v-model="formInline.user"
|
||||
placeholder="商品搜索"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||
>查询</el-button
|
||||
<div>
|
||||
<div v-if="shopId" 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-select>
|
||||
</el-form-item> -->
|
||||
<!-- <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-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="商品搜索">
|
||||
<el-input
|
||||
v-model="formInline.name"
|
||||
placeholder="商品搜索"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="marketList.length > 0" label="摊铺">
|
||||
<el-select v-model="formInline.marketId" placeholder="请选择摊铺">
|
||||
<el-option
|
||||
v-for="item in marketList"
|
||||
:key="item.marketId"
|
||||
:label="item.marketName"
|
||||
:value="item.marketId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="$refs.oTable.reload()"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button type="primary" @click="Reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="在售" name="在售"></el-tab-pane>
|
||||
<el-tab-pane label="仓库中" name="仓库中"></el-tab-pane>
|
||||
<el-tab-pane label="折扣" name="折扣"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="mb-2">
|
||||
<el-button type="primary" size="small" @click="addProduct"
|
||||
>添加商品</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="在售" name="在售"></el-tab-pane>
|
||||
<el-tab-pane label="仓库中" name="仓库中"></el-tab-pane>
|
||||
<el-tab-pane label="折扣" name="折扣"></el-tab-pane>
|
||||
</el-tabs>
|
||||
<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>
|
||||
<!-- 改价格 -->
|
||||
<AddPrice ref="AddPrice" @queryList="$refs.oTable.reload()"></AddPrice>
|
||||
<!-- 改库存 -->
|
||||
<addStock ref="addStock" @queryList="$refs.oTable.reload()"></addStock>
|
||||
<!-- 打折扣 -->
|
||||
<AddDiscount
|
||||
ref="AddDiscount"
|
||||
@queryList="$refs.oTable.reload()"
|
||||
></AddDiscount>
|
||||
<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>
|
||||
<!-- 改价格 -->
|
||||
<AddPrice ref="AddPrice" @queryList="$refs.oTable.reload()"></AddPrice>
|
||||
<!-- 改库存 -->
|
||||
<addStock ref="addStock" @queryList="$refs.oTable.reload()"></addStock>
|
||||
<!-- 打折扣 -->
|
||||
<AddDiscount
|
||||
ref="AddDiscount"
|
||||
@queryList="$refs.oTable.reload()"
|
||||
></AddDiscount>
|
||||
</div>
|
||||
<div style="height: calc(100vh - 200px)" v-else>
|
||||
<el-empty :image-size="200" description="请先去完成商品哦"></el-empty>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -83,9 +99,10 @@ export default {
|
|||
activeName: "在售",
|
||||
dataList: [],
|
||||
formInline: {
|
||||
user: "",
|
||||
region: "",
|
||||
name: "",
|
||||
marketId: "",
|
||||
},
|
||||
marketList: [],
|
||||
tableProp: {
|
||||
"auto-resize": true,
|
||||
border: true,
|
||||
|
@ -95,8 +112,23 @@ export default {
|
|||
},
|
||||
productFilterType: "SALE",
|
||||
selectList: [],
|
||||
shopId: "",
|
||||
};
|
||||
},
|
||||
created() {
|
||||
if (JSON.parse(sessionStorage.getItem("userInfo")).markets.length > 0) {
|
||||
this.shopId = true;
|
||||
this.formInline.marketId = JSON.parse(
|
||||
sessionStorage.getItem("userInfo")
|
||||
).markets[0].marketId;
|
||||
this.marketList = JSON.parse(sessionStorage.getItem("userInfo")).markets;
|
||||
console.log(this.marketList);
|
||||
} else if (JSON.parse(sessionStorage.getItem("userInfo")).shopId) {
|
||||
this.shopId = true;
|
||||
} else {
|
||||
this.shopId = false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addProduct() {
|
||||
this.$refs.addOrUpdate.toggle().add();
|
||||
|
@ -131,6 +163,7 @@ export default {
|
|||
pageNumber: pageNo,
|
||||
pageSize: pageSize,
|
||||
},
|
||||
...this.formInline,
|
||||
productFilterType: this.productFilterType,
|
||||
merchantId: JSON.parse(sessionStorage.getItem("userInfo")).merchantId,
|
||||
shopId: JSON.parse(sessionStorage.getItem("userInfo")).shopId,
|
||||
|
@ -147,6 +180,14 @@ export default {
|
|||
this.$refs.oTable.complete(false);
|
||||
});
|
||||
},
|
||||
Reset() {
|
||||
this.formInline = {
|
||||
name: "",
|
||||
marketId: JSON.parse(sessionStorage.getItem("userInfo")).markets[0]
|
||||
.marketId,
|
||||
};
|
||||
this.$refs.oTable.reload();
|
||||
},
|
||||
handleClick() {
|
||||
switch (this.activeName) {
|
||||
case "在售":
|
||||
|
@ -288,6 +329,8 @@ export default {
|
|||
width: "340px",
|
||||
render: ({ row }) => {
|
||||
let edit = () => {
|
||||
console.log(row);
|
||||
|
||||
this.$refs.addOrUpdate.toggle(row).update();
|
||||
};
|
||||
let priceAdjustment = () => {
|
||||
|
|
|
@ -208,6 +208,7 @@ export default {
|
|||
});
|
||||
|
||||
this.isAdd = true;
|
||||
console.log("112233");
|
||||
},
|
||||
update: () => {
|
||||
this.modalConfig.title = "编辑商品";
|
||||
|
|
Loading…
Reference in New Issue