This commit is contained in:
2023-10-30 15:36:25 +08:00
16 changed files with 248 additions and 297 deletions

View File

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

View File

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

View File

@@ -29,14 +29,5 @@ export default [{
}, },
component: () => import('@/views/sales/OnStock') component: () => import('@/views/sales/OnStock')
} }
// {
// path: '/sales/offline',
// name: 'SalesOffline',
// meta: {
// title: '线下出货列表',
// icon: 'unordered-list'
// },
// component: () => import('@/views/sales/Offline')
// }
] ]
}] }]

View File

@@ -31,14 +31,23 @@ export default [{
} }
}, },
{ {
path: '/stock/out', path: '/sales/offline',
name: 'StockOut', name: 'SalesOffline',
component: () => import('@/views/stock/Out'),
meta: { meta: {
title: '出库管理', title: '线下出货列表',
icon: 'export' icon: 'unordered-list'
} },
component: () => import('@/views/sales/Offline')
} }
// {
// path: '/stock/out',
// name: 'StockOut',
// component: () => import('@/views/stock/Out'),
// meta: {
// title: '出库管理',
// icon: 'export'
// }
// }
] ]
}, },
{ {

View File

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

View File

@@ -3,20 +3,17 @@
<a-row :gutter="24"> <a-row :gutter="24">
<!-- 分公司库存 --> <!-- 分公司库存 -->
<a-col <a-col
v-if="info.middle"
:sm="24" :sm="24"
:md="12" :md="12"
:xl="12" :xl="12"
:xxl="12" :xxl="12"
:style="{ marginBottom: '10px' }" :style="{ marginBottom: '10px' }"
v-if="info.middle"> >
<chart-card :loading="loading" :title="$t('分公司总库存(瓶)')" :total="info.middle.total"> <chart-card :loading="loading" title="分公司总库存(瓶)" :total="info.middle.total">
<a-tooltip :title="$t('总分公司总库存')" slot="action">
<a-icon type="info-circle-o" />
</a-tooltip>
<template slot="footer"> <template slot="footer">
<!-- <span> {{ info.total.people }}</span> --> <!-- <trend flag="up"> <span slot="term">{{ $t('线上库存') }}</span>{{ info.middle.online_stock }}</trend> -->
<trend flag="up"> <span slot="term">{{ $t('线上库存') }}</span>{{ info.middle.online_stock }}</trend> <trend flag="down">
<trend flag="down" style="margin-left: 20px;">
<span slot="term">{{ $t('线下库存') }}</span>{{ info.middle.offline_stock }} <span slot="term">{{ $t('线下库存') }}</span>{{ info.middle.offline_stock }}
</trend> </trend>
</template> </template>
@@ -31,8 +28,8 @@
:style="{ marginBottom: '10px' }" :style="{ marginBottom: '10px' }"
v-if="info.agent" v-if="info.agent"
> >
<chart-card :loading="loading" :title="$t('经销商总库存(瓶)')" :total="info.agent.stock | NumberFormat"> <chart-card :loading="loading" title="经销商总库存(瓶)" :total="info.agent.stock | NumberFormat">
<a-tooltip :title="$t('经销商总库存')" slot="action"> <a-tooltip title="经销商总库存" slot="action">
<a-icon type="info-circle-o" /> <a-icon type="info-circle-o" />
</a-tooltip> </a-tooltip>
<div> <div>
@@ -80,16 +77,10 @@
<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.sales_quantity.online_all" :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.sales_quantity.online_retail" :bordered="true"/> <info title="线上售数量(瓶)" :value="''+info.sales_quantity.online_retail" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="线上代理进货数量(瓶)" :value="''+info.sales_quantity.online_agent_in" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="线上创客进货数量(瓶)" :value="''+info.sales_quantity.online_maker_in" :bordered="true"/>
</a-col> </a-col>
<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.sales_quantity.offline" /> <info title="线下出货数量(瓶)" :value="''+info.sales_quantity.offline" />
@@ -100,17 +91,14 @@
<a-col :span="24" v-if="info.sales_amount"> <a-col :span="24" v-if="info.sales_amount">
<a-card :bordered="false" title="售卖数据管理"> <a-card :bordered="false" title="售卖数据管理">
<a-row> <a-row>
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20"> <a-col :sm="24" :md="12" :xl="8" :xxl="8" class="mt20">
<info title="代理进货金额(元)" :value="''+info.sales_amount.online_agent_in" :bordered="true"/> <info title="售卖数据管理总数(元)" :value="''+info.sales_amount.online_agent_all" :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="8" :xxl="8" class="mt20">
<info title="创客进货金额(元)" :value="''+info.sales_amount.online_maker_in" :bordered="true"/>
</a-col>
<a-col :sm="24" :md="12" :xl="6" :xxl="6" class="mt20">
<info title="线上销售金额(元)" :value="''+info.sales_amount.online_sell" :bordered="true"/> <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="8" :xxl="8" class="mt20">
<info title="线下销售金额(元)" :value="''+info.sales_amount.offline_sell" /> <info title="线下出货金额总和(元)" :value="''+info.sales_amount.offline_sell" />
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>

View File

@@ -133,6 +133,25 @@ export default {
} }
} }
}, },
watch: {
$route (to, from) {
if (to.name === 'PermissionsIndex' && (
from.name === 'Home' ||
from.name === 'cityExperienceOfficer' ||
from.name === 'StockOut' ||
from.name === 'StockIn' ||
from.name === 'DealerIn' ||
from.name === 'DealerOut' ||
from.name === 'UserIndex' ||
from.name === 'SalesOnline' ||
from.name === 'SalesOffline' ||
from.name === 'PermissionsIndex' ||
from.name === 'SalesStock')
) {
this.$refs.table.loadData()
}
}
},
methods: { methods: {
// 新增用户 // 新增用户

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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