tianyi 3 months ago
parent
commit
00fb4affe9
  1. 14
      src/api/index.js
  2. 3
      src/views/app/business/lineManage/logisticsAddress.vue
  3. 464
      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)
}
//根据手机号查询物流公司信息
//查询物流公司信息
export const findByMobile = (params) => {
return postRequest('/app/logitics/findByMobile', params)
}
@ -679,9 +679,9 @@ export const deleteOrder = (params) => {
return postRequest('/order/delByIds', 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)
}
// 获取实时物流操作
// 获取实时订单操作
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: {
init() {
// this.getDataList();
},
initRecharge(data) {
//data
console.log(data);

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

@ -5,19 +5,20 @@
<template>
<div class="search">
<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">
<TabPane label="待指派" name="0"></TabPane>
<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="00"></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>
<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">
<Form ref="searchForm" :model="searchForm" inline :label-width="70">
@ -29,63 +30,13 @@
<Input type="text" v-model="searchForm.shopName" clearable placeholder="请输入店铺名称"
style="width: 200px" />
</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">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button>
<a class="drop-down" @click="dropDown">
{{ dropDownContent }}
<Icon :type="dropDownIcon"></Icon>
</a>
</FormItem>
</Form>
</Row>
<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">
<Tooltip content="刷新" placement="top" transfer>
<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"
@on-sort-change="changeSort" @on-selection-change="showSelect" ref="table"></Table>
<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]"
size="small" show-total show-elevator show-sizer></Page>
</Row>
@ -138,14 +89,20 @@
</Modal>
<!-- 转单弹窗 -->
<Modal v-model="transferOrder" @on-ok="transferClose" :width="1065">
<Table :loading="loading" border :columns="workerList" :data="transferList" :size="tableSize" sortable="custom"
ref="table1"></Table>
<Table :loading="loading" border :columns="workerList" :data="transferList" :size="tableSize"
sortable="custom" ref="table1"></Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchWorker.pageNum" :total="total" :page-size="searchWorker.pageSize"
@on-change="changeWorkerPage" @on-page-size-change="changeWorkerPageSize" :page-size-opts="[10, 20, 50]"
size="small" show-total show-elevator show-sizer></Page>
@on-change="changeWorkerPage" @on-page-size-change="changeWorkerPageSize"
:page-size-opts="[10, 20, 50]" size="small" show-total show-elevator show-sizer></Page>
</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>
<!-- 导入数据 -->
<Drawer title="导入数据" closable v-model="importModalVisible" width="800" draggable>
@ -212,14 +169,17 @@
import excel from "@/libs/excel";
import addEdit from "./addEdit.vue";
import dict from "@/views/my-components/hiver/dict";
import logisticsAddress from "@/views/app/business/logistics/logisticsAddress";
export default {
name: "order-manage",
components: {
addEdit,
dict,
logisticsAddress,
},
data() {
return {
Visiable: false,
transferList: [],
tableSize: "default",
height: 510,
@ -239,26 +199,26 @@
dropDownIcon: "ios-arrow-down",
selectList: [],
searchWorker: {
ownerCompany: "", //id
searchStr: "",
pageNum: 1,
pageSize: 10
baozhang: false,
keyword: "",
orderType: 0,
putAreaId: "",
shopAreaId: "",
xiangtong: false
},
searchForm: {
workerName: "",
shopName: "",
orderId: "",
orderLogistics: "",
kdOrderId: "",
timeout: "",
orderStatus: "",
orderByWorker: "",
pageNumber: 1,
pageSize: 10,
sort: "createTime",
order: "desc",
startDate: "",
endDate: "",
deliveryType: 1,
getAreaId: "",
hallOnly: true,
kuaidiData: [],
order: "",
pageNum: 1,
pageSize: '10',
putAreaId: "",
regionId: "",
status: 0,
waimaiData: [],
workerId: ""
},
selectDate: null,
options: {
@ -283,42 +243,20 @@
width: 200,
align: "center",
}, {
title: "在线状态",
key: "getOrderAddress",
width: 200,
title: "待取",
key: "orderGetCount",
width: 130,
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: "人员身份",
key: "getOrderAddress",
width: 200,
title: "待送",
key: "orderPutCount",
width: 130,
align: "center",
}, {
title: "待接单",
key: "orderWaitCount",
width: 130,
align: "center",
render: (h, params) => {
const signPerson = params.row.signPerson == 1 ? '拉包工' : params.row.signPerson == 2?'快递员':''; //
return < span > {
signPerson
} < /span>;
},
}, {
title: "操作",
key: "action",
@ -337,11 +275,6 @@
},
"转单"
),
h("Divider", {
props: {
type: "vertical",
},
}),
]);
},
}],
@ -357,149 +290,51 @@
width: 60,
align: "center",
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: "店铺联系电话",
key: "mobile",
width: 130,
title: "订单编号",
key: "status",
width: 100,
align: "center",
}, {
title: "取货地址",
key: "getOrderAddress",
key: "shopAddress",
width: 200,
align: "center",
},
/**
* 订单状态开单
* 0待抢单
* 1待取货
* 2已作废
* 3待送达
* 4已完成
* 退货
* 5下游客户待退货
* 00退货待抢单
* 01退货待取货
* 02退货已作废
* 03退货待送达
* 04待确认退货
* 4已完成
*/
{
}, {
title: "送货地址",
key: "receiverAddress",
width: 200,
align: "center",
}, {
title: "订单状态",
key: "orderStatus",
width: 100,
// sortable: true,
render: (h, params) => {
let re = "",
color = "";
if (params.row.orderStatus == "0") {
re = "待抢单";
if (params.row.status == "7") {
re = "指派单";
color = "yellow";
} else if (params.row.orderStatus == "1") {
} else if (params.row.status == "0") {
re = "待接单";
color = "yellow";
} else if (params.row.status == "1") {
re = "待取货";
color = "yellow";
} else if (params.row.orderStatus == "2") {
re = "已作废";
color = "#D3D3D3";
} else if (params.row.orderStatus == "3") {
} else if (params.row.status == "2") {
re = "待送达";
color = "yellow";
} else if (params.row.orderStatus == "4") {
color = "green";
} else if (params.row.status == "3") {
re = "已完成";
color = "green";
} else if (params.row.orderStatus == "5") {
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 = "待确认退货";
} else if (params.row.status == "4") {
re = "已取消";
color = "green";
} else if (params.row.orderStatus == "8") {
re = "待物流自取";
} else if (params.row.status == "5") {
re = "已退款";
color = "green";
} else if (params.row.status == "6") {
re = "预订单";
color = "green";
}
return h("div", [
@ -513,50 +348,47 @@
),
]);
},
},
{
}, {
title: "配送员",
key: "workerName",
width: 80,
//sortable: true,
width: 120,
align: "center"
}, { //getTimeDifference
title: "送达时间",
key: "createTime",
minWidth: 80,
align: "center",
render: (h, params) => {
const workerName = params.row.worker ? params.row.worker.workerName : ''; //
return < span > {
workerName
} < /span>;
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,
},
{
title: "联系方式",
key: "workMobile",
width: 130,
//sortable: true,
render: (h, params) => {
const mobile = params.row.worker ? params.row.worker.mobile : ''; //
return < span > {
mobile
} < /span>;
}
},
{
title: "配送公司",
key: "companyName",
width: 110,
re
),
]);
},
{
title: "公司电话",
key: "transCompanyPhone",
width: 130,
}, {
title: "运单号",
key: "kdOrderId",
title: "订单时间",
key: "createTime",
width: 200,
align: "center",
},
{
}, {
title: "操作",
key: "action",
width: 80,
width: 180,
align: "center",
fixed: "right",
render: (h, params) => {
@ -565,17 +397,27 @@
"a", {
on: {
click: () => {
this.unbind(params.row);
this.orderDetail(params.row);
},
},
},
"转单"
"订单详情"
),
h("Divider", {
props: {
type: "vertical",
},
}),
h(
"a", {
on: {
click: () => {
this.unbind(params.row);
},
},
},
"改派订单"
),
]);
},
},
@ -642,13 +484,18 @@
handleSelectDep(v) {
this.searchForm.departmentId = v;
},
changeOrderTab() {
this.searchForm.pageNum = 1;
this.searchForm.deliveryType = v;
this.getDataList();
},
changeTab(v) {
this.searchForm.pageNumber = 1;
this.searchForm.orderStatus = v;
this.searchForm.pageNum = 1;
this.searchForm.status = v;
this.getDataList();
},
changePage(v) {
this.searchForm.pageNumber = v;
this.searchForm.pageNum = v;
this.getDataList();
this.clearSelectAll();
},
@ -681,48 +528,27 @@
},
getDataList() {
this.loading = true;
if(this.searchForm.orderStatus == "8"){
this.searchForm.companyId = ''
this.searchForm.modeOfService= 2
this.searchForm.status= 8
getSaleByCompanyId(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();
}
}
});
}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();
}
this.data = res.result.records;
this.total = res.result.total;
}
});
}
},
transferClose() {
this.transferOrder = false
},
handleSearch() {
this.searchForm.pageNumber = 1;
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
handleReset() {
this.$refs.searchForm.resetFields();
this.searchForm.pageNumber = 1;
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
this.selectDate = null;
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) {
this.transferOrder = true
this.orderId = v.orderId
this.isKD = v.companyName.indexOf('快递') != -1?v.transCompany:''
this.searchWorker.pageNum = 1;
this.searchWorker.ownerCompany = this.isKD
this.getWorker()
this.searchWorker.shopAreaId = v.getAreaId
this.searchWorker.putAreaId = v.putAreaId
console.log(v)
this.getWorker(v)
},
//
getWorker() {
getWorkerListData(this.searchWorker).then((res) => {
this.loading = false;
if (res.success) {
this.transferList = res.result.content
this.transferList = res.result
this.total = res.result.totalElements;
if (this.transferList.length == 0 && this.searchWorker.pageNum > 1) {
this.searchWorker.pageNum -= 1;

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

@ -5,6 +5,16 @@
<template>
<div class="search">
<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">
<Form ref="searchForm" :model="searchForm" inline :label-width="70">
<FormItem label="状态" prop="orderId">
@ -40,22 +50,6 @@
</Option>
</Select>
</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">
<Button @click="handleSearch" type="primary" icon="ios-search">搜索</Button>
<Button @click="handleReset">重置</Button>
@ -63,45 +57,6 @@
</Form>
</Row>
<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">
<Tooltip content="刷新" placement="top" transfer>
<Icon type="md-refresh" size="18" class="item" @click="getDataList" />
@ -129,7 +84,7 @@
<span class="select-count">{{ selectList.length }}</span>
<a class="select-clear" @click="clearSelectAll">清空</a>
</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>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNum" :total="total" :page-size="searchForm.pageSize"
@ -137,7 +92,13 @@
size="small" show-total show-elevator show-sizer></Page>
</Row>
</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">
<Form ref="exportForm" :label-width="100">
@ -190,7 +151,7 @@
getLogisticsOrderPageList,
getLogisticsOrderStatistics,
batchUpdateOrderStatus,
findByMobile,
getOrderList,
enableUser,
getLogisticsAddressBookPageList,
disableUser,
@ -219,25 +180,24 @@
import excel from "@/libs/excel";
import addEdit from "./addEdit.vue";
import dict from "@/views/my-components/hiver/dict";
import logisticsAddress from "@/views/app/business/logistics/logisticsAddress";
export default {
name: "order-manage",
components: {
addEdit,
dict,
logisticsAddress,
},
data() {
return {
tableSize: "default",
height: 510,
wuliuValue:'',
loading1: false,
loading2: false,
showOrder: false,
clearShou: false,
clearWuLiu: false,
clearFa: false,
shouList: [],
wuliuList: [],
shou: '',
fa: '',
faList: [],
@ -258,21 +218,10 @@
searchForm: {
pageNum: 1,
pageSize: 10,
searchStr: '',
orderStatus: '',
companyName: "",
companyId: "",
circuitName: "",
circuitId: "",
arrivalStationId: "",
shipperName: "",
shipperId: "",
shipperMobile: "",
shipperAddress: "",
receiverName: "",
receiverId: "",
startDate: "",
endDate: ""
regionId: "",
searchType: 0,
shopName: "",
userId: ""
},
selectDate: null,
options: {
@ -280,165 +229,62 @@
},
form: {},
columns: [{
type: "selection",
width: 60,
align: "center",
fixed: "left",
},
{
type: "index",
width: 60,
align: "center",
fixed: "left",
},
{
title: "发站",
key: "goStationName",
title: "订单编号",
key: "id",
width: 150,
align: "center",
},
{
title: "到站",
key: "arrivalStationName",
title: "用户账号",
key: "receiverPhone",
width: 150,
align: "center",
},
{
title: "单号",
key: "orderNumber",
minWidth: 165,
render: (h, params) => {
return h(
"a", {
on: {
click: () => {
this.showDetail(params.row);
},
},
},
params.row.orderNumber
);
},
},
{
title: "物品名称",
key: "objectName",
width: 100,
title: "店铺名称",
key: "shopName",
width: 200,
align: "center",
},
{
title: "物流公司",
title: "交易金额",
key: "companyName",
width: 100,
align: "center",
},
{
title: "件数",
key: "count",
width: 100,
title: "订单总金额",
key: "totalAmount",
width: 160,
align: "center",
},
{
title: "收货人",
title: "商家优惠券金额",
key: "receiverName",
width: 150,
align: "center",
},
{
title: "重量",
title: "平台优惠券金额",
key: "weight",
width: 100,
align: "center",
},
{
title: "运费",
key: "freight",
width: 100,
align: "center",
},
{
title: "总费用",
key: "allCost",
width: 100,
width: 150,
align: "center",
},
{
title: "现金",
key: "methodOfSettlement",
minWidth: 100,
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,
title: "完成支付时间",
key: "createTime",
width: 150,
align: "center",
},
{
title: "状态",
key: "orderStatus",
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",
title: "订单状态",
key: "status",
width: 200,
align: "center",
},
@ -450,36 +296,6 @@
fixed: "right",
render: (h, params) => {
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(
"a", {
on: {
@ -534,10 +350,7 @@
mounted() {
//
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();
},
methods: {
@ -654,9 +467,6 @@
}
},
handleSelectDep(v) {
this.searchForm.departmentId = v;
},
changePage(v) {
this.searchForm.pageNum = v;
this.getDataList();
@ -666,22 +476,6 @@
this.searchForm.pageSize = v;
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) {
if (this.clearShou == true) {
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) {
this.tableSize = v;
},
//
//
getLogisticsInfo() {
findByMobile({
mobile: JSON.parse(window.localStorage.getItem("userInfo")).mobile
}).then((res) => {
getOrderList(this.searchForm).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;
if (res.success) {
this.data = res.result.records;
this.data = res.result.records
this.total = res.result.total;
if (this.data.length == 0 && this.searchForm.pageNum > 1) {
this.searchForm.pageNum -= 1;
this.getDataList();
}
}
});
},
handleSearch() {
this.searchForm.pageNum = 1;
this.searchForm.pageSize = 10;
@ -965,63 +672,9 @@
this.showType = "0";
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) {
this.showDetail(v);
},
@ -1042,34 +695,6 @@
clearSelectAll() {
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>
Loading…
Cancel
Save