Compare commits

...

16 Commits

Author SHA1 Message Date
0c6094af96 merge 2023-12-19 16:32:45 +08:00
702a5f69a2 merge 2023-12-12 16:31:49 +08:00
476906af0c 分公司管理 2023-12-12 16:31:04 +08:00
12f89352c3 线上中台 2023-12-12 10:09:35 +08:00
eb6bd10790 merget 2023-10-30 15:36:25 +08:00
e8f545971d merge 2023-10-30 15:25:14 +08:00
7ccd43b4dd 出库去掉分公司及平台展示 2023-10-24 15:06:29 +08:00
e130380d20 水感应经销商端中台更改字段 2023-08-24 13:35:54 +08:00
de844a9462 merge 2023-08-24 10:27:57 +08:00
JasonChen
6a4aa2826a merge 2023-08-07 16:41:26 +08:00
JasonChen
3593b8e00d 隐藏线下出库管理 2023-08-07 16:39:44 +08:00
JasonChen
60b34ebcd0 watch监听控制页面列表刷新 2023-08-04 16:45:40 +08:00
JasonChen
58d8b32131 线下出货模块处理 2023-08-04 15:53:16 +08:00
JasonChen
2cad342c01 水感应控制面板展示效果 2023-08-04 11:05:54 +08:00
JasonChen
3df1509f91 管理员功能增加 2023-08-03 11:56:58 +08:00
JasonChen
9b09e33695 优惠券列表接口对接 2023-08-02 17:30:01 +08:00
47 changed files with 6784 additions and 6109 deletions

BIN
.DS_Store vendored

Binary file not shown.

3
.env
View File

@@ -1,8 +1,7 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=false VUE_APP_PREVIEW=false
# <!-- //水感应正式环境--> # <!-- //水感应正式环境-->
# VUE_APP_API_BASE_URL=https://douhuo.douhuofalv.com/agent # VUE_APP_API_BASE_URL=https://api.shui.shuiganying.com/api
# <!-- // 水感应测试--> # <!-- // 水感应测试-->
# VUE_APP_API_BASE_URL=https://api.douhuotest.douhuofalv.com/agent
VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api

View File

@@ -1,16 +1,15 @@
### ###
# @Author: Aimee~ # @Author: Aimee~
# @Date: 2023-05-11 11:17:32 # @Date: 2023-05-11 11:17:32
# @LastEditTime: 2023-07-28 09:49:14 # @LastEditTime: 2023-12-12 15:52:34
# @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git # @LastEditors: Aimee
# @FilePath: /douhuo-agent/.env.development # @FilePath: /water_dealer-agent/.env.development
# @Description: 正式环境测试环境更改 # @Description: 正式环境测试环境更改
### ###
NODE_ENV=development NODE_ENV=development
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
# <!-- //水感应正式环境--> # <!-- //水感应正式环境-->
# VUE_APP_API_BASE_URL=https://douhuo.douhuofalv.com/agent # VUE_APP_API_BASE_URL=https://api.shui.shuiganying.com/api
# <!-- //水感应测试--> # <!-- // 水感应测试-->
# VUE_APP_API_BASE_URL=https://api.douhuotest.douhuofalv.com/agent VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api
VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api

View File

@@ -1,16 +1,15 @@
### ###
# @Author: Aimee~ # @Author: Aimee~
# @Date: 2023-05-11 11:17:32 # @Date: 2023-05-11 11:17:32
# @LastEditTime: 2023-07-28 10:09:13 # @LastEditTime: 2023-12-12 15:52:50
# @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git # @LastEditors: Aimee
# @FilePath: /douhuo-agent/.env.preview # @FilePath: /water_dealer-agent/.env.preview
# @Description: # @Description:
### ###
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
# <!-- //水感应正式环境--> # <!-- //水感应正式环境-->
# VUE_APP_API_BASE_URL=https://douhuo.douhuofalv.com/agent # VUE_APP_API_BASE_URL=https://api.shui.shuiganying.com/api
# <!-- //水感应测试--> # <!-- // 水感应测试-->
# VUE_APP_API_BASE_URL=https://api.douhuotest.douhuofalv.com/agent
VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api VUE_APP_API_BASE_URL=https://shuitest.shuiganying.com/api

View File

@@ -1,12 +1,14 @@
<!-- <!--
* @Author: Aimee~ * @Author: Aimee~
* @Date: 2023-05-11 12:02:45 * @Date: 2023-05-11 12:02:45
* @LastEditTime: 2023-06-27 14:25:57 * @LastEditTime: 2023-12-12 16:31:35
* @LastEditors: Aimee * @LastEditors: Aimee
* @FilePath: /douhuo-agent/README.md * @FilePath: /water_dealer-agent/README.md
* @Description: 备注信息 * @Description: 备注信息
--> -->
# 水感应 分公司 中台(数据展示及分公司数据) # 组件
ant-design-vue
# 水感应 分公司 中台(数据展示及分公司数据) 水感应分公司管理 (线上)
打包后文件件需要有一个 static 文件存放 打包后文件件需要有一个 static 文件存放
'/static/vue.min.js' '/static/vue.min.js'
'/static/vue-router.min.js' '/static/vue-router.min.js'
@@ -14,13 +16,15 @@
'/static/axios.min.js' '/static/axios.min.js'
否则报错 否则报错
# node 版本 10.23.1 # node 版本 node-v14.21.3
# 水感应测试-存放路径 # 水感应测试-存放路径
/home/wwwroot/Development/Douhuo/agent
# 水感应正式-存放路径 # 水感应正式-存放路径
oss://douhuo-agent/ OSS_ACCESS_KEY=LTAI5tHYDoN6trRhsBmRvD7h
OSS_SECRET_KEY=k3e6veUY45WM8QMMMyRKYr0KjiOXzC
oss://sgy-agent-web/
# 运行 yarn run dev # 运行 yarn run dev
# 打包 yarn build # 打包 yarn build

View File

@@ -26,13 +26,17 @@
"md5": "^2.3.0", "md5": "^2.3.0",
"moment": "^2.24.0", "moment": "^2.24.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"quill": "1.3.7",
"quill-image-drop-module": "1.0.3",
"quill-image-extend-module": "1.1.2",
"quill-image-resize-module": "3.0.0",
"store": "^2.0.12", "store": "^2.0.12",
"viser-vue": "^2.4.6", "viser-vue": "^2.4.6",
"vue": "^2.6.12", "vue": "^2.6.12",
"vue-clipboard2": "^0.2.1", "vue-clipboard2": "^0.2.1",
"vue-cropper": "0.4.9", "vue-cropper": "0.4.9",
"vue-i18n": "^8.22.3", "vue-i18n": "^8.22.3",
"vue-quill-editor": "^3.0.6", "vue-quill-editor": "3.0.6",
"vue-router": "^3.4.9", "vue-router": "^3.4.9",
"vue-sku-form": "^0.4.1", "vue-sku-form": "^0.4.1",
"vue-svg-component-runtime": "^1.0.1", "vue-svg-component-runtime": "^1.0.1",

5
public/Index.vue vendored
View File

@@ -219,9 +219,12 @@ export default {
}, },
computed: { computed: {
currentUser () { currentUser () {
console.log(this.$store.getters)
return { return {
name: this.$store.getters.nickname, name: this.$store.getters.nickname,
avatar: this.$store.getters.avatar avatar: this.$store.getters.avatar,
isManage: this.$store.getters.isManage,
username: this.$store.getters.username
} }
} }
}, },

23
public/index.html vendored
View File

@@ -1,3 +1,11 @@
<!--
* @Author: Aimee~
* @Date: 2023-08-03 17:36:19
* @LastEditTime: 2023-12-12 16:12:55
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/public/index.html
* @Description:
-->
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh-cmn-Hans"> <html lang="zh-cmn-Hans">
@@ -6,7 +14,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.png"> <link rel="icon" href="<%= BASE_URL %>logo.png">
<title> 水感应经销商管理后台 WaterFeel.Vip</title> <title> 水感应分公司管理 WaterFeel.Vip</title>
<style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style> <style>.first-loading-wrp{display:flex;justify-content:center;align-items:center;flex-direction:column;min-height:420px;height:100%}.first-loading-wrp>h1{font-size:128px}.first-loading-wrp .loading-wrp{padding:98px;display:flex;justify-content:center;align-items:center}.dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:32px;width:32px;height:32px;box-sizing:border-box}.dot i{width:14px;height:14px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.dot i:nth-child(1){top:0;left:0}.dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style>
<!-- require cdn assets css --> <!-- require cdn assets css -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %> <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
@@ -19,11 +27,11 @@
</noscript> </noscript>
<div id="app"> <div id="app">
<div class="first-loading-wrp"> <div class="first-loading-wrp">
<h1> 水感应经销商管理后台</h1> <h1> 水感应分公司管理</h1>
<div class="loading-wrp"> <div class="loading-wrp">
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span> <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
</div> </div>
<div style="display: flex; justify-content: center; align-items: center;"WaterFeel.manager Co.,Ltd.</div> <div>WaterFeel.manager Co.,Ltd.</div>
</div> </div>
</div> </div>
<!-- require cdn assets js --> <!-- require cdn assets js -->
@@ -32,4 +40,13 @@
<% } %> <% } %>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
<style>
.bottomText{
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
flex-direction: row;
}
</style>
</html> </html>

10
src/api/coupon.js Normal file
View File

@@ -0,0 +1,10 @@
import request from '@/utils/request'
// 优惠券列表
export function getMiddlesCoupons (parameter) {
return request({
url: '/middles/stock/coupons',
method: 'get',
params: parameter
})
}

View File

@@ -1,10 +1,45 @@
import request from '@/utils/request' import request from '@/utils/request'
// 用户列表 // 用户列表
export function getList (parameter) { export function getMiddlesManageUsers (parameter) {
return request({ return request({
url: '/middles/user/children', url: '/middles/manage/users',
method: 'get', method: 'get',
params: parameter params: parameter
}) })
} }
// 新增管理账号
export function addMiddlesManageUser (parameter) {
return request({
url: '/middles/manage/users',
method: 'post',
params: parameter
})
}
// 修改管理账号
export function editMiddlesManageUser (middleId, parameter) {
return request({
url: `/middles/manage/users/${middleId}`,
method: 'put',
params: parameter
})
}
// 删除管理账号
export function delMiddlesManageUser (middleId) {
return request({
url: `/middles/manage/users/${middleId}`,
method: 'DELETE'
})
}
// 删除管理账号
export function setMiddlesManageUserStatus (middleId, parameter) {
return request({
url: `/middles/manage/users/${middleId}/set_status`,
method: 'post',
params: parameter
})
}

View File

@@ -1,8 +1,8 @@
/* /*
* @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
* @Date: 2023-07-07 14:02:05 * @Date: 2023-07-07 14:02:05
* @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git * @LastEditors: Aimee
* @LastEditTime: 2023-07-31 13:58:48 * @LastEditTime: 2023-12-12 11:47:55
* @FilePath: /water_dealer-agent/src/api/statistical.js * @FilePath: /water_dealer-agent/src/api/statistical.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
@@ -10,13 +10,18 @@
import request from '@/utils/request' import request from '@/utils/request'
// 获取 首页数据看板数据 // 获取 首页数据看板数据
export function getMiddlesUserDatas (item) { export function getMiddlesUserDatas (item, value) {
const params = {
time_type: item
}
if (value !== null) {
params.start_at = value[0]
params.end_at = value[1]
}
return request({ return request({
url: '/middles/user/datas', url: '/middles/user/datas',
method: 'get', method: 'get',
params: { params: params
time_type: item
}
}) })
} }

View File

@@ -69,6 +69,7 @@ export function getMiddlesOrderIdentity (parameter) {
params: parameter params: parameter
}) })
} }
// 订单详情 // 订单详情
export function getMiddlesOrderDetail (id) { export function getMiddlesOrderDetail (id) {
return request({ return request({
@@ -78,3 +79,27 @@ export function getMiddlesOrderDetail (id) {
} }
// 线下出货订单 // 线下出货订单
export function getMiddlesStockOffline (parameter) {
return request({
url: '/middles/stock/offline',
method: 'get',
params: parameter
})
}
// 线下搜索前置
export function getMiddlesStockOfflineInit () {
return request({
url: 'middles/stock/offline/before',
method: 'get'
})
}
// 创建线下出货订单
export function createMiddlesStockOffline (parameter) {
return request({
url: 'middles/stock/offline',
method: 'post',
params: parameter
})
}

View File

@@ -1,7 +1,8 @@
<template> <template>
<a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false"> <a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
{{ title }}
<div class="chart-card-header"> <div class="chart-card-header">
<div class="meta"> <!-- <div class="meta">
<span class="chart-card-title"> <span class="chart-card-title">
<slot name="title"> <slot name="title">
{{ title }} {{ title }}
@@ -10,11 +11,12 @@
<span class="chart-card-action"> <span class="chart-card-action">
<slot name="action"></slot> <slot name="action"></slot>
</span> </span>
</div> </div> -->
<div class="total"> <div class="total">
<slot name="total"> {{ total }}
<!-- <slot name="total">
<span>{{ typeof total === 'function' && total() || total }}</span> <span>{{ typeof total === 'function' && total() || total }}</span>
</slot> </slot> -->
</div> </div>
</div> </div>
<div class="chart-card-content"> <div class="chart-card-content">

View File

@@ -14,9 +14,9 @@
<a-icon type="lock" /> <a-icon type="lock" />
修改密码 修改密码
</a-menu-item> </a-menu-item>
<!-- <a-menu-item key="changePermission" @click="goPermission"> <!-- <a-menu-item v-if="currentUser.isManage" key="changePermission" @click="goPermission">
<a-icon type="setting" /> <a-icon type="setting" />
权限管理 管理员管理
</a-menu-item> --> </a-menu-item> -->
<a-menu-item key="logout" @click="handleLogout"> <a-menu-item key="logout" @click="handleLogout">
<a-icon type="logout" /> <a-icon type="logout" />

View File

@@ -60,6 +60,7 @@ export default {
return { return {
name: this.$store.getters.nickname, name: this.$store.getters.nickname,
avatar: this.$store.getters.avatar, avatar: this.$store.getters.avatar,
isManage: this.$store.getters.isManage,
username: this.$store.getters.username username: this.$store.getters.username
} }
} }

View File

@@ -1,9 +1,9 @@
/* /*
* @Author: Aimee~ * @Author: Aimee~
* @Date: 2022-06-12 15:05:53 * @Date: 2022-06-12 15:05:53
* @LastEditTime: 2022-06-13 09:33:54 * @LastEditTime: 2023-12-12 16:13:22
* @LastEditors: Aimee * @LastEditors: Aimee
* @FilePath: /gl-agent/src/config/defaultSettings.js * @FilePath: /water_dealer-agent/src/config/defaultSettings.js
* @Description: 修改默认配置 * @Description: 修改默认配置
*/ */
/** /**
@@ -31,7 +31,7 @@ var defaultValue = {
menu: { menu: {
locale: true locale: true
}, },
title: ' 水感应经销商管理后台', title: ' 水感应分公司管理',
pwa: false, pwa: false,
production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true' production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true'
} }

View File

@@ -1,9 +1,9 @@
/* /*
* @Author: Aimee~ * @Author: Aimee~
* @Date: 2023-05-11 12:02:45 * @Date: 2023-05-11 12:02:45
* @LastEditTime: 2023-07-05 15:03:09 * @LastEditTime: 2023-12-13 13:11:46
* @LastEditors: Aimee * @LastEditors: Aimee
* @FilePath: /douhuo-agent/src/config/router.config.js * @FilePath: /water_dealer-agent/src/config/router.config.js
* @Description: 路由 * @Description: 路由
*/ */
import { import {
@@ -16,7 +16,7 @@ import user from './routes/user'
// import coupon from './routes/coupon' // import coupon from './routes/coupon'
import permission from './routes/permission' import permission from './routes/permission'
import sales from './routes/sales' import sales from './routes/sales'
import cityExperienceOfficer from './routes/cityExperienceOfficer' // import cityExperienceOfficer from './routes/cityExperienceOfficer'
export const asyncRouterMap = [{ export const asyncRouterMap = [{
path: '/', path: '/',
@@ -38,7 +38,7 @@ export const asyncRouterMap = [{
} }
}, },
...detail, ...detail,
...cityExperienceOfficer, // ...cityExperienceOfficer,
...stock, ...stock,
...sales, ...sales,
...user, ...user,
@@ -67,7 +67,7 @@ export const constantRouterMap = [{
name: 'Login', name: 'Login',
component: () => import('@/views/auth/Login'), component: () => import('@/views/auth/Login'),
meta: { meta: {
title: '登陆水感应经销商系统' title: '登陆水感应分公司管理'
} }
}, },
{ {

View File

@@ -14,7 +14,7 @@ export default [
component: () => import('@/views/permissions/Index'), component: () => import('@/views/permissions/Index'),
hidden: true, hidden: true,
meta: { meta: {
title: '权限管理', title: '管理员管理',
icon: 'cluster' icon: 'cluster'
} }
} }

View File

@@ -1,3 +1,11 @@
/*
* @Author: Aimee~
* @Date: 2023-10-30 15:25:23
* @LastEditTime: 2023-12-12 11:04:30
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/config/routes/sales.js
* @Description: 零售订单
*/
import { import {
RouteView RouteView
} from '@/layouts' } from '@/layouts'
@@ -6,7 +14,7 @@ export default [{
path: '/sales', path: '/sales',
name: 'StockIndex', name: 'StockIndex',
meta: { meta: {
title: '销售管理', title: '订单管理',
icon: 'bank' icon: 'bank'
}, },
component: RouteView, component: RouteView,
@@ -15,7 +23,7 @@ export default [{
path: '/sales/online', path: '/sales/online',
name: 'SalesOnline', name: 'SalesOnline',
meta: { meta: {
title: '线上零售订单', title: '零售订单',
icon: 'unordered-list' icon: 'unordered-list'
}, },
component: () => import('@/views/sales/Online') component: () => import('@/views/sales/Online')
@@ -24,19 +32,10 @@ export default [{
path: '/sales/stock', path: '/sales/stock',
name: 'SalesStock', name: 'SalesStock',
meta: { meta: {
title: '线上进货订单', title: '进货订单',
icon: 'unordered-list' icon: 'unordered-list'
}, },
component: () => import('@/views/sales/OnStock') component: () => import('@/views/sales/OnStock')
} }
// {
// path: '/sales/offline',
// name: 'SalesOffline',
// meta: {
// title: '线下出货列表',
// icon: 'unordered-list'
// },
// component: () => import('@/views/sales/Offline')
// }
] ]
}] }]

View File

@@ -1,3 +1,11 @@
/*
* @Author: Aimee~
* @Date: 2023-10-30 15:25:23
* @LastEditTime: 2023-12-12 11:02:36
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/config/routes/stock.js
* @Description: 库存管理
*/
import { import {
RouteView RouteView
} from '@/layouts' } from '@/layouts'
@@ -11,65 +19,72 @@ export default [{
}, },
component: RouteView, component: RouteView,
children: [ children: [
{ {
path: '/stock/ins', path: '/stock/dealer/in',
name: 'StockIns', name: 'DealerIn',
component: () => import('@/views/stock/DealerIn'),
meta: { meta: {
title: '分公司库存管理', title: '经销商入库管理',
icon: 'control' icon: 'import'
}, }
component: RouteView, },
redirect: '/stock/in', {
children: [ path: '/stock/dealer/out',
{ name: 'DealerOut',
path: '/stock/in', component: () => import('@/views/stock/DealerOut'),
name: 'StockIn',
component: () => import('@/views/stock/In'),
meta: {
title: '入库管理',
icon: 'import'
}
},
{
path: '/stock/out',
name: 'StockOut',
component: () => import('@/views/stock/Out'),
meta: {
title: '出库管理',
icon: 'export'
}
}
]
},
{
path: '/stock/dealer',
name: 'StockDealer',
meta: { meta: {
title: '经销商库管理', title: '经销商库管理',
icon: 'usergroup-add' icon: 'export'
}, }
component: RouteView, }
redirect: '/stock/dealer/in', // {
children: [ // path: '/stock/ins',
{ // name: 'StockIns',
path: '/stock/dealer/in', // meta: {
name: 'DealerIn', // title: '分公司库存管理',
component: () => import('@/views/stock/DealerIn'), // icon: 'control'
meta: { // },
title: '入库管理', // component: RouteView,
icon: 'import' // redirect: '/stock/in',
} // children: [
}, // {
{ // path: '/stock/in',
path: '/stock/dealer/out', // name: 'StockIn',
name: 'DealerOut', // component: () => import('@/views/stock/In'),
component: () => import('@/views/stock/DealerOut'), // meta: {
meta: { // title: '入库管理',
title: '出库管理', // icon: 'import'
icon: 'export' // }
} // },
} // {
] // path: '/sales/offline',
} // name: 'SalesOffline',
// meta: {
// title: '线下出货列表',
// icon: 'unordered-list'
// },
// component: () => import('@/views/sales/Offline')
// }
// // {
// // path: '/stock/out',
// // name: 'StockOut',
// // component: () => import('@/views/stock/Out'),
// // meta: {
// // title: '出库管理',
// // icon: 'export'
// // }
// // }
// ]
// },
// {
// path: '/stock/dealer',
// name: 'StockDealer',
// meta: {
// title: '经销商入库管理',
// icon: 'usergroup-add'
// },
// component: RouteView,
// redirect: '/stock/dealer/in'
// }
] ]
}] }]

View File

@@ -18,7 +18,7 @@
</template> </template>
<template v-slot:rightContentRender> <template v-slot:rightContentRender>
<span class="rightContentRenderTitle">欢迎使用水感应经销商端</span> <span class="rightContentRenderTitle">欢迎使用水感应分公司管理</span>
<right-content :is-mobile="isMobile" :theme="settings.theme" :top-menu="settings.layout === 'topmenu'" /> <right-content :is-mobile="isMobile" :theme="settings.theme" :top-menu="settings.layout === 'topmenu'" />
</template> </template>
@@ -61,7 +61,7 @@ export default {
menus: [], menus: [],
// 侧栏收起状态 // 侧栏收起状态
collapsed: false, collapsed: false,
title: ' 水感应代理商 ', title: ' 水感应分公司管理 ',
logo: '', logo: '',
settings: { settings: {
// 布局类型 // 布局类型

View File

@@ -6,7 +6,7 @@
<div class="header"> <div class="header">
<a href="/"> <a href="/">
<span class="title">欢迎登录</span> <span class="title">欢迎登录</span>
<span class="des">欢迎使用水感应经销商端</span> <span class="des">欢迎使用水感应分公司管理</span>
</a> </a>
</div> </div>
</div> </div>

View File

@@ -8,6 +8,7 @@ const getters = {
user_id: state => state.user.user_id, user_id: state => state.user.user_id,
username: state => state.user.username, username: state => state.user.username,
nickname: state => state.user.nickname, nickname: state => state.user.nickname,
isManage: state => state.user.is_manage,
roles: state => state.user.roles, roles: state => state.user.roles,
userInfo: state => state.user.info, userInfo: state => state.user.info,
addRouters: state => state.permission.addRouters, addRouters: state => state.permission.addRouters,

View File

@@ -10,6 +10,7 @@ const user = {
username: '', username: '',
nickname: '', nickname: '',
avatar: '', avatar: '',
is_manage: false,
roles: [], roles: [],
info: {} info: {}
}, },
@@ -33,6 +34,9 @@ const user = {
SET_NICKNAME: (state, name) => { SET_NICKNAME: (state, name) => {
state.nickname = name state.nickname = name
}, },
SET_IS_MANAGE: (state, isManage) => {
state.is_manage = isManage
},
SET_AVATAR: (state, avatar) => { SET_AVATAR: (state, avatar) => {
state.avatar = avatar state.avatar = avatar
}, },
@@ -85,13 +89,10 @@ const user = {
GetMiddleUser ({ commit }) { GetMiddleUser ({ commit }) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
getMiddleUser().then(res => { getMiddleUser().then(res => {
// storage.set('middleground_id', res.middleground_id)
commit('SET_USER_ID', res.middleground_id) commit('SET_USER_ID', res.middleground_id)
// commit('SET_USERTYPE', res.type)
commit('SET_USERNAME', res.username) commit('SET_USERNAME', res.username)
commit('SET_NICKNAME', res.name) commit('SET_NICKNAME', res.name)
// commit('SET_AVATAR', res.avatar || '') commit('SET_IS_MANAGE', res.is_manage)
// commit('SET_INFO', res || '')
resolve(res) resolve(res)
}).catch(error => { }).catch(error => {
reject(error) reject(error)
@@ -105,6 +106,7 @@ const user = {
commit('SET_TOKEN', '') commit('SET_TOKEN', '')
commit('SET_ORG_ID', '') commit('SET_ORG_ID', '')
commit('is_subscribe', '') commit('is_subscribe', '')
commit('SET_IS_MANAGE', false)
commit('SET_ROLES', []) commit('SET_ROLES', [])
storage.remove(ACCESS_TOKEN) storage.remove(ACCESS_TOKEN)
storage.remove('is_subscribe') storage.remove('is_subscribe')

View File

@@ -1,14 +1,22 @@
/*
* @Author: Aimee~
* @Date: 2023-08-03 17:36:19
* @LastEditTime: 2023-12-12 16:13:49
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/utils/screenLog.js
* @Description: 关键字
*/
/* eslint-disable */ /* eslint-disable */
export const printANSI = () => { export const printANSI = () => {
// console.clear() // console.clear()
// ASCII - ANSI Shadow // ASCII - ANSI Shadow
let text = `水感应大数据综合管理后台 let text = `水感应分公司管理
PUBLISHED: 1.0.0-10.0.0 PUBLISHED: 1.0.0-10.0.0
EMAIL: yuzhankeji@163.com EMAIL: yuzhankeji@163.com
CREATED_AT: ${BUILD_DATE}` CREATED_AT: ${BUILD_DATE}`
console.log(`%c${text}`, 'color: #fc4d50') console.log(`%c${text}`, 'color: #fc4d50')
console.log(`%c可以植入广告`, 'color: #fc4d50') console.log(`%c可以植入广告`, 'color: #fc4d50')
console.log('%c感谢使用 水感应大数据综合管理后台', 'color: #fc4d50; font-size: 14px; font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;') console.log('%c感谢使用 水感应分公司管理', 'color: #fc4d50; font-size: 14px; font-family: Hiragino Sans GB,Microsoft YaHei,\\\\5FAE\\8F6F\\96C5\\9ED1,Droid Sans Fallback,Source Sans,Wenquanyi Micro Hei,WenQuanYi Micro Hei Mono,WenQuanYi Zen Hei,Apple LiGothic Medium,SimHei,ST Heiti,WenQuanYi Zen Hei Sharp,sans-serif;')
console.log('%cThanks for DouHuo - Vip!', 'color: #fc4d50; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;') console.log('%cThanks for ShuiGanYing - Vip!', 'color: #fc4d50; font-size: 14px; font-weight: 300; text-shadow:#000 1px 0 0,#000 0 1px 0,#000 -1px 0 0,#000 0 -1px 0;')
} }

View File

@@ -226,6 +226,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -6,35 +6,32 @@
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="优惠券生成人姓名"> <a-form-item label="管理人手机号或昵称">
<a-input v-model="queryParam.item_id" placeholder="优惠券生成人姓名" /> <a-input v-model="queryParam.manage_username" placeholder="请输入" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="优惠券类型" has-feedback> <a-form-item label="优惠券名称" has-feedback>
<a-select v-model="queryParam.business_type_id" @change="onBusinessChange" placeholder="优惠券类型"> <a-select v-model="queryParam.goods_id" placeholder="请选择">
<a-select-option v-for="item in businessArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option> <a-select-option v-for="item in goods" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="优惠券状态" has-feedback> <a-form-item label="优惠券状态" has-feedback>
<a-select v-model="queryParam.business_type_id" @change="onBusinessChange" placeholder="优惠券状态"> <a-select v-model="queryParam.status" placeholder="请选择">
<a-select-option v-for="item in businessArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option> <a-select-option v-for="item in status" :key="item.value" :value="item.value">{{ item.text }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24">
<a-form-item label="使用人手机号或昵称">
<a-input v-model="queryParam.username" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-button type="primary" @click="search"><a-icon type="search" />搜索</a-button> <a-button type="primary" @click="search"><a-icon type="search" />搜索</a-button>
<!-- <a-button class="ml8" t ype="primary" @click="onAddRole"><a-icon type="plus" />新增</a-button> -->
<a-button class="ml8" @click="resetSearch"><a-icon type="undo" />重置</a-button> <a-button class="ml8" @click="resetSearch"><a-icon type="undo" />重置</a-button>
<a-button
v-if="exports_can"
class="ml8"
type="dashed"
shape="round"
icon="download"
@click="exports"/>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@@ -47,26 +44,29 @@
ref="table" ref="table"
:columns="columns" :columns="columns"
:data="loadData" :data="loadData"
:rowKey="(row) => row.order_item_id" :rowKey="(row) => row.stock_card_id"
showPagination="auto" showPagination="auto"
bordered bordered
size="default" size="default"
:scroll="{ x: 1200, y: 1000 }"> :scroll="{ x: 1200, y: 1000 }">
<div slot="name"> <div slot="manage-name" slot-scope="text,record">
<div>zdx</div> <div>{{ record.manage.nickname || '--' }}{{ record.manage.name?'('+record.manage.name+')':'' }}</div>
</div> </div>
<div slot="phone"> <div slot="manage-username" slot-scope="text,record">
<div>14745798066</div> <div>{{ record.manage.username || '--' }}</div>
</div> </div>
<div slot="time"> <div slot="user-name" slot-scope="text,record">
<div>2023-11-11~2029-11-11</div> <div>{{ record.user.nickname || '--' }}{{ record.user.name?'('+record.user.name+')':'' }}</div>
</div>
<div slot="user-username" slot-scope="text,record">
<div>{{ record.user.username || '--' }}</div>
</div>
<div slot="time" slot-scope="text, record">
<div>{{ record.created_at }}~{{ record.actived_at }}</div>
</div> </div>
<div slot="type"> <div slot="status" slot-scope="text, record">
<div>3瓶优惠券</div> <a-tag :color="record.status.value === 0?'blue':record.status.value === 1?'pink':record.status.value === 2?'orange':record.status.value === 3?'green':record.status.value === 9?'purple':''">{{ record.status.text }}</a-tag>
</div>
<div slot="status">
<div>待使用</div>
</div> </div>
<span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span> <span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span>
<!-- 操作 --> <!-- 操作 -->
@@ -81,31 +81,39 @@
<script> <script>
import { STable, UserInfo } from '@/components' import { STable, UserInfo } from '@/components'
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton' import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
import { institutionsExports } from '@/api/storage'
import moment from 'moment' import moment from 'moment'
import Info from '@/views/home/components/Info' import Info from '@/views/home/components/Info'
import { import {
getList, getMiddlesCoupons
init, } from '@/api/coupon'
canExport
} from '@/api/organization'
import storage from 'store'
import StockInfo from './widgets/StockInfo.vue' import StockInfo from './widgets/StockInfo.vue'
import AddRole from './widgets/AddRole.vue' import AddRole from './widgets/AddRole.vue'
// 列表规格 // 列表规格
const columns = [ const columns = [
{
title: '优惠券名称',
dataIndex: 'name',
width: 120,
align: 'center'
},
{
title: '优惠券状态',
scopedSlots: { customRender: 'status' },
width: 140,
align: 'center'
},
{ {
title: '优惠券生成人', title: '优惠券生成人',
children: [ children: [
{ {
title: '姓名', title: '姓名',
scopedSlots: { customRender: 'name' }, scopedSlots: { customRender: 'manage-name' },
align: 'center' align: 'center'
}, },
{ {
title: '手机号', title: '手机号',
scopedSlots: { customRender: 'phone' }, scopedSlots: { customRender: 'manage-username' },
align: 'center' align: 'center'
} }
], ],
@@ -116,12 +124,12 @@ const columns = [
children: [ children: [
{ {
title: '姓名', title: '姓名',
scopedSlots: { customRender: 'name' }, scopedSlots: { customRender: 'user-name' },
align: 'center' align: 'center'
}, },
{ {
title: '手机号', title: '手机号',
scopedSlots: { customRender: 'phone' }, scopedSlots: { customRender: 'user-username' },
align: 'center' align: 'center'
} }
], ],
@@ -132,18 +140,6 @@ const columns = [
scopedSlots: { customRender: 'time' }, scopedSlots: { customRender: 'time' },
width: 240, width: 240,
align: 'center' align: 'center'
},
{
title: '优惠券类型',
scopedSlots: { customRender: 'type' },
width: 140,
align: 'center'
},
{
title: '优惠券状态',
scopedSlots: { customRender: 'status' },
width: 140,
align: 'center'
} }
// { // {
// title: '操作', // title: '操作',
@@ -164,74 +160,34 @@ export default {
}, },
data () { data () {
return { return {
exports_can: false,
columns, columns,
searchType: false, // 展示全部的搜索 goods: [], // 优惠券类型
businessArray: [], // 业务类型 status: [], // 优惠券使用状态
statusArray: [], // 机构列表
queryParam: { queryParam: {
order_no: '', // 订单编号 goods_id: undefined, // 商品id
institution: '', // 机构名 manage_username: undefined, // 管理人手机号或昵
item_id: '', // 机构编号 username: undefined, // 使用人手机号或昵称
nickname: '', // 下单人 status: undefined // 优惠券状态
business_type_id: '', // 业务类型
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined // 结案时间
}, },
listCount: 0,
loadData: (parameter) => { loadData: (parameter) => {
const requestParameters = Object.assign({}, parameter, this.queryParam) const requestParameters = Object.assign({}, parameter, this.queryParam)
return getList(requestParameters) return getMiddlesCoupons(requestParameters).then(res => {
if (this.goods.length === 0) {
this.goods = res.search.goods
this.status = res.search.status
}
return res.cards
})
} }
} }
}, },
watch: { watch: {
$route (to, from) { $route (to, from) {
if (
(from.name === 'Detail' && to.name === 'FristCheckrderIndex') ||
(from.name === 'Home' && to.name === 'FristCheckrderIndex') ||
(from.name === 'AssignrderIndex' && to.name === 'FristCheckrderIndex') ||
(from.name === 'SignInrderIndex' && to.name === 'FristCheckrderIndex') ||
(from.name === 'ReCheckrderIndex' && to.name === 'FristCheckrderIndex') ||
(from.name === 'HandleService' && to.name === 'FristCheckrderIndex') ||
(from.name === 'CompleteOrder' && to.name === 'FristCheckrderIndex')
) {
this.$refs.table.loadData()
}
} }
}, },
created () {
this.init()
},
methods: { methods: {
moment, moment,
// 获取检索的基本样式
init () {
init().then(res => {
this.statusArray = res.status // 机构状态
this.businessArray = res.type // 业务类型
// this.canExports()
})
},
// 更改创建时间
onCreateChange (dates, dateStrings) {
this.queryParam.paid_at = dateStrings
},
// 更改执行时间
onCarryChange (dates, dateStrings) {
this.queryParam.audit_at = dateStrings
},
// 更改结案时间
onSettleChange (dates, dateStrings) {
this.queryParam.settle_at = dateStrings
},
// 处理状态
onDisposeChange (e) {
this.queryParam.dispose = e
},
// 业务类型 // 业务类型
onBusinessChange (e) { onBusinessChange (e) {
this.queryParam.business_type_id = e this.queryParam.business_type_id = e
@@ -247,43 +203,13 @@ export default {
// 重置搜索列表 // 重置搜索列表
resetSearch () { resetSearch () {
this.queryParam = { this.queryParam = {
order_no: '', // 订单编号 goods_id: undefined, // 商品id
institution: '', // 机构名 manage_username: undefined, // 管理人手机号或昵
item_id: '', // 机构编号 username: undefined, // 使用人手机号或昵称
nickname: '', // 下单人 status: undefined // 优惠券状态
business_type_id: '', // 业务类型
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined// 结案时间
} }
this.$refs.table.refresh(true) // 重置接口且刷先到第一页 this.$refs.table.refresh(true) // 重置接口且刷先到第一页
}, },
// 机构是否能导出
canExports () {
canExport(storage.get('userid')).then(res => {
this.exports_can = res.exports
})
},
// 导出列表
exports () {
const params = this.queryParam
params.audit_at = this.queryParam.audit_at || ''
params.paid_at = this.queryParam.paid_at || ''
params.settle_at = this.queryParam.settle_at || ''
if (this.listCount > 0) {
let downUrl = institutionsExports() + '?user_id=' + storage.get('userid')
for (const key in params) {
downUrl = downUrl + '&' + key + '=' + params[key]
}
window.open(downUrl)
} else {
this.$notification.error({
message: '温馨提醒',
description: '数据为空不能下载!'
})
}
},
// 新增用户 // 新增用户
onAddRole () { onAddRole () {
const success = { const success = {

View File

@@ -0,0 +1,18 @@
<template>
<a-result status="403" title="403" sub-title="Sorry您当前没有权限操作这些~">
<template #extra>
<a-button type="primary" @click="toHome">返回数据看板</a-button>
</template>
</a-result>
</template>
<script>
export default {
name: 'NoRight',
methods: {
toHome () {
this.$router.replace({ name: 'Home' })
}
}
}
</script>

View File

@@ -1,10 +1,18 @@
<!--
* @Author: Aimee~
* @Date: 2023-08-03 17:36:19
* @LastEditTime: 2023-12-12 16:06:46
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/views/home/Index.vue
* @Description: index
-->
<template> <template>
<a-row :gutter="[24, 24]"> <a-row :gutter="[24, 24]">
<!-- <a-col :lg="10" :md="24" :sm="24" :xl="8" :xxl="7"> <!-- <a-col :lg="10" :md="24" :sm="24" :xl="8" :xxl="7">
<UserInfo /> <UserInfo />
</a-col> --> </a-col> -->
<a-col :lg="24" :md="24" :sm="24" :xl="24" :xxl="24"> <a-col :lg="24" :md="24" :sm="24" :xl="24" :xxl="24">
<Count v-if="info!=={}" :info="info" /> <Count v-if="info != {}" :info="info" />
</a-col> </a-col>
<!-- <!--
<a-col :lg="24" :md="24" :sm="24" :xl="24" :xxl="24"> <a-col :lg="24" :md="24" :sm="24" :xl="24" :xxl="24">
@@ -26,23 +34,35 @@ export default {
}, },
data () { data () {
return { return {
info: {}, info: [],
serarchkey: 'today' serarchkey: 'year',
searchValue: null
} }
}, },
computed: { computed: {
currentUser () { currentUser () {
return { return {
name: this.$store.getters.nickname, name: this.$store.getters.nickname,
avatar: this.$store.getters.avatar avatar: this.$store.getters.avatar,
isManage: this.$store.getters.isManage,
username: this.$store.getters.username
} }
} }
}, },
created () { created () {
this.getInfo() this.getInfo()
// 监听是否切换了日,周,月,年 // 监听是否切换了日,周,月,年
this.eventBus.$on('updateHomeDataByType', (type) => { this.eventBus.$on('updateHomeDataByType', (item) => {
this.serarchkey = type.type if (item.type === 'custom' && item.value == null) {
return
} else if (item.type === 'custom' && item.value !== null) {
this.serarchkey = item.type
this.searchValue = item.value
this.getInfo()
return
}
this.serarchkey = item.type
this.searchValue = item.value
this.getInfo() this.getInfo()
}) })
}, },
@@ -51,7 +71,7 @@ export default {
}, },
methods: { methods: {
getInfo () { getInfo () {
getMiddlesUserDatas(this.serarchkey).then(res => { getMiddlesUserDatas(this.serarchkey, this.searchValue).then(res => {
this.info = res this.info = res
}).catch(err => { }).catch(err => {
this.$notification.error(err) this.$notification.error(err)

View File

@@ -2,28 +2,24 @@
<a-row> <a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<!-- 分公司库存 --> <!-- 分公司库存 -->
<a-col <!-- <a-col
v-if="info.middle"
:sm="24" :sm="24"
:md="12" :md="12"
:xl="12" :xl="12"
:xxl="12" :xxl="12"
:style="{ marginBottom: '10px' }" :style="{ marginBottom: '10px' }"
v-if="info.middle"> >
<chart-card :loading="loading" :title="$t('分公司总库存(瓶)')" :total="info.middle.total"> <chart-card :loading="loading" title="分公司总库存(瓶)" :total="info.middle.total">
<a-tooltip :title="$t('总分公司总库存')" slot="action">
<a-icon type="info-circle-o" />
</a-tooltip>
<template slot="footer"> <template slot="footer">
<!-- <span> {{ info.total.people }}</span> --> <trend flag="down">
<trend flag="up"> <span slot="term">{{ $t('线上库存') }}</span>{{ info.middle.online_stock }}</trend>
<trend flag="down" style="margin-left: 20px;">
<span slot="term">{{ $t('线下库存') }}</span>{{ info.middle.offline_stock }} <span slot="term">{{ $t('线下库存') }}</span>{{ info.middle.offline_stock }}
</trend> </trend>
</template> </template>
</chart-card> </chart-card>
</a-col> </a-col> -->
<!-- 经销商总库存 --> <!-- 经销商总库存 -->
<a-col <!-- <a-col
:sm="24" :sm="24"
:md="12" :md="12"
:xl="12" :xl="12"
@@ -31,8 +27,8 @@
:style="{ marginBottom: '10px' }" :style="{ marginBottom: '10px' }"
v-if="info.agent" v-if="info.agent"
> >
<chart-card :loading="loading" :title="$t('经销商总库存(瓶)')" :total="info.agent.stock | NumberFormat"> <chart-card :loading="loading" title="经销商总库存(瓶)" :total="info.agent.stock | NumberFormat">
<a-tooltip :title="$t('经销商总库存')" slot="action"> <a-tooltip title="经销商总库存" slot="action">
<a-icon type="info-circle-o" /> <a-icon type="info-circle-o" />
</a-tooltip> </a-tooltip>
<div> <div>
@@ -40,59 +36,59 @@
</div> </div>
<template slot="footer">{{ $t('经销商总数') }}<span style="margin-right:20px;"> {{ info.agent.users | NumberFormat }} </span></template> <template slot="footer">{{ $t('经销商总数') }}<span style="margin-right:20px;"> {{ info.agent.users | NumberFormat }} </span></template>
</chart-card> </chart-card>
</a-col> </a-col> -->
</a-row> </a-row>
<a-col
<a-col :span="24" > :span="24"
<a-card :bordered="false" title="用户数据"> v-for="(item, index) in info"
<template #extra> :key="index">
<a-card :bordered="false" :title="item.title">
<template v-if="index === 0" #extra>
<a-dropdown v-model="visible"> <a-dropdown v-model="visible">
<a class="ant-dropdown-link" @click="e => e.preventDefault()">{{ searchs[typeIndex].title }} <a-icon type="down" /></a> <a class="ant-dropdown-link" @click="e => e.preventDefault()">{{ searchs[typeIndex].title }} <a-icon type="down" /></a>
<a-menu slot="overlay" @click="handleMenuClick"> <a-menu slot="overlay" @click="handleMenuClick">
<a-menu-item <a-menu-item
v-for="item in searchs" v-for="iit in searchs"
:key="item.key"> :key="iit.key">
<a href="javascript:;">{{ item.title }}</a> <a href="javascript:;">{{ iit.title }}</a>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
<a-range-picker
style="margin-left:40px;"
v-if="type == 'custom'"
:placeholder="['开始日期', '结束日期']"
:value="rang_at"
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
@change="onCreateChange" />
</template> </template>
<a-row v-if="info.users"> <a-row>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> <a-col
<info title="用户总数量(人)" :value="''+info.users.all" :bordered="true" /> :sm="24"
</a-col> :md="12"
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> :xl="8"
<info title="新增代理数(人)" :value="''+info.users.new_agents" :bordered="true" /> :xxl="8"
</a-col> v-for="(it, idx) in item.data"
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> :key="idx"
<info title="新增创客数(人)" :value="''+info.users.new_makers" :bordered="true"/> class="mt20">
</a-col> <info :title="it.title" :value="''+ it.number" :bordered="(idx + 1) === item.data.length ? false : true" />
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增VIP数(人)" :value="''+info.users.new_vips" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="新增游客数量(人)" :value="''+info.users.new_visitors"/>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
</a-col> </a-col>
<a-col :span="24" v-if="info.sales_quantity">
<!-- <a-col :span="24" v-if="info.sales_quantity">
<a-card :bordered="false" title="累计销售数量"> <a-card :bordered="false" title="累计销售数量">
<a-row> <a-row>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> <a-col
<info title="线上销售数量(瓶)" :value="''+info.sales_quantity.online_all" :bordered="true" /> :sm="24"
</a-col> :md="12"
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> :xl="8"
<info title="线上零售数量(瓶)" :value="''+info.sales_quantity.online_retail" :bordered="true"/> :xxl="8"
</a-col> class="mt20"
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20"> v-for="(item, index) in info.sales_quantity"
<info title="线上代理进货数量(瓶)" :value="''+info.sales_quantity.online_agent_in" :bordered="true"/> :key="index">
</a-col> <info :title="item.title" :value="'' + item.number" :bordered="true" />
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="线上创客进货数量(瓶)" :value="''+info.sales_quantity.online_maker_in" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="线下出货数量(瓶)" :value="''+info.sales_quantity.offline" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
@@ -100,22 +96,19 @@
<a-col :span="24" v-if="info.sales_amount"> <a-col :span="24" v-if="info.sales_amount">
<a-card :bordered="false" title="售卖数据管理"> <a-card :bordered="false" title="售卖数据管理">
<a-row> <a-row>
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20"> <a-col
<info title="代理进货金额(元)" :value="''+info.sales_amount.online_agent_in" :bordered="true"/> :sm="24"
</a-col> :md="12"
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20"> :xl="8"
<info title="创客进货金额(元)" :value="''+info.sales_amount.online_maker_in" :bordered="true"/> :xxl="8"
</a-col> class="mt20"
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20"> v-for="(item, index) in info.sales_amount"
<info title="线上销售金额(元)" :value="''+info.sales_amount.online_sell" :bordered="true"/> :key="index">
</a-col> <info :title="item.title" :value="'' + item.number" :bordered="true" />
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
<info title="线下销售金额(元)" :value="''+info.sales_amount.offline_sell" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
</a-col> </a-col> -->
<!-- <a-col :span="24" v-if="info.b_recheck"> <!-- <a-col :span="24" v-if="info.b_recheck">
<a-card :bordered="false" title="复审业务操作"> <a-card :bordered="false" title="复审业务操作">
<a-row> <a-row>
@@ -131,7 +124,6 @@
</a-row> </a-row>
</a-card> </a-card>
</a-col> --> </a-col> -->
</a-row> </a-row>
</template> </template>
@@ -148,6 +140,7 @@
NumberInfo, NumberInfo,
MiniSmoothArea MiniSmoothArea
} from '@/components' } from '@/components'
import moment from 'moment'
export default { export default {
components: { components: {
@@ -164,9 +157,9 @@ export default {
}, },
props: { props: {
info: { info: {
type: Object, type: Array,
default: () => { default: () => {
return {} return []
} }
} }
}, },
@@ -174,21 +167,35 @@ export default {
data: () => ({ data: () => ({
visible: false, visible: false,
loading: false, loading: false,
type: 'today', type: 'year',
typeIndex: 0, typeIndex: 0,
searchs: [ searchs: [
{ key: 'today', title: '本' }, { key: 'year', title: '本' },
{ key: 'week', title: '本周' },
{ key: 'month', title: '本月' }, { key: 'month', title: '本月' },
{ key: 'year', title: '本' } { key: 'week', title: '本' },
] { key: 'today', title: '本日' },
{ key: 'custom', title: '自定义时间' }
],
rang_at: null, // 开始时间 结束时间
date2: null
}), }),
methods: { methods: {
moment,
handleMenuClick (e) { handleMenuClick (e) {
this.typeIndex = this.searchs.findIndex(item => item.key === e.key) this.typeIndex = this.searchs.findIndex(item => item.key === e.key)
this.visible = false this.visible = false
this.type = e.key this.type = e.key
this.eventBus.$emit('updateHomeDataByType', { type: e.key }) if (this.type === 'custom') {
return
} else {
this.date2 = null
}
this.eventBus.$emit('updateHomeDataByType', { type: e.key, value: this.date2 })
},
onCreateChange (dates, dateStrings) {
this.rang_at = dates
this.date2 = dates.length === 2 ? dateStrings : null
this.eventBus.$emit('updateHomeDataByType', { type: this.type, value: this.date2 })
} }
} }
} }

View File

@@ -2,26 +2,19 @@
<page-header-wrapper> <page-header-wrapper>
<!-- 有操作权限 --> <!-- 有操作权限 -->
<!-- v-if="$store.getters.hasPromissionsShow.permission" --> <!-- v-if="$store.getters.hasPromissionsShow.permission" -->
<a-card :bordered="false" class="card"> <a-card :bordered="false" class="card" v-if="isManage">
<a-row> <a-row>
<a-col :span="24"> <a-col :span="24">
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :md="6" :sm="24">
<a-form-item label="用户角色">
<a-select placeholder="请选择" v-model="queryParam.identity_id">
<a-select-option v-for="item in indentitys" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item label="用户姓名"> <a-form-item label="用户姓名">
<a-input v-model="queryParam.name" placeholder="" /> <a-input v-model="queryParam.name" placeholder="" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="6" :sm="24"> <a-col :md="6" :sm="24">
<a-form-item label="用户手机"> <a-form-item label="登录账号">
<a-input v-model="queryParam.username" placeholder="" /> <a-input v-model="queryParam.username" placeholder="" />
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -37,29 +30,21 @@
ref="table" ref="table"
:columns="columns" :columns="columns"
:data="loadData" :data="loadData"
:rowKey="row => row.user.user_id" :rowKey="row => row.middleground_id"
showPagination="auto" showPagination="auto"
bordered bordered
size="default" size="default"
> >
<div slot="name" slot-scope="text, record"> <div slot="status" slot-scope="text, record">
<div>{{ record.name }}</div> <a-switch :default-checked="record.status.value ===1? true : false" checked-children="可以登录" un-checked-children="禁止登录" @change="switchChange(record,$event)" />
<div>{{ record.username }}</div>
</div> </div>
<div slot="type" slot-scope="text, record">{{ record.type }}</div>
<!-- <div slot="status" class="status">
<div class="status-item">初审中 <a> (0) </a></div><a-divider type="vertical" />
<div class="status-item">复审中 <a> (0) </a></div>
<a-divider type="vertical" />
<div class="status-item">待签收 <a> (0) </a></div><a-divider type="vertical" />
<div class="status-item">办理中 <a> (0) </a></div>
</div> -->
<div slot="actions" slot-scope="text, record"> <div slot="actions" slot-scope="text, record">
<a @click="EditPromissions(record)">修改</a> <a @click="EditPromissions(record)">修改</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<a-popconfirm <a-popconfirm
placement="left" placement="left"
title="是否确认删除该角色?" title="是否确认删除该用户?"
ok-text="OK" ok-text="OK"
cancel-text="NO" cancel-text="NO"
@confirm="delPromissions(record)" @confirm="delPromissions(record)"
@@ -72,39 +57,44 @@
</a-row> </a-row>
</a-card> </a-card>
<!-- 没有操作权限限制 --> <!-- 没有操作权限限制 -->
<!-- <NoPromissions /> --> <NoRight v-else />
</page-header-wrapper> </page-header-wrapper>
</template> </template>
<script> <script>
import { STable, UserInfo } from '@/components' import { STable, UserInfo } from '@/components'
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton' import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
import { getList } from '@/api/permissions' import { getMiddlesManageUsers, delMiddlesManageUser, setMiddlesManageUserStatus } from '@/api/permissions'
import AddPromissions from './modules/AddPromissions' import AddPromissions from './modules/AddPromissions'
import EditPromissions from './modules/EditPromissions' import EditPromissions from './modules/EditPromissions'
import AssignmentChange from './modules/AssignmentChange' import NoRight from '@/views/exception/noRight'
// import NoPromissions from '@/views/exception/noRight'
const columns = [ const columns = [
{ {
title: '用户ID', title: '用户ID',
dataIndex: 'staff_id', dataIndex: 'middleground_id',
align: 'center', align: 'center',
width: 120 width: 120
}, },
{ {
title: '用户姓名', title: '用户姓名',
key: 'name', key: 'name',
scopedSlots: { customRender: 'name' }, dataIndex: 'name',
align: 'center', align: 'center',
width: 200 width: 200
}, },
{ {
title: '用户角色', title: '登录账号',
scopedSlots: { customRender: 'type' }, dataIndex: 'username',
align: 'center', align: 'center',
width: 160 width: 160
}, },
{
title: '用户状态',
scopedSlots: { customRender: 'status' },
align: 'center',
width: 120
},
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'created_at', dataIndex: 'created_at',
@@ -127,54 +117,44 @@ export default {
DeriveButton, DeriveButton,
AddPromissions, AddPromissions,
EditPromissions, EditPromissions,
AssignmentChange NoRight
// NoPromissions
}, },
data () { data () {
this.columns = columns this.columns = columns
return { return {
indentitys: [
{ id: 1, name: '普通用户' },
{ id: 2, name: 'VIP' },
{ id: 4, name: '创客' },
{ id: 6, name: '代理商' }
], // 业务类型
queryParam: { queryParam: {
identity_id: undefined,
name: undefined, name: undefined,
username: undefined username: undefined
}, },
permission: false, // 展示展示分配权限 isManage: this.$store.getters.isManage, // 展示展示分配权限
loadData: parameter => { loadData: parameter => {
const requestParameters = Object.assign({}, parameter, this.queryParam) const requestParameters = Object.assign({}, parameter, this.queryParam)
return getList(requestParameters) return getMiddlesManageUsers(requestParameters)
} }
} }
}, },
watch: {
$route (to, from) {
if (to.name === 'PermissionsIndex' && (
from.name === 'Home' ||
from.name === 'cityExperienceOfficer' ||
from.name === 'StockOut' ||
from.name === 'StockIn' ||
from.name === 'DealerIn' ||
from.name === 'DealerOut' ||
from.name === 'UserIndex' ||
from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock')
) {
this.$refs.table.loadData()
}
}
},
methods: { methods: {
// 确认删除权限
delPromissions (item) { // 新增用户
// delDepartsUser(item.staff_id).then(res => {
this.$refs.table.loadData()
this.$notification.success({
message: '成功',
description: '删除成功'
})
this.staffDeparts()
// }).catch(err => {
// this.$notification.error(err)
// })
},
// 重置搜索列表
resetSearch () {
this.queryParam = {
username: undefined,
name: undefined,
identity_id: undefined
}
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
},
// 新增权限
addPromissions () { addPromissions () {
this.$dialog( this.$dialog(
AddPromissions, AddPromissions,
@@ -182,7 +162,6 @@ export default {
on: { on: {
ok: () => { ok: () => {
this.$refs.table.refresh(true) this.$refs.table.refresh(true)
this.staffDeparts()
} }
} }
}, },
@@ -196,7 +175,7 @@ export default {
} }
) )
}, },
// 编辑权限 // 编辑用户
EditPromissions (item) { EditPromissions (item) {
this.$dialog( this.$dialog(
EditPromissions, EditPromissions,
@@ -218,35 +197,42 @@ export default {
} }
) )
}, },
// 指派订单 // 删除
Assignment (item) { delPromissions (item) {
const order = { delMiddlesManageUser(item.middleground_id).then(res => {
item: item, this.$refs.table.loadData()
orderId: this.id, this.$notification.success({
type: this.promissions message: '成功',
} description: '删除成功'
this.$dialog( })
AssignmentChange, }).catch(err => {
{ this.$notification.error(err)
order, })
on: { },
ok: () => { // 重置搜索列表
this.$refs.table.loadData() resetSearch () {
// this.getInfo() this.queryParam = {
} username: undefined,
} name: undefined
}, }
{ this.$refs.table.refresh(true) // 重置接口且刷先到第一页
title: '指派订单', },
width: 500, // 更改状态
maskClosable: true, switchChange (record, e) {
closable: true, const data = {
okText: '确认指派', status: (e ? 1 : 0)
cancelText: '取消' }
} setMiddlesManageUserStatus(record.middleground_id, data).then(res => {
) this.$notification.success({
} message: '成功',
description: res
})
this.$refs.table.loadData()
}).catch(err => {
this.$notification.error(err)
})
} }
}
} }
</script> </script>

View File

@@ -44,7 +44,7 @@
</template> </template>
<script> <script>
// import { addPreDepartUser, addDepartsUser } from '@/api/permissions' import { addMiddlesManageUser } from '@/api/permissions'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'OperationAdd', name: 'OperationAdd',
@@ -53,48 +53,31 @@ export default {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 } wrapperCol: { span: 14 }
}, },
loading: false, loading: false
permission: [],
users: []
}), }),
beforeCreate () { beforeCreate () {
this.form = this.$form.createForm(this) this.form = this.$form.createForm(this)
}, },
created () {
this.getBase('')
},
methods: { methods: {
moment, moment,
getBase (key) {
// addPreDepartUser({ key: key }).then(res => {
// if (key === '') {
// this.permission = res.permission
// } else {
// this.users = res.users
// }
// })
},
handleRoleChange (value) {
this.getBase(value + '')
},
onOk () { onOk () {
return new Promise(resolve => { return new Promise(resolve => {
this.form.validateFields((errors, values) => { this.form.validateFields((errors, values) => {
values.password = values.password || '111111' values.password = values.password || '111111'
if (!errors) { if (!errors) {
// addDepartsUser(values).then((res) => { addMiddlesManageUser(values).then((res) => {
// this.$notification.success({ this.$notification.success({
// message: '成功', message: '成功',
// description: '添加成功' description: '添加成功'
// }) })
// resolve(true) resolve(true)
// }).catch((err) => { }).catch((err) => {
// this.$notification.error({ this.$notification.error({
// message: '失败', message: '失败',
// description: err.message description: err.message
// }) })
// resolve(false) resolve(false)
// }) })
} }
}) })
}) })

View File

@@ -1,107 +0,0 @@
<template>
<a-form ref="form" v-bind="formItemLayout" :form="form">
<a-form-item label="指派人员">
<a-select
v-decorator="[
'role',
{
rules: [
{ required: true, message: '请选择指派人员!', type: 'string' },
]
}
]"
placeholder="请选择指派人员!">
<a-select-option
:value="item.key"
v-for="item in order.type[1].children"
:key="item.key">
<a-icon
type="user"
:style="{ fontSize: '14px', color: '#1890ff', padding: '6px 16px 6px 0' }" />{{ item.title }}</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="备注信息">
<a-textarea
:rows="4"
v-decorator="[
'description',
{
rules: [
{ required: true, message: '请输入备注信息!', type: 'string' },
]
}
]"
placeholder="请输入备注信息!" />
</a-form-item>
</a-form>
</template>
<script>
// import { doLogs } from '@/api/order'
import moment from 'moment'
export default {
name: 'AssignmentAdd',
props: {
order: {
type: Object,
default: () => {
return {}
}
}
},
data: () => ({
formItemLayout: {
labelCol: { span: 6 },
wrapperCol: { span: 14 }
},
loading: false,
expressList: []
}),
beforeCreate () {
this.form = this.$form.createForm(this)
},
created () {
// getExpressCommonList(this.order.order_no).then(res => {
// this.expressList = res
// })
},
methods: {
moment,
onChange (date, dateString) {
},
onOk () {
return new Promise(resolve => {
this.form.validateFields((errors, values) => {
values.password = values.password || '111111'
if (!errors) {
// doLogs(this.order.orderId, params).then((res) => {
// this.$notification.success({
// message: '成功',
// description: '添加记录成功'
// })
resolve(true)
// }).catch((err) => {
// this.$notification.error({
// message: '失败',
// description: err.message
// })
// resolve(false)
// })
}
})
})
}
}
}
</script>
<style scoped>
.flexrow {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
</style>

View File

@@ -1,6 +1,20 @@
<!-- 驳回原因客户姓名输入 --> <!-- 驳回原因客户姓名输入 -->
<template> <template>
<a-form ref="form" v-bind="formItemLayout" :form="form"> <a-form ref="form" v-bind="formItemLayout" :form="form">
<a-form-item label="登录账号">
<a-input
:maxLength="11"
:disabled="true"
v-decorator="[
'username',
{
rules: [
{ required: true, message: '请输入添加登录账号!', type: 'string' },
]
}
]"
placeholder="请输入添加登录账号!" />
</a-form-item>
<a-form-item label="用户姓名"> <a-form-item label="用户姓名">
<a-input <a-input
:rows="4" :rows="4"
@@ -14,19 +28,6 @@
]" ]"
placeholder="请输入添加姓名!" /> placeholder="请输入添加姓名!" />
</a-form-item> </a-form-item>
<a-form-item label="手机号码">
<a-input
:maxLength="11"
v-decorator="[
'username',
{
rules: [
{ required: true, message: '请输入添加手机号码!', type: 'string' },
]
}
]"
placeholder="请输入添加手机号码!" />
</a-form-item>
<a-form-item label="初始密码"> <a-form-item label="初始密码">
<a-input <a-input
:maxLength="6" :maxLength="6"
@@ -44,7 +45,7 @@
</template> </template>
<script> <script>
// import { addPreDepartUser, editDepartsUser, getDefaultUserInfo } from '@/api/permissions' import { editMiddlesManageUser } from '@/api/permissions'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'EditPromissions', name: 'EditPromissions',
@@ -53,13 +54,7 @@ export default {
labelCol: { span: 6 }, labelCol: { span: 6 },
wrapperCol: { span: 14 } wrapperCol: { span: 14 }
}, },
loading: false, loading: false
permissions: [],
users: [],
defaultRoleKey: '', // 默认role 的 key
defaultRoleName: '', // 默认显示下拉姓名
defaultParentsKey: '', // 默认Parents 的 key
defaultParentsName: '' // 默认显示下拉姓名
}), }),
props: { props: {
item: { item: {
@@ -69,77 +64,41 @@ export default {
} }
} }
}, },
mounted () {
this.$nextTick(() => {
this.form.setFieldsValue({
name: this.item.name,
username: this.item.username
})
})
},
beforeCreate () { beforeCreate () {
this.form = this.$form.createForm(this) this.form = this.$form.createForm(this)
}, },
mounted () {
this.getBase('')
// getDefaultUserInfo(this.item.staff_id).then(res => {
// this.$nextTick(() => {
// this.form.setFieldsValue({
// name: res.name,
// username: res.username
// // role: res.type.key
// // address: res.address
// })
// this.defaultRoleKey = res.type.key
// this.defaultRoleName = res.type.text
// this.defaultParentsKey = res.parent_id
// })
// this.getBase(res.type.key)
// }).catch(err => {
// console.log(err)
// })
},
methods: { methods: {
moment, moment,
getBase (key) {
// addPreDepartUser({ key: key }).then(res => {
// if (key === '') {
// this.permissions = res.permission
// } else {
// this.users = res.users
// const index = res.users.findIndex(item => item.staff_id === this.defaultParentsKey)
// if (index >= 0) {
// this.defaultParentsName = res.users[index].name + '(' + res.users[index].type + ')' + res.users[index].username
// }
// }
// })
},
handleRoleChange (value) {
this.getBase(value + '')
this.defaultParentsKey = ''
this.defaultParentsName = ''
this.defaultRoleKey = ''
this.defaultRoleName = ''
this.form.setFieldsValue({
parent_id: ''
})
},
onOk () { onOk () {
return new Promise(resolve => { return new Promise(resolve => {
this.form.validateFields((errors, values) => { this.form.validateFields((errors, values) => {
// const data = { const data = {
// name: values.name, name: values.name,
// password: values.password || '111111', password: values.password || '111111',
// username: values.username, username: values.username
// role: this.defaultRoleKey || values.role, }
// parent_id: this.defaultParentsKey || values.parent_id
// }
if (!errors) { if (!errors) {
// editDepartsUser(this.item.staff_id, data).then((res) => { editMiddlesManageUser(this.item.middleground_id, data).then((res) => {
// this.$notification.success({ this.$notification.success({
// message: '成功', message: '成功',
// description: '修改成功' description: '修改成功'
// }) })
// resolve(true) resolve(true)
// }).catch((err) => { }).catch((err) => {
// this.$notification.error({ this.$notification.error({
// message: '失败', message: '失败',
// description: err.message description: err.message
// }) })
// resolve(false) resolve(false)
// }) })
} }
}) })
}) })

View File

@@ -6,49 +6,40 @@
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline"> <a-form layout="inline">
<a-row :gutter="48"> <a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="订单号码">
<a-input v-model="queryParam.item_id" placeholder="订单号" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="手机号码"> <a-form-item label="手机号码">
<a-input v-model="queryParam.order_no" placeholder="购买人手机号" /> <a-input v-model="queryParam.mobile" placeholder="购买人手机号" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="真实姓名"> <a-form-item label="真实姓名">
<a-input v-model="queryParam.item_id" placeholder="购买人真实姓名" /> <a-input v-model="queryParam.name" placeholder="购买人真实姓名" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="发货数量" has-feedback> <a-form-item label="详细地址">
<a-input v-model="queryParam.order_no" placeholder="发货数量" /> <a-input v-model="queryParam.address" placeholder="购买人收货地址" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24">
<a-form-item label="快递类型" has-feedback> <!-- <a-col :md="8" :sm="24">
<a-select v-model="queryParam.business_type_id" @change="onBusinessChange" placeholder="快递类型"> <a-form-item label="发货方式" has-feedback>
<a-select-option v-for="item in businessArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option> <a-select v-model="queryParam.channel" placeholder="发货方式">
<a-select-option v-for="item in channels" :key="item.value" :value="item.value">{{ item.text }}</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-form-item label="快递单号"> <a-form-item label="快递类型" has-feedback>
<a-input v-model="queryParam.item_id" placeholder="快递单号" /> <a-select v-model="queryParam.express" placeholder="快递类型">
<a-select-option v-for="(item, key, index) in expresses" :key="index" :value="key">{{ item }}</a-select-option>
</a-select>
</a-form-item> </a-form-item>
</a-col> </a-col> -->
<a-col :md="8" :sm="24"> <a-col :md="8" :sm="24">
<a-button type="primary" @click="search"><a-icon type="search" />搜索</a-button> <a-button type="primary" @click="search"><a-icon type="search" />搜索</a-button>
<a-button class="ml8" t ype="primary" @click="onAddRole"><a-icon type="plus" />新增线下出货</a-button> <a-button class="ml8" t ype="primary" @click="CreateOffline"><a-icon type="plus" />新增线下出货</a-button>
<a-button class="ml8" @click="resetSearch"><a-icon type="undo" />重置</a-button> <a-button class="ml8" @click="resetSearch"><a-icon type="undo" />重置</a-button>
<a-button
v-if="exports_can"
class="ml8"
type="dashed"
shape="round"
icon="download"
@click="exports"/>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
@@ -61,22 +52,23 @@
ref="table" ref="table"
:columns="columns" :columns="columns"
:data="loadData" :data="loadData"
:rowKey="(row) => row.order_item_id" :rowKey="(row) => row.offline_id"
showPagination="auto" showPagination="auto"
bordered bordered
size="default" size="default"
:scroll="{ x: 1200, y: 1000 }"> >
<!-- 申请用户 实习顾问 法务老师 --> <div slot="name" slot-scope="text, record">
<div slot="user" slot-scope="text, record" style="color: #1890ff"> <div>{{ record.name }} {{ record.mobile?'('+record.mobile+')':'--' }}</div>
<div>{{ record.user }}</div> <div>{{ record.address || '--' }}</div>
</div> </div>
<!-- 创建时间 --> <div slot="number" slot-scope="text, record">{{ record.number }}</div>
<span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span> <a slot="total" slot-scope="text, record">{{ record.total || '0.00' }}</a>
<!-- 操作 --> <div slot="channel" slot-scope="text, record">{{ record.channel == 'express' ?'快递':'自提' }}</div>
<div slot="actions" slot-scope="text, record"> <div slot="express" slot-scope="text, record">
<a class="ant-dropdown-link" @click="onInfo(record)">查看详情</a> <div v-if="record.channel === 'express'">
<!-- <a-divider type="vertical" /> --> {{ record.express.name || '-' }} <div>{{ record.express.express_no || '-' }}</div>
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> --> </div>
<div v-else>发货时间{{ record.deliver_at }}</div>
</div> </div>
</s-table> </s-table>
</a-card> </a-card>
@@ -86,62 +78,59 @@
<script> <script>
import { STable, UserInfo } from '@/components' import { STable, UserInfo } from '@/components'
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton' import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
import { institutionsExports } from '@/api/storage'
import moment from 'moment' import moment from 'moment'
import Info from '@/views/home/components/Info' import Info from '@/views/home/components/Info'
import { import { getMiddlesStockOffline, getMiddlesStockOfflineInit } from '@/api/stock'
init,
canExport
} from '@/api/organization'
import { getMiddlesExperience } from '@/api/stock'
import storage from 'store'
import EditSend from './widgets/EditSend.vue'
import StockInfo from './widgets/StockInfo.vue'
import AddOffline from './widgets/AddOffline.vue' import AddOffline from './widgets/AddOffline.vue'
// 列表规格 // 列表规格
const columns = [ const columns = [
{ {
title: '订单号', title: 'ID',
dataIndex: 'user22', dataIndex: 'offline_id',
align: 'center' align: 'center',
}, width: 100
{
title: '收货人',
dataIndex: 'created_at',
align: 'center'
}, },
{ {
title: '发货数量', title: '发货数量',
dataIndex: 'created_at1', scopedSlots: { customRender: 'number' },
align: 'center'
},
{
title: '订单信息',
children: [
{
title: '状态',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '金额',
dataIndex: 'name1',
key: 'name1',
align: 'center'
}
],
width: 300,
align: 'center'
},
{
title: '操作',
scopedSlots: { customRender: 'actions' },
align: 'center', align: 'center',
width: 160, width: 120
fixed: 'right' },
{
title: '金额',
scopedSlots: { customRender: 'total' },
align: 'center',
width: 120
},
{
title: '发货方式',
scopedSlots: { customRender: 'channel' },
align: 'center',
width: 120
},
{
title: '收货人',
scopedSlots: { customRender: 'name' },
align: 'center'
},
{
title: '快递信息',
scopedSlots: { customRender: 'express' },
align: 'center'
},
{
title: '创建时间',
dataIndex: 'created_at',
align: 'center'
} }
// {
// title: '操作',
// scopedSlots: { customRender: 'actions' },
// align: 'center',
// width: 160,
// fixed: 'right'
// }
] ]
export default { export default {
@@ -157,37 +146,37 @@ export default {
exports_can: false, exports_can: false,
columns, columns,
searchType: false, // 展示全部的搜索 searchType: false, // 展示全部的搜索
businessArray: [], // 业务类型 expresses: [], // 快递列表
statusArray: [], // 机构列表 channels: [], // 返货方式
queryParam: { queryParam: {
order_no: '', // 订单编号 name: undefined,
institution: '', // 机构名称 mobile: undefined,
item_id: '', // 机构编号 channel: undefined,
nickname: '', // 下单人 address: undefined,
business_type_id: '', // 业务类型 express: undefined
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined // 结案时间
}, },
listCount: 0, listCount: 0,
loadData: (parameter) => { loadData: (parameter) => {
const requestParameters = Object.assign({}, parameter, this.queryParam) const requestParameters = Object.assign({}, parameter, this.queryParam)
return getMiddlesExperience(requestParameters) return getMiddlesStockOffline(requestParameters)
} }
} }
}, },
watch: { watch: {
$route (to, from) { $route (to, from) {
if ( if (to.name === 'SalesOffline' && (
(from.name === 'Detail' && to.name === 'FristCheckrderIndex') || from.name === 'Home' ||
(from.name === 'Home' && to.name === 'FristCheckrderIndex') || from.name === 'cityExperienceOfficer' ||
(from.name === 'AssignrderIndex' && to.name === 'FristCheckrderIndex') || from.name === 'StockOut' ||
(from.name === 'SignInrderIndex' && to.name === 'FristCheckrderIndex') || from.name === 'StockIn' ||
(from.name === 'ReCheckrderIndex' && to.name === 'FristCheckrderIndex') || from.name === 'DealerIn' ||
(from.name === 'HandleService' && to.name === 'FristCheckrderIndex') || from.name === 'DealerOut' ||
(from.name === 'CompleteOrder' && to.name === 'FristCheckrderIndex') from.name === 'UserIndex' ||
from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()
} }
@@ -200,36 +189,11 @@ export default {
moment, moment,
// 获取检索的基本样式 // 获取检索的基本样式
init () { init () {
init().then(res => { getMiddlesStockOfflineInit().then(res => {
this.statusArray = res.status // 机构状态 this.channels = res.channel
this.businessArray = res.type // 业务类型 this.expresses = res.expresses
// this.canExports()
}) })
}, },
// 更改创建时间
onCreateChange (dates, dateStrings) {
this.queryParam.paid_at = dateStrings
},
// 更改执行时间
onCarryChange (dates, dateStrings) {
this.queryParam.audit_at = dateStrings
},
// 更改结案时间
onSettleChange (dates, dateStrings) {
this.queryParam.settle_at = dateStrings
},
// 处理状态
onDisposeChange (e) {
this.queryParam.dispose = e
},
// 业务类型
onBusinessChange (e) {
this.queryParam.business_type_id = e
},
// 机构状态
onOrganizationChange (e) {
this.queryParam.status = e
},
// 搜索列表 // 搜索列表
search () { search () {
this.$refs.table.refresh(true) // 重置接口且刷先到第一页 this.$refs.table.refresh(true) // 重置接口且刷先到第一页
@@ -237,45 +201,16 @@ export default {
// 重置搜索列表 // 重置搜索列表
resetSearch () { resetSearch () {
this.queryParam = { this.queryParam = {
order_no: '', // 订单编号 name: undefined,
institution: '', // 机构名称 mobile: undefined,
item_id: '', // 机构编号 channel: undefined,
nickname: '', // 下单人 address: undefined,
business_type_id: '', // 业务类型 express: undefined
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined// 结案时间
} }
this.$refs.table.refresh(true) // 重置接口且刷先到第一页 this.$refs.table.refresh(true) // 重置接口且刷先到第一页
}, },
// 机构是否能导出 // 创建线下出货
canExports () { CreateOffline () {
canExport(storage.get('userid')).then(res => {
this.exports_can = res.exports
})
},
// 导出列表
exports () {
const params = this.queryParam
params.audit_at = this.queryParam.audit_at || ''
params.paid_at = this.queryParam.paid_at || ''
params.settle_at = this.queryParam.settle_at || ''
if (this.listCount > 0) {
let downUrl = institutionsExports() + '?user_id=' + storage.get('userid')
for (const key in params) {
downUrl = downUrl + '&' + key + '=' + params[key]
}
window.open(downUrl)
} else {
this.$notification.error({
message: '温馨提醒',
description: '数据为空不能下载!'
})
}
},
// 新增用户
onAddRole () {
const success = { const success = {
title: '新增线下出货', title: '新增线下出货',
width: 600, width: 600,
@@ -284,55 +219,15 @@ export default {
okText: '确认新增', okText: '确认新增',
cancelText: '取消' cancelText: '取消'
} }
const offline = {
channels: this.channels,
expresses: this.expresses
}
console.log(offline)
this.$dialog( this.$dialog(
AddOffline, AddOffline,
{ {
on: { offline,
ok: () => {
this.$refs.table.loadData()
}
}
},
success
)
},
// 查看详情
onInfo (item) {
const success = {
title: '立即发货',
width: 1000,
maskClosable: true,
closable: true,
footer: '',
cancelText: '取消'
}
this.$dialog(
StockInfo,
{
item,
on: {
ok: () => {
this.$refs.table.loadData()
}
}
},
success
)
},
// 发货
onEdit (item) {
const success = {
title: '立即发货',
width: 600,
maskClosable: true,
closable: true,
okText: '确认发货',
cancelText: '取消'
}
this.$dialog(
EditSend,
{
item,
on: { on: {
ok: () => { ok: () => {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -60,7 +60,7 @@
<div>{{ record.express.full_address || '--' }}</div> <div>{{ record.express.full_address || '--' }}</div>
</div> </div>
<a slot="total" slot-scope="text, record">{{ record.total }}</a> <a slot="total" slot-scope="text, record">{{ record.total }}</a>
<a slot="items_qty" slot-scope="text, record">{{ record.items_qty }}</a> <a slot="items_qty" slot-scope="text, record">{{ record.items_qty }}</a>
<!-- 操作 --> <!-- 操作 -->
<div slot="actions" slot-scope="text, record"> <div slot="actions" slot-scope="text, record">
<a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a> <a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a>
@@ -168,6 +168,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -60,7 +60,7 @@
<div>{{ record.express.full_address || '--' }}</div> <div>{{ record.express.full_address || '--' }}</div>
</div> </div>
<a slot="total" slot-scope="text, record">{{ record.total }}</a> <a slot="total" slot-scope="text, record">{{ record.total }}</a>
<a slot="items_qty" slot-scope="text, record">{{ record.items_qty }}</a> <a slot="items_qty" slot-scope="text, record">{{ record.items_qty }}</a>
<!-- 操作 --> <!-- 操作 -->
<div slot="actions" slot-scope="text, record"> <div slot="actions" slot-scope="text, record">
<a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a> <a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a>
@@ -173,6 +173,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -8,7 +8,7 @@
<a-form-item label="收货人名"> <a-form-item label="收货人名">
<a-input <a-input
v-decorator="[ v-decorator="[
'no1', 'name',
{ {
rules: [ rules: [
{ required: true, message: `请选择收货人名!`, type: 'string' }, { required: true, message: `请选择收货人名!`, type: 'string' },
@@ -18,10 +18,23 @@
:placeholder="`请选择收货人名!`" :placeholder="`请选择收货人名!`"
/> />
</a-form-item> </a-form-item>
<a-form-item label="收货手机号">
<a-input
v-decorator="[
'mobile_no',
{
rules: [
{ required: true, message: `请选择收货手机号!`, type: 'string' },
]
}
]"
:placeholder="`请选择收货手机号!`"
/>
</a-form-item>
<a-form-item label="收货地址"> <a-form-item label="收货地址">
<a-input <a-input
v-decorator="[ v-decorator="[
'no2', 'address',
{ {
rules: [ rules: [
{ required: true, message: `请选择收货地址!`, type: 'string' }, { required: true, message: `请选择收货地址!`, type: 'string' },
@@ -34,21 +47,21 @@
<a-form-item label="购买数量"> <a-form-item label="购买数量">
<a-input <a-input
v-decorator="[ v-decorator="[
'no3', 'number',
{ {
rules: [ rules: [
{ required: true, message: `请选择购买数量!`, type: 'string' }, { required: true, message: `请输入购买数量!`, type: 'string' },
] ]
} }
]" ]"
:placeholder="`请选择购买数量!`" :placeholder="`请输入购买数量!`"
/> />
</a-form-item> </a-form-item>
<a-form-item label="发货方式"> <a-form-item label="发货方式">
<a-select <a-select
@change="typeChange" @change="typeChange"
v-decorator="[ v-decorator="[
'status', 'channel',
{ {
rules: [ rules: [
{ required: true, message: `请选择发货方式!`, type: 'string' } { required: true, message: `请选择发货方式!`, type: 'string' }
@@ -56,14 +69,13 @@
} }
]" ]"
:placeholder="`请选择发货方式!`"> :placeholder="`请选择发货方式!`">
<a-select-option value="online">线上发货</a-select-option> <a-select-option v-for="item in offline.channels" :key="item.value" :value="item.value">{{ item.text }}</a-select-option>
<a-select-option value="offline">线下自提</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="快递类型" v-if="currentType === 'online'"> <a-form-item label="快递类型" v-if="currentType === 'express'">
<a-select <a-select
v-decorator="[ v-decorator="[
'tpe', 'express_id',
{ {
rules: [ rules: [
{ required: true, message: `请选择快递类型!`, type: 'string' } { required: true, message: `请选择快递类型!`, type: 'string' }
@@ -71,14 +83,13 @@
} }
]" ]"
:placeholder="`请选择快递类型!`"> :placeholder="`请选择快递类型!`">
<a-select-option value="shunfeng">顺丰速递</a-select-option> <a-select-option v-for="(item, key, index) in offline.expresses" :key="index" :value="key">{{ item }}</a-select-option>
<a-select-option value="yunda">韵达快递</a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="快递单号" v-if="currentType === 'online'"> <a-form-item label="快递单号" v-if="currentType === 'express'">
<a-input <a-input
v-decorator="[ v-decorator="[
'no', 'express_no',
{ {
rules: [ rules: [
{ required: true, message: `请选择快递单号!`, type: 'string' }, { required: true, message: `请选择快递单号!`, type: 'string' },
@@ -89,31 +100,30 @@
/> />
</a-form-item> </a-form-item>
<a-form-item <a-form-item
label="自提时间" label="发货时间"
v-if="currentType === 'offline'"
> >
<a-date-picker <a-date-picker
v-decorator="[ v-decorator="[
'time', 'deliver_at',
{ {
rules: [ rules: [
{ required: true, message: `请选择自提时间!` }, { required: false, message: `请选择发货时间!` },
] ]
} }
]" ]"
:placeholder="`请选择自提时间!`" :placeholder="`请选择发货时间!`"
style="width: 100%" /> style="width: 100%" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</template> </template>
<script> <script>
import { changeStatusTwo } from '@/api/organization' import { createMiddlesStockOffline } from '@/api/stock'
import moment from 'moment' import moment from 'moment'
export default { export default {
name: 'EditSend', name: 'EditSend',
props: { props: {
item: { offline: {
type: Object, type: Object,
default: () => { default: () => {
return {} return {}
@@ -137,13 +147,11 @@ export default {
return new Promise(resolve => { return new Promise(resolve => {
this.form.validateFields((errors, values) => { this.form.validateFields((errors, values) => {
if (!errors) { if (!errors) {
const params = { values.deliver_at = moment(values.deliver_at).format('YYYY-MM-DD')
status: values.status createMiddlesStockOffline(values).then((res) => {
}
changeStatusTwo(this.item.order_item_id, params).then((res) => {
this.$notification.success({ this.$notification.success({
message: '成功', message: '成功',
description: '修改成功' description: '新增线下出货成功!!'
}) })
resolve(true) resolve(true)
}).catch((err) => { }).catch((err) => {

View File

@@ -1,3 +1,11 @@
<!--
* @Author: Aimee~
* @Date: 2023-08-03 17:36:19
* @LastEditTime: 2023-12-13 13:19:33
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/views/sales/widgets/StockInfo.vue
* @Description: stockinfo
-->
<!-- 驳回原因用户姓名输入 --> <!-- 驳回原因用户姓名输入 -->
<template> <template>
@@ -11,9 +19,9 @@
<br/><a-divider orientation="left">{{ info.channel.text + info.operation_type.text }}</a-divider> <br/><a-divider orientation="left">{{ info.channel.text + info.operation_type.text }}</a-divider>
<a-descriptions :column="4"> <a-descriptions :column="4">
<a-descriptions-item :label="info.channel.text + info.operation_type.text+ '方式'" span="2">{{ info.type.text }}</a-descriptions-item> <a-descriptions-item :label="info.channel.text + info.operation_type.text+ '方式'" span="2">{{ info.type.text }}</a-descriptions-item>
<a-descriptions-item :label="info.operation_type.text + '数量'" span="2">{{ info.items_count.qty_all }}</a-descriptions-item> <a-descriptions-item :label="info.operation_type.text + '数量'" span="2">{{ info.items_count.qty_all }}</a-descriptions-item>
<a-descriptions-item label="是否使用优惠券兑换" span="2">{{ info.items_count.coupon_all>0 ?'是':'否' }}</a-descriptions-item> <a-descriptions-item label="是否使用优惠券兑换" span="2">{{ info.items_count.coupon_all>0 ?'是':'否' }}</a-descriptions-item>
<a-descriptions-item label="使用优惠券兑换数量" span="2" v-if="info.items_count.coupon_all>0">{{ info.items_count.coupon_all + '' }}</a-descriptions-item> <a-descriptions-item label="使用优惠券兑换数量" span="2" v-if="info.items_count.coupon_all>0">{{ info.items_count.coupon_all + '' }}</a-descriptions-item>
<a-descriptions-item label="使用优惠券兑换抵扣金额" span="2" v-if="info.items_count.coupon_all>0">{{ info.coupon.price + '' }}</a-descriptions-item> <a-descriptions-item label="使用优惠券兑换抵扣金额" span="2" v-if="info.items_count.coupon_all>0">{{ info.coupon.price + '' }}</a-descriptions-item>
</a-descriptions> </a-descriptions>
<br/><a-divider orientation="left">购买商品</a-divider> <br/><a-divider orientation="left">购买商品</a-divider>

View File

@@ -64,8 +64,8 @@
size="default"> size="default">
<user-info slot="user" slot-scope="text, record" :info="{...record.in_user}" /> <user-info slot="user" slot-scope="text, record" :info="{...record.in_user}" />
<user-info slot="out_user" slot-scope="text, record" :info="{...record.out_user}" /> <user-info slot="out_user" slot-scope="text, record" :info="{...record.out_user}" />
<a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a> <a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a>
<a slot="stock" slot-scope="text, record" style="color: #1890ff">{{ record.stock }}</a> <a slot="stock" slot-scope="text, record" style="color: #1890ff">{{ record.stock }}</a>
<a slot="total" slot-scope="text, record" style="color: #1890ff">{{ record.total }}</a> <a slot="total" slot-scope="text, record" style="color: #1890ff">{{ record.total }}</a>
<div slot="stock_order" slot-scope="text, record" >{{ record.stock_order?record.stock_order.type:'--' }}</div> <div slot="stock_order" slot-scope="text, record" >{{ record.stock_order?record.stock_order.type:'--' }}</div>
</s-table> </s-table>
@@ -183,6 +183,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -81,8 +81,8 @@
size="default"> size="default">
<user-info slot="in_user" slot-scope="text, record" :info="{...record.in_user}" /> <user-info slot="in_user" slot-scope="text, record" :info="{...record.in_user}" />
<user-info slot="out_user" slot-scope="text, record" :info="{...record.out_user}" /> <user-info slot="out_user" slot-scope="text, record" :info="{...record.out_user}" />
<a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a> <a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a>
<a slot="stock" slot-scope="text, record" style="color: #1890ff">{{ record.stock }}</a> <a slot="stock" slot-scope="text, record" style="color: #1890ff">{{ record.stock }}</a>
<a slot="total" slot-scope="text, record" style="color: #1890ff">{{ record.total }}</a> <a slot="total" slot-scope="text, record" style="color: #1890ff">{{ record.total }}</a>
</s-table> </s-table>
</a-card> </a-card>
@@ -107,16 +107,16 @@ const columns = [
}, },
{ {
title: '经销商', title: '经销商',
scopedSlots: { customRender: 'in_user' }, scopedSlots: { customRender: 'out_user' },
align: 'center', align: 'center',
width: 140 width: 140
}, },
{ // {
title: '分公司/平台', // title: '分公司/平台',
scopedSlots: { customRender: 'out_user' }, // scopedSlots: { customRender: 'out_user' },
align: 'center', // align: 'center',
width: 140 // width: 140
}, // },
{ {
title: '库变数据', title: '库变数据',
scopedSlots: { customRender: 'number' }, scopedSlots: { customRender: 'number' },
@@ -181,6 +181,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -44,7 +44,7 @@
showPagination="auto" showPagination="auto"
bordered bordered
size="default"> size="default">
<a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a> <a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}</a>
</s-table> </s-table>
</a-card> </a-card>
</page-header-wrapper> </page-header-wrapper>
@@ -132,6 +132,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -177,6 +177,8 @@ export default {
from.name === 'DealerOut' || from.name === 'DealerOut' ||
from.name === 'SalesOnline' || from.name === 'SalesOnline' ||
from.name === 'UserIndex' || from.name === 'UserIndex' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock') from.name === 'SalesStock')
) { ) {
this.$refs.table.loadData() this.$refs.table.loadData()

View File

@@ -1,248 +1,27 @@
<template> <template>
<page-header-wrapper> <page-header-wrapper>
<template v-slot:content>
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="用户昵称">
<a-input v-model="queryParam.nickname" placeholder="用户昵称" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="用户手机号">
<a-input v-model="queryParam.username" placeholder="用户手机号" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="身份筛选" has-feedback>
<a-select v-model="queryParam.identity_id" placeholder="身份筛选">
<a-select-option v-for="item in indentitys" :key="item.id" :value="item.id">{{ item.name }}</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-button type="primary" @click="search"><a-icon type="search" />搜索</a-button>
<a-button class="ml8" type="primary" @click="onAddRole"><a-icon type="plus" />新增</a-button>
<a-button class="ml8" @click="resetSearch"><a-icon type="undo" />重置</a-button>
</a-col>
</a-row>
</a-form>
</div>
</template>
<!-- 列表 --> <!-- 列表 -->
<a-card :bordered="false"> <a-card :bordered="false">
<s-table <QuillEditor />
ref="table"
:columns="columns"
:data="loadData"
:rowKey="(row) => row.user.user_id"
showPagination="auto"
bordered
size="default"
:scroll="{ x: 1200, y: 1000 }">
<div slot="user_id" slot-scope="text, record">{{ record.user.user_id }}</div>
<div slot="nickname" slot-scope="text, record" >{{ record.user.nickname || '-' }}</div>
<div slot="name" slot-scope="text, record">{{ record.user.name || '-' }}</div>
<div slot="username" slot-scope="text, record">{{ record.user.username || '-' }}</div>
<div slot="identity" slot-scope="text, record">
<img v-if="record.identity&& record.identity.cover" :src="record.identity.cover" alt="" style="width:60px">
<span v-else> {{ record.identity.name }}</span>
</div>
<div slot="invite" slot-scope="text, record" style="color: #1890ff">{{ record.user.invite || '-' }}</div>
<div slot="parent" slot-scope="text, record">{{ record.parent.nickname }}<div>{{ record.parent.username }}</div></div>
<span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span>
<!-- 操作 -->
<div slot="actions" slot-scope="text, record">
<a class="ant-dropdown-link" @click="onEdit(record)">更改推荐人</a>
</div>
</s-table>
</a-card> </a-card>
</page-header-wrapper> </page-header-wrapper>
</template> </template>
<script> <script>
import { STable, UserInfo } from '@/components' import QuillEditor from '@/components/Editor/QuillEditor.vue'
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
import moment from 'moment'
import { getMiddlesUser } from '@/api/user'
import EditInvite from './widgets/EditInvite.vue'
import AddUser from './widgets/AddUser.vue'
// 列表规格
const columns = [
{
title: '用户ID',
scopedSlots: { customRender: 'user_id' },
align: 'center',
width: 80
},
{
title: '当前用户信息',
children: [
{
title: '昵称',
scopedSlots: { customRender: 'nickname' },
align: 'center',
width: 200
},
{
title: '真实姓名',
scopedSlots: { customRender: 'name' },
align: 'center',
width: 140
},
{
title: '用户手机',
scopedSlots: { customRender: 'username' },
align: 'center',
width: 140
},
{
title: '身份',
scopedSlots: { customRender: 'identity' },
align: 'center',
width: 140
},
{
title: '邀请码',
scopedSlots: { customRender: 'invite' },
align: 'center',
width: 140
}
],
width: 300,
align: 'center'
},
{
title: '推荐人手机号',
scopedSlots: { customRender: 'parent' },
width: 140,
align: 'center'
},
{
title: '注册时间',
dataIndex: 'created_at',
width: 200,
align: 'center'
},
{
title: '操作',
dataIndex: 'status10',
scopedSlots: { customRender: 'actions' },
align: 'center',
width: 160,
fixed: 'right'
}
]
export default { export default {
name: 'UserIndex', name: 'UserIndex',
components: { components: {
STable, QuillEditor
UserInfo,
DeriveButton
}, },
data () { data () {
return { return {
columns,
indentitys: [
{ id: 1, name: '普通用户' },
{ id: 2, name: 'VIP' },
{ id: 4, name: '创客' },
{ id: 6, name: '代理商' }
], // 业务类型
queryParam: {
username: undefined,
nickname: undefined,
identity_id: undefined
},
listCount: 0,
loadData: (parameter) => {
const requestParameters = Object.assign({}, parameter, this.queryParam)
return getMiddlesUser(requestParameters)
}
}
},
watch: {
$route (to, from) {
if (to.name === 'UserIndex' && (
from.name === 'Home' ||
from.name === 'cityExperienceOfficer' ||
from.name === 'StockOut' ||
from.name === 'StockIn' ||
from.name === 'DealerIn' ||
from.name === 'DealerOut' ||
from.name === 'SalesOnline' ||
from.name === 'SalesStock')
) {
this.$refs.table.loadData()
}
} }
}, },
methods: { methods: {
moment,
// 搜索列表
search () {
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
},
// 重置搜索列表
resetSearch () {
this.queryParam = {
username: undefined,
nickname: undefined,
identity_id: undefined
}
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
},
// 新增用户
onAddRole () {
const success = {
title: '新增用户',
width: 600,
maskClosable: true,
closable: true,
okText: '确认新增',
cancelText: '取消'
}
this.$dialog(
AddUser,
{
on: {
ok: () => {
this.$refs.table.loadData()
}
}
},
success
)
},
// 更改推荐人
onEdit (item) {
const success = {
title: '更改推荐人',
width: 600,
maskClosable: true,
closable: true,
okText: '确认变更',
cancelText: '取消'
}
this.$dialog(
EditInvite,
{
item,
on: {
ok: () => {
this.$refs.table.loadData()
}
}
},
success
)
}
} }
} }
</script> </script>

View File

@@ -0,0 +1,359 @@
<!--
* @Author: Aimee~
* @Date: 2023-12-18 13:31:13
* @LastEditTime: 2023-12-19 16:30:51
* @LastEditors: Aimee
* @FilePath: /water_dealer-agent/src/views/user/widgets/QuillEditorVue.vue
* @Description: vueQuillEditor
-->
<template>
<div class="VueQuillEditor">
<!-- 上传 -->
<a-upload class="quill-upload" :action="actionUrl" @change="handleChange" :show-upload-list="false" ref="aUpload">
</a-upload>
<div class="myQuillTitle">{{ title }}</div>
<quill-editor
v-model="content"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)"
@focus="onEditorFocus($event)"
@change="onEditorChange($event)"
@ready="onEditorReady($event)">
</quill-editor>
</div>
</template>
<script>
import Quill from 'quill'
import { quillEditor } from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
import { ImageDrop } from 'quill-image-drop-module'
import ImageaResize from 'quill-image-resize-module'
import { ImageExtend } from 'quill-image-extend-module'
Quill.register('modules/imageResize', ImageaResize)
Quill.register('modules/imageExtend', ImageExtend)
Quill.register('modules/imageDrop', ImageDrop)
// 富文本顶部按钮
const toolbar = [
['bold', 'italic', 'underline', 'strike'], // 加粗 斜体 下划线 删除线
['blockquote', 'code-block'], // 引用 代码块
[{ header: 1 }, { header: 2 }], // 1、2 级标题
[{ list: 'ordered' }, { list: 'bullet' }], // 有序、无序列表
[{ script: 'sub' }, { script: 'super' }], // 上标/下标
[{ indent: '-1' }, { indent: '+1' }], // 缩进
[{ direction: 'rtl' }], // 文本方向
[{ 'size': ['12', '14', '16', '18', '20', '22', '24', '28', '32', '36'] }], // 字体大小
[{ header: [1, 2, 3, 4, 5, 6] }], // 标题
[{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
// [{ font: ['songti'] }], // 字体种类
[{ align: [] }], // 对齐方式
['clean'], // 清除文本格式
['link', 'video'], // 链接、图片、视频
['myUploadBtn'] // 自定义上传按钮
]
// toolbar标题
const titleConfig = [
{ Choice: '.ql-insertMetric', title: '跳转配置' },
{ Choice: '.ql-bold', title: '加粗' },
{ Choice: '.ql-italic', title: '斜体' },
{ Choice: '.ql-underline', title: '下划线' },
{ Choice: '.ql-header', title: '段落格式' },
{ Choice: '.ql-strike', title: '删除线' },
{ Choice: '.ql-blockquote', title: '块引用' },
{ Choice: '.ql-code', title: '插入代码' },
{ Choice: '.ql-code-block', title: '插入代码段' },
{ Choice: '.ql-font', title: '字体' },
{ Choice: '.ql-size', title: '字体大小' },
{ Choice: '.ql-list[value="ordered"]', title: '编号列表' },
{ Choice: '.ql-list[value="bullet"]', title: '项目列表' },
{ Choice: '.ql-direction', title: '文本方向' },
{ Choice: '.ql-header[value="1"]', title: 'h1' },
{ Choice: '.ql-header[value="2"]', title: 'h2' },
{ Choice: '.ql-align', title: '对齐方式' },
{ Choice: '.ql-color', title: '字体颜色' },
{ Choice: '.ql-background', title: '背景颜色' },
{ Choice: '.ql-image', title: '图像' },
{ Choice: '.ql-video', title: '视频' },
{ Choice: '.ql-link', title: '添加链接' },
{ Choice: '.ql-formula', title: '插入公式' },
{ Choice: '.ql-clean', title: '清除字体格式' },
{ Choice: '.ql-script[value="sub"]', title: '下标' },
{ Choice: '.ql-script[value="super"]', title: '上标' },
{ Choice: '.ql-indent[value="-1"]', title: '向左缩进' },
{ Choice: '.ql-indent[value="+1"]', title: '向右缩进' },
{ Choice: '.ql-header .ql-picker-label', title: '标题大小' },
{ Choice: '.ql-header .ql-picker-item[data-value="1"]', title: '标题一' },
{ Choice: '.ql-header .ql-picker-item[data-value="2"]', title: '标题二' },
{ Choice: '.ql-header .ql-picker-item[data-value="3"]', title: '标题三' },
{ Choice: '.ql-header .ql-picker-item[data-value="4"]', title: '标题四' },
{ Choice: '.ql-header .ql-picker-item[data-value="5"]', title: '标题五' },
{ Choice: '.ql-header .ql-picker-item[data-value="6"]', title: '标题六' },
{ Choice: '.ql-header .ql-picker-item:last-child', title: '标准' },
{ Choice: '.ql-size .ql-picker-item[data-value="small"]', title: '小号' },
{ Choice: '.ql-size .ql-picker-item[data-value="large"]', title: '大号' },
{ Choice: '.ql-size .ql-picker-item[data-value="huge"]', title: '超大号' },
{ Choice: '.ql-size .ql-picker-item:nth-child(2)', title: '标准' },
{ Choice: '.ql-align .ql-picker-item:first-child', title: '居左对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="center"]', title: '居中对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="right"]', title: '居右对齐' },
{ Choice: '.ql-align .ql-picker-item[data-value="justify"]', title: '两端对齐' }
]
// 遍历中文
for (const item of titleConfig) {
const tip = document.querySelector('.quill-editor ' + item.Choice)
if (!tip) continue
tip.setAttribute('title', item.title)
}
export default {
name: 'QuillEditor',
components: { quillEditor },
props: {
title: {
type: String,
default: () => {
return ''
}
},
content: {
type: String,
default: () => {
return ''
}
}
},
data () {
return {
// 富文本编辑器配置
editorOption: {
modules: {
history: { // 后退
delay: 1000,
maxStack: 50,
userOnly: false
},
imageDrop: true, // 可以拉图片
imageResize: {
displaySize: true // 修改图片大小
},
toolbar: {
container: toolbar,
handlers: {
myUploadBtn: this.myUploadBtnClick
}
}
},
placeholder: '请输入正文'
},
actionUrl: 'https://text.twmkeji.cn/api'
}
},
mounted () {
this.initButton()
},
methods: {
// 失去焦点事件
onEditorBlur (quill) {
console.log('editor blur!', quill)
},
// 获得焦点事件
onEditorFocus (quill) {
console.log('editor focus!', quill)
},
// 准备富文本编辑器
onEditorReady (quill) {
console.log('editor ready!', quill)
},
// 内容改变事件
onEditorChange ({ quill, html, text }) {
// console.log('editor change!', quill, html, text)
this.$emit('updateHtml', html)
},
// 自定义按钮内容初始化
initButton () {
const myUploadBtn = document.querySelector('.ql-myUploadBtn')
myUploadBtn.innerHTML = '<i class="el-icon-picture" style="font-size:18px;color:black;"></i>'
},
// 自定义按钮的点击事件
myUploadBtnClick (e) {
this.$refs.aUpload.$children[0].$refs.uploaderRef.onClick()
},
// 上传图片生成
handleChange (e) {
const { file } = e
if (file.status === 'done') {
console.log('done...')
const url = file.response.data.url[0]
console.log(file.response.data.url)
this.quillSuccess(url)
}
},
// 插入逛飙图片
quillSuccess (url) {
const quill = this.$refs.myQuillEditor.quill
// 获取光标所在位置
const length = quill.getSelection().index
// // 插入图片 res.url 为服务器返回的图片地址
quill.insertEmbed(length, 'image', url)
// // 调整光标到最后
quill.setSelection(length + 1)
}
}
}
</script>
<style>
.myQuillTitle {
color: #222;
padding-bottom: 10px;
}
/* // 这个是字号数字对应的显示的内容vertical-align根据个人需要加不加因为我页面那个字与其他对不齐 */
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="12"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12"]::before {
content: '12px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="14"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14"]::before {
content: '14px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="16"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16"]::before {
content: '16px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="18"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18"]::before {
content: '18px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="20"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20"]::before {
content: '20px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="22"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="22"]::before {
content: '22px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="24"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24"]::before {
content: '24px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="28"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28"]::before {
content: '28px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="32"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32"]::before {
content: '32px';
vertical-align: top;
}
.ql-snow .ql-picker.ql-size .ql-picker-label[data-value="36"]::before,
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="36"]::before {
content: '36px';
vertical-align: top;
}
/* // 这个是字号数字对应的px值 */
.ql-editor .ql-size-12 {
font-size: 12px;
}
.ql-editor .ql-size-14 {
font-size: 14px;
}
.ql-editor .ql-size-16 {
font-size: 16px;
}
.ql-editor .ql-size-18 {
font-size: 18px;
}
.ql-editor .ql-size-20 {
font-size: 20px;
}
.ql-editor .ql-size-22 {
font-size: 22px;
}
.ql-editor .ql-size-24 {
font-size: 24px;
}
.ql-editor .ql-size-28 {
font-size: 28px;
}
.ql-editor .ql-size-32 {
font-size: 32px;
}
.ql-editor .ql-size-36 {
font-size: 36px;
}
/* // 选择字号富文本字的大小 */
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="12"]::before {
font-size: 12px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="14"]::before {
font-size: 14px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="16"]::before {
font-size: 16px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="18"]::before {
font-size: 18px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="20"]::before {
font-size: 20px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="22"]::before {
font-size: 22px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="24"]::before {
font-size: 24px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="28"]::before {
font-size: 28px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="32"]::before {
font-size: 32px;
}
.ql-snow .ql-picker.ql-size .ql-picker-item[data-value="36"]::before {
font-size: 36px;
}
</style>

View File

@@ -36,19 +36,20 @@ const assetsCDN = {
] ]
} }
// vue.config.js
const vueConfig = { const vueConfig = {
configureWebpack: { configureWebpack: {
// webpack plugins
plugins: [ plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.DefinePlugin({ new webpack.DefinePlugin({
APP_VERSION: `"${require('./package.json').version}"`, APP_VERSION: `"${require('./package.json').version}"`,
GIT_HASH: JSON.stringify(getGitHash()), GIT_HASH: JSON.stringify(getGitHash()),
BUILD_DATE: buildDate BUILD_DATE: buildDate
}),
new webpack.ProvidePlugin({
'window.Quill': 'quill/dist/quill.js',
'Quill': 'quill/dist/quill.js'
}) })
], ],
// if prod, add externals
externals: isProd ? assetsCDN.externals : {} externals: isProd ? assetsCDN.externals : {}
}, },

10623
yarn.lock

File diff suppressed because it is too large Load Diff