修改密码隐藏忘记密码,销售管理接口,数据看板柱形图展示,页面切换刷新处理
This commit is contained in:
4
public/Index.vue
vendored
4
public/Index.vue
vendored
@@ -190,7 +190,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStatistical } from '@/api/statistical'
|
import { getMiddlesUserDatas } from '@/api/statistical'
|
||||||
import { timeFix } from '@/utils/util'
|
import { timeFix } from '@/utils/util'
|
||||||
import EditShop from '@/views/home/modules/EditShop'
|
import EditShop from '@/views/home/modules/EditShop'
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfo () {
|
getInfo () {
|
||||||
getStatistical().then(res => {
|
getMiddlesUserDatas().then(res => {
|
||||||
this.base_info = res.base_info
|
this.base_info = res.base_info
|
||||||
this.business = res.business
|
this.business = res.business
|
||||||
this.orders = res.orders
|
this.orders = res.orders
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ const userApi = {
|
|||||||
Logout: '/auth/logout',
|
Logout: '/auth/logout',
|
||||||
CommonLogin: '/middles/auth/login', // 登录接口
|
CommonLogin: '/middles/auth/login', // 登录接口
|
||||||
forgetPassword: '/staff/forget/password',
|
forgetPassword: '/staff/forget/password',
|
||||||
password: '/staff/password',
|
password: '/middles/user/password', // 修改密码
|
||||||
// get my info
|
// get my info
|
||||||
middleUser: '/middles/user', // 获取经销商信息
|
middleUser: '/middles/user', // 获取经销商信息
|
||||||
getScanCode: '/staff/scan_code',
|
getScanCode: '/staff/scan_code',
|
||||||
@@ -50,7 +50,7 @@ export function forgetPassword (parameter) {
|
|||||||
data: parameter
|
data: parameter
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改密码
|
||||||
export function password (parameter) {
|
export function password (parameter) {
|
||||||
return request({
|
return request({
|
||||||
url: userApi.password,
|
url: userApi.password,
|
||||||
|
|||||||
@@ -1,9 +1,22 @@
|
|||||||
|
/*
|
||||||
|
* @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
|
||||||
|
* @FilePath: /water_dealer-agent/src/api/statistical.js
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
|
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
export function getStatistical () {
|
// 获取 首页数据看板数据
|
||||||
|
export function getMiddlesUserDatas (item) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/index',
|
url: '/middles/user/datas',
|
||||||
method: 'get'
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
time_type: item
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
80
src/api/stock.js
Normal file
80
src/api/stock.js
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 经销商入库管理
|
||||||
|
export function getMiddlesStockInStocks (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/stock/in_stocks',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分公司出库管理
|
||||||
|
export function getMiddlesStockOutStocks (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/stock/out_stocks',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分公司入库管理
|
||||||
|
export function getMiddlesAgentStockInStocks (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/stock/agent/in_stocks',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 经销商出库管理
|
||||||
|
export function getMiddlesAgentStockOutStocks (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/stock/agent/out_stocks',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 城市体验官
|
||||||
|
export function getMiddlesExperience (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/experience',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 城市体验官前置
|
||||||
|
export function getMiddlesExperienceBefore () {
|
||||||
|
return request({
|
||||||
|
url: '/middles/experience/before',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 线上零售订单
|
||||||
|
export function getMiddlesOrderRetail (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/order/retail',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 线上进货订单
|
||||||
|
export function getMiddlesOrderIdentity (parameter) {
|
||||||
|
return request({
|
||||||
|
url: '/middles/order/identity',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 订单详情
|
||||||
|
export function getMiddlesOrderDetail (id) {
|
||||||
|
return request({
|
||||||
|
url: `/middles/order/${id}`,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 线下出货订单
|
||||||
@@ -10,16 +10,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import moment from 'moment'
|
import moment from 'moment'
|
||||||
// const data = []
|
const data2 = []
|
||||||
// const beginDay = new Date().getTime()
|
const beginDay = new Date().getTime()
|
||||||
|
|
||||||
// for (let i = 0; i < 10; i++) {
|
for (let i = 0; i < 7; i++) {
|
||||||
// data.push({
|
data2.push({
|
||||||
// x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
x: moment(new Date(beginDay + 1000 * 60 * 60 * 24 * i)).format('YYYY-MM-DD'),
|
||||||
// y: Math.round(Math.random() * 10)
|
y: Math.round(Math.random() * 10)
|
||||||
// })
|
})
|
||||||
// }
|
}
|
||||||
|
|
||||||
const tooltip = [
|
const tooltip = [
|
||||||
'x*y',
|
'x*y',
|
||||||
@@ -50,7 +50,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
// data,
|
data2,
|
||||||
tooltip,
|
tooltip,
|
||||||
scale,
|
scale,
|
||||||
height: 100
|
height: 100
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<a-avatar v-else src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" class="antd-pro-global-header-index-avatar" size="small" />
|
<a-avatar v-else src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" class="antd-pro-global-header-index-avatar" size="small" />
|
||||||
<!-- <img class="avatar" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /> -->
|
<!-- <img class="avatar" src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /> -->
|
||||||
<!-- <a-avatar v-else style="color: #f56a00; backgroundColor: #fde3cf" class="antd-pro-global-header-index-avatar" size="small">U</a-avatar> -->
|
<!-- <a-avatar v-else style="color: #f56a00; backgroundColor: #fde3cf" class="antd-pro-global-header-index-avatar" size="small">U</a-avatar> -->
|
||||||
<span>{{ currentUser.name }} ({{ currentUser.type }})</span>
|
<span>{{ currentUser.name }} ({{ currentUser.username }})</span>
|
||||||
</span>
|
</span>
|
||||||
<template v-slot:overlay>
|
<template v-slot:overlay>
|
||||||
<a-menu :selected-keys="[]" class="ant-pro-drop-down menu">
|
<a-menu :selected-keys="[]" class="ant-pro-drop-down menu">
|
||||||
@@ -83,12 +83,12 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
postData: {
|
postData: {
|
||||||
passWord: '',
|
passWord: '',
|
||||||
passWordAgain: ''
|
passWordAgain: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
<!--
|
||||||
|
* @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 09:12:56
|
||||||
|
* @FilePath: /water_dealer-agent/src/components/GlobalHeader/RightContent.vue
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div :class="wrpCls">
|
<div :class="wrpCls">
|
||||||
<!-- <notice-icon /> -->
|
<!-- <notice-icon /> -->
|
||||||
@@ -52,7 +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,
|
||||||
type: this.$store.getters.userInfo.type
|
username: this.$store.getters.username
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,11 +15,10 @@
|
|||||||
style="width: 300px"
|
style="width: 300px"
|
||||||
>
|
>
|
||||||
<a-card-meta
|
<a-card-meta
|
||||||
:title="info.nickname || '无昵称'"
|
:title="`${info.nickname || '无昵称'} ${info.identity ? '('+info.identity.name+')': '' }`"
|
||||||
>
|
>
|
||||||
<a-avatar slot="avatar" v-if="info.avatar" :src="info.avatar" :size="64" />
|
<a-avatar slot="avatar" v-if="info.avatar" :src="info.avatar" :size="64" />
|
||||||
<a-avatar slot="avatar" v-else icon="user" :size="64" />
|
<a-avatar slot="avatar" v-else icon="user" :size="64" />
|
||||||
|
|
||||||
<div slot="description">
|
<div slot="description">
|
||||||
{{ info.username }}
|
{{ info.username }}
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +35,7 @@
|
|||||||
</a-popover>
|
</a-popover>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-name">
|
<div class="user-name">
|
||||||
<div class="nickname">{{ info.nickname || '无昵称' }} ({{ info.sex }})</div>
|
<div class="nickname">{{ info.nickname || '无昵称' }} {{ info.identity? `(${info.identity.name})`: '' }}</div>
|
||||||
<div class="username">{{ info.username || '******' }}</div>
|
<div class="username">{{ info.username || '******' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -16,6 +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'
|
||||||
|
|
||||||
export const asyncRouterMap = [{
|
export const asyncRouterMap = [{
|
||||||
path: '/',
|
path: '/',
|
||||||
@@ -37,6 +38,7 @@ export const asyncRouterMap = [{
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
...detail,
|
...detail,
|
||||||
|
...cityExperienceOfficer,
|
||||||
...stock,
|
...stock,
|
||||||
...sales,
|
...sales,
|
||||||
...user,
|
...user,
|
||||||
|
|||||||
9
src/config/routes/cityExperienceOfficer.js
Normal file
9
src/config/routes/cityExperienceOfficer.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
export default [{
|
||||||
|
path: '/city/experience/officer',
|
||||||
|
name: 'cityExperienceOfficer',
|
||||||
|
meta: {
|
||||||
|
title: '城市体验官',
|
||||||
|
icon: 'sketch'
|
||||||
|
},
|
||||||
|
component: () => import('@/views/cityExperienceOfficer/Index')
|
||||||
|
}]
|
||||||
@@ -28,15 +28,15 @@ export default [{
|
|||||||
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')
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// path: '/sales/offline',
|
||||||
|
// name: 'SalesOffline',
|
||||||
|
// meta: {
|
||||||
|
// title: '线下出货列表',
|
||||||
|
// icon: 'unordered-list'
|
||||||
|
// },
|
||||||
|
// component: () => import('@/views/sales/Offline')
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|||||||
@@ -48,7 +48,28 @@ export default [{
|
|||||||
title: '经销商库存管理',
|
title: '经销商库存管理',
|
||||||
icon: 'usergroup-add'
|
icon: 'usergroup-add'
|
||||||
},
|
},
|
||||||
component: () => import('@/views/stock/DealerIndex')
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}]
|
}]
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @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-28 11:17:48
|
||||||
|
* @FilePath: /water_dealer-agent/src/router/index.js
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import Router from 'vue-router'
|
import Router from 'vue-router'
|
||||||
import NProgress from 'nprogress' // progress bar
|
import NProgress from 'nprogress' // progress bar
|
||||||
@@ -24,17 +32,18 @@ const router = new Router({
|
|||||||
})
|
})
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
|
console.log(to, from, next)
|
||||||
NProgress.start() // start progress bar
|
NProgress.start() // start progress bar
|
||||||
to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${i18nRender(to.meta.title)} - ${domTitle}`))
|
to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${i18nRender(to.meta.title)} - ${domTitle}`))
|
||||||
/* has token */
|
/* has token */
|
||||||
// /* has token */ && storage.get('is_subscribe')
|
// /* has token */ && storage.get('is_subscribe')
|
||||||
if (storage.get(ACCESS_TOKEN) && storage.get('is_subscribe')) {
|
if (storage.get(ACCESS_TOKEN)) {
|
||||||
if (to.path === loginRoutePath) {
|
if (to.path === loginRoutePath) {
|
||||||
next({ path: defaultRoutePath })
|
next({ path: defaultRoutePath })
|
||||||
NProgress.done()
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.user_id === '') {
|
if (store.getters.user_id === '') {
|
||||||
store.dispatch('GetPermission')
|
store.dispatch('GetMiddleUser')
|
||||||
.then(() => {
|
.then(() => {
|
||||||
const redirect = decodeURIComponent(from.query.redirect || to.path)
|
const redirect = decodeURIComponent(from.query.redirect || to.path)
|
||||||
if (to.path === redirect) {
|
if (to.path === redirect) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<a-button :disabled="btn" class="login-button" htmlType="submit" size="large" type="primary"> 登录 </a-button>
|
<a-button :disabled="btn" class="login-button" htmlType="submit" size="large" type="primary"> 登录 </a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a class="login-form-forgot" @click="goForget"> 忘记密码 </a>
|
<!-- <a class="login-form-forgot" @click="goForget"> 忘记密码 </a> -->
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<!-- 二维码展示区域 -->
|
<!-- 二维码展示区域 -->
|
||||||
@@ -165,13 +165,7 @@ export default {
|
|||||||
description: `${ timeFix() },欢迎回来`
|
description: `${ timeFix() },欢迎回来`
|
||||||
})
|
})
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// console.log(this.$route)
|
this.$router.push('/home')
|
||||||
// this.$router.beforeEach((to, from, next) => {
|
|
||||||
// console.log(to, from, next)
|
|
||||||
// })
|
|
||||||
this.$router.replace({
|
|
||||||
path: '/'
|
|
||||||
})
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
OnSubCancel () {
|
OnSubCancel () {
|
||||||
|
|||||||
268
src/views/cityExperienceOfficer/Index.vue
Normal file
268
src/views/cityExperienceOfficer/Index.vue
Normal file
@@ -0,0 +1,268 @@
|
|||||||
|
<template>
|
||||||
|
<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.username" placeholder="申请人手机号" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24" v-if="areas.length>0">
|
||||||
|
<a-form-item label="城市选择" has-feedback>
|
||||||
|
<a-select v-model="queryParam.experience_area_id" placeholder="请选择城市">
|
||||||
|
<a-select-option v-for="item in areas" :key="item.experience_area_id" :value="item.experience_area_id">{{ item.city }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24" v-if="provinces.length>0">
|
||||||
|
<a-form-item label="省份" has-feedback>
|
||||||
|
<a-select v-model="queryParam.province_id" placeholder="请选择省份">
|
||||||
|
<a-select-option v-for="item in provinces" :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-form-item label="收件人手机号">
|
||||||
|
<a-input v-model="queryParam.mobile" placeholder="收件人手机号" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24" v-if="status.length>0">
|
||||||
|
<a-form-item label="报名状态" has-feedback>
|
||||||
|
<a-select v-model="queryParam.status" placeholder="请选择报名状态">
|
||||||
|
<a-select-option v-for="item in status" :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-button type="primary" @click="search"><a-icon type="search" />搜索</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">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="4" :xs="24">
|
||||||
|
<info title="总参与人数" :value="count.all+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="3" :xs="24">
|
||||||
|
<info title="待检测" :value="count.init+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="3" :xs="24">
|
||||||
|
<info title="待审核" :value="count.audit+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="4" :xs="24">
|
||||||
|
<info title="已拒绝" :value="count.refuse+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="3" :xs="24">
|
||||||
|
<info title="待发货" :value="count.pass+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="3" :xs="24">
|
||||||
|
<info title="待签收" :value="count.sign+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="4" :xs="24">
|
||||||
|
<info title="已签收" :value="count.signed+''" />
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card>
|
||||||
|
<br/>
|
||||||
|
<s-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:data="loadData"
|
||||||
|
:rowKey="(row) => row.enroll_id + ''"
|
||||||
|
showPagination="auto"
|
||||||
|
bordered
|
||||||
|
:scroll="{ x: 1200, y: 1000 }"
|
||||||
|
size="default">
|
||||||
|
<!-- 收货人姓名 电话 收货地址 -->
|
||||||
|
<div slot="name" slot-scope="text, record" >
|
||||||
|
{{ record.express.name || '--' }}<div>{{ record.express.mobile }}</div>
|
||||||
|
</div>
|
||||||
|
<div slot="addr" slot-scope="text, record">{{ record.express.full_address || '--' }}</div>
|
||||||
|
<div slot="express" slot-scope="text, record">
|
||||||
|
{{ record.express.express.name || '--' }}<br/>{{ record.express.express_no }}
|
||||||
|
</div>
|
||||||
|
<user-info slot="share_user" slot-scope="text, record" :info="{...record.share_user}" />
|
||||||
|
<user-info slot="user" slot-scope="text, record" :info="{...record.user}" />
|
||||||
|
</s-table>
|
||||||
|
</a-card>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { STable, UserInfo } from '@/components'
|
||||||
|
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
|
||||||
|
import moment from 'moment'
|
||||||
|
import Info from '@/views/home/components/Info'
|
||||||
|
import {
|
||||||
|
getMiddlesExperience, getMiddlesExperienceBefore
|
||||||
|
} from '@/api/stock'
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
dataIndex: 'enroll_id',
|
||||||
|
align: 'center',
|
||||||
|
width: 60
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '推荐人',
|
||||||
|
scopedSlots: { customRender: 'share_user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '申请人',
|
||||||
|
scopedSlots: { customRender: 'user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 200
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '体验类型',
|
||||||
|
dataIndex: 'type_name',
|
||||||
|
align: 'center',
|
||||||
|
width: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '报名状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
align: 'center',
|
||||||
|
width: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收件人',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: '收件人姓名/电话',
|
||||||
|
scopedSlots: { customRender: 'name' },
|
||||||
|
align: 'center',
|
||||||
|
width: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '收件地址',
|
||||||
|
scopedSlots: { customRender: 'addr' },
|
||||||
|
align: 'center',
|
||||||
|
width: 150
|
||||||
|
}, {
|
||||||
|
title: '发货单号',
|
||||||
|
scopedSlots: { customRender: 'express' },
|
||||||
|
align: 'center',
|
||||||
|
width: 170
|
||||||
|
}
|
||||||
|
],
|
||||||
|
align: 'center'
|
||||||
|
}, {
|
||||||
|
title: '审核时间',
|
||||||
|
dataIndex: 'audit_at',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
}, {
|
||||||
|
title: '报名时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StockIn',
|
||||||
|
components: {
|
||||||
|
STable,
|
||||||
|
UserInfo,
|
||||||
|
Info,
|
||||||
|
DeriveButton
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
columns,
|
||||||
|
areas: [],
|
||||||
|
status: [],
|
||||||
|
provinces: [],
|
||||||
|
count: {
|
||||||
|
'all': 0, // 全部
|
||||||
|
'init': 0, // 待检测
|
||||||
|
'audit': 0, // 待审核
|
||||||
|
'refuse': 0, // 已拒绝
|
||||||
|
'pass': 0, // 待发货
|
||||||
|
'sign': 0, // 待签收
|
||||||
|
'signed': 0 // 已签收
|
||||||
|
},
|
||||||
|
queryParam: {
|
||||||
|
username: undefined, // 申请人手机号
|
||||||
|
mobile: undefined, // 收件人手机号
|
||||||
|
experience_area_id: undefined, // 城市id
|
||||||
|
status: undefined, // 状态:
|
||||||
|
province_id: undefined // 省
|
||||||
|
},
|
||||||
|
loadData: (parameter) => {
|
||||||
|
this.getbeforeInfo()
|
||||||
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
|
return getMiddlesExperience(requestParameters)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route (to, from) {
|
||||||
|
if (to.name === 'cityExperienceOfficer' && (
|
||||||
|
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: {
|
||||||
|
moment,
|
||||||
|
// 更改创建时间
|
||||||
|
onCreateChange (dates, dateStrings) {
|
||||||
|
this.queryParam.start_at = dateStrings[0]
|
||||||
|
this.queryParam.end_at = dateStrings[1]
|
||||||
|
this.rang_at = dateStrings
|
||||||
|
},
|
||||||
|
// 搜索列表
|
||||||
|
search () {
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
},
|
||||||
|
// 重置搜索列表
|
||||||
|
resetSearch () {
|
||||||
|
this.queryParam.experience_area_id = undefined
|
||||||
|
this.queryParam.username = undefined
|
||||||
|
this.queryParam.mobile = undefined
|
||||||
|
this.queryParam.status = undefined
|
||||||
|
this.queryParam.province_id = undefined
|
||||||
|
this.rang_at = []
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
},
|
||||||
|
// 获取前置信息
|
||||||
|
getbeforeInfo () {
|
||||||
|
getMiddlesExperienceBefore().then(res => {
|
||||||
|
this.areas = res.areas
|
||||||
|
this.count = res.count
|
||||||
|
this.provinces = res.provinces
|
||||||
|
this.status = res.status
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.ml8 {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStatistical } from '@/api/statistical'
|
import { getMiddlesUserDatas } from '@/api/statistical'
|
||||||
import UserInfo from '@/views/home/components/UserInfo'
|
import UserInfo from '@/views/home/components/UserInfo'
|
||||||
import Count from '@/views/home/components/Count'
|
import Count from '@/views/home/components/Count'
|
||||||
import Analysis from '@/views/home/components/Analysis.vue'
|
import Analysis from '@/views/home/components/Analysis.vue'
|
||||||
@@ -26,7 +26,8 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
info: {}
|
info: {},
|
||||||
|
serarchkey: 'today'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -42,6 +43,7 @@ export default {
|
|||||||
// 监听是否切换了日,周,月,年
|
// 监听是否切换了日,周,月,年
|
||||||
this.eventBus.$on('updateHomeDataByType', (type) => {
|
this.eventBus.$on('updateHomeDataByType', (type) => {
|
||||||
console.log(type)
|
console.log(type)
|
||||||
|
this.serarchkey = type.type
|
||||||
this.getInfo()
|
this.getInfo()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -50,7 +52,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getInfo () {
|
getInfo () {
|
||||||
getStatistical().then(res => {
|
getMiddlesUserDatas(this.serarchkey).then(res => {
|
||||||
this.info = res
|
this.info = res
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$notification.error(err)
|
this.$notification.error(err)
|
||||||
|
|||||||
@@ -8,16 +8,16 @@
|
|||||||
:xl="12"
|
:xl="12"
|
||||||
:xxl="12"
|
:xxl="12"
|
||||||
:style="{ marginBottom: '10px' }"
|
:style="{ marginBottom: '10px' }"
|
||||||
v-if="info.total">
|
v-if="info.middle">
|
||||||
<chart-card :loading="loading" :title="$t('分公司总库存')" :total="'¥'+info.total.total">
|
<chart-card :loading="loading" :title="$t('分公司总库存(瓶)')" :total="info.middle.total">
|
||||||
<a-tooltip :title="$t('总分公司总库存')" slot="action">
|
<a-tooltip :title="$t('总分公司总库存')" slot="action">
|
||||||
<a-icon type="info-circle-o" />
|
<a-icon type="info-circle-o" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<!-- <span> {{ info.total.people }}瓶</span> -->
|
<!-- <span> {{ info.total.people }}瓶</span> -->
|
||||||
<trend flag="up"> <span slot="term">{{ $t('线上库存') }}</span>321瓶</trend>
|
<trend flag="up"> <span slot="term">{{ $t('线上库存') }}</span>{{ info.middle.online_stock }}瓶</trend>
|
||||||
<trend flag="down" style="margin-left: 20px;">
|
<trend flag="down" style="margin-left: 20px;">
|
||||||
<span slot="term">{{ $t('线下库存') }}</span>1234瓶
|
<span slot="term">{{ $t('线下库存') }}</span>{{ info.middle.offline_stock }}瓶
|
||||||
</trend>
|
</trend>
|
||||||
</template>
|
</template>
|
||||||
</chart-card>
|
</chart-card>
|
||||||
@@ -29,66 +29,21 @@
|
|||||||
:xl="12"
|
:xl="12"
|
||||||
:xxl="12"
|
:xxl="12"
|
||||||
:style="{ marginBottom: '10px' }"
|
:style="{ marginBottom: '10px' }"
|
||||||
v-if="info.people"
|
v-if="info.agent"
|
||||||
>
|
>
|
||||||
<chart-card :loading="loading" :title="$t('经销商总库存')" :total="info.people.total | NumberFormat">
|
<chart-card :loading="loading" :title="$t('经销商总库存(瓶)')" :total="info.agent.stock | NumberFormat">
|
||||||
<a-tooltip :title="$t('经销商总库存')" slot="action">
|
<a-tooltip :title="$t('经销商总库存')" slot="action">
|
||||||
<a-icon type="info-circle-o" />
|
<a-icon type="info-circle-o" />
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<div>
|
<div>
|
||||||
<mini-area :data="info.people.charts" />
|
<mini-area :data="info.agent.line" />
|
||||||
</div>
|
</div>
|
||||||
<template slot="footer">{{ $t('经销商总数') }}<span style="margin-right:20px;"> {{ info.people.count | 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-col
|
|
||||||
:sm="24"
|
|
||||||
:md="12"
|
|
||||||
:xl="12"
|
|
||||||
:xxl="6"
|
|
||||||
:style="{ marginBottom: '24px' }"
|
|
||||||
v-if="info.paid"
|
|
||||||
>
|
|
||||||
<chart-card :loading="loading" :title="$t('日成交统计')" :total="info.paid.today | NumberFormat">
|
|
||||||
<a-tooltip :title="$t('每日交易数进行比对统计')" slot="action">
|
|
||||||
<a-icon type="info-circle-o" />
|
|
||||||
</a-tooltip>
|
|
||||||
<div>
|
|
||||||
<mini-bar :data="info.paid.charts"/>
|
|
||||||
</div>
|
|
||||||
<template slot="footer">
|
|
||||||
<trend flag="up" style="margin-right: 16px;">
|
|
||||||
<span slot="term">{{ $t('交易数') }}</span>
|
|
||||||
20%
|
|
||||||
</trend>
|
|
||||||
</template>
|
|
||||||
</chart-card>
|
|
||||||
</a-col> -->
|
|
||||||
<!-- 订单进行比例 -->
|
|
||||||
<!-- <a-col :sm="24" :md="12" :xl="12" :xxl="6" :style="{ marginBottom: '24px' }">
|
|
||||||
<chart-card :loading="loading" :title="$t('订单进度比例')" :total="info.process">
|
|
||||||
<a-tooltip :title="$t('订单进度比例包含未完成已完成订单的比例')" slot="action">
|
|
||||||
<a-icon type="info-circle-o" />
|
|
||||||
</a-tooltip>
|
|
||||||
<div>
|
|
||||||
<mini-progress color="rgb(19, 194, 194)" :target="info.process" :percentage="info.process" height="8px" />
|
|
||||||
</div>
|
|
||||||
<template slot="footer">
|
|
||||||
<trend flag="down" style="margin-right: 16px;">
|
|
||||||
<span slot="term">{{ $t('订单未完成') }}</span>
|
|
||||||
12%
|
|
||||||
</trend>
|
|
||||||
<trend flag="up">
|
|
||||||
<span slot="term">{{ $t('订单已完成') }}</span>
|
|
||||||
88%
|
|
||||||
</trend>
|
|
||||||
</template>
|
|
||||||
</chart-card>
|
|
||||||
</a-col> -->
|
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-col :span="24">
|
<a-col :span="24" >
|
||||||
<a-card :bordered="false" title="用户数据">
|
<a-card :bordered="false" title="用户数据">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<a-dropdown v-model="visible">
|
<a-dropdown v-model="visible">
|
||||||
@@ -102,60 +57,60 @@
|
|||||||
</a-menu>
|
</a-menu>
|
||||||
</a-dropdown>
|
</a-dropdown>
|
||||||
</template>
|
</template>
|
||||||
<a-row>
|
<a-row v-if="info.users">
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="用户总数量(人)" value="1" :bordered="true" />
|
<info title="用户总数量(人)" :value="''+info.users.all" :bordered="true" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="新增代理数(人)" value="2" :bordered="true" />
|
<info title="新增代理数(人)" :value="''+info.users.new_agents" :bordered="true" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="新增创客数(人)" value="2" />
|
<info title="新增创客数(人)" :value="''+info.users.new_makers" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="新增VIP数(人)" value="2" :bordered="true"/>
|
<info title="新增VIP数(人)" :value="''+info.users.new_vips" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="新增游客数量(人)" value="2"/>
|
<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.init">
|
<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 :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="线上销售数量(瓶)" :value="info.init.apply+''" :bordered="true" />
|
<info title="线上销售数量(瓶)" :value="''+info.sales_quantity.online_all" :bordered="true" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="线上零售数量(瓶)" :value="info.init.base+''" :bordered="true"/>
|
<info title="线上零售数量(瓶)" :value="''+info.sales_quantity.online_retail" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="线上代理进货数量(瓶)" :value="info.init.base+''"/>
|
<info title="线上代理进货数量(瓶)" :value="''+info.sales_quantity.online_agent_in" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="线上创客进货数量(瓶)" :value="info.init.base+''" :bordered="true"/>
|
<info title="线上创客进货数量(瓶)" :value="''+info.sales_quantity.online_maker_in" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
|
||||||
<info title="线下出货数量(瓶)" :value="info.init.init+''" />
|
<info title="线下出货数量(瓶)" :value="''+info.sales_quantity.offline" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24" v-if="info.b_check">
|
<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 :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
||||||
<info title="代理进货金额(元)" :value="info.b_check.process+''" :bordered="true"/>
|
<info title="代理进货金额(元)" :value="''+info.sales_amount.online_agent_in" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
||||||
<info title="创客进货金额(元)" :value="info.b_check.pass+''" :bordered="true"/>
|
<info title="创客进货金额(元)" :value="''+info.sales_amount.online_maker_in" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
||||||
<info title="线上销售金额(元)" :value="info.b_check.diff+''" :bordered="true"/>
|
<info title="线上销售金额(元)" :value="''+info.sales_amount.online_sell" :bordered="true"/>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
|
||||||
<info title="线下销售金额(元)" :value="info.b_check.diff+''" />
|
<info title="线下销售金额(元)" :value="''+info.sales_amount.offline_sell" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|||||||
@@ -90,10 +90,10 @@ 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,
|
|
||||||
init,
|
init,
|
||||||
canExport
|
canExport
|
||||||
} from '@/api/organization'
|
} from '@/api/organization'
|
||||||
|
import { getMiddlesExperience } from '@/api/stock'
|
||||||
import storage from 'store'
|
import storage from 'store'
|
||||||
import EditSend from './widgets/EditSend.vue'
|
import EditSend from './widgets/EditSend.vue'
|
||||||
import StockInfo from './widgets/StockInfo.vue'
|
import StockInfo from './widgets/StockInfo.vue'
|
||||||
@@ -174,7 +174,7 @@ export default {
|
|||||||
listCount: 0,
|
listCount: 0,
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
return getList(requestParameters)
|
return getMiddlesExperience(requestParameters)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -279,7 +279,7 @@ export default {
|
|||||||
onAddRole () {
|
onAddRole () {
|
||||||
console.log('add....')
|
console.log('add....')
|
||||||
const success = {
|
const success = {
|
||||||
title: '新增用户',
|
title: '新增线下出货',
|
||||||
width: 600,
|
width: 600,
|
||||||
maskClosable: true,
|
maskClosable: true,
|
||||||
closable: true,
|
closable: true,
|
||||||
|
|||||||
@@ -1,54 +1,42 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- 线上进货 -->
|
<!-- 线上零售 -->
|
||||||
<page-header-wrapper>
|
<page-header-wrapper>
|
||||||
<template v-slot:content>
|
<template v-slot:content>
|
||||||
<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-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.order_no" 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.order_no" placeholder="购买人手机号" />
|
<a-input v-model="queryParam.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="真实姓名">
|
<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="订单状态" has-feedback>
|
||||||
<a-input v-model="queryParam.order_no" placeholder="发货数量" />
|
<a-select v-model="queryParam.state" placeholder="订单状态">
|
||||||
</a-form-item>
|
<a-select-option v-for="item in state" :key="item.key" :value="item.key">{{ item.text }}</a-select-option>
|
||||||
</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-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="快递单号">
|
||||||
<a-input v-model="queryParam.item_id" placeholder="快递单号" />
|
<a-input v-model="queryParam.express_no" placeholder="快递单号" />
|
||||||
</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" type="primary" @click="onAdd">新增</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,21 +49,22 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:rowKey="(row) => row.order_item_id"
|
:rowKey="(row) => row.order_no"
|
||||||
showPagination="auto"
|
showPagination="auto"
|
||||||
bordered
|
bordered
|
||||||
size="default"
|
size="default"
|
||||||
:scroll="{ x: 1200, y: 1000 }">
|
:scroll="{ x: 1200, y: 1000 }">
|
||||||
<!-- 申请用户 实习顾问 法务老师 -->
|
<!--收货地址 -->
|
||||||
<div slot="user" slot-scope="text, record" style="color: #1890ff">
|
<div slot="express" slot-scope="text, record">
|
||||||
<div>{{ record.user }}</div>
|
<div>{{ record.express.name }} {{ record.express.mobile?'('+record.express.mobile+')':'--' }}</div>
|
||||||
|
<div>{{ record.express.full_address || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建时间 -->
|
<a slot="total" slot-scope="text, record">¥{{ record.total }}</a>
|
||||||
<span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span>
|
<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)">查看详情</a>
|
<a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a>
|
||||||
<!-- <a-divider type="vertical" /> -->
|
<!-- <a-divider type="vertical" /> -->
|
||||||
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> -->
|
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> -->
|
||||||
</div>
|
</div>
|
||||||
</s-table>
|
</s-table>
|
||||||
@@ -86,15 +75,9 @@
|
|||||||
<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 { getMiddlesOrderIdentity, getMiddlesOrderDetail } from '@/api/stock'
|
||||||
getList,
|
|
||||||
init,
|
|
||||||
canExport
|
|
||||||
} from '@/api/organization'
|
|
||||||
import storage from 'store'
|
|
||||||
import EditSend from './widgets/EditSend.vue'
|
import EditSend from './widgets/EditSend.vue'
|
||||||
import StockInfo from './widgets/StockInfo.vue'
|
import StockInfo from './widgets/StockInfo.vue'
|
||||||
|
|
||||||
@@ -108,31 +91,33 @@ const columns = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收货人',
|
title: '收货人',
|
||||||
dataIndex: 'tutor',
|
scopedSlots: { customRender: 'express' },
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '进货数量',
|
title: '进货数量',
|
||||||
dataIndex: 'order_id',
|
scopedSlots: { customRender: 'items_qty' },
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单信息',
|
title: '订单',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '订单类型',
|
||||||
dataIndex: 'status',
|
dataIndex: 'type',
|
||||||
key: 'status',
|
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '金额',
|
title: '订单状态',
|
||||||
dataIndex: 'price',
|
dataIndex: 'state',
|
||||||
key: 'price',
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '订单金额',
|
||||||
|
scopedSlots: { customRender: 'total' },
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -154,82 +139,44 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
exports_can: false,
|
|
||||||
columns,
|
columns,
|
||||||
searchType: false, // 展示全部的搜索
|
|
||||||
businessArray: [], // 业务类型
|
|
||||||
statusArray: [], // 机构列表
|
|
||||||
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
order_no: '', // 订单编号
|
state: undefined, // 订单状态
|
||||||
institution: '', // 机构名称
|
order_no: undefined, // 订单编号
|
||||||
item_id: '', // 机构编号
|
username: undefined, // 购买人手机号
|
||||||
nickname: '', // 下单人
|
name: undefined, // 购买人真实姓名
|
||||||
business_type_id: '', // 业务类型
|
express_no: undefined // 快递单号
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined // 结案时间
|
|
||||||
},
|
},
|
||||||
listCount: 0,
|
state: [],
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
return getList(requestParameters)
|
return getMiddlesOrderIdentity(requestParameters).then(res => {
|
||||||
|
this.state = res.search.state
|
||||||
|
return res.orders
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route (to, from) {
|
$route (to, from) {
|
||||||
if (
|
if (to.name === 'SalesStock' && (
|
||||||
(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 === 'SalesOnline' ||
|
||||||
|
from.name === 'SalesStock')
|
||||||
) {
|
) {
|
||||||
this.$refs.table.loadData()
|
this.$refs.table.loadData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
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) {
|
|
||||||
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,67 +184,45 @@ export default {
|
|||||||
// 重置搜索列表
|
// 重置搜索列表
|
||||||
resetSearch () {
|
resetSearch () {
|
||||||
this.queryParam = {
|
this.queryParam = {
|
||||||
order_no: '', // 订单编号
|
state: undefined, // 订单状态
|
||||||
institution: '', // 机构名称
|
order_no: undefined, // 订单编号
|
||||||
item_id: '', // 机构编号
|
username: undefined, // 购买人手机号
|
||||||
nickname: '', // 下单人
|
name: undefined, // 购买人真实姓名
|
||||||
business_type_id: '', // 业务类型
|
express_no: undefined // 快递单号
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined// 结案时间
|
|
||||||
}
|
}
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
},
|
},
|
||||||
// 机构是否能导出
|
|
||||||
canExports () {
|
|
||||||
console.log('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: '数据为空不能下载!'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 查看详情
|
// 查看详情
|
||||||
onInfo (item) {
|
onInfo (id) {
|
||||||
const success = {
|
getMiddlesOrderDetail(id).then(res => {
|
||||||
title: '立即发货',
|
console.log(res)
|
||||||
width: 1000,
|
const info = res
|
||||||
maskClosable: true,
|
setTimeout(() => {
|
||||||
closable: true,
|
const success = {
|
||||||
footer: '',
|
title: '订单详情',
|
||||||
cancelText: '取消'
|
width: 1000,
|
||||||
}
|
maskClosable: true,
|
||||||
this.$dialog(
|
closable: true,
|
||||||
StockInfo,
|
footer: '',
|
||||||
{
|
cancelText: '取消'
|
||||||
item,
|
}
|
||||||
on: {
|
this.$dialog(
|
||||||
ok: () => {
|
StockInfo,
|
||||||
console.log('成功了。。')
|
{
|
||||||
this.$refs.table.loadData()
|
info,
|
||||||
|
on: {
|
||||||
|
ok: () => {
|
||||||
|
console.log('成功了。。')
|
||||||
|
this.$refs.table.loadData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
success
|
||||||
success
|
)
|
||||||
)
|
}, 500)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$notification.error(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 发货
|
// 发货
|
||||||
onEdit (item) {
|
onEdit (item) {
|
||||||
|
|||||||
@@ -7,48 +7,36 @@
|
|||||||
<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.order_no" 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.order_no" placeholder="购买人手机号" />
|
<a-input v-model="queryParam.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="真实姓名">
|
<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="订单状态" has-feedback>
|
||||||
<a-input v-model="queryParam.order_no" placeholder="发货数量" />
|
<a-select v-model="queryParam.state" placeholder="订单状态">
|
||||||
</a-form-item>
|
<a-select-option v-for="item in state" :key="item.key" :value="item.key">{{ item.text }}</a-select-option>
|
||||||
</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-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="快递单号">
|
||||||
<a-input v-model="queryParam.item_id" placeholder="快递单号" />
|
<a-input v-model="queryParam.express_no" placeholder="快递单号" />
|
||||||
</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" type="primary" @click="onAdd">新增</a-button> -->
|
<!-- <a-button class="ml8" type="primary" @click="onAdd">新增</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,20 +49,21 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:rowKey="(row) => row.order_item_id"
|
:rowKey="(row) => row.order_no"
|
||||||
showPagination="auto"
|
showPagination="auto"
|
||||||
bordered
|
bordered
|
||||||
size="default"
|
size="default"
|
||||||
:scroll="{ x: 1200, y: 1000 }">
|
:scroll="{ x: 1200, y: 1000 }">
|
||||||
<!-- 申请用户 实习顾问 法务老师 -->
|
<!--收货地址 -->
|
||||||
<div slot="user" slot-scope="text, record" style="color: #1890ff">
|
<div slot="express" slot-scope="text, record">
|
||||||
<div>{{ record.user }}</div>
|
<div>{{ record.express.name }} {{ record.express.mobile?'('+record.express.mobile+')':'--' }}</div>
|
||||||
|
<div>{{ record.express.full_address || '--' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建时间 -->
|
<a slot="total" slot-scope="text, record">¥{{ record.total }}</a>
|
||||||
<span slot="created_at" slot-scope="text, record">{{ record.created_at }}</span>
|
<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)">查看详情</a>
|
<a class="ant-dropdown-link" @click="onInfo(record.order_no)">查看详情</a>
|
||||||
<!-- <a-divider type="vertical" /> -->
|
<!-- <a-divider type="vertical" /> -->
|
||||||
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> -->
|
<!-- <a class="ant-dropdown-link" @click="onEdit(record)">发货</a> -->
|
||||||
</div>
|
</div>
|
||||||
@@ -86,15 +75,9 @@
|
|||||||
<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 { getMiddlesOrderRetail, getMiddlesOrderDetail } from '@/api/stock'
|
||||||
getList,
|
|
||||||
init,
|
|
||||||
canExport
|
|
||||||
} from '@/api/organization'
|
|
||||||
import storage from 'store'
|
|
||||||
import EditSend from './widgets/EditSend.vue'
|
import EditSend from './widgets/EditSend.vue'
|
||||||
import StockInfo from './widgets/StockInfo.vue'
|
import StockInfo from './widgets/StockInfo.vue'
|
||||||
|
|
||||||
@@ -104,35 +87,42 @@ const columns = [
|
|||||||
title: '订单号',
|
title: '订单号',
|
||||||
dataIndex: 'order_no',
|
dataIndex: 'order_no',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 160
|
width: 140
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收货人',
|
title: '收货人',
|
||||||
dataIndex: 'tutor',
|
scopedSlots: { customRender: 'express' },
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
width: 200
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '进货数量',
|
title: '零售数量',
|
||||||
dataIndex: 'order_id',
|
scopedSlots: { customRender: 'items_qty' },
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
width: 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '订单信息',
|
title: '订单',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '状态',
|
title: '订单类型',
|
||||||
dataIndex: 'status',
|
dataIndex: 'type',
|
||||||
key: 'status',
|
align: 'center',
|
||||||
align: 'center'
|
width: 130
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '金额',
|
title: '订单状态',
|
||||||
dataIndex: 'price',
|
dataIndex: 'state',
|
||||||
key: 'price',
|
align: 'center',
|
||||||
align: 'center'
|
width: 130
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '订单金额',
|
||||||
|
scopedSlots: { customRender: 'total' },
|
||||||
|
align: 'center',
|
||||||
|
width: 130
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -154,82 +144,44 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
exports_can: false,
|
|
||||||
columns,
|
columns,
|
||||||
searchType: false, // 展示全部的搜索
|
|
||||||
businessArray: [], // 业务类型
|
|
||||||
statusArray: [], // 机构列表
|
|
||||||
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
order_no: '', // 订单编号
|
state: undefined, // 订单状态
|
||||||
institution: '', // 机构名称
|
order_no: undefined, // 订单编号
|
||||||
item_id: '', // 机构编号
|
username: undefined, // 购买人手机号
|
||||||
nickname: '', // 下单人
|
name: undefined, // 购买人真实姓名
|
||||||
business_type_id: '', // 业务类型
|
express_no: undefined // 快递单号
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined // 结案时间
|
|
||||||
},
|
},
|
||||||
listCount: 0,
|
state: [],
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
return getList(requestParameters)
|
return getMiddlesOrderRetail(requestParameters).then(res => {
|
||||||
|
this.state = res.search.state
|
||||||
|
return res.orders
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route (to, from) {
|
$route (to, from) {
|
||||||
if (
|
if (to.name === 'SalesOnline' && (
|
||||||
(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 === 'SalesOnline' ||
|
||||||
|
from.name === 'SalesStock')
|
||||||
) {
|
) {
|
||||||
this.$refs.table.loadData()
|
this.$refs.table.loadData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
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) {
|
|
||||||
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,67 +189,45 @@ export default {
|
|||||||
// 重置搜索列表
|
// 重置搜索列表
|
||||||
resetSearch () {
|
resetSearch () {
|
||||||
this.queryParam = {
|
this.queryParam = {
|
||||||
order_no: '', // 订单编号
|
state: undefined, // 订单状态
|
||||||
institution: '', // 机构名称
|
order_no: undefined, // 订单编号
|
||||||
item_id: '', // 机构编号
|
username: undefined, // 购买人手机号
|
||||||
nickname: '', // 下单人
|
name: undefined, // 购买人真实姓名
|
||||||
business_type_id: '', // 业务类型
|
express_no: undefined // 快递单号
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined// 结案时间
|
|
||||||
}
|
}
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
},
|
},
|
||||||
// 机构是否能导出
|
|
||||||
canExports () {
|
|
||||||
console.log('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: '数据为空不能下载!'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 查看详情
|
// 查看详情
|
||||||
onInfo (item) {
|
onInfo (id) {
|
||||||
const success = {
|
getMiddlesOrderDetail(id).then(res => {
|
||||||
title: '立即发货',
|
console.log(res)
|
||||||
width: 1000,
|
const info = res
|
||||||
maskClosable: true,
|
setTimeout(() => {
|
||||||
closable: true,
|
const success = {
|
||||||
footer: '',
|
title: '订单详情',
|
||||||
cancelText: '取消'
|
width: 1000,
|
||||||
}
|
maskClosable: true,
|
||||||
this.$dialog(
|
closable: true,
|
||||||
StockInfo,
|
footer: '',
|
||||||
{
|
cancelText: '取消'
|
||||||
item,
|
}
|
||||||
on: {
|
this.$dialog(
|
||||||
ok: () => {
|
StockInfo,
|
||||||
console.log('成功了。。')
|
{
|
||||||
this.$refs.table.loadData()
|
info,
|
||||||
|
on: {
|
||||||
|
ok: () => {
|
||||||
|
console.log('成功了。。')
|
||||||
|
this.$refs.table.loadData()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
success
|
||||||
success
|
)
|
||||||
)
|
}, 500)
|
||||||
|
}).catch(err => {
|
||||||
|
this.$notification.error(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 发货
|
// 发货
|
||||||
onEdit (item) {
|
onEdit (item) {
|
||||||
|
|||||||
119
src/views/sales/widgets/StockInfo copy(备份以后动态数据用).vue
Normal file
119
src/views/sales/widgets/StockInfo copy(备份以后动态数据用).vue
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
|
||||||
|
<!-- 驳回原因用户姓名输入 -->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-descriptions title="用户信息" :column="4">
|
||||||
|
<a-descriptions-item label="姓名" span="2">张冬雪</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="电话" span="2">1810000000</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="身份" span="2">创客</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 出库 线上出库 -->
|
||||||
|
<a-descriptions title="线上出库" :column="4">
|
||||||
|
<a-descriptions-item label="线上出库方式" span="2">线上零售、优惠券扣除库存</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="出库数量" span="2">12件</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 出库 线下出库 物流 -->
|
||||||
|
<a-descriptions title="线下出库(线上发货)" :column="4">
|
||||||
|
<a-descriptions-item label="出库数量" span="2">12件</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="发货状态" span="2">线上发货</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="快递状态" span="2">待发货</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="发货时间" span="2">2023-12-12 12:12:12</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="快递单号" span="2">20398475766539979</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="收货人名" span="2">张冬雪</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="收货地址" span="3">哈尔滨市香坊区香顺街98号-2-201</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 出库 线下出库 自提 -->
|
||||||
|
<a-descriptions title="线下出库(自提)" :column="4">
|
||||||
|
<a-descriptions-item label="自提数量" span="2">12件</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="发货状态" span="2">自提</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="提货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 入库 线上 -->
|
||||||
|
<a-descriptions title="入库(线上)" :column="4">
|
||||||
|
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="进货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 入库 线下 线上发货-->
|
||||||
|
<a-descriptions title="入库(线下发货)" :column="4">
|
||||||
|
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="进货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="快递单号" span="2">20398475766539979</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="快递状态" span="2">待发货</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="收货地址" span="3">哈尔滨市香坊区香顺街98号-2-201</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
|
||||||
|
<!-- 入库 线下 自提-->
|
||||||
|
<a-descriptions title="入库(线下发货)" :column="4">
|
||||||
|
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="自提时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { changeStatusTwo } from '@/api/organization'
|
||||||
|
export default {
|
||||||
|
name: 'StockInfo',
|
||||||
|
props: {
|
||||||
|
item: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data: () => ({
|
||||||
|
formItemLayout: {
|
||||||
|
labelCol: { span: 6 },
|
||||||
|
wrapperCol: { span: 14 }
|
||||||
|
},
|
||||||
|
loading: false
|
||||||
|
}),
|
||||||
|
beforeCreate () {
|
||||||
|
this.form = this.$form.createForm(this)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onOk () {
|
||||||
|
return new Promise(resolve => {
|
||||||
|
this.form.validateFields((errors, values) => {
|
||||||
|
console.log(values)
|
||||||
|
if (!errors) {
|
||||||
|
console.log(values)
|
||||||
|
const params = {
|
||||||
|
status: values.status
|
||||||
|
}
|
||||||
|
changeStatusTwo(this.item.order_item_id, params).then((res) => {
|
||||||
|
this.$notification.success({
|
||||||
|
message: '成功',
|
||||||
|
description: '修改成功'
|
||||||
|
})
|
||||||
|
resolve(true)
|
||||||
|
}).catch((err) => {
|
||||||
|
this.$notification.error({
|
||||||
|
message: '失败',
|
||||||
|
description: err.message
|
||||||
|
})
|
||||||
|
resolve(false)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -2,62 +2,37 @@
|
|||||||
<!-- 驳回原因用户姓名输入 -->
|
<!-- 驳回原因用户姓名输入 -->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<a-descriptions title="用户信息" :column="4">
|
<a-divider orientation="left">下单用户信息</a-divider>
|
||||||
<a-descriptions-item label="姓名" span="2">张冬雪</a-descriptions-item>
|
<a-descriptions :column="4">
|
||||||
<a-descriptions-item label="电话" span="2">1810000000</a-descriptions-item>
|
<a-descriptions-item label="姓名" span="2">{{ info.user.name || info.user.nickname }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="身份" span="2">创客</a-descriptions-item>
|
<a-descriptions-item label="电话" span="2">{{ info.user.username }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="身份" span="2">{{ info.user.identity.name || '--' }}</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
|
<br/><a-divider orientation="left">{{ info.channel.text + info.operation_type.text }}</a-divider>
|
||||||
<!-- 出库 线上出库 -->
|
<a-descriptions :column="4">
|
||||||
<a-descriptions title="线上出库" :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="线上出库方式" span="2">线上零售、优惠券扣除库存</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">12件</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.coupon.price + '元' }}</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
|
<br/><a-divider orientation="left">购买商品</a-divider>
|
||||||
<!-- 出库 线下出库 物流 -->
|
<a-descriptions :column="4">
|
||||||
<a-descriptions title="线下出库(线上发货)" :column="4">
|
<a-descriptions-item label="商品名称" span="2">{{ info.items[0].sku.goods_name }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="出库数量" span="2">12件</a-descriptions-item>
|
<a-descriptions-item label="" span="2">
|
||||||
<a-descriptions-item label="发货状态" span="2">线上发货</a-descriptions-item>
|
<img :src="info.items[0].sku.cover" alt="" style="width: 200px;">
|
||||||
<a-descriptions-item label="快递状态" span="2">待发货</a-descriptions-item>
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="发货时间" span="2">2023-12-12 12:12:12</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="快递单号" span="2">20398475766539979</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="收货人名" span="2">张冬雪</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="收货地址" span="3">哈尔滨市香坊区香顺街98号-2-201</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
|
<br/><a-divider orientation="left">订单信息</a-divider>
|
||||||
<!-- 出库 线下出库 自提 -->
|
<a-descriptions :column="4">
|
||||||
<a-descriptions title="线下出库(自提)" :column="4">
|
<a-descriptions-item label="订单号" span="2">{{ info.order_no }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="自提数量" span="2">12件</a-descriptions-item>
|
<a-descriptions-item label="订单状态" span="2">{{ info.state.text }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="发货状态" span="2">自提</a-descriptions-item>
|
<a-descriptions-item label="下单时间" span="2">{{ info.created_at }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="提货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
<a-descriptions-item label="快递单号" span="2">{{ info.express.express_no || '-' }}</a-descriptions-item>
|
||||||
</a-descriptions>
|
<a-descriptions-item label="收货人" span="2">{{ info.express.name || '-' }} {{ info.express.mobile?'('+info.express.mobile +')':'-' }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="收货地址" span="3">{{ info.express.full_address || '--' }}</a-descriptions-item>
|
||||||
<!-- 入库 线上 -->
|
|
||||||
<a-descriptions title="入库(线上)" :column="4">
|
|
||||||
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="进货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
|
||||||
|
|
||||||
<!-- 入库 线下 线上发货-->
|
|
||||||
<a-descriptions title="入库(线下发货)" :column="4">
|
|
||||||
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="进货时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="快递单号" span="2">20398475766539979</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="快递状态" span="2">待发货</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="收货地址" span="3">哈尔滨市香坊区香顺街98号-2-201</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
|
||||||
|
|
||||||
<!-- 入库 线下 自提-->
|
|
||||||
<a-descriptions title="入库(线下发货)" :column="4">
|
|
||||||
<a-descriptions-item label="订单号" span="2">20398475766539979</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="进货数量" span="2">99件</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="经销商姓名手机号" span="2">张冬雪14745798055</a-descriptions-item>
|
|
||||||
<a-descriptions-item label="自提时间" span="2">2023-11-11 10:12:12</a-descriptions-item>
|
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
|
<br/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -66,7 +41,7 @@ import { changeStatusTwo } from '@/api/organization'
|
|||||||
export default {
|
export default {
|
||||||
name: 'StockInfo',
|
name: 'StockInfo',
|
||||||
props: {
|
props: {
|
||||||
item: {
|
info: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {
|
default: () => {
|
||||||
return {}
|
return {}
|
||||||
|
|||||||
227
src/views/stock/DealerIn.vue
Normal file
227
src/views/stock/DealerIn.vue
Normal file
@@ -0,0 +1,227 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<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="入库时间">
|
||||||
|
<a-range-picker
|
||||||
|
:placeholder="['开始日期', '结束日期']"
|
||||||
|
:value="rang_at"
|
||||||
|
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
||||||
|
@change="onCreateChange" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="入库人身份" has-feedback>
|
||||||
|
<a-select v-model="queryParam.identity" @change="onIdentityChange" placeholder="身份筛选">
|
||||||
|
<a-select-option v-for="item in identity" :key="item.id" :value="item.id">{{ item.title }}</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" @click="resetSearch"><a-icon type="undo" />重置</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- <a-card :bordered="false">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="12" :xs="24">
|
||||||
|
<info title="线上库存量剩余" :value="listCount.online+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="12" :xs="24">
|
||||||
|
<info title="线下库存量剩余" :value="listCount.offline+''" :bordered="false" />
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card> -->
|
||||||
|
<br/>
|
||||||
|
<s-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:data="loadData"
|
||||||
|
:rowKey="(row) => row.stock_log_id + ''"
|
||||||
|
showPagination="auto"
|
||||||
|
bordered
|
||||||
|
:scroll="{ x: 1200, y: 1000 }"
|
||||||
|
size="default">
|
||||||
|
<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}" />
|
||||||
|
<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="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>
|
||||||
|
</s-table>
|
||||||
|
</a-card>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { STable, UserInfo } from '@/components'
|
||||||
|
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
|
||||||
|
import moment from 'moment'
|
||||||
|
import Info from '@/views/home/components/Info'
|
||||||
|
import {
|
||||||
|
getMiddlesAgentStockInStocks
|
||||||
|
} from '@/api/stock'
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
dataIndex: 'stock_log_id',
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '经销商',
|
||||||
|
scopedSlots: { customRender: 'user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 140
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分公司/平台',
|
||||||
|
scopedSlots: { customRender: 'out_user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 140
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '当前库存',
|
||||||
|
scopedSlots: { customRender: 'stock' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '库变数据',
|
||||||
|
scopedSlots: { customRender: 'number' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '金额',
|
||||||
|
scopedSlots: { customRender: 'total' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
scopedSlots: { customRender: 'stock_order' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '补充库存时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StockOut',
|
||||||
|
components: {
|
||||||
|
STable,
|
||||||
|
UserInfo,
|
||||||
|
Info,
|
||||||
|
DeriveButton
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
columns,
|
||||||
|
rang_at: [],
|
||||||
|
queryParam: {
|
||||||
|
start_at: undefined,
|
||||||
|
end_at: undefined,
|
||||||
|
identity: undefined, // 身份
|
||||||
|
nickname: undefined, // 经销商昵称
|
||||||
|
username: undefined // 经销商手机号
|
||||||
|
},
|
||||||
|
identity: [ // 4 创客 6 代理商
|
||||||
|
{ title: '创客', id: 4 },
|
||||||
|
{ title: '代理商 ', id: 6 }
|
||||||
|
],
|
||||||
|
listCount: {
|
||||||
|
offline: 0,
|
||||||
|
online: 0
|
||||||
|
},
|
||||||
|
loadData: (parameter) => {
|
||||||
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
|
return getMiddlesAgentStockInStocks(requestParameters)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route (to, from) {
|
||||||
|
if (to.name === 'DealerIn' && (
|
||||||
|
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: {
|
||||||
|
moment,
|
||||||
|
// 更改创建时间
|
||||||
|
onCreateChange (dates, dateStrings) {
|
||||||
|
this.queryParam.start_at = dateStrings[0]
|
||||||
|
this.queryParam.end_at = dateStrings[1]
|
||||||
|
this.rang_at = dateStrings
|
||||||
|
},
|
||||||
|
onIdentityChange (e) {
|
||||||
|
this.queryParam.identity = e
|
||||||
|
},
|
||||||
|
onChannelChange (e) {
|
||||||
|
this.queryParam.channel = e
|
||||||
|
},
|
||||||
|
// 搜索列表
|
||||||
|
search () {
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
},
|
||||||
|
// 重置搜索列表
|
||||||
|
resetSearch () {
|
||||||
|
this.queryParam.start_at = undefined
|
||||||
|
this.queryParam.end_at = undefined
|
||||||
|
this.queryParam.nickname = undefined
|
||||||
|
this.queryParam.identity = undefined
|
||||||
|
this.queryParam.username = undefined
|
||||||
|
this.rang_at = []
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.ml8 {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,362 +0,0 @@
|
|||||||
|
|
||||||
<template>
|
|
||||||
<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.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-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>
|
|
||||||
</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-select>
|
|
||||||
</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-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :md="8" :sm="24">
|
|
||||||
<a-form-item label="入库时间">
|
|
||||||
<a-range-picker
|
|
||||||
:placeholder="['开始日期', '结束日期']"
|
|
||||||
v-model="queryParam.paid_at"
|
|
||||||
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
|
||||||
@change="onCreateChange" />
|
|
||||||
</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" 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
|
|
||||||
v-if="exports_can"
|
|
||||||
class="ml8"
|
|
||||||
type="dashed"
|
|
||||||
shape="round"
|
|
||||||
icon="download"
|
|
||||||
@click="exports"/>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 列表 -->
|
|
||||||
<a-card :bordered="false">
|
|
||||||
<s-table
|
|
||||||
ref="table"
|
|
||||||
:columns="columns"
|
|
||||||
:data="loadData"
|
|
||||||
:rowKey="(row) => row.order_item_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>
|
|
||||||
<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>
|
|
||||||
<a-divider type="vertical" />
|
|
||||||
<a class="ant-dropdown-link" @click="onUpData(record)">更改库存</a>
|
|
||||||
</div>
|
|
||||||
</s-table>
|
|
||||||
</a-card>
|
|
||||||
</page-header-wrapper>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<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 {
|
|
||||||
getList,
|
|
||||||
init,
|
|
||||||
canExport
|
|
||||||
} from '@/api/organization'
|
|
||||||
import storage from 'store'
|
|
||||||
import StockInfo from './widgets/StockInfo.vue'
|
|
||||||
import onUpData from './widgets/onUpData.vue'
|
|
||||||
|
|
||||||
// 列表规格
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: '用户ID',
|
|
||||||
dataIndex: 'order_id',
|
|
||||||
align: 'center',
|
|
||||||
width: 80
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '当前用户信息',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '昵称',
|
|
||||||
dataIndex: 'name',
|
|
||||||
key: 'name',
|
|
||||||
align: 'center',
|
|
||||||
width: 200
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '账号',
|
|
||||||
dataIndex: 'name23',
|
|
||||||
key: 'name23',
|
|
||||||
align: 'center',
|
|
||||||
width: 140
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '身份',
|
|
||||||
dataIndex: 'name2',
|
|
||||||
key: 'name2',
|
|
||||||
align: 'center',
|
|
||||||
width: 140
|
|
||||||
}
|
|
||||||
],
|
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '库变类型(入库、出库)',
|
|
||||||
dataIndex: 'user212',
|
|
||||||
width: 140,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '库变数量',
|
|
||||||
dataIndex: 'user232',
|
|
||||||
width: 140,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '当前库存',
|
|
||||||
dataIndex: 'user22',
|
|
||||||
width: 140,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '库变时间',
|
|
||||||
dataIndex: 'created_at',
|
|
||||||
width: 200,
|
|
||||||
align: 'center',
|
|
||||||
sorter: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
dataIndex: 'status110',
|
|
||||||
scopedSlots: { customRender: 'actions' },
|
|
||||||
align: 'center',
|
|
||||||
width: 200,
|
|
||||||
fixed: 'right'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'DealerIndex',
|
|
||||||
components: {
|
|
||||||
STable,
|
|
||||||
UserInfo,
|
|
||||||
Info,
|
|
||||||
DeriveButton
|
|
||||||
},
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
exports_can: false,
|
|
||||||
columns,
|
|
||||||
searchType: false, // 展示全部的搜索
|
|
||||||
businessArray: [], // 业务类型
|
|
||||||
statusArray: [], // 机构列表
|
|
||||||
|
|
||||||
queryParam: {
|
|
||||||
order_no: '', // 订单编号
|
|
||||||
institution: '', // 机构名称
|
|
||||||
item_id: '', // 机构编号
|
|
||||||
nickname: '', // 下单人
|
|
||||||
business_type_id: '', // 业务类型
|
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined // 结案时间
|
|
||||||
},
|
|
||||||
listCount: 0,
|
|
||||||
loadData: (parameter) => {
|
|
||||||
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
|
||||||
return getList(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')
|
|
||||||
) {
|
|
||||||
this.$refs.table.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created () {
|
|
||||||
this.init()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
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) {
|
|
||||||
this.queryParam.business_type_id = e
|
|
||||||
},
|
|
||||||
// 机构状态
|
|
||||||
onOrganizationChange (e) {
|
|
||||||
this.queryParam.status = e
|
|
||||||
},
|
|
||||||
// 搜索列表
|
|
||||||
search () {
|
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
|
||||||
},
|
|
||||||
// 重置搜索列表
|
|
||||||
resetSearch () {
|
|
||||||
this.queryParam = {
|
|
||||||
order_no: '', // 订单编号
|
|
||||||
institution: '', // 机构名称
|
|
||||||
item_id: '', // 机构编号
|
|
||||||
nickname: '', // 下单人
|
|
||||||
business_type_id: '', // 业务类型
|
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined// 结案时间
|
|
||||||
}
|
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
|
||||||
},
|
|
||||||
// 机构是否能导出
|
|
||||||
canExports () {
|
|
||||||
console.log('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: '数据为空不能下载!'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 更改库存
|
|
||||||
onUpData (item) {
|
|
||||||
console.log(item)
|
|
||||||
const success = {
|
|
||||||
title: '更改库存',
|
|
||||||
width: 600,
|
|
||||||
maskClosable: true,
|
|
||||||
closable: true,
|
|
||||||
okText: '知道了'
|
|
||||||
}
|
|
||||||
this.$dialog(
|
|
||||||
onUpData,
|
|
||||||
{
|
|
||||||
item,
|
|
||||||
on: {
|
|
||||||
ok: () => {
|
|
||||||
console.log('成功了。。')
|
|
||||||
this.$refs.table.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// 修改用户
|
|
||||||
onEdit (item) {
|
|
||||||
const success = {
|
|
||||||
title: '库变详情',
|
|
||||||
width: 1000,
|
|
||||||
maskClosable: true,
|
|
||||||
closable: true,
|
|
||||||
footer: '',
|
|
||||||
okText: '知道了'
|
|
||||||
}
|
|
||||||
this.$dialog(
|
|
||||||
StockInfo,
|
|
||||||
{
|
|
||||||
item,
|
|
||||||
on: {
|
|
||||||
ok: () => {
|
|
||||||
console.log('成功了。。')
|
|
||||||
this.$refs.table.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="less" scoped>
|
|
||||||
.ml8 {
|
|
||||||
margin-left: 8px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
231
src/views/stock/DealerOut.vue
Normal file
231
src/views/stock/DealerOut.vue
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<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.in_nickname" placeholder="入库人昵称" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="入库人手机号">
|
||||||
|
<a-input v-model="queryParam.in_username" placeholder="入库人手机号" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="入库人身份" has-feedback>
|
||||||
|
<a-select v-model="queryParam.in_identity" @change="onIdentityInChange" placeholder="身份筛选">
|
||||||
|
<a-select-option v-for="item in identity" :key="item.id" :value="item.id">{{ item.title }}</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.out_nickname" placeholder="出库人昵称" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="出库人手机号">
|
||||||
|
<a-input v-model="queryParam.out_username" placeholder="出库人手机号" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="出库人身份" has-feedback>
|
||||||
|
<a-select v-model="queryParam.out_identity" @change="onIdentityOutChange" placeholder="身份筛选">
|
||||||
|
<a-select-option v-for="item in identity" :key="item.id" :value="item.id">{{ item.title }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="出库时间">
|
||||||
|
<a-range-picker
|
||||||
|
:placeholder="['开始日期', '结束日期']"
|
||||||
|
:value="rang_at"
|
||||||
|
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
||||||
|
@change="onCreateChange" />
|
||||||
|
</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" @click="resetSearch"><a-icon type="undo" />重置</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 列表 -->
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- <a-card :bordered="false">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="12" :xs="24">
|
||||||
|
<info title="线上库存量剩余" :value="listCount.online+''" :bordered="true" />
|
||||||
|
</a-col>
|
||||||
|
<a-col :sm="12" :xs="24">
|
||||||
|
<info title="线下库存量剩余" :value="listCount.offline+''" :bordered="false" />
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-card> -->
|
||||||
|
<br/>
|
||||||
|
<s-table
|
||||||
|
ref="table"
|
||||||
|
:columns="columns"
|
||||||
|
:data="loadData"
|
||||||
|
:rowKey="(row) => row.stock_log_id + ''"
|
||||||
|
showPagination="auto"
|
||||||
|
bordered
|
||||||
|
:scroll="{ x: 1200, y: 1000 }"
|
||||||
|
size="default">
|
||||||
|
<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}" />
|
||||||
|
<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="total" slot-scope="text, record" style="color: #1890ff">¥{{ record.total }}</a>
|
||||||
|
</s-table>
|
||||||
|
</a-card>
|
||||||
|
</page-header-wrapper>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { STable, UserInfo } from '@/components'
|
||||||
|
import DeriveButton from '@/components/OrderDetailInfo/DeriveButton'
|
||||||
|
import moment from 'moment'
|
||||||
|
import Info from '@/views/home/components/Info'
|
||||||
|
import {
|
||||||
|
getMiddlesAgentStockOutStocks
|
||||||
|
} from '@/api/stock'
|
||||||
|
|
||||||
|
const columns = [
|
||||||
|
{
|
||||||
|
title: 'ID',
|
||||||
|
dataIndex: 'stock_log_id',
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '经销商',
|
||||||
|
scopedSlots: { customRender: 'in_user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 140
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分公司/平台',
|
||||||
|
scopedSlots: { customRender: 'out_user' },
|
||||||
|
align: 'center',
|
||||||
|
width: 140
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '库变数据',
|
||||||
|
scopedSlots: { customRender: 'number' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '金额',
|
||||||
|
scopedSlots: { customRender: 'total' },
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '补充库存时间',
|
||||||
|
dataIndex: 'created_at',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'StockOut',
|
||||||
|
components: {
|
||||||
|
STable,
|
||||||
|
UserInfo,
|
||||||
|
Info,
|
||||||
|
DeriveButton
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
columns,
|
||||||
|
rang_at: null,
|
||||||
|
queryParam: {
|
||||||
|
start_at: undefined,
|
||||||
|
end_at: undefined,
|
||||||
|
out_identity: undefined, // 身份
|
||||||
|
out_nickname: undefined, // 出库人昵称
|
||||||
|
out_username: undefined // 出库人手机号
|
||||||
|
},
|
||||||
|
identity: [ // 4 创客 6 代理商
|
||||||
|
{ title: '创客', id: 4 },
|
||||||
|
{ title: '代理商 ', id: 6 }
|
||||||
|
],
|
||||||
|
listCount: {
|
||||||
|
offline: 0,
|
||||||
|
online: 0
|
||||||
|
},
|
||||||
|
loadData: (parameter) => {
|
||||||
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
|
return getMiddlesAgentStockOutStocks(requestParameters)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
$route (to, from) {
|
||||||
|
if (to.name === 'DealerOut' && (
|
||||||
|
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: {
|
||||||
|
moment,
|
||||||
|
// 更改创建时间
|
||||||
|
onCreateChange (dates, dateStrings) {
|
||||||
|
this.queryParam.start_at = dateStrings[0]
|
||||||
|
this.queryParam.end_at = dateStrings[1]
|
||||||
|
this.rang_at = dateStrings
|
||||||
|
},
|
||||||
|
onIdentityInChange (e) {
|
||||||
|
this.queryParam.in_identity = e
|
||||||
|
},
|
||||||
|
onIdentityOutChange (e) {
|
||||||
|
this.queryParam.out_identity = e
|
||||||
|
},
|
||||||
|
onChannelChange (e) {
|
||||||
|
this.queryParam.channel = e
|
||||||
|
},
|
||||||
|
// 搜索列表
|
||||||
|
search () {
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
},
|
||||||
|
// 重置搜索列表
|
||||||
|
resetSearch () {
|
||||||
|
this.queryParam.start_at = undefined
|
||||||
|
this.queryParam.end_at = undefined
|
||||||
|
this.queryParam.out_nickname = undefined
|
||||||
|
this.queryParam.out_identity = undefined
|
||||||
|
this.queryParam.out_username = undefined
|
||||||
|
this.queryParam.in_nickname = undefined
|
||||||
|
this.queryParam.in_identity = undefined
|
||||||
|
this.queryParam.in_username = undefined
|
||||||
|
this.rang_at = []
|
||||||
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.ml8 {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<a-form-item label="入库时间">
|
<a-form-item label="入库时间">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
:placeholder="['开始日期', '结束日期']"
|
:placeholder="['开始日期', '结束日期']"
|
||||||
v-model="queryParam.paid_at"
|
:value="rang_at"
|
||||||
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
||||||
@change="onCreateChange" />
|
@change="onCreateChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -28,10 +28,10 @@
|
|||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :sm="12" :xs="24">
|
<a-col :sm="12" :xs="24">
|
||||||
<info title="线上库存量剩余" value="222" :bordered="true" />
|
<info title="线上库存量剩余" :value="listCount.online+''" :bordered="true" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="12" :xs="24">
|
<a-col :sm="12" :xs="24">
|
||||||
<info title="线下库存量剩余" value="333" :bordered="false" />
|
<info title="线下库存量剩余" :value="listCount.offline+''" :bordered="false" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -40,21 +40,11 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:rowKey="(row) => row.order_item_id"
|
:rowKey="(row) => row.middle_systen_id + ''"
|
||||||
showPagination="auto"
|
showPagination="auto"
|
||||||
bordered
|
bordered
|
||||||
size="default"
|
size="default">
|
||||||
:scroll="{ x: 1200, y: 1000 }">
|
<a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}件</a>
|
||||||
<!-- 申请用户 实习顾问 法务老师 -->
|
|
||||||
<div slot="user" slot-scope="text, record" style="color: #1890ff">
|
|
||||||
<div>{{ record.user }}</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-icon type="down" /></a>
|
|
||||||
</div>
|
|
||||||
</s-table>
|
</s-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
@@ -63,58 +53,42 @@
|
|||||||
<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,
|
getMiddlesStockInStocks
|
||||||
init,
|
} from '@/api/stock'
|
||||||
canExport
|
|
||||||
} from '@/api/organization'
|
|
||||||
import storage from 'store'
|
|
||||||
// import EditRole from './widgets/EditRole.vue'
|
|
||||||
import AddRole from './widgets/AddRole.vue'
|
|
||||||
|
|
||||||
// 列表规格
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '创客进货金额',
|
title: 'ID',
|
||||||
dataIndex: 'user22',
|
dataIndex: 'middle_systen_id',
|
||||||
align: 'center'
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '渠道',
|
||||||
|
dataIndex: 'channel',
|
||||||
|
align: 'center',
|
||||||
|
width: 180
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '补充库存数量',
|
||||||
|
scopedSlots: { customRender: 'number' },
|
||||||
|
align: 'center',
|
||||||
|
width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '补充库存时间',
|
title: '补充库存时间',
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
sorter: true
|
width: 180
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '补充库存数量',
|
title: '备注',
|
||||||
children: [
|
dataIndex: 'remark',
|
||||||
{
|
|
||||||
title: '线上',
|
|
||||||
dataIndex: 'name',
|
|
||||||
key: 'name',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '线下',
|
|
||||||
dataIndex: 'name1',
|
|
||||||
key: 'name1',
|
|
||||||
align: 'center'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
align: 'center'
|
||||||
}
|
}
|
||||||
// {
|
|
||||||
// title: '操作',
|
|
||||||
// dataIndex: 'status10',
|
|
||||||
// scopedSlots: { customRender: 'actions' },
|
|
||||||
// align: 'center',
|
|
||||||
// width: 160,
|
|
||||||
// fixed: 'right'
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -127,81 +101,49 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
exports_can: false,
|
|
||||||
columns,
|
columns,
|
||||||
searchType: false, // 展示全部的搜索
|
rang_at: [],
|
||||||
businessArray: [], // 业务类型
|
|
||||||
statusArray: [], // 机构列表
|
|
||||||
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
order_no: '', // 订单编号
|
start_at: undefined,
|
||||||
institution: '', // 机构名称
|
end_at: undefined
|
||||||
item_id: '', // 机构编号
|
},
|
||||||
nickname: '', // 下单人
|
listCount: {
|
||||||
business_type_id: '', // 业务类型
|
offline: 0,
|
||||||
status: '', // 机构状态
|
online: 0
|
||||||
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 getMiddlesStockInStocks(requestParameters).then(res => {
|
||||||
|
this.listCount.offline = res.count.offline
|
||||||
|
this.listCount.online = res.count.online
|
||||||
|
return res.logs
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route (to, from) {
|
$route (to, from) {
|
||||||
if (
|
if (to.name === 'StockIn' && (
|
||||||
(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 === 'SalesOnline' ||
|
||||||
|
from.name === 'SalesStock')
|
||||||
) {
|
) {
|
||||||
this.$refs.table.loadData()
|
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) {
|
onCreateChange (dates, dateStrings) {
|
||||||
this.queryParam.paid_at = dateStrings
|
this.queryParam.start_at = dateStrings[0]
|
||||||
},
|
this.queryParam.end_at = dateStrings[1]
|
||||||
// 更改执行时间
|
this.rang_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 () {
|
||||||
@@ -209,93 +151,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 重置搜索列表
|
// 重置搜索列表
|
||||||
resetSearch () {
|
resetSearch () {
|
||||||
this.queryParam = {
|
this.queryParam.start_at = undefined
|
||||||
order_no: '', // 订单编号
|
this.queryParam.end_at = undefined
|
||||||
institution: '', // 机构名称
|
this.rang_at = []
|
||||||
item_id: '', // 机构编号
|
|
||||||
nickname: '', // 下单人
|
|
||||||
business_type_id: '', // 业务类型
|
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined// 结案时间
|
|
||||||
}
|
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
},
|
|
||||||
// 机构是否能导出
|
|
||||||
canExports () {
|
|
||||||
console.log('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 () {
|
|
||||||
console.log('add....')
|
|
||||||
const success = {
|
|
||||||
title: '新增用户',
|
|
||||||
width: 600,
|
|
||||||
maskClosable: true,
|
|
||||||
closable: true,
|
|
||||||
okText: '确认新增',
|
|
||||||
cancelText: '取消'
|
|
||||||
}
|
|
||||||
this.$dialog(
|
|
||||||
AddRole,
|
|
||||||
{
|
|
||||||
on: {
|
|
||||||
ok: () => {
|
|
||||||
console.log('成功了。。')
|
|
||||||
this.$refs.table.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// 修改用户
|
|
||||||
onEdit (item) {
|
|
||||||
console.log(item)
|
|
||||||
// const success = {
|
|
||||||
// title: '修改用户',
|
|
||||||
// width: 600,
|
|
||||||
// maskClosable: true,
|
|
||||||
// closable: true,
|
|
||||||
// okText: '确认修改',
|
|
||||||
// cancelText: '取消'
|
|
||||||
// }
|
|
||||||
// this.$dialog(
|
|
||||||
// EditRole,
|
|
||||||
// {
|
|
||||||
// item,
|
|
||||||
// on: {
|
|
||||||
// ok: () => {
|
|
||||||
// console.log('成功了。。')
|
|
||||||
// this.$refs.table.loadData()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// success
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,30 @@
|
|||||||
<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.username" placeholder="用户手机" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="订单类型" has-feedback>
|
||||||
|
<a-select v-model="queryParam.type" @change="onTypeChange" placeholder="身份筛选">
|
||||||
|
<a-select-option v-for="item in typeArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :md="8" :sm="24">
|
||||||
|
<a-form-item label="渠道" has-feedback>
|
||||||
|
<a-select v-model="queryParam.channel" @change="onChannelChange" placeholder="身份筛选">
|
||||||
|
<a-select-option v-for="item in channelArray" :key="item.id" :value="item.id">{{ item.title }}</a-select-option>
|
||||||
|
</a-select>
|
||||||
|
</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-range-picker
|
<a-range-picker
|
||||||
:placeholder="['开始日期', '结束日期']"
|
:placeholder="['开始日期', '结束日期']"
|
||||||
v-model="queryParam.paid_at"
|
:value="rang_at"
|
||||||
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
:ranges="{ Today: [moment(), moment()], 'This Month': [moment(), moment().endOf('month')] }"
|
||||||
@change="onCreateChange" />
|
@change="onCreateChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -22,15 +41,16 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :sm="12" :xs="24">
|
<a-col :sm="12" :xs="24">
|
||||||
<info title="线上库存量剩余" value="222" :bordered="true" />
|
<info title="线上库存量剩余" :value="listCount.online+''" :bordered="true" />
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="12" :xs="24">
|
<a-col :sm="12" :xs="24">
|
||||||
<info title="线下库存量剩余" value="333" :bordered="false" />
|
<info title="线下库存量剩余" :value="listCount.offline+''" :bordered="false" />
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
@@ -39,21 +59,15 @@
|
|||||||
ref="table"
|
ref="table"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="loadData"
|
:data="loadData"
|
||||||
:rowKey="(row) => row.order_item_id"
|
:rowKey="(row) => row.middle_stock_log_id + ''"
|
||||||
showPagination="auto"
|
showPagination="auto"
|
||||||
bordered
|
bordered
|
||||||
size="default"
|
size="default">
|
||||||
:scroll="{ x: 1200, y: 1000 }">
|
<div slot="user" slot-scope="text, record">
|
||||||
<!-- 申请用户 实习顾问 法务老师 -->
|
<user-info :info="{...record.in_user}" />
|
||||||
<div slot="user" slot-scope="text, record" style="color: #1890ff">
|
|
||||||
<div>{{ record.user }}</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-icon type="down" /></a>
|
|
||||||
</div>
|
</div>
|
||||||
|
<a slot="number" slot-scope="text, record" style="color: #1890ff">{{ record.number }}件</a>
|
||||||
|
<a slot="total" slot-scope="text, record" style="color: #1890ff">¥{{ record.total }}</a>
|
||||||
</s-table>
|
</s-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</page-header-wrapper>
|
</page-header-wrapper>
|
||||||
@@ -62,164 +76,125 @@
|
|||||||
<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,
|
getMiddlesStockOutStocks
|
||||||
init,
|
} from '@/api/stock'
|
||||||
canExport
|
|
||||||
} from '@/api/organization'
|
|
||||||
import storage from 'store'
|
|
||||||
// import EditRole from './widgets/EditRole.vue'
|
|
||||||
import AddRole from './widgets/AddRole.vue'
|
|
||||||
|
|
||||||
// 列表规格
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '用户名',
|
title: 'ID',
|
||||||
dataIndex: 'user22',
|
dataIndex: 'middle_stock_log_id',
|
||||||
|
align: 'center',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '用户',
|
||||||
|
scopedSlots: { customRender: 'user' },
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '出库时间',
|
title: '补充库存数量',
|
||||||
|
scopedSlots: { customRender: 'number' },
|
||||||
|
align: 'center',
|
||||||
|
width: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '金额',
|
||||||
|
scopedSlots: { customRender: 'total' },
|
||||||
|
align: 'center',
|
||||||
|
width: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '渠道',
|
||||||
|
dataIndex: 'channel',
|
||||||
|
align: 'center',
|
||||||
|
width: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '订单类型',
|
||||||
|
dataIndex: 'type',
|
||||||
|
align: 'center'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '补充库存时间',
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
sorter: true
|
width: 150
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '经销商进货明细',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '线上数量',
|
|
||||||
dataIndex: 'name33',
|
|
||||||
key: 'name',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '线下数量',
|
|
||||||
dataIndex: 'name1333',
|
|
||||||
key: 'name1',
|
|
||||||
align: 'center'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '零售出库明细',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '线上数量',
|
|
||||||
dataIndex: 'name11',
|
|
||||||
key: 'name11',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '线下数量',
|
|
||||||
dataIndex: 'name12',
|
|
||||||
key: 'name12',
|
|
||||||
align: 'center'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
width: 300,
|
|
||||||
align: 'center'
|
|
||||||
}
|
}
|
||||||
// {
|
|
||||||
// title: '操作',
|
|
||||||
// dataIndex: 'status10',
|
|
||||||
// scopedSlots: { customRender: 'actions' },
|
|
||||||
// align: 'center',
|
|
||||||
// width: 160,
|
|
||||||
// fixed: 'right'
|
|
||||||
// }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StockOut',
|
name: 'StockOut',
|
||||||
components: {
|
components: {
|
||||||
Info,
|
|
||||||
STable,
|
STable,
|
||||||
UserInfo,
|
UserInfo,
|
||||||
|
Info,
|
||||||
DeriveButton
|
DeriveButton
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
exports_can: false,
|
|
||||||
columns,
|
columns,
|
||||||
searchType: false, // 展示全部的搜索
|
rang_at: [],
|
||||||
businessArray: [], // 业务类型
|
|
||||||
statusArray: [], // 机构列表
|
|
||||||
|
|
||||||
queryParam: {
|
queryParam: {
|
||||||
order_no: '', // 订单编号
|
start_at: undefined,
|
||||||
institution: '', // 机构名称
|
end_at: undefined,
|
||||||
item_id: '', // 机构编号
|
channel: undefined,
|
||||||
nickname: '', // 下单人
|
type: undefined,
|
||||||
business_type_id: '', // 业务类型
|
username: '' // 用户手机号
|
||||||
status: '', // 机构状态
|
},
|
||||||
paid_at: undefined, // 下单时间
|
typeArray: [
|
||||||
audit_at: undefined, // 执行时间
|
{ title: '零售', id: 1 },
|
||||||
settle_at: undefined // 结案时间
|
{ title: '进货单 ', id: 2 }
|
||||||
|
],
|
||||||
|
channelArray: [
|
||||||
|
{ title: '线上', id: 1 },
|
||||||
|
{ title: '线下 ', id: 2 }
|
||||||
|
],
|
||||||
|
listCount: {
|
||||||
|
offline: 0,
|
||||||
|
online: 0
|
||||||
},
|
},
|
||||||
listCount: 0,
|
|
||||||
loadData: (parameter) => {
|
loadData: (parameter) => {
|
||||||
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
const requestParameters = Object.assign({}, parameter, this.queryParam)
|
||||||
return getList(requestParameters)
|
return getMiddlesStockOutStocks(requestParameters).then(res => {
|
||||||
|
this.listCount.offline = res.count.offline
|
||||||
|
this.listCount.online = res.count.online
|
||||||
|
return res.logs
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route (to, from) {
|
$route (to, from) {
|
||||||
if (
|
if (to.name === 'StockOut' && (
|
||||||
(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 === 'SalesOnline' ||
|
||||||
|
from.name === 'SalesStock')
|
||||||
) {
|
) {
|
||||||
this.$refs.table.loadData()
|
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) {
|
onCreateChange (dates, dateStrings) {
|
||||||
this.queryParam.paid_at = dateStrings
|
this.queryParam.start_at = dateStrings[0]
|
||||||
|
this.queryParam.end_at = dateStrings[1]
|
||||||
|
this.rang_at = dateStrings
|
||||||
},
|
},
|
||||||
// 更改执行时间
|
onTypeChange (e) {
|
||||||
onCarryChange (dates, dateStrings) {
|
this.queryParam.type = e
|
||||||
this.queryParam.audit_at = dateStrings
|
|
||||||
},
|
},
|
||||||
// 更改结案时间
|
onChannelChange (e) {
|
||||||
onSettleChange (dates, dateStrings) {
|
this.queryParam.channel = e
|
||||||
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 () {
|
||||||
@@ -227,93 +202,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 重置搜索列表
|
// 重置搜索列表
|
||||||
resetSearch () {
|
resetSearch () {
|
||||||
this.queryParam = {
|
this.queryParam.start_at = undefined
|
||||||
order_no: '', // 订单编号
|
this.queryParam.end_at = undefined
|
||||||
institution: '', // 机构名称
|
this.queryParam.channel = undefined
|
||||||
item_id: '', // 机构编号
|
this.queryParam.type = undefined
|
||||||
nickname: '', // 下单人
|
this.queryParam.username = undefined
|
||||||
business_type_id: '', // 业务类型
|
this.rang_at = []
|
||||||
status: '', // 机构状态
|
|
||||||
paid_at: undefined, // 下单时间
|
|
||||||
audit_at: undefined, // 执行时间
|
|
||||||
settle_at: undefined// 结案时间
|
|
||||||
}
|
|
||||||
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
this.$refs.table.refresh(true) // 重置接口且刷先到第一页
|
||||||
},
|
|
||||||
// 机构是否能导出
|
|
||||||
canExports () {
|
|
||||||
console.log('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 () {
|
|
||||||
console.log('add....')
|
|
||||||
const success = {
|
|
||||||
title: '新增用户',
|
|
||||||
width: 600,
|
|
||||||
maskClosable: true,
|
|
||||||
closable: true,
|
|
||||||
okText: '确认新增',
|
|
||||||
cancelText: '取消'
|
|
||||||
}
|
|
||||||
this.$dialog(
|
|
||||||
AddRole,
|
|
||||||
{
|
|
||||||
on: {
|
|
||||||
ok: () => {
|
|
||||||
console.log('成功了。。')
|
|
||||||
this.$refs.table.loadData()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
success
|
|
||||||
)
|
|
||||||
},
|
|
||||||
// 修改用户
|
|
||||||
onEdit (item) {
|
|
||||||
console.log(item)
|
|
||||||
// const success = {
|
|
||||||
// title: '修改用户',
|
|
||||||
// width: 600,
|
|
||||||
// maskClosable: true,
|
|
||||||
// closable: true,
|
|
||||||
// okText: '确认修改',
|
|
||||||
// cancelText: '取消'
|
|
||||||
// }
|
|
||||||
// this.$dialog(
|
|
||||||
// EditRole,
|
|
||||||
// {
|
|
||||||
// item,
|
|
||||||
// on: {
|
|
||||||
// ok: () => {
|
|
||||||
// console.log('成功了。。')
|
|
||||||
// this.$refs.table.loadData()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
// success
|
|
||||||
// )
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user