tianyi 3 months ago
parent
commit
00fb4affe9
  1. 14
      src/api/index.js
  2. 3
      src/views/app/business/lineManage/logisticsAddress.vue
  3. 506
      src/views/app/business/logistics/logistics.vue
  4. 479
      src/views/sys/order-manage/orderManage.vue

14
src/api/index.js

@ -645,7 +645,7 @@ export const getLogisticsOrderStatistics = (params) => {
return postBodyRequest('/app/logisticsOrder/getLogisticsOrderStatistics', params) return postBodyRequest('/app/logisticsOrder/getLogisticsOrderStatistics', params)
} }
//根据手机号查询物流公司信息 //查询物流公司信息
export const findByMobile = (params) => { export const findByMobile = (params) => {
return postRequest('/app/logitics/findByMobile', params) return postRequest('/app/logitics/findByMobile', params)
} }
@ -679,9 +679,9 @@ export const deleteOrder = (params) => {
return postRequest('/order/delByIds', params) return postRequest('/order/delByIds', params)
} }
// 获取订单数据 多条件 // 获取配送员
export const getWorkerListData = (params) => { export const getWorkerListData = (params) => {
return postBodyRequest('/worker/getByCondition', params) return postBodyRequest('/worker/getMatchingWorkerList', params)
} }
// 创建订单 // 创建订单
@ -727,9 +727,13 @@ export const runshOrder = (params) => {
return postBodyRequest('/order/rush/order', params) return postBodyRequest('/order/rush/order', params)
} }
// 获取实时物流操作 // 获取实时订单操作
export const getOwListData = (params) => { export const getOwListData = (params) => {
return postRequest('/order/ow/getAllByCondition', params) return postBodyRequest('/mall/delivery/page', params)
}
// 获取订单
export const getOrderList = (params) => {
return postBodyRequest('/mall/order/page', params)
} }
//查询物流自取 //查询物流自取

3
src/views/app/business/lineManage/logisticsAddress.vue

@ -185,9 +185,6 @@
}; };
}, },
methods: { methods: {
init() {
// this.getDataList();
},
initRecharge(data) { initRecharge(data) {
//data //data
console.log(data); console.log(data);

506
src/views/app/business/logistics/logistics.vue

@ -5,19 +5,20 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Tabs v-model="tabName" :animated="false" @on-click="changeOrderTab">
<TabPane label="饭团订单" name="1"></TabPane>
<TabPane label="快递订单" name="2"></TabPane>
<TabPane label="跑腿订单" name="3"></TabPane>
</Tabs>
<Tabs v-model="tabName" :animated="false" @on-click="changeTab"> <Tabs v-model="tabName" :animated="false" @on-click="changeTab">
<TabPane label="待指派" name="0"></TabPane> <TabPane label="指派单" name="7"></TabPane>
<TabPane label="待接单" name="0"></TabPane>
<TabPane label="待取货" name="1"></TabPane> <TabPane label="待取货" name="1"></TabPane>
<TabPane label="已作废" name="2"></TabPane> <TabPane label="待送达" name="2"></TabPane>
<TabPane label="待送达" name="3"></TabPane> <TabPane label="已完成" name="3"></TabPane>
<TabPane label="已完成" name="4"></TabPane> <TabPane label="已取消" name="4"></TabPane>
<TabPane label="下游客户待退货" name="5"></TabPane> <TabPane label="已退款" name="5"></TabPane>
<TabPane label="退货待抢单" name="00"></TabPane> <TabPane label="预订单" name="6"></TabPane>
<TabPane label="退货待取货" name="01"></TabPane>
<TabPane label="退货已作废" name="02"></TabPane>
<TabPane label="退货待送达" name="03"></TabPane>
<TabPane label="待确认退货" name="04"></TabPane>
<TabPane label="待物流自取" name="8"></TabPane>
</Tabs> </Tabs>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> <Form ref="searchForm" :model="searchForm" inline :label-width="70">
@ -29,63 +30,13 @@
<Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入店铺名称" <Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入店铺名称"
style="width: 200px" /> style="width: 200px" />
</FormItem> </FormItem>
<span v-if="drop">
<FormItem label="订单号" prop="orderId">
<Input type="text" v-model="searchForm.orderId" clearable placeholder="请输入订单号"
style="width: 200px" />
</FormItem>
<FormItem label="寄送方式" prop="orderLogistics">
<dict dict="orderLogistics" v-model="searchForm.orderLogistics" style="width: 200px" />
</FormItem>
<FormItem label="运单号" prop="kdOrderId">
<Input type="text" v-model="searchForm.kdOrderId" clearable placeholder="请输入快递单号"
style="width: 200px" />
</FormItem>
<!-- <FormItem label="订单是否超时" prop="timeout">
<dict dict="status" v-model="searchForm.timeout" style="width: 200px" />
</FormItem> -->
<!-- <FormItem label="订单状态" prop="orderStatus">
<dict dict="orderStatus" v-model="searchForm.orderStatus" style="width: 200px" />
</FormItem> -->
<!-- <FormItem label="抢单工编号" prop="orderByWorker">
<Input type="text" v-model="searchForm.orderByWorker" clearable placeholder="请输入抢单工信息"
style="width: 200px" />
</FormItem> -->
<!-- <FormItem label="创建时间">
<DatePicker :options="options" v-model="selectDate" type="daterange" format="yyyy-MM-dd"
clearable @on-change="selectDateRange" placeholder="选择起始时间" style="width: 200px">
</DatePicker>
</FormItem> -->
</span>
<FormItem style="margin-left: -35px" class="br"> <FormItem style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button> <Button @click="handleReset">重置</Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
<Icon :type="dropDownIcon"></Icon>
</a>
</FormItem> </FormItem>
</Form> </Form>
</Row> </Row>
<Row align="middle" justify="space-between" class="operation"> <Row align="middle" justify="space-between" class="operation">
<!-- <div>
<Button @click="add" type="primary" icon="md-add">创建订单</Button>
<Button @click="delAll" icon="md-trash">批量删除</Button>
<Dropdown @on-click="handleDropdown">
<Button>
更多操作
<Icon type="md-arrow-dropdown" />
</Button>
<DropdownMenu slot="list">
<DropdownItem name="reset">重置用户密码</DropdownItem>
<DropdownItem name="exportData">导出所选数据</DropdownItem>
<DropdownItem name="exportAll">导出全部数据</DropdownItem>
<DropdownItem name="importData">导入数据</DropdownItem>
</DropdownMenu>
</Dropdown>
</div>
-->
<div class="icons"> <div class="icons">
<Tooltip content="刷新" placement="top" transfer> <Tooltip content="刷新" placement="top" transfer>
<Icon type="md-refresh" size="18" class="item" @click="getDataList" /> <Icon type="md-refresh" size="18" class="item" @click="getDataList" />
@ -116,7 +67,7 @@
<Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom" <Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize"
@on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
@ -138,14 +89,20 @@
</Modal> </Modal>
<!-- 转单弹窗 --> <!-- 转单弹窗 -->
<Modal v-model="transferOrder" @on-ok="transferClose" :width="1065"> <Modal v-model="transferOrder" @on-ok="transferClose" :width="1065">
<Table :loading="loading" border :columns="workerList" :data="transferList" :size="tableSize" sortable="custom" <Table :loading="loading" border :columns="workerList" :data="transferList" :size="tableSize"
ref="table1"></Table> sortable="custom" ref="table1"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchWorker.pageNum" :total="total" :page-size="searchWorker.pageSize" <Page :current="searchWorker.pageNum" :total="total" :page-size="searchWorker.pageSize"
@on-change="changeWorkerPage" @on-page-size-change="changeWorkerPageSize" :page-size-opts="[10, 20, 50]" @on-change="changeWorkerPage" @on-page-size-change="changeWorkerPageSize"
size="small" show-total show-elevator show-sizer></Page> :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Modal>
<!-- 订单详情 -->
<Modal :title="订单详情" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000">
<logistics-address v-if="Visiable" ref="dialog"></logistics-address>
<div slot="footer" v-show="Visiable">
<Button type="text" @click="Visiable = false">关闭</Button>
</div>
</Modal> </Modal>
<!-- 导入数据 --> <!-- 导入数据 -->
<Drawer title="导入数据" closable v-model="importModalVisible" width="800" draggable> <Drawer title="导入数据" closable v-model="importModalVisible" width="800" draggable>
@ -212,14 +169,17 @@
import excel from "@/libs/excel"; import excel from "@/libs/excel";
import addEdit from "./addEdit.vue"; import addEdit from "./addEdit.vue";
import dict from "@/views/my-components/hiver/dict"; import dict from "@/views/my-components/hiver/dict";
import logisticsAddress from "@/views/app/business/logistics/logisticsAddress";
export default { export default {
name: "order-manage", name: "order-manage",
components: { components: {
addEdit, addEdit,
dict, dict,
logisticsAddress,
}, },
data() { data() {
return { return {
Visiable: false,
transferList: [], transferList: [],
tableSize: "default", tableSize: "default",
height: 510, height: 510,
@ -238,27 +198,27 @@
dropDownContent: "展开", dropDownContent: "展开",
dropDownIcon: "ios-arrow-down", dropDownIcon: "ios-arrow-down",
selectList: [], selectList: [],
searchWorker:{ searchWorker: {
ownerCompany: "", //id baozhang: false,
searchStr: "", keyword: "",
pageNum: 1, orderType: 0,
pageSize: 10 putAreaId: "",
shopAreaId: "",
xiangtong: false
}, },
searchForm: { searchForm: {
workerName: "", deliveryType: 1,
shopName: "", getAreaId: "",
orderId: "", hallOnly: true,
orderLogistics: "", kuaidiData: [],
kdOrderId: "", order: "",
timeout: "", pageNum: 1,
orderStatus: "", pageSize: '10',
orderByWorker: "", putAreaId: "",
pageNumber: 1, regionId: "",
pageSize: 10, status: 0,
sort: "createTime", waimaiData: [],
order: "desc", workerId: ""
startDate: "",
endDate: "",
}, },
selectDate: null, selectDate: null,
options: { options: {
@ -267,12 +227,12 @@
form: {}, form: {},
// {{item.isOnLine==0?'线':'线'}} // {{item.isOnLine==0?'线':'线'}}
// {{item.signPerson==1?'':''}} // {{item.signPerson==1?'':''}}
workerList:[{ workerList: [{
type: "index", type: "index",
width: 60, width: 60,
align: "center", align: "center",
fixed: "left", fixed: "left",
},{ }, {
title: "配送人员", title: "配送人员",
key: "workerName", key: "workerName",
width: 200, width: 200,
@ -283,43 +243,21 @@
width: 200, width: 200,
align: "center", align: "center",
}, { }, {
title: "在线状态", title: "待取",
key: "getOrderAddress", key: "orderGetCount",
width: 200, width: 130,
align: "center", align: "center",
render: (h, params) => {
let re = "",
color = "";
if (params.row.isOnLine == "0") {
re = "离线";
color = "#D3D3D3";
} else if (params.row.isOnLine == "1") {
re = "在线";
color = "green";
}
return h("div", [
h(
"Tag", {
props: {
color: color,
},
},
re
),
]);
},
}, { }, {
title: "人员身份", title: "待送",
key: "getOrderAddress", key: "orderPutCount",
width: 200, width: 130,
align: "center", align: "center",
render: (h, params) => { }, {
const signPerson = params.row.signPerson == 1 ? '拉包工' : params.row.signPerson == 2?'快递员':''; // title: "待接单",
return < span > { key: "orderWaitCount",
signPerson width: 130,
} < /span>; align: "center",
}, }, {
},{
title: "操作", title: "操作",
key: "action", key: "action",
width: 170, width: 170,
@ -337,11 +275,6 @@
}, },
"转单" "转单"
), ),
h("Divider", {
props: {
type: "vertical",
},
}),
]); ]);
}, },
}], }],
@ -357,149 +290,51 @@
width: 60, width: 60,
align: "center", align: "center",
fixed: "left", fixed: "left",
},
{ //getTimeDifference
title: "时间",
key: "createTime",
minWidth: 185,
align: "center",
fixed: "left",
render: (h, params) => {
let re = "",
color = "";
if (this.getTimeDifference(params.row.createTime) > 15 && (params.row.orderStatus == "0" || params.row.orderStatus == "1")) {
re = params.row.createTime;
color = "red";
}else{
re = params.row.createTime;
color = "green";
}
return h("div", [
h(
"Tag", {
props: {
color: color,
},
},
re
),
]);
},
},
{
title: "订单号",
key: "orderId",
minWidth: 125,
// sortable: true,
align: "center",
fixed: "left",
},
// {
// title: "",
// key: "orderLogistics",
// minWidth: 125,
// sortable: true,
// fixed: "left",
// render: (h, params) => {
// let re = "",
// color = "";
// if (params.row.orderLogistics == 1) {
// re = "";
// color = "blue";
// } else if (params.row.orderLogistics == 2) {
// re = "";
// color = "yellow";
// } else if (params.row.orderLogistics == 3) {
// re = "";
// color = "red";
// }
// return h("div", [
// h(
// "Tag", {
// props: {
// color: color,
// },
// },
// re
// ),
// ]);
// },
// },
{
title: "店铺名称",
key: "shopName",
width: 200,
align: "center",
}, { }, {
title: "店铺联系电话", title: "订单编号",
key: "mobile", key: "status",
width: 130, width: 100,
align: "center", align: "center",
}, { }, {
title: "取货地址", title: "取货地址",
key: "getOrderAddress", key: "shopAddress",
width: 200, width: 200,
align: "center", align: "center",
}, }, {
/** title: "送货地址",
* 订单状态开单 key: "receiverAddress",
* 0待抢单 width: 200,
* 1待取货 align: "center",
* 2已作废 }, {
* 3待送达
* 4已完成
* 退货
* 5下游客户待退货
* 00退货待抢单
* 01退货待取货
* 02退货已作废
* 03退货待送达
* 04待确认退货
* 4已完成
*/
{
title: "订单状态", title: "订单状态",
key: "orderStatus", key: "orderStatus",
width: 100, width: 100,
// sortable: true,
render: (h, params) => { render: (h, params) => {
let re = "", let re = "",
color = ""; color = "";
if (params.row.orderStatus == "0") { if (params.row.status == "7") {
re = "待抢单"; re = "指派单";
color = "yellow"; color = "yellow";
} else if (params.row.orderStatus == "1") { } else if (params.row.status == "0") {
re = "待接单";
color = "yellow";
} else if (params.row.status == "1") {
re = "待取货"; re = "待取货";
color = "yellow"; color = "yellow";
} else if (params.row.orderStatus == "2") { } else if (params.row.status == "2") {
re = "已作废";
color = "#D3D3D3";
} else if (params.row.orderStatus == "3") {
re = "待送达"; re = "待送达";
color = "yellow"; color = "green";
} else if (params.row.orderStatus == "4") { } else if (params.row.status == "3") {
re = "已完成"; re = "已完成";
color = "green"; color = "green";
} else if (params.row.orderStatus == "5") { } else if (params.row.status == "4") {
re = "下游客户待退货"; re = "已取消";
color = "yellow";
} else if (params.row.orderStatus == "00") {
re = "退货待抢单";
color = "yellow";
} else if (params.row.orderStatus == "01") {
re = "退货待取货";
color = "yellow";
} else if (params.row.orderStatus == "02") {
re = "退货已作废";
color = "#D3D3D3";
} else if (params.row.orderStatus == "03") {
re = "退货待送达";
color = "yellow";
} else if (params.row.orderStatus == "04") {
re = "待确认退货";
color = "green"; color = "green";
} else if (params.row.orderStatus == "8") { } else if (params.row.status == "5") {
re = "待物流自取"; re = "已退款";
color = "green";
} else if (params.row.status == "6") {
re = "预订单";
color = "green"; color = "green";
} }
return h("div", [ return h("div", [
@ -513,50 +348,47 @@
), ),
]); ]);
}, },
}, }, {
{
title: "配送员", title: "配送员",
key: "workerName", key: "workerName",
width: 80, width: 120,
//sortable: true, align: "center"
render: (h, params) => { }, { //getTimeDifference
const workerName = params.row.worker ? params.row.worker.workerName : ''; // title: "送达时间",
return < span > { key: "createTime",
workerName minWidth: 80,
} < /span>; align: "center",
}
},
{
title: "联系方式",
key: "workMobile",
width: 130,
//sortable: true,
render: (h, params) => { render: (h, params) => {
const mobile = params.row.worker ? params.row.worker.mobile : ''; // let re = "",
return < span > { color = "";
mobile if (this.getTimeDifference(params.row.createTime) > 15 && (params.row.orderStatus ==
} < /span>; "0" || params.row.orderStatus == "1")) {
} re = params.row.createTime;
}, color = "red";
{ } else {
title: "配送公司", re = params.row.createTime;
key: "companyName", color = "green";
width: 110, }
}, return h("div", [
{ h(
title: "公司电话", "Tag", {
key: "transCompanyPhone", props: {
width: 130, color: color,
},
},
re
),
]);
},
}, { }, {
title: "运单号", title: "订单时间",
key: "kdOrderId", key: "createTime",
width: 200, width: 200,
align: "center", align: "center",
}, }, {
{
title: "操作", title: "操作",
key: "action", key: "action",
width: 80, width: 180,
align: "center", align: "center",
fixed: "right", fixed: "right",
render: (h, params) => { render: (h, params) => {
@ -565,17 +397,27 @@
"a", { "a", {
on: { on: {
click: () => { click: () => {
this.unbind(params.row); this.orderDetail(params.row);
}, },
}, },
}, },
"转单" "订单详情"
), ),
h("Divider", { h("Divider", {
props: { props: {
type: "vertical", type: "vertical",
}, },
}), }),
h(
"a", {
on: {
click: () => {
this.unbind(params.row);
},
},
},
"改派订单"
),
]); ]);
}, },
}, },
@ -596,8 +438,8 @@
exportData: [], exportData: [],
total: 0, total: 0,
dictData: [], dictData: [],
isKD:'', isKD: '',
orderId:'' // orderId: '' //
}; };
}, },
methods: { methods: {
@ -614,8 +456,8 @@
}, },
//--> //-->
goTransferOrder(item){ goTransferOrder(item) {
console.log('订单',item) console.log('订单', item)
runshOrder({ runshOrder({
orderId: this.orderId, orderId: this.orderId,
@ -624,9 +466,9 @@
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
transferOrder({ transferOrder({
orderId:this.orderId, orderId: this.orderId,
orderByWorker:item.workerId, orderByWorker: item.workerId,
workerName:item.workerName workerName: item.workerName
}).then((res) => { }).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
@ -642,13 +484,18 @@
handleSelectDep(v) { handleSelectDep(v) {
this.searchForm.departmentId = v; this.searchForm.departmentId = v;
}, },
changeOrderTab() {
this.searchForm.pageNum = 1;
this.searchForm.deliveryType = v;
this.getDataList();
},
changeTab(v) { changeTab(v) {
this.searchForm.pageNumber = 1; this.searchForm.pageNum = 1;
this.searchForm.orderStatus = v; this.searchForm.status = v;
this.getDataList(); this.getDataList();
}, },
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNum = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
@ -681,48 +528,27 @@
}, },
getDataList() { getDataList() {
this.loading = true; this.loading = true;
if(this.searchForm.orderStatus == "8"){ //
this.searchForm.companyId = '' getOwListData(this.searchForm).then((res) => {
this.searchForm.modeOfService= 2 this.loading = false;
this.searchForm.status= 8 if (res.success) {
getSaleByCompanyId(this.searchForm).then((res) => { this.data = res.result.records;
this.loading = false; this.total = res.result.total;
if (res.success) { }
this.data = res.result.content; });
this.total = res.result.totalElements;
if (this.data.length == 0 && this.searchForm.pageNumber > 1) {
this.searchForm.pageNumber -= 1;
this.getDataList();
}
}
});
}else{
//
getOwListData(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.content;
this.total = res.result.totalElements;
if (this.data.length == 0 && this.searchForm.pageNumber > 1) {
this.searchForm.pageNumber -= 1;
this.getDataList();
}
}
});
}
}, },
transferClose() { transferClose() {
this.transferOrder = false this.transferOrder = false
}, },
handleSearch() { handleSearch() {
this.searchForm.pageNumber = 1; this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
}, },
handleReset() { handleReset() {
this.$refs.searchForm.resetFields(); this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1; this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.selectDate = null; this.selectDate = null;
this.searchForm.startDate = ""; this.searchForm.startDate = "";
@ -930,20 +756,28 @@
}, },
}); });
}, },
orderDetail(v) {
let that = this;
this.Visiable = true;
console.log(v)
this.$nextTick(() => {
that.$refs.dialog.initRecharge(v);
});
},
unbind(v) { unbind(v) {
this.transferOrder = true this.transferOrder = true
this.orderId = v.orderId
this.isKD = v.companyName.indexOf('快递') != -1?v.transCompany:''
this.searchWorker.pageNum = 1; this.searchWorker.pageNum = 1;
this.searchWorker.ownerCompany = this.isKD this.searchWorker.shopAreaId = v.getAreaId
this.getWorker() this.searchWorker.putAreaId = v.putAreaId
console.log(v)
this.getWorker(v)
}, },
// //
getWorker(){ getWorker() {
getWorkerListData(this.searchWorker).then((res) => { getWorkerListData(this.searchWorker).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.transferList = res.result.content this.transferList = res.result
this.total = res.result.totalElements; this.total = res.result.totalElements;
if (this.transferList.length == 0 && this.searchWorker.pageNum > 1) { if (this.transferList.length == 0 && this.searchWorker.pageNum > 1) {
this.searchWorker.pageNum -= 1; this.searchWorker.pageNum -= 1;

479
src/views/sys/order-manage/orderManage.vue

@ -5,6 +5,16 @@
<template> <template>
<div class="search"> <div class="search">
<Card> <Card>
<Tabs v-model="tabName" :animated="false" @on-click="changeOrderTab">
<TabPane label="指派单" name="7"></TabPane>
<TabPane label="待接单" name="0"></TabPane>
<TabPane label="待取货" name="1"></TabPane>
<TabPane label="待送达" name="2"></TabPane>
<TabPane label="已完成" name="3"></TabPane>
<TabPane label="已取消" name="4"></TabPane>
<TabPane label="已退款" name="5"></TabPane>
<TabPane label="预订单" name="6"></TabPane>
</Tabs>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
<Form ref="searchForm" :model="searchForm" inline :label-width="70"> <Form ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem label="状态" prop="orderId"> <FormItem label="状态" prop="orderId">
@ -40,22 +50,6 @@
</Option> </Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="创建时间">
<DatePicker :options="options" clearable v-model="selectDate" type="daterange"
format="yyyy-MM-dd" @on-change="selectDateRange" placeholder="选择起始时间"
style="width: 200px">
</DatePicker>
</FormItem>
<FormItem label="物流公司" prop="kdOrderId2">
<Select v-model="wuliuValue" clearable filterable @on-clear="clearWuLiuValue"
:remote-method="getWuLiuValue" :loading="loading1" placeholder="请选择或输入添加">
<Option v-for="item in wuliuList" :value="item.companyName" :key="item.id"
:label="item.companyName" @on-change="checkWuLiuValue(item)">
<span style="margin-right: 10px">{{ item.companyName }}</span>
</Option>
</Select>
</FormItem>
<FormItem style="margin-left: -35px" class="br"> <FormItem style="margin-left: -35px" class="br">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button> <Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button> <Button @click="handleReset">重置</Button>
@ -63,45 +57,6 @@
</Form> </Form>
</Row> </Row>
<Row align="middle" justify="space-between" class="operation"> <Row align="middle" justify="space-between" class="operation">
<div>
<!-- <Button @click="add" type="primary" icon="md-add">创建订单</Button> -->
<Button @click="" icon="md-add">批量确认</Button>
<Button @click="checkOrderStatus('','0')" icon="md-add">批量已付</Button>
<Button @click="checkOrderStatus('','1')" icon="md-add">批量未付</Button>
<Dropdown @on-click="handleDropdown">
<Button>
更多操作
<Icon type="md-arrow-dropdown" />
</Button>
<DropdownMenu slot="list">
<!-- <DropdownItem name="reset">重置用户密码</DropdownItem> -->
<DropdownItem name="exportData">导出所选数据</DropdownItem>
<DropdownItem name="exportAll">导出全部数据</DropdownItem>
<!-- <DropdownItem name="importData">导入数据</DropdownItem> -->
</DropdownMenu>
</Dropdown>
<!-- <span style="width:180px;display:inline-block;font-size:16px;">
客户运费:{{orderStatistics.totalFreight == null ?0:orderStatistics.totalFreight}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
总单数:{{orderStatistics.totalOrder == null ?0:orderStatistics.totalOrder}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
客户数:{{orderStatistics.totalCustomer == null ?0:orderStatistics.totalCustomer}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
运输费:{{orderStatistics.totalTransportationFee == null ?0:orderStatistics.totalTransportationFee}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
装车费:{{orderStatistics.totalLoadingFee == null ?0:orderStatistics.totalLoadingFee}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
小费:{{orderStatistics.totalTip == null ?0:orderStatistics.totalTip}}
</span>
<span style="width:120px;display:inline-block;font-size:16px;">
保费:{{orderStatistics.totalInsuranceFee == null ?0:orderStatistics.totalInsuranceFee}}
</span> -->
</div>
<div class="icons"> <div class="icons">
<Tooltip content="刷新" placement="top" transfer> <Tooltip content="刷新" placement="top" transfer>
<Icon type="md-refresh" size="18" class="item" @click="getDataList" /> <Icon type="md-refresh" size="18" class="item" @click="getDataList" />
@ -129,7 +84,7 @@
<span class="select-count">{{ selectList.length }}</span> <span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a> <a class="select-clear" @click="clearSelectAll">清空</a>
</Alert> </Alert>
<Table :loading="loading" border :columns="colHidden" :data="data" :size="tableSize" sortable="custom" <Table :loading="loading" border :columns="columns" :data="data" :size="tableSize" sortable="custom"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table> @on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<Row type="flex" justify="end" class="page"> <Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize" <Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize"
@ -137,7 +92,13 @@
size="small" show-total show-elevator show-sizer></Page> size="small" show-total show-elevator show-sizer></Page>
</Row> </Row>
</Card> </Card>
<!-- 订单详情 -->
<Modal :title="订单详情" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000">
<logistics-address v-if="Visiable" ref="dialog"></logistics-address>
<div slot="footer" v-show="Visiable">
<Button type="text" @click="Visiable = false">关闭</Button>
</div>
</Modal>
<!-- 自定义导出数据 --> <!-- 自定义导出数据 -->
<Modal v-model="exportModalVisible" :title="exportTitle" :loading="loadingExport" @on-ok="exportCustomData"> <Modal v-model="exportModalVisible" :title="exportTitle" :loading="loadingExport" @on-ok="exportCustomData">
<Form ref="exportForm" :label-width="100"> <Form ref="exportForm" :label-width="100">
@ -190,7 +151,7 @@
getLogisticsOrderPageList, getLogisticsOrderPageList,
getLogisticsOrderStatistics, getLogisticsOrderStatistics,
batchUpdateOrderStatus, batchUpdateOrderStatus,
findByMobile, getOrderList,
enableUser, enableUser,
getLogisticsAddressBookPageList, getLogisticsAddressBookPageList,
disableUser, disableUser,
@ -219,25 +180,24 @@
import excel from "@/libs/excel"; import excel from "@/libs/excel";
import addEdit from "./addEdit.vue"; import addEdit from "./addEdit.vue";
import dict from "@/views/my-components/hiver/dict"; import dict from "@/views/my-components/hiver/dict";
import logisticsAddress from "@/views/app/business/logistics/logisticsAddress";
export default { export default {
name: "order-manage", name: "order-manage",
components: { components: {
addEdit, addEdit,
dict, dict,
logisticsAddress,
}, },
data() { data() {
return { return {
tableSize: "default", tableSize: "default",
height: 510, height: 510,
wuliuValue:'',
loading1: false, loading1: false,
loading2: false, loading2: false,
showOrder: false, showOrder: false,
clearShou: false, clearShou: false,
clearWuLiu: false,
clearFa: false, clearFa: false,
shouList: [], shouList: [],
wuliuList: [],
shou: '', shou: '',
fa: '', fa: '',
faList: [], faList: [],
@ -258,21 +218,10 @@
searchForm: { searchForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
searchStr: '', regionId: "",
orderStatus: '', searchType: 0,
companyName: "", shopName: "",
companyId: "", userId: ""
circuitName: "",
circuitId: "",
arrivalStationId: "",
shipperName: "",
shipperId: "",
shipperMobile: "",
shipperAddress: "",
receiverName: "",
receiverId: "",
startDate: "",
endDate: ""
}, },
selectDate: null, selectDate: null,
options: { options: {
@ -280,165 +229,62 @@
}, },
form: {}, form: {},
columns: [{ columns: [{
type: "selection",
width: 60,
align: "center",
fixed: "left",
},
{
type: "index", type: "index",
width: 60, width: 60,
align: "center", align: "center",
fixed: "left", fixed: "left",
}, },
{ {
title: "发站", title: "订单编号",
key: "goStationName", key: "id",
width: 150, width: 150,
align: "center", align: "center",
}, },
{ {
title: "到站", title: "用户账号",
key: "arrivalStationName", key: "receiverPhone",
width: 150, width: 150,
align: "center", align: "center",
}, },
{ {
title: "单号", title: "店铺名称",
key: "orderNumber", key: "shopName",
minWidth: 165, width: 200,
render: (h, params) => {
return h(
"a", {
on: {
click: () => {
this.showDetail(params.row);
},
},
},
params.row.orderNumber
);
},
},
{
title: "物品名称",
key: "objectName",
width: 100,
align: "center", align: "center",
}, },
{ {
title: "物流公司", title: "交易金额",
key: "companyName", key: "companyName",
width: 100, width: 100,
align: "center", align: "center",
}, },
{ {
title: "件数", title: "订单总金额",
key: "count", key: "totalAmount",
width: 100, width: 160,
align: "center", align: "center",
}, },
{ {
title: "收货人", title: "商家优惠券金额",
key: "receiverName", key: "receiverName",
width: 150, width: 150,
align: "center", align: "center",
}, },
{ {
title: "重量", title: "平台优惠券金额",
key: "weight", key: "weight",
width: 100, width: 150,
align: "center",
},
{
title: "运费",
key: "freight",
width: 100,
align: "center",
},
{
title: "总费用",
key: "allCost",
width: 100,
align: "center", align: "center",
}, },
{ {
title: "现金", title: "完成支付时间",
key: "methodOfSettlement", key: "createTime",
minWidth: 100, width: 150,
render: (h, params) => {
let re = "",
color = "";
if (params.row.methodOfSettlement == 0) {
re = params.row.allCost;
color = "blue";
}
return h("div", [
re
]);
},
},
{
title: "月结",
key: "methodOfSettlement",
minWidth: 100,
render: (h, params) => {
let re = "",
color = "";
if (params.row.methodOfSettlement == 1) {
re = params.row.allCost;
color = "yellow";
}
return h("div", [
re
]);
},
},
{
title: "小费",
key: "tips",
width: 100,
align: "center", align: "center",
}, },
{ {
title: "状态", title: "订单状态",
key: "orderStatus", key: "status",
minWidth: 100,
render: (h, params) => {
let re = "",
color = "";
if (params.row.orderStatus == "0") {
re = "已付";
color = "blue";
} else if (params.row.orderStatus == "1") {
re = "未付";
color = "red";
} else if (params.row.orderStatus == "2") {
re = "挂单";
color = "yellow";
}
return h("div", [
h(
"a", {
props: {
color: color,
},
on: {
click: () => {
this.checkOrderStatus(params.row, params.row
.orderStatus == '2' || params.row
.orderStatus == '1' ? '0' : '1');
},
},
},
re
)
]);
},
},
{
title: "备注",
key: "remark",
width: 200, width: 200,
align: "center", align: "center",
}, },
@ -450,36 +296,6 @@
fixed: "right", fixed: "right",
render: (h, params) => { render: (h, params) => {
return h("div", [ return h("div", [
h(
"a", {
on: {
click: () => {
this.edit(params.row);
},
},
},
"修改"
),
h("Divider", {
props: {
type: "vertical",
},
}),
h(
"a", {
on: {
click: () => {
this.remove(params.row);
},
},
},
"确认"
),
h("Divider", {
props: {
type: "vertical",
},
}),
h( h(
"a", { "a", {
on: { on: {
@ -534,10 +350,7 @@
mounted() { mounted() {
// //
this.height = Number(document.documentElement.clientHeight - 230); this.height = Number(document.documentElement.clientHeight - 230);
let dayTime = this.getMonth()
this.selectDate = [dayTime, dayTime]
this.searchForm.startDate = dayTime
this.searchForm.endDate = dayTime
this.init(); this.init();
}, },
methods: { methods: {
@ -654,9 +467,6 @@
} }
}, },
handleSelectDep(v) {
this.searchForm.departmentId = v;
},
changePage(v) { changePage(v) {
this.searchForm.pageNum = v; this.searchForm.pageNum = v;
this.getDataList(); this.getDataList();
@ -666,22 +476,6 @@
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
selectDateRange(v) {
if (v) {
console.log(v)
this.searchForm.startDate = v[0];
this.searchForm.endDate = v[1];
}
},
clearWuLiuValue(){
console.log('wuliuValue',this.wuliuValue)
this.searchForm.companyId = ""
this.searchForm.companyName = ""
},
checkWuLiuValue(v) {
this.searchForm.companyId = v.id
this.searchForm.companyName = v.companyName
},
checkShouValue(v) { checkShouValue(v) {
if (this.clearShou == true) { if (this.clearShou == true) {
this.searchForm.receiverId = "" this.searchForm.receiverId = ""
@ -704,107 +498,20 @@
} }
}, },
getWuLiuValue(v) {
console.log('物流',v)
this.searchForm.companyName = v
getLogiticsCompanyData({
companyName: v,
id: "",
contacts: "",
mobile: "",
pageNumber: 1,
pageSize: 10,
sort: "createTime",
order: "desc",
startDate: "",
endDate: "",
signCompany: "",
}).then((res) => {
this.loading = false;
if (res.success) {
this.wuliuList = res.result.content
}
});
},
getShouValue(v) {
console.log(v)
this.searchForm.receiverName = v
getLogisticsAddressBookPageList({
pageNum: 1,
pageSize: 100,
keyWord: v,
companyId: this.searchForm.companyId,
addressType: '2'
}).then((res) => {
this.loading = false;
if (res.success) {
this.shouList = res.result.records
}
});
},
getFaValue(v) {
console.log(v)
this.searchForm.shipperName = v
getLogisticsAddressBookPageList({
pageNum: 1,
pageSize: 100,
keyWord: v,
companyId: this.searchForm.companyId,
addressType: '1'
}).then((res) => {
this.loading = false;
if (res.success) {
this.faList = res.result.records
}
});
},
changeTableSize(v) { changeTableSize(v) {
this.tableSize = v; this.tableSize = v;
}, },
// //
getLogisticsInfo() { getLogisticsInfo() {
findByMobile({ getOrderList(this.searchForm).then((res) => {
mobile: JSON.parse(window.localStorage.getItem("userInfo")).mobile
}).then((res) => {
this.loading = false;
if (res.success) {
this.searchForm.companyId = res.result[0].companyId
this.getAllNum()
this.getDataList();
}
});
},
//
getAllNum() {
getLogisticsOrderStatistics({
companyId: this.searchForm.companyId,
startDate: this.searchForm.startDate,
endDate: this.searchForm.endDate
}).then((res) => {
this.loading = false;
if (res.success) {
this.orderStatistics = res.result
}
});
},
getDataList() {
this.loading = true;
getLogisticsOrderPageList(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.records; this.data = res.result.records
this.total = res.result.total; this.total = res.result.total;
if (this.data.length == 0 && this.searchForm.pageNum > 1) {
this.searchForm.pageNum -= 1;
this.getDataList();
}
} }
}); });
}, },
handleSearch() { handleSearch() {
this.searchForm.pageNum = 1; this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
@ -965,63 +672,9 @@
this.showType = "0"; this.showType = "0";
this.showOrder = true; this.showOrder = true;
}, },
add() {
this.showType = "2";
this.showOrder = true;
},
edit(v) {
// null""
for (let attr in v) {
if (v[attr] == null) {
v[attr] = "";
}
}
let str = JSON.stringify(v);
let data = JSON.parse(str);
this.form = data;
if (this.form.methodOfSettlement == 0) { //
this.form.xianjin = this.form.allCost
this.form.yuefu = ""
} else if (this.form.methodOfSettlement == 1) {
this.form.xianjin = ""
this.form.yuefu = this.form.allCost
}
this.showType = "1";
this.showOrder = true;
console.log('this.form', this.form)
},
enable(v) {
this.$Modal.confirm({
title: "确认启用",
content: "您确认要启用用户 " + v.username + " ?",
loading: true,
onOk: () => {
enableUser(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
disable(v) {
this.$Modal.confirm({
title: "确认禁用",
content: "您确认要禁用用户 " + v.username + " ?",
loading: true,
onOk: () => {
disableUser(v.id).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("操作成功");
this.getDataList();
}
});
},
});
},
getDetail(v) { getDetail(v) {
this.showDetail(v); this.showDetail(v);
}, },
@ -1042,34 +695,6 @@
clearSelectAll() { clearSelectAll() {
this.$refs.table.selectAll(false); this.$refs.table.selectAll(false);
}, },
delAll() {
if (this.selectList.length <= 0) {
this.$Message.warning("您还未选择要删除的数据");
return;
}
this.$Modal.confirm({
title: "确认删除",
content: "您确认要删除所选的 " + this.selectList.length + " 条数据?",
loading: true,
onOk: () => {
let ids = "";
this.selectList.forEach(function(e) {
ids += e.id + ",";
});
ids = ids.substring(0, ids.length - 1);
deleteUser({
ids: ids
}).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success("删除成功");
this.clearSelectAll();
this.getDataList();
}
});
},
});
},
} }
}; };
</script> </script>
Loading…
Cancel
Save