Compare commits

...

13 Commits

Author SHA1 Message Date
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
30 changed files with 512 additions and 467 deletions

BIN
.DS_Store vendored

Binary file not shown.

5
.env
View File

@@ -1,8 +1,7 @@
NODE_ENV=production
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~
# @Date: 2023-05-11 11:17:32
# @LastEditTime: 2023-07-28 09:49:14
# @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
# @FilePath: /douhuo-agent/.env.development
# @LastEditTime: 2023-12-12 15:52:34
# @LastEditors: Aimee
# @FilePath: /water_dealer-agent/.env.development
# @Description: 正式环境测试环境更改
###
NODE_ENV=development
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~
# @Date: 2023-05-11 11:17:32
# @LastEditTime: 2023-07-28 10:09:13
# @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
# @FilePath: /douhuo-agent/.env.preview
# @LastEditTime: 2023-12-12 15:52:50
# @LastEditors: Aimee
# @FilePath: /water_dealer-agent/.env.preview
# @Description:
###
NODE_ENV=production
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~
* @Date: 2023-05-11 12:02:45
* @LastEditTime: 2023-06-27 14:25:57
* @LastEditTime: 2023-12-12 16:31:35
* @LastEditors: Aimee
* @FilePath: /douhuo-agent/README.md
* @FilePath: /water_dealer-agent/README.md
* @Description: 备注信息
-->
# 水感应 分公司 中台(数据展示及分公司数据)
# 组件
ant-design-vue
# 水感应 分公司 中台(数据展示及分公司数据) 水感应分公司管理 (线上)
打包后文件件需要有一个 static 文件存放
'/static/vue.min.js'
'/static/vue-router.min.js'
@@ -17,10 +19,12 @@
# 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 build

12
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>
<html lang="zh-cmn-Hans">
@@ -6,7 +14,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<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>
<!-- require cdn assets css -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
@@ -19,7 +27,7 @@
</noscript>
<div id="app">
<div class="first-loading-wrp">
<h1> 水感应经销商管理后台</h1>
<h1> 水感应分公司管理</h1>
<div class="loading-wrp">
<span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
</div>

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
* @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
* @LastEditTime: 2023-07-31 13:58:48
* @LastEditors: Aimee
* @LastEditTime: 2023-12-12 11:47:55
* @FilePath: /water_dealer-agent/src/api/statistical.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -10,13 +10,18 @@
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({
url: '/middles/user/datas',
method: 'get',
params: {
time_type: item
}
params: params
})
}

View File

@@ -69,6 +69,7 @@ export function getMiddlesOrderIdentity (parameter) {
params: parameter
})
}
// 订单详情
export function getMiddlesOrderDetail (id) {
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>
<a-card :loading="loading" :body-style="{ padding: '20px 24px 8px' }" :bordered="false">
{{ title }}
<div class="chart-card-header">
<div class="meta">
<!-- <div class="meta">
<span class="chart-card-title">
<slot name="title">
{{ title }}
@@ -10,11 +11,12 @@
<span class="chart-card-action">
<slot name="action"></slot>
</span>
</div>
</div> -->
<div class="total">
<slot name="total">
{{ total }}
<!-- <slot name="total">
<span>{{ typeof total === 'function' && total() || total }}</span>
</slot>
</slot> -->
</div>
</div>
<div class="chart-card-content">

View File

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

View File

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

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 {
RouteView
} from '@/layouts'
@@ -6,7 +14,7 @@ export default [{
path: '/sales',
name: 'StockIndex',
meta: {
title: '销售管理',
title: '订单管理',
icon: 'bank'
},
component: RouteView,
@@ -15,7 +23,7 @@ export default [{
path: '/sales/online',
name: 'SalesOnline',
meta: {
title: '线上零售订单',
title: '零售订单',
icon: 'unordered-list'
},
component: () => import('@/views/sales/Online')
@@ -24,19 +32,10 @@ export default [{
path: '/sales/stock',
name: 'SalesStock',
meta: {
title: '线上进货订单',
title: '进货订单',
icon: 'unordered-list'
},
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 {
RouteView
} from '@/layouts'
@@ -11,65 +19,72 @@ export default [{
},
component: RouteView,
children: [
{
path: '/stock/ins',
name: 'StockIns',
{
path: '/stock/dealer/in',
name: 'DealerIn',
component: () => import('@/views/stock/DealerIn'),
meta: {
title: '分公司库存管理',
icon: 'control'
},
component: RouteView,
redirect: '/stock/in',
children: [
{
path: '/stock/in',
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',
title: '经销商入库管理',
icon: 'import'
}
},
{
path: '/stock/dealer/out',
name: 'DealerOut',
component: () => import('@/views/stock/DealerOut'),
meta: {
title: '经销商库管理',
icon: 'usergroup-add'
},
component: RouteView,
redirect: '/stock/dealer/in',
children: [
{
path: '/stock/dealer/in',
name: 'DealerIn',
component: () => import('@/views/stock/DealerIn'),
meta: {
title: '入库管理',
icon: 'import'
}
},
{
path: '/stock/dealer/out',
name: 'DealerOut',
component: () => import('@/views/stock/DealerOut'),
meta: {
title: '出库管理',
icon: 'export'
}
}
]
}
title: '经销商库管理',
icon: 'export'
}
}
// {
// path: '/stock/ins',
// name: 'StockIns',
// meta: {
// title: '分公司库存管理',
// icon: 'control'
// },
// component: RouteView,
// redirect: '/stock/in',
// children: [
// {
// path: '/stock/in',
// name: 'StockIn',
// component: () => import('@/views/stock/In'),
// meta: {
// title: '入库管理',
// icon: 'import'
// }
// },
// {
// 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 v-slot:rightContentRender>
<span class="rightContentRenderTitle">欢迎使用水感应经销商端</span>
<span class="rightContentRenderTitle">欢迎使用水感应分公司管理</span>
<right-content :is-mobile="isMobile" :theme="settings.theme" :top-menu="settings.layout === 'topmenu'" />
</template>
@@ -61,7 +61,7 @@ export default {
menus: [],
// 侧栏收起状态
collapsed: false,
title: ' 水感应代理商 ',
title: ' 水感应分公司管理 ',
logo: '',
settings: {
// 布局类型

View File

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

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 */
export const printANSI = () => {
// console.clear()
// ASCII - ANSI Shadow
let text = `水感应大数据综合管理后台
let text = `水感应分公司管理
PUBLISHED: 1.0.0-10.0.0
EMAIL: yuzhankeji@163.com
CREATED_AT: ${BUILD_DATE}`
console.log(`%c${text}`, '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('%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('%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 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 === 'UserIndex' ||
from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock')
) {
this.$refs.table.loadData()

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>
<a-row :gutter="[24, 24]">
<!-- <a-col :lg="10" :md="24" :sm="24" :xl="8" :xxl="7">
<UserInfo />
</a-col> -->
<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 :lg="24" :md="24" :sm="24" :xl="24" :xxl="24">
@@ -26,8 +34,9 @@ export default {
},
data () {
return {
info: {},
serarchkey: 'today'
info: [],
serarchkey: 'year',
searchValue: null
}
},
computed: {
@@ -43,8 +52,17 @@ export default {
created () {
this.getInfo()
// 监听是否切换了日,周,月,年
this.eventBus.$on('updateHomeDataByType', (type) => {
this.serarchkey = type.type
this.eventBus.$on('updateHomeDataByType', (item) => {
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()
})
},
@@ -53,7 +71,7 @@ export default {
},
methods: {
getInfo () {
getMiddlesUserDatas(this.serarchkey).then(res => {
getMiddlesUserDatas(this.serarchkey, this.searchValue).then(res => {
this.info = res
}).catch(err => {
this.$notification.error(err)

View File

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

@@ -133,6 +133,25 @@ export default {
}
}
},
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: {
// 新增用户

View File

@@ -6,49 +6,40 @@
<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.item_id" placeholder="订单号" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="手机号码">
<a-input v-model="queryParam.order_no" placeholder="购买人手机号" />
<a-input v-model="queryParam.mobile" placeholder="购买人手机号" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="真实姓名">
<a-input v-model="queryParam.item_id" placeholder="购买人真实姓名" />
<a-input v-model="queryParam.name" placeholder="购买人真实姓名" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="发货数量" has-feedback>
<a-input v-model="queryParam.order_no" placeholder="发货数量" />
<a-form-item label="详细地址">
<a-input v-model="queryParam.address" placeholder="购买人收货地址" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="快递类型" has-feedback>
<a-select v-model="queryParam.business_type_id" @change="onBusinessChange" placeholder="快递类型">
<a-select-option v-for="item in businessArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option>
<!-- <a-col :md="8" :sm="24">
<a-form-item label="发货方式" has-feedback>
<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-form-item>
</a-col>
<a-col :md="8" :sm="24">
<a-form-item label="快递单号">
<a-input v-model="queryParam.item_id" placeholder="快递单号" />
<a-form-item label="快递类型" has-feedback>
<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-col>
</a-col> -->
<a-col :md="8" :sm="24">
<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
v-if="exports_can"
class="ml8"
type="dashed"
shape="round"
icon="download"
@click="exports"/>
</a-col>
</a-row>
</a-form>
@@ -61,22 +52,23 @@
ref="table"
:columns="columns"
:data="loadData"
:rowKey="(row) => row.order_item_id"
:rowKey="(row) => row.offline_id"
showPagination="auto"
bordered
size="default"
:scroll="{ x: 1200, y: 1000 }">
<!-- 申请用户 实习顾问 法务老师 -->
<div slot="user" slot-scope="text, record" style="color: #1890ff">
<div>{{ record.user }}</div>
>
<div slot="name" slot-scope="text, record">
<div>{{ record.name }} {{ record.mobile?'('+record.mobile+')':'--' }}</div>
<div>{{ record.address || '--' }}</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="onInfo(record)">查看详情</a>
<!-- <a-divider type="vertical" /> -->
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> -->
<div slot="number" slot-scope="text, record">{{ record.number }}</div>
<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="express" slot-scope="text, record">
<div v-if="record.channel === 'express'">
{{ record.express.name || '-' }} <div>{{ record.express.express_no || '-' }}</div>
</div>
<div v-else>发货时间{{ record.deliver_at }}</div>
</div>
</s-table>
</a-card>
@@ -86,62 +78,59 @@
<script>
import { STable, UserInfo } from '@/components'
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
import { institutionsExports } from '@/api/storage'
import moment from 'moment'
import Info from '@/views/home/components/Info'
import {
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 { getMiddlesStockOffline, getMiddlesStockOfflineInit } from '@/api/stock'
import AddOffline from './widgets/AddOffline.vue'
// 列表规格
const columns = [
{
title: '订单号',
dataIndex: 'user22',
align: 'center'
},
{
title: '收货人',
dataIndex: 'created_at',
align: 'center'
title: 'ID',
dataIndex: 'offline_id',
align: 'center',
width: 100
},
{
title: '发货数量',
dataIndex: 'created_at1',
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' },
scopedSlots: { customRender: 'number' },
align: 'center',
width: 160,
fixed: 'right'
width: 120
},
{
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 {
@@ -157,37 +146,37 @@ export default {
exports_can: false,
columns,
searchType: false, // 展示全部的搜索
businessArray: [], // 业务类型
statusArray: [], // 机构列表
expresses: [], // 快递列表
channels: [], // 返货方式
queryParam: {
order_no: '', // 订单编号
institution: '', // 机构名称
item_id: '', // 机构编号
nickname: '', // 下单人
business_type_id: '', // 业务类型
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined // 结案时间
name: undefined,
mobile: undefined,
channel: undefined,
address: undefined,
express: undefined
},
listCount: 0,
loadData: (parameter) => {
const requestParameters = Object.assign({}, parameter, this.queryParam)
return getMiddlesExperience(requestParameters)
return getMiddlesStockOffline(requestParameters)
}
}
},
watch: {
$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')
if (to.name === 'SalesOffline' && (
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()
}
@@ -200,36 +189,11 @@ export default {
moment,
// 获取检索的基本样式
init () {
init().then(res => {
this.statusArray = res.status // 机构状态
this.businessArray = res.type // 业务类型
// this.canExports()
getMiddlesStockOfflineInit().then(res => {
this.channels = res.channel
this.expresses = res.expresses
})
},
// 更改创建时间
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 () {
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
@@ -237,45 +201,16 @@ export default {
// 重置搜索列表
resetSearch () {
this.queryParam = {
order_no: '', // 订单编号
institution: '', // 机构名称
item_id: '', // 机构编号
nickname: '', // 下单人
business_type_id: '', // 业务类型
status: '', // 机构状态
paid_at: undefined, // 下单时间
audit_at: undefined, // 执行时间
settle_at: undefined// 结案时间
name: undefined,
mobile: undefined,
channel: undefined,
address: undefined,
express: undefined
}
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 () {
// 创建线下出货
CreateOffline () {
const success = {
title: '新增线下出货',
width: 600,
@@ -284,55 +219,15 @@ export default {
okText: '确认新增',
cancelText: '取消'
}
const offline = {
channels: this.channels,
expresses: this.expresses
}
console.log(offline)
this.$dialog(
AddOffline,
{
on: {
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,
offline,
on: {
ok: () => {
this.$refs.table.loadData()

View File

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

View File

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

View File

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

View File

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

View File

@@ -107,16 +107,16 @@ const columns = [
},
{
title: '经销商',
scopedSlots: { customRender: 'in_user' },
scopedSlots: { customRender: 'out_user' },
align: 'center',
width: 140
},
{
title: '分公司/平台',
scopedSlots: { customRender: 'out_user' },
align: 'center',
width: 140
},
// {
// title: '分公司/平台',
// scopedSlots: { customRender: 'out_user' },
// align: 'center',
// width: 140
// },
{
title: '库变数据',
scopedSlots: { customRender: 'number' },
@@ -181,6 +181,8 @@ export default {
from.name === 'DealerOut' ||
from.name === 'UserIndex' ||
from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock')
) {
this.$refs.table.loadData()

View File

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

View File

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

View File

@@ -5,26 +5,26 @@
<div class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-col :md="6" :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-col :md="6" :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="6" :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-col :md="6" :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" 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>
@@ -55,6 +55,10 @@
<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="order_count" slot-scope="text, record" style="color: #1890ff">{{ record.order.count + '(单)' || '-' }}</div>
<div slot="order_price" slot-scope="text, record" style="color: #1890ff">{{ record.order.price + '(元)' || '-' }}</div>
<div slot="stock" slot-scope="text, record" style="color: #1890ff">{{ record.stock + '(件)' || '-' }}</div>
<!-- 操作 -->
<div slot="actions" slot-scope="text, record">
<a class="ant-dropdown-link" @click="onEdit(record)">更改推荐人</a>
@@ -87,35 +91,52 @@ const columns = [
title: '昵称',
scopedSlots: { customRender: 'nickname' },
align: 'center',
width: 200
width: 140
},
{
title: '真实姓名',
scopedSlots: { customRender: 'name' },
align: 'center',
width: 140
width: 120
},
{
title: '用户手机',
scopedSlots: { customRender: 'username' },
align: 'center',
width: 140
width: 130
},
{
title: '身份',
scopedSlots: { customRender: 'identity' },
align: 'center',
width: 140
width: 120
},
{
title: '邀请码',
scopedSlots: { customRender: 'invite' },
align: 'center',
width: 140
width: 130
}
],
width: 300,
align: 'center'
}, {
title: '当前库存',
scopedSlots: { customRender: 'stock' },
width: 120,
align: 'center'
},
{
title: '消费订单量',
scopedSlots: { customRender: 'order_count' },
width: 120,
align: 'center'
},
{
title: '消费订单额',
scopedSlots: { customRender: 'order_price' },
width: 120,
align: 'center'
},
{
title: '推荐人手机号',
@@ -128,15 +149,15 @@ const columns = [
dataIndex: 'created_at',
width: 200,
align: 'center'
},
{
title: '操作',
dataIndex: 'status10',
scopedSlots: { customRender: 'actions' },
align: 'center',
width: 160,
fixed: 'right'
}
// {
// title: '操作',
// dataIndex: 'status10',
// scopedSlots: { customRender: 'actions' },
// align: 'center',
// width: 160,
// fixed: 'right'
// }
]
export default {

View File

@@ -1653,9 +1653,9 @@
integrity sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==
"@types/node@*":
version "20.4.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.5.tgz#9dc0a5cb1ccce4f7a731660935ab70b9c00a5d69"
integrity sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==
version "20.4.7"
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.4.7.tgz#74d323a93f1391a63477b27b9aec56669c98b2ab"
integrity sha512-bUBrPjEry2QUTsnuEjzjbS7voGWCc30W0qzgMf90GPeDGFRakvrz47ju+oqDAKCXLUCe39u57/ORMl/O/04/9g==
"@types/node@8.9":
version "8.9.5"
@@ -3573,9 +3573,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001517:
version "1.0.30001518"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001518.tgz#b3ca93904cb4699c01218246c4d77a71dbe97150"
integrity sha512-rup09/e3I0BKjncL+FesTayKtPrdwKhUufQFd3riFw1hHg8JmIFoInYfB102cFcY/pPgGmdyl/iy+jgiDi2vdA==
version "1.0.30001519"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz#3e7b8b8a7077e78b0eb054d69e6edf5c7df35601"
integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==
capture-exit@^2.0.0:
version "2.0.0"
@@ -5075,9 +5075,9 @@ ejs@^2.6.1:
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
electron-to-chromium@^1.4.477:
version "1.4.480"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.480.tgz#40e32849ca50bc23ce29c1516c5adb3fddac919d"
integrity sha512-IXTgg+bITkQv/FLP9FjX6f9KFCs5hQWeh5uNSKxB9mqYj/JXhHDbu+ekS43LVvbkL3eW6/oZy4+r9Om6lan1Uw==
version "1.4.484"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.484.tgz#770358eba089471c5dae5719db3a5a4fbf02bfb2"
integrity sha512-nO3ZEomTK2PO/3TUXgEx0A97xZTpKVf4p427lABHuCpT1IQ2N+njVh29DkQkCk6Q4m2wjU+faK4xAcfFndwjvw==
element-resize-detector@1.1.13:
version "1.1.13"