Commit bd186301 authored by yaya's avatar yaya

feat:添加平台中转订单

parent 23128f83
......@@ -22,3 +22,41 @@ export function requestDelivery(data) {
})
}
export function requestTransferOrderList(data) {
return request({
url: '/identifyOrder/findList',
method: 'post',
data
})
}
export function requestSigned(data) {
return request({
url: '/identifyOrder/signed',
method: 'post',
data
})
}
export function requestIdentify(data) {
return request({
url: '/identifyOrder/identify',
method: 'post',
data
})
}
export function requestIdentifyDelivery(data) {
return request({
url: '/identifyOrder/delivery',
method: 'post',
data
})
}
export function requestIdentifySendBack(data) {
return request({
url: '/identifyOrder/sendBack',
method: 'post',
data
})
}
......@@ -514,7 +514,7 @@ export const asyncRouterMap = [
},
children: [
{
path: 'saleList',
path: 'itemOrderList',
component: () => import('@/views/order/itemOrderList'),
name: 'itemOrderList',
meta: {
......
<template>
<el-dialog
v-if="showNoPassIdentifyDialogShow"
:visible.sync="showNoPassIdentifyDialogShow"
:before-close="handleCancelConsignDialog"
width="600px"
height="600px"
title="平台鉴定结果">
<el-form ref="cancel" :model="cancelForm" :rules="cancelRules">
<el-form-item label="" label-width="80px" prop="content">
<div>该藏品未通过平台鉴定,请描述原因:</div>
</el-form-item>
<el-form-item label="" label-width="80px" prop="remark">
<el-input
v-model="cancelForm.remark"
:autosize="{ minRows: 8, maxRows: 8}"
style="width: 400px"
maxlength="50"
type="textarea"
show-word-limit
placeholder="该藏品未通过平台鉴定,请描述原因:" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelConsignDialog">取 消</el-button>
<el-button type="primary" @click="handleCancelValue">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentify } from '@/api/business/order'
export default {
name: 'NoPassIdentifyDialog',
props: {
showNoPassIdentifyDialogShow: {
type: Boolean,
default: false
},
distributionOrderId: {
type: String,
default: ''
},
identifyOrderId: {
type: String,
default: ''
}
},
data() {
return {
cancelForm: {
remark: ''
},
cancelRules: {
remark: [
{ required: true, message: '原因不能为空', trigger: 'blur' }
]
}
}
},
methods: {
handleCancelConsignDialog() {
this.$emit('cancelDialog')
},
/**
* 取消
*/
handleCancelValue() {
if (this.distributionOrderId) {
const params = { ...this.cancelForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId, approved: 0 }
this.$refs.cancel.validate((valid) => {
if (valid) {
requestIdentify(params)
.then(response => {
this.$notify.success({
message: '操作成功'
})
this.$emit('refreshItem', this.distributionOrderId)
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
})
}
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<el-dialog
v-if="logisticDialogShow"
:visible.sync="logisticDialogShow"
:before-close="handleCancelLogisticDialog"
width="600px"
height="800px"
title="寄出快递">
<el-form ref="imageValue" :model="logisticForm" :rules="logisticRules">
<el-form-item label="物流公司" label-width="100px" prop="outLogisticsCode">
<el-select v-model="logisticForm.outLogisticsCode" placeholder="请选择物流公司">
<el-option
v-for="item in logisticList"
:key="item.code"
:label="item.name"
:value="item.code"/>
</el-select>
</el-form-item>
<el-form-item label="快递单号" label-width="100px" prop="outWaybill">
<el-input
v-model="logisticForm.outWaybill"
clearable
size="mini"
class="filter-item"
style="width: 240px;margin-right: 10px"
placeholder="请输入快递单号" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancelLogisticDialog">取 消</el-button>
<el-button type="primary" @click="handleLogistic">确 定</el-button>
</div>
</el-dialog>
</template>
<script>
import { MessageBox } from 'element-ui'
import { requestIdentifyDelivery, requestIdentifySendBack } from '@/api/business/order'
export default {
name: 'ReturnLogisticIdentifyDialog',
props: {
logisticDialogShow: {
type: Boolean,
default: false
},
distributionOrderId: {
type: String,
default: ''
},
identifyOrderId: {
type: String,
default: ''
},
type: {
type: Number,
default: 1
}
},
data() {
return {
logisticForm: {
outLogisticsCode: '',
outWaybill: ''
},
logisticRules: {
outLogisticsCode: [
{ required: true, message: '请选择物流公司', trigger: 'blur' }
],
outWaybill: [
{ required: true, message: '请输入快递单号', trigger: 'blur' }
]
},
logisticList: [
{
'code': 'JD',
'name': '京东快递'
},
{
'code': 'SF',
'name': '顺丰快递'
},
{
'code': 'STO',
'name': '申通快递'
},
{
'code': 'YTO',
'name': '圆通快递'
},
{
'code': 'ZTO',
'name': '中通快递'
},
{
'code': 'YUNDA',
'name': '韵达快递'
}
]
}
},
methods: {
handleCancelLogisticDialog() {
this.$emit('cancelDialog')
},
/**
* 实物评估
*/
handleLogistic() {
const params = { ...this.logisticForm, distributionOrderId: this.distributionOrderId, identifyOrderId: this.identifyOrderId }
this.$refs.imageValue.validate((valid) => {
if (valid) {
if (this.type === 1) {
requestIdentifyDelivery(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '发货成功'
})
this.$emit('refreshDelivery')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
} else {
requestIdentifySendBack(params)
.then(response => {
this.itemContent = {}
this.logisticForm = {}
this.$notify.success({
message: '退回成功'
})
this.$emit('refreshSendBack')
})
.catch(response => {
MessageBox.alert('业务错误:' + response.data.errmsg, '警告', {
confirmButtonText: '确定',
type: 'error'
})
})
}
}
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
width: 100%;
text-align: center;
}
.image {
width: 400px;
height: auto;
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入订单编号" />
<el-select v-model="listQuery.state" placeholder="请选择订单状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select>
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏品名称"/>
<el-input v-model="listQuery.sellerName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家名称"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
<el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" @select="handleSelect">
<el-menu-item index="1">藏馆订单</el-menu-item>
<el-menu-item index="2">平台中转</el-menu-item>
</el-menu>
<div v-if="activeIndex === '1'">
<SaleOrderView />
</div>
<div v-else>
<TransferOrderView />
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" />
<el-table-column align="center" label="藏家名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<el-table-column align="center" label="数量" prop="itemNum" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单用户" prop="buyerName" />
<el-table-column align="center" label="下单时间" prop="createTime" />
<el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="介绍人" prop="introducerName">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introducerName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<el-table-column align="center" label="物流公司" prop="logisticsName">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.logisticsName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="快递单号" prop="waybill">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.waybill || '-'}` }}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="primary"
size="mini"
@click="handleToDetail(scope.row)">编辑
</el-button>
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="danger"
size="mini"
@click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>-->
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestOrderList } from '@/api/business/order'
import SaleOrderView from './saleOrderView'
import TransferOrderView from './transferOrderView'
export default {
name: 'ItemOrderList',
components: {
Pagination,
Line2Hidden
TransferOrderView,
SaleOrderView
},
data() {
return {
activeIndex: '1',
itemKey: 0,
options: [{
value: 1,
......@@ -168,6 +76,9 @@ export default {
},
methods: {
handleSelect(value) {
this.activeIndex = value
},
resetSearchForm() {
this.listQuery = {
page: 1,
......
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入订单编号" />
<el-select v-model="listQuery.state" placeholder="请选择订单状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select>
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏品名称"/>
<el-input v-model="listQuery.sellerName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家名称"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" />
<el-table-column align="center" label="藏家名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏家地址" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<el-table-column align="center" label="数量" prop="itemNum" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单用户" prop="buyerName" />
<el-table-column align="center" label="下单时间" prop="createTime" />
<el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="介绍人" prop="introducerName">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.introducerName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="订单状态" prop="stateName" />
<el-table-column align="center" label="中转状态" prop="transferStateName" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.transferStateName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="物流公司" prop="logisticsName">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.logisticsName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="快递单号" prop="waybill">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.waybill || '-'}` }}</span>
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="primary"
size="mini"
@click="handleToDetail(scope.row)">编辑
</el-button>
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
type="danger"
size="mini"
@click="handleDelete(scope.row)">删除
</el-button>
</template>
</el-table-column>-->
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestOrderList } from '@/api/business/order'
export default {
name: 'SaleOrderView',
components: {
Pagination,
Line2Hidden
},
data() {
return {
activeIndex: '1',
itemKey: 0,
options: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20,
type: 3
},
list: [],
total: 0,
// 图文估价
imageValueDialogShow: false,
// 建议寄售价
identifyValueDialogShow: false,
// 货品售出
finishDialogShow: false,
// 寄售凭证
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
currentSaleId: ''
}
},
created() {
this.getList()
},
methods: {
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20,
type: 3
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
requestOrderList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
<template>
<div class="page_consignList">
<div class="filter-container">
<div class="button_left">
<el-input
v-model="listQuery.distributionOrderId"
clearable
class="filter-item"
style="width: 200px;"
placeholder="请输入订单编号" />
<el-select v-model="listQuery.state" placeholder="请选择中转状态" class="filter-item" style="width: 200px;">
<el-option
v-for="item in options"
:key="item.label"
:label="item.label"
:value="item.value"
size="mini"/>
</el-select>
<el-input v-model="listQuery.itemName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏品名称"/>
<el-input v-model="listQuery.sellerName" clearable class="filter-item" style="width: 200px;" placeholder="请输入藏家名称"/>
<el-button class="filter-item" type="primary" icon="el-icon-search" style="margin-left: 12px" @click="handleFilter">查找</el-button>
<el-button class="filter-item" @click="resetSearchForm">重置</el-button>
</div>
</div>
<el-table
v-loading="listLoading"
:data="list"
size="small"
element-loading-text="正在查询中..."
border
fit
highlight-current-row>
<!-- <el-table-column align="center" label="排行" width="100px" type="index" />-->
<el-table-column align="center" min-width="100px" prop="distributionOrderId" label="订单编号" />
<el-table-column align="center" label="藏家名称" min-width="150px" prop="sellerName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.sellerName || ''" />
</template>
</el-table-column>
<el-table-column align="center" label="藏家地址" prop="returnName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.returnName" >{{ scope.row.returnName + ',' + scope.row.returnPhone + ',' + scope.row.returnAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="藏品图片" prop="homePageImage">
<template slot-scope="scope">
<img v-if="scope.row.homePageImage && scope.row.homePageImage.url" :src="scope.row.homePageImage.url" width="60px" height="60px">
</template>
</el-table-column>
<el-table-column align="center" label="藏品名称" min-width="150px" prop="itemName">
<template slot-scope="scope">
<Line2Hidden :text="scope.row.itemName" />
</template>
</el-table-column>
<el-table-column align="center" label="数量" prop="itemNum" />
<el-table-column align="center" label="订单金额" prop="amount">
<template slot-scope="scope">
<span class="tooltip-span">{{ `¥ ${scope.row.amount}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单用户" prop="buyerName" />
<el-table-column align="center" label="收货信息" prop="receiverName" min-width="160px">
<template slot-scope="scope">
<span v-if="scope.row.receiverName" >{{ scope.row.receiverName + ',' + scope.row.receiverPhone + ',' + scope.row.receiverAddress }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="下单时间" prop="createTime" />
<el-table-column align="center" label="中转状态" prop="transferStateName" >
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.transferStateName || '-'}` }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="平台鉴定结果" prop="approved">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.approved === 1 ? '通过' : scope.row.approved === 0 ? '不通过' : '-'}` }}</span>
</template>
</el-table-column>
<!-- 中转单状态 (12, "待平台收货"), (13, "平台鉴定中"), (14, "待平台发货"), (15, "待平台退回"), (16, "平台已发货"), (17, "退回待收货"), (18, "退回已收货"),-->
<el-table-column align="center" label="操作" width="300">
<template slot-scope="scope">
<el-button
type="primary"
size="mini"
@click="handleToDetail(scope.row)">详情
</el-button>
<el-button
v-if="(scope.row.transferState === 12)"
type="primary"
size="mini"
@click="handleReceive(scope.row)">确认收货
</el-button>
<el-button
v-if="(scope.row.transferState === 13)"
type="primary"
size="mini"
@click="handlePass(scope.row)">通过
</el-button>
<el-button
v-if="(scope.row.transferState === 13)"
type="danger"
size="mini"
@click="handleNoPass(scope.row)">不通过
</el-button>
<el-button
v-if="(scope.row.transferState === 14)"
type="primary"
size="mini"
@click="handleSend(scope.row, 1)">去发货
</el-button>
<el-button
v-if="(scope.row.transferState === 15)"
type="primary"
size="mini"
@click="handleSend(scope.row, 2)">退回藏品
</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-show="total>0"
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
<NoPassIdentifyDialog
:show-no-pass-identify-dialog-show="showNoPassIdentifyDialog"
:distribution-order-id="distributionOrderId"
:identify-order-id="identifyOrderId"
@refreshItem="handleRefreshItem"
@cancelDialog="handleCancelNoPassDialog"
/>
<ReturnLogisticIdentifyDialog
v-if="logisticDialogShow"
:logistic-dialog-show="logisticDialogShow"
:distribution-order-id="distributionOrderId"
:identify-order-id="identifyOrderId"
:type="logisticType"
@cancelDialog="handleCancelLogisticDialog"
@refreshDelivery="handleRefreshLogisticItem(1)"
@refreshSendBack="handleRefreshLogisticItem(2)"/>
</div>
</template>
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestTransferOrderList, requestSigned, requestIdentify } from '@/api/business/order'
import NoPassIdentifyDialog from './components/NoPassIdentifyDialog'
import ReturnLogisticIdentifyDialog from './components/ReturnLogisticIdentifyDialog'
export default {
name: 'TransferOrderView',
components: {
ReturnLogisticIdentifyDialog,
NoPassIdentifyDialog,
Pagination,
Line2Hidden
},
data() {
return {
activeIndex: '1',
itemKey: 0,
options: [{
value: 12,
label: '待平台收货'
}, {
value: 13,
label: '平台鉴定中'
}, {
value: 14,
label: '待平台发货'
}, {
value: 15,
label: '待平台退回'
}, {
value: 16,
label: '平台已发货'
}, {
value: 17,
label: '退回待收货'
}, {
value: 18,
label: '退回已收货'
}],
listLoading: true,
listQuery: {
page: 1,
size: 20,
type: 3
},
list: [],
total: 0,
// 取消
currentSaleId: '',
distributionOrderId: '',
identifyOrderId: '',
showNoPassIdentifyDialog: false,
logisticDialogShow: false,
logisticType: 1
}
},
created() {
this.getList()
},
methods: {
/**
* 详情
* @param item
*/
handleToDetail(item) {
},
/**
* 收货
* @param item
*/
handleReceive(row) {
this.$confirm('请确认包裹的物流信息是否正确?', '确认收货', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'message'
}).then(() => {
const params = {
identifyOrderId: row.identifyOrderId
}
requestSigned(params).then(response => {
this.list = this.list.filter((item) => {
if (item.identifyOrderId === row.identifyOrderId) {
item.transferStateName = '平台鉴定中'
item.transferState = 13
return item
}
return item
})
this.$notify.success({
message: '确认收货成功'
})
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
})
},
/**
* 通过
* @param item
*/
handlePass(row) {
this.$confirm('该藏品确定通过平台鉴定?', '平台鉴定结果', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'message'
}).then(() => {
const params = {
identifyOrderId: row.identifyOrderId,
distributionOrderId: row.distributionOrderId,
approved: 1
}
requestIdentify(params).then(response => {
this.list = this.list.filter((item) => {
if (item.distributionOrderId === row.distributionOrderId) {
item.transferStateName = '待平台发货'
item.transferState = 14
return item
}
return item
})
this.$notify.success({
message: '操作成功'
})
}).catch((e) => {
console.log('===报错=', e)
this.$message.error(e.data && e.data.errmsg || '请求失败, 请重试')
})
})
},
/**
* 不通过
* @param row
*/
handleNoPass(row) {
this.identifyOrderId = row.identifyOrderId
this.distributionOrderId = row.distributionOrderId
this.showNoPassIdentifyDialog = true
},
/**
* 不通过操作成功,刷新列表
*/
handleRefreshItem() {
if (this.identifyOrderId) {
this.list = this.list.filter((item) => {
if (item.identifyOrderId === this.identifyOrderId) {
item.transferStateName = '待平台退回'
item.transferState = 15
return item
}
return item
})
}
this.handleCancelNoPassDialog()
},
/**
* 不通过
* @param row type: 1平台发货 2退回藏品
*/
handleSend(row, type) {
this.identifyOrderId = row.identifyOrderId
this.distributionOrderId = row.distributionOrderId
this.logisticDialogShow = true
this.logisticType = type
},
/**
* 不通过操作成功,刷新列表
*/
handleRefreshLogisticItem(type) {
if (this.identifyOrderId) {
this.list = this.list.filter((item) => {
if (item.identifyOrderId === this.identifyOrderId) {
if (type === 1) {
item.transferStateName = '平台已发货'
item.transferState = 16
} else {
item.transferStateName = '退回待收货'
item.transferState = 17
}
return item
}
return item
})
}
this.handleCancelLogisticDialog()
},
/**
* 发货 or 退回操作
*/
handleCancelLogisticDialog() {
this.logisticDialogShow = false
this.identifyOrderId = ''
this.distributionOrderId = ''
this.logisticType = 0
},
/**
* 不通过操作取消
*/
handleCancelNoPassDialog() {
this.showNoPassIdentifyDialog = false
this.identifyOrderId = ''
this.distributionOrderId = ''
},
resetSearchForm() {
this.listQuery = {
page: 1,
limit: 20,
type: 3
}
this.getList()
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handlerGetList() {
this.listQuery.page = 1
this.getList()
},
handleClick(tab, event) {
this.listQuery.page = 1
this.getList()
},
getList() {
localStorage.setItem('systemState', '')
this.listLoading = true
requestTransferOrderList(this.listQuery).then(response => {
this.list = response.data.data.dataList
this.total = response.data.data.total
this.listLoading = false
}).catch((e) => {
console.log('===报错=', e)
this.list = []
this.total = 0
this.listLoading = false
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/ .el-switch {
height: 30px;
}
/deep/ .cell {
display: flex;
justify-content: center;
}
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
justify-content: space-between;
}
}
</style>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment