Commit cc08917f authored by yaya's avatar yaya

会员管理、分销订单、藏馆订单优化

parent dcf936c1
......@@ -7,4 +7,18 @@ export function requestOrderList(data) {
data
})
}
export function requestLogisticsList(data) {
return request({
url: '/sysDistributionOrder/getLogisticsList',
method: 'post',
data
})
}
export function requestDelivery(data) {
return request({
url: '/sysDistributionOrder/delivery',
method: 'post',
data
})
}
......@@ -2,6 +2,12 @@
<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"
......@@ -49,13 +55,28 @@
</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="介绍人">
<template slot-scope="scope">
<span class="tooltip-span">{{ `${scope.row.介绍人 || '-'}` }}</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
......
......@@ -2,17 +2,39 @@
<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"/>
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-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>
......@@ -33,7 +55,11 @@
</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">
<img
v-if="scope.row.homePageImage && scope.row.homePageImage.url"
:src="scope.row.homePageImage.url"
width="60px"
height="60px">
</template>
</el-table-column>
......@@ -49,29 +75,37 @@
</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>
<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="stateName" />
<!-- <el-table-column align="center" label="操作" width="300">
<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="100">
<template slot-scope="scope">
<el-button
:disabled="(!scope.row.editAble && scope.row.type === 2)"
v-if="scope.row.state === 10"
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)">删除
@click="handleToSend(scope.row)">发货
</el-button>
<span v-if="scope.row.state !== 10" class="tooltip-span">-</span>
</template>
</el-table-column>-->
</el-table-column>
</el-table>
......@@ -81,6 +115,35 @@
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList" />
<el-dialog :visible.sync="sendDialogVisible" title="发货">
<el-form
ref="sendFormRef"
:model="sendForm"
:rules="rules"
status-icon
label-position="left"
label-width="130px"
style="width: 600px; margin-left:50px;">
<el-form-item label="请输入快递单号:" prop="waybill" >
<el-select v-model="sendForm.logisticsCode" placeholder="请选择快的公司" class="filter-item" style="width: 200px;">
<el-option
v-for="item in logisticList"
:key="item.name"
:label="item.name"
:value="item.code"
size="mini" />
</el-select>
</el-form-item>
<el-form-item prop="waybill" label="快递单号:" >
<el-input v-model="sendForm.waybill" placeholder="请输入快递单号" style="width: 200px;" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="sendDialogVisible = false">取消</el-button>
<el-button type="primary" @click="handleShowSendDialog">确定</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -88,7 +151,7 @@
<script>
import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination'
import { requestOrderList } from '@/api/business/order'
import { requestOrderList, requestLogisticsList, requestDelivery } from '@/api/business/order'
export default {
name: 'SaleOrderList',
......@@ -138,14 +201,57 @@ export default {
finishSettlementDialogShow: false,
// 取消
cancelConsignDialogShow: false,
currentSaleId: ''
// 发货
sendDialogVisible: false,
currentSaleId: '',
logisticOptions: [{
value: 1,
label: '待付款'
}, {
value: 10,
label: '待发货'
}, {
value: 20,
label: '待收货'
}, {
value: 30,
label: '售后中'
}, {
value: 80,
label: '退款受理中'
}, {
value: 100,
label: '已完成'
}, {
value: 101,
label: '已取消'
}],
sendForm: {},
logisticList: [],
orderId: '',
rules: {
waybill: [{ required: true, message: '请输入物流单号', trigger: 'blur' }],
logisticsCode: [{ required: true, message: '请选择快递公司', trigger: 'blur' }]
}
}
},
created() {
this.getList()
this.getLogisticsList()
},
methods: {
/**
* 获取物流公司列表
*/
getLogisticsList() {
requestLogisticsList().then((response) => {
console.log('==response===', response)
this.logisticList = response.data.data
}).catch((err) => {
console.log('==err===', err)
})
},
resetSearchForm() {
this.listQuery = {
page: 1,
......@@ -179,6 +285,44 @@ export default {
this.total = 0
this.listLoading = false
})
},
/**
* 展示发货弹窗
*/
handleShowSendDialog() {
this.$refs.sendFormRef.validate((valid) => {
if (valid) {
this.sendForm.distributionOrderId = this.orderId
requestDelivery(this.sendForm)
.then(response => {
this.$notify.success({
message: '发货成功'
})
this.list = this.list.filter((item) => {
if (item.distributionOrderId === this.orderId) {
item.stateName = '待收货'
item.state = 20
return item
}
return item
})
this.sendDialogVisible = false
})
.catch(response => {
this.$notify.error({
title: '失败',
message: response.data.errmsg
})
})
}
})
},
/**
* 发货
*/
handleToSend(row) {
this.sendDialogVisible = true
this.orderId = row.distributionOrderId
}
}
}
......@@ -196,6 +340,7 @@ export default {
.page_consignList {
padding: 20px;
.filter-container {
display: flex;
flex-direction: row;
......
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