tianyi 1 week ago
parent
commit
cc56a3a715
  1. 19
      src/api/index.js
  2. 49
      src/views/app/business/courier/courier.vue
  3. 71
      src/views/app/business/logistics/logistics.vue
  4. 144
      src/views/app/business/logistics/logisticsAddress.vue
  5. 187
      src/views/sys/order-manage/logisticsAddress.vue
  6. 84
      src/views/sys/order-manage/orderManage.vue

19
src/api/index.js

@ -681,7 +681,7 @@ export const deleteOrder = (params) => {
// 获取配送员 // 获取配送员
export const getWorkerListData = (params) => { export const getWorkerListData = (params) => {
return postBodyRequest('/worker/getByCondition', params) return postBodyRequest('/worker/getMatchingWorkerList', params)
} }
// 创建订单 // 创建订单
@ -724,9 +724,19 @@ export const unbindOrder = (id, params) => {
// 抢单操作 // 抢单操作
export const runshOrder = (params) => { export const runshOrder = (params) => {
return postBodyRequest('/order/rush/order', params) return postRequest('/mall/delivery/reassignWorker', params)
} }
// 订单详情
export const getOrderDetail = (id,params) => {
return getRequest(`/mall/order/detail/${id}`, params)
}
// 售后订单详情
export const getReturnOrderList = (params) => {
return postBodyRequest('/mall/refund/page', params)
}
// 获取实时订单操作 // 获取实时订单操作
export const getOwListData = (params) => { export const getOwListData = (params) => {
return postBodyRequest('/mall/delivery/page', params) return postBodyRequest('/mall/delivery/page', params)
@ -743,6 +753,11 @@ export const orderScheduling = (params) => {
export const returnOrder = (params) => { export const returnOrder = (params) => {
return postRequest('/mall/order/cancel', params) return postRequest('/mall/order/cancel', params)
} }
//同意/拒绝退款售后
export const returnOrNoOrder = (params) => {
return postBodyRequest('/mall/refund/allowOrReject', params)
}
//查询物流自取 //查询物流自取
export const getSaleByCompanyId = (params) => { export const getSaleByCompanyId = (params) => {

49
src/views/app/business/courier/courier.vue

@ -62,7 +62,7 @@
<Table :loading="loading" border :columns="colHidden" :data="data" :size="tableSize" sortable="custom" <Table :loading="loading" border :columns="colHidden" :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,7 +138,7 @@
isOnLine:'', //0线1线 isOnLine:'', //0线1线
getPushOrder:'', //0 1 getPushOrder:'', //0 1
pageNum: 1, pageNum: 1,
pageSize: 10 pageSize: 1000
}, },
selectDate: null, selectDate: null,
options: { options: {
@ -172,26 +172,21 @@
key: "depoBal", key: "depoBal",
minWidth: 125, minWidth: 125,
}, },
{
title: "配送员创建时间",
key: "createTime",
minWidth: 125,
},
{ {
title: "联系方式", title: "联系方式",
key: "mobile", key: "mobile",
minWidth: 125, minWidth: 125,
}, },
{ // {
title: "接单区域", // title: "",
key: "regionTitle", // key: "regionTitle",
minWidth: 125, // minWidth: 125,
}, // },
{ // {
title: "描述", // title: "",
key: "remark", // key: "remark",
minWidth: 125, // minWidth: 125,
}, // },
{ {
title: "接单状态", title: "接单状态",
key: "workerStatus", key: "workerStatus",
@ -412,21 +407,13 @@
methods: { methods: {
init() { init() {
this.getDataList(); this.getDataList();
//
let array = [];
this.exportColumns.forEach((e) => {
//
//e.disabled = false;
array.push(e.title);
});
this.chooseColumns = array;
}, },
handleSelectDep(v) { handleSelectDep(v) {
this.searchForm.departmentId = v; this.searchForm.departmentId = v;
}, },
changePage(v) { changePage(v) {
this.searchForm.pageNumber = v; this.searchForm.pageNum = v;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
@ -457,23 +444,23 @@
getWorkerListData(this.searchForm).then((res) => { getWorkerListData(this.searchForm).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
this.data = res.result.content; this.data = res.result;
this.total = res.result.totalElements; this.total = res.result.totalElements;
if (this.data.length == 0 && this.searchForm.pageNumber > 1) { if (this.data.length == 0 && this.searchForm.pageNum > 1) {
this.searchForm.pageNumber -= 1; this.searchForm.pageNum -= 1;
this.getDataList(); this.getDataList();
} }
} }
}); });
}, },
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 = "";

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

@ -145,7 +145,7 @@
keyword: "", keyword: "",
orderType: 0, orderType: 0,
putAreaId: "", putAreaId: "",
shopAreaId: "", getAreaId: "",
xiangtong: false xiangtong: false
}, },
searchForm: { searchForm: {
@ -286,18 +286,18 @@
align: "center" align: "center"
}, { //getTimeDifference }, { //getTimeDifference
title: "送达时间", title: "送达时间",
key: "createTime", key: "mustFinishTime",
minWidth: 80, minWidth: 80,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
let re = "", let re = "",
color = ""; color = "";
if (this.getTimeDifference(params.row.createTime) > 15 && (params.row.orderStatus == if (this.getTimeDifference(params.row.mustFinishTime) > 15 && (params.row.orderStatus ==
"0" || params.row.orderStatus == "1")) { "0" || params.row.orderStatus == "1")) {
re = params.row.createTime; re = params.row.mustFinishTime;
color = "red"; color = "red";
} else { } else {
re = params.row.createTime; re = params.row.mustFinishTime;
color = "green"; color = "green";
} }
return h("div", [ return h("div", [
@ -307,7 +307,7 @@
color: color, color: color,
}, },
}, },
re this.formatDateTime(re)
), ),
]); ]);
}, },
@ -316,6 +316,28 @@
key: "createTime", key: "createTime",
width: 200, width: 200,
align: "center", align: "center",
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,
},
},
this.formatDateTime(params.row.createTime)
),
]);
},
}, { }, {
title: "操作", title: "操作",
key: "action", key: "action",
@ -379,23 +401,18 @@
console.log('订单', item) console.log('订单', item)
runshOrder({ runshOrder({
orderId: this.orderId, deliveryId: this.orderId,
orderByWorker: item.workerId, newWorkerId: item.workerId,
newWorkerName:item.workerName,
newWorkerPhone:item.mobile,
}).then((res) => { }).then((res) => {
this.loading = false; this.loading = false;
if (res.success) { if (res.success) {
transferOrder({ if (res.success) {
orderId: this.orderId, this.$Message.success("转单成功");
orderByWorker: item.workerId, this.transferOrder = false
workerName: item.workerName this.getLogisticsInfo()
}).then((res) => { }
this.loading = false;
if (res.success) {
this.$Message.success("转单成功");
this.transferOrder = false
this.getLogisticsInfo()
}
});
} }
}); });
@ -502,6 +519,17 @@
this.showType = "0"; this.showType = "0";
this.showOrder = true; this.showOrder = true;
}, },
formatDateTime(isoString) {
if (!isoString) return ''
const date = new Date(isoString)
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
},
add() { add() {
this.showType = "2"; this.showType = "2";
this.showOrder = true; this.showOrder = true;
@ -581,8 +609,9 @@
unbind(v) { unbind(v) {
this.transferOrder = true this.transferOrder = true
this.searchWorker.pageNum = 1; this.searchWorker.pageNum = 1;
this.searchWorker.shopAreaId = v.getAreaId this.searchWorker.getAreaId = v.getAreaId
this.searchWorker.putAreaId = v.putAreaId this.searchWorker.putAreaId = v.putAreaId
this.orderId = v.id
console.log(v) console.log(v)
this.getWorker(v) this.getWorker(v)
}, },

144
src/views/app/business/logistics/logisticsAddress.vue

@ -2,34 +2,37 @@
<div class="search"> <div class="search">
<div class='waiceng' style="margin-top: 20px;"> <div class='waiceng' style="margin-top: 20px;">
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">核对编号0005</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">核对编号{{orderData.numberCode}}</div>
<div style="flex:1;padding-left:10px;">物流编号12604030938</div> <div style="flex:1;padding-left:10px;">物流编号{{orderData.deliveryInfo.id}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">订单编号126040314565364</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">订单编号{{orderData.id}}</div>
<div style="flex:1;padding-left:10px;">物流订单生成时间2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;">物流订单生成时间{{orderData.deliveryInfo.createTime | formatDateTime}}
</div>
</div> </div>
</div> </div>
<div class="title">商家信息</div> <div class="title">商家信息</div>
<div class='waiceng'> <div class='waiceng'>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">名称麽麽蜜呀明珠早市馆西3号门</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">名称{{orderData.shopName}}</div>
<div style="flex:1;padding-left:10px;">联系方式13231710122</div> <div style="flex:1;padding-left:10px;">联系方式{{orderData.shopPhone}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">地址河北省沧州市运河区明珠商贸城早市馆西3号门底商A2-1031</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">地址{{orderData.shopAddress}}</div>
<div style="flex:1;padding-left:10px;">发货时间15:13</div> <div style="flex:1;padding-left:10px;">发货时间{{orderData.shopMakeTime | formatDateTime}}</div>
</div> </div>
</div> </div>
<div class="title">用户信息</div> <div class="title">用户信息</div>
<div class='waiceng'> <div class='waiceng'>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;"></div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">{{orderData.receiverName}}</div>
<div style="flex:1;padding-left:10px;">联系方式15145128710</div> <div style="flex:1;padding-left:10px;">联系方式{{orderData.receiverPhone}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">地址明珠国际商贸城早市馆5楼北天井3道进来思羽家</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">地址{{orderData.receiverAddress}}
<div style="flex:1;padding-left:10px;">要求送达时间15:21</div> </div>
<div style="flex:1;padding-left:10px;">要求送达时间{{orderData.deliveryInfo.mustFinishTime | formatDateTime}}
</div>
</div> </div>
</div> </div>
<div class="title">商品信息</div> <div class="title">商品信息</div>
@ -40,41 +43,36 @@
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">数量</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">数量</div>
<div style="flex:1;padding-left:10px;">总价</div> <div style="flex:1;padding-left:10px;">总价</div>
</div> </div>
<div class="nei1"> <div class="nei1" v-for="(item,index) in orderData.goodsList" :key="index">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">百香多芒</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">{{item.productName}}</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">少冰+正常糖</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">{{item.specs}}</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">1</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">{{item.quantity}}</div>
<div style="flex:1;padding-left:10px;">¥7.00</div> <div style="flex:1;padding-left:10px;">¥{{item.price}}</div>
</div>
<div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">超级百香果</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">少冰+正常糖</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">1</div>
<div style="flex:1;padding-left:10px;">¥14.00</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">餐盒费</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">餐盒费</div>
<div style="width:25%;padding-left:10px;">¥0.00</div> <div style="width:25%;padding-left:10px;">¥{{orderData.packageFee}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送费</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送费</div>
<div style="width:25%;padding-left:10px;">¥1.50</div> <div style="width:25%;padding-left:10px;">¥{{orderData.deliveryFee}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">总计</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">总计</div>
<div style="width:25%;padding-left:10px;">¥1.50</div> <div style="width:25%;padding-left:10px;">¥{{orderData.totalAmount}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">抵用券金额</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">抵用券金额</div>
<div style="width:25%;padding-left:10px;">¥1.50</div> <div style="width:25%;padding-left:10px;">
¥{{orderData.couponDiscountFee== null?0.00:orderData.couponDiscountFee}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">活动优惠金额</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">活动优惠金额</div>
<div style="width:25%;padding-left:10px;">¥1.50</div> <div style="width:25%;padding-left:10px;">¥0.00</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">实付金额</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">实付金额</div>
<div style="width:25%;padding-left:10px;">¥1.50</div> <div style="width:25%;padding-left:10px;">¥{{orderData.totalAmount}}</div>
</div> </div>
</div> </div>
<div class="title">配送流程</div> <div class="title">配送流程</div>
@ -86,76 +84,120 @@
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">用户下单</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">用户下单</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
{{orderData.createTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;"></div> <div style="flex:1;padding-left:10px;"></div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">商家接单</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">商家出餐</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
<div style="flex:1;padding-left:10px;">麽麽蜜呀</div> {{orderData.shopMakeTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;">{{orderData.shopName}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员接单</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员接单</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
<div style="flex:1;padding-left:10px;">张宝芹</div> {{orderData.deliveryInfo.acceptTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;">{{orderData.deliveryInfo.workerName}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">已到店</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">已到店</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
<div style="flex:1;padding-left:10px;">张宝芹</div> {{orderData.deliveryInfo.arriveTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;">{{orderData.deliveryInfo.workerName}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员已取货</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员已取货</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
<div style="flex:1;padding-left:10px;">张宝芹</div> {{orderData.deliveryInfo.getTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;">{{orderData.deliveryInfo.workerName}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员已送达</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">配送员已送达</div>
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">2026-04-03 14:56:09</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">
<div style="flex:1;padding-left:10px;">张宝芹</div> {{orderData.deliveryInfo.finishTime | formatDateTime}}</div>
<div style="flex:1;padding-left:10px;">{{orderData.deliveryInfo.workerName}}</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">送单时长</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">送单时长</div>
<div style="width: 33%;padding-left:10px;">23分钟</div> <div style="width: 33%;padding-left:10px;">{{getMinutesDiff(orderData.deliveryInfo.acceptTime !=null?orderData.deliveryInfo.acceptTime:1,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">订单总计时</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">订单总计时</div>
<div style="width: 33%;padding-left:10px;">0时23分</div> <div style="width: 33%;padding-left:10px;">{{getMinutesDiff(orderData.createTime,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟</div>
</div> </div>
<div class="nei1"> <div class="nei1">
<div style="flex:1;padding-left:10px;border-right:1px solid #eee;">超时</div> <div style="flex:1;padding-left:10px;border-right:1px solid #eee;">超时</div>
<div style="width: 33%;padding-left:10px;">--</div> <div style="width: 33%;padding-left:10px;">{{getMinutesDiff(orderData.deliveryInfo.mustFinishTime,orderData.deliveryInfo.finishTime != null?orderData.deliveryInfo.finishTime:1)}}分钟</div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {
getOrderDetail,
} from "@/api/index";
export default { export default {
name: "logisticsAddress", name: "logisticsAddress",
data() { data() {
return { return {
orderData:{} orderData: {},
}; };
}, },
filters: {
formatDateTime(isoString) {
if (!isoString) return ''
const date = new Date(isoString)
const year = date.getFullYear()
const month = String(date.getMonth() + 1).padStart(2, '0')
const day = String(date.getDate()).padStart(2, '0')
const hours = String(date.getHours()).padStart(2, '0')
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
},
methods: { methods: {
initRecharge(data) { initRecharge(data) {
//data this.orderDetail(data.orderId)
console.log(data); },
this.orderData = data getMinutesDiff(time1, time2) {
console.log('time1',time1)
console.log('time2',time2)
// Date 1
const date1 = time1 === 1 ? new Date() : new Date(time1);
const date2 = time2 === 1 ? new Date() : new Date(time2);
//
const diffMs = Math.abs(date2 - date1);
const diffMinutes = Math.ceil(diffMs / (1000 * 60));
return diffMinutes;
},
orderDetail(id) {
getOrderDetail(id).then((res) => {
this.loading = false;
if (res.success) {
this.orderData = res.result
}
});
} }
} }
}; };
</script> </script>
<style lang="less"> <style lang="less">
//@import "@/styles/table-common.less"; //@import "@/styles/table-common.less";
.nei1{ .nei1 {
display: flex; display: flex;
border:1px solid #eee; border: 1px solid #eee;
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.title{
.title {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
font-size: 14px; font-size: 14px;

187
src/views/sys/order-manage/logisticsAddress.vue

@ -11,7 +11,7 @@
<div>收货人<span class="blue-color">{{orderData.receiverName}}</span></div> <div>收货人<span class="blue-color">{{orderData.receiverName}}</span></div>
<div>收货电话<span class="blue-color">{{orderData.receiverPhone}}</span></div> <div>收货电话<span class="blue-color">{{orderData.receiverPhone}}</span></div>
<div>收货地址<span class="blue-color">{{orderData.receiverAddress}}</span></div> <div>收货地址<span class="blue-color">{{orderData.receiverAddress}}</span></div>
<div>要求送达时间<span class="blue-color">2026/04/07 09:31:00</span></div> <div>要求送达时间<span class="blue-color">{{orderData.deliveryInfo.mustFinishTime | formatDateTime}}</span></div>
</div> </div>
<div class="waiceng"> <div class="waiceng">
<div class="title">店铺信息</div> <div class="title">店铺信息</div>
@ -21,13 +21,41 @@
</div> </div>
<div class="waiceng"> <div class="waiceng">
<div class="title">其他信息</div> <div class="title">其他信息</div>
<div>配送员<span class="blue-color">张宝芹</span></div> <div>配送员<span class="blue-color">{{orderData.deliveryInfo.workerName}}</span></div>
<div>配送员电话<span class="blue-color">15832720108</span></div> <div>配送员电话<span class="blue-color">{{orderData.deliveryInfo.workerPhone}}</span></div>
<div>备注<span class="blue-color">{{orderData.remark}}</span></div> <div>备注<span class="blue-color">{{orderData.deliveryInfo.remark}}</span></div>
</div> </div>
</div> </div>
<div style="display: flex;"> <div style="display: flex;">
<div class="waiceng" style="width: 70%;"> <div class="waiceng" style="width: 70%;">
<div class="title" style="color:red">申请退款信息-用户全部退款</div>
<div class="box" v-for="(item,index) in orderData.goodsList" :key="index">
<div style="flex:1;">{{item.productName}}</div>
<div class="price"> X{{item.quantity}}</div>
<div class="price">¥{{item.price}}</div>
</div>
<div class="box">
<div style="flex:1;">餐盒费</div>
<div class="price">¥{{orderData.packageFee}}</div>
</div>
<div class="box">
<div style="flex:1;">配送费</div>
<div class="price">¥{{orderData.deliveryFee}}</div>
</div>
<div class="zong">
合计退款<span style="color:red;">¥{{orderData.totalAmount}}</span></div>
</div>
<div style="background: #fff;padding: 10px;border-radius: 10px;width: 30%;margin: 10;">
<div class="title">售后原因说明</div>
<textarea name="" id="" cols="30" rows="10" style="width: 100%;border: 1px solid #eee;"></textarea>
<div style="display: flex;">
<div class='btn' @click="returnAmountAllow(orderData,1)">同意退款</div>
<div class='btn' @click="returnAmountAllow(orderData,0)">拒绝退款</div>
</div>
</div>
</div>
<div style="display: flex;">
<div class="waiceng" style="width: 69%;">
<div class="title">商品信息</div> <div class="title">商品信息</div>
<div class="box" v-for="(item,index) in orderData.goodsList" :key="index"> <div class="box" v-for="(item,index) in orderData.goodsList" :key="index">
<div style="flex:1;">{{item.productName}}</div> <div style="flex:1;">{{item.productName}}</div>
@ -44,21 +72,23 @@
</div> </div>
<div class="zong">活动优惠<span style="color:red;">¥0</span> 下单返佣<span style="color:red;">¥0</span> <div class="zong">活动优惠<span style="color:red;">¥0</span> 下单返佣<span style="color:red;">¥0</span>
合计<span style="color:#11cd6e;">¥{{orderData.totalAmount}}</span></div> 合计<span style="color:#11cd6e;">¥{{orderData.totalAmount}}</span></div>
<div class="zong">流水金额<span class="blue-color">¥24</span> </div> <div v-if="orderData.chouyong" class="zong">平台服务费:<span class="blue-color">¥{{(orderData.chouyong).toFixed(2)}}</span> </div>
<div class="zong">商家预计收入<span class="blue-color">¥20.16</span> </div> <div v-if="orderData.yujishouru" class="zong">商家预计收入:<span class="blue-color">¥{{(orderData.yujishouru).toFixed(2)}}</span> </div>
</div> </div>
<div class="waiceng" style="width: 30%;background: #eee;padding: 0;"> <div class="waiceng" style="width: 29%;background: #eee;padding: 0;">
<div style="background: #fff;padding: 10px;margin-bottom: 10px;border-radius: 10px;"> <div style="background: #fff;padding: 10px;margin-bottom: 10px;border-radius: 10px;">
<div class="title">物流信息</div> <div class="title">物流信息</div>
<div class="text">用户提交订单时间{{orderData.createTime | formatDateTime }}</div> <div class="text">用户下单{{orderData.createTime | formatDateTime}}</div>
<div class="text">用户完成支付时间2026/04/07 09:06:41</div> <div class="text">商家出餐{{orderData.shopMakeTime | formatDateTime}}</div>
<div class="text">商家接单时间2026/04/07 09:06:41</div> <div class="text">配送员接单{{orderData.deliveryInfo.acceptTime | formatDateTime}}</div>
<div class="text">配送员已接单2026/04/07 09:06:44</div> <div class="text">已到店{{orderData.deliveryInfo.arriveTime | formatDateTime}}</div>
<div class="text">配送员已取货{{orderData.deliveryInfo.getTime | formatDateTime}}</div>
<div class="text">配送员已送达{{orderData.deliveryInfo.finishTime | formatDateTime}}</div>
</div> </div>
<div style="background: #fff;padding: 10px;border-radius: 10px;"> <div v-if="orderData.status !=7 && orderData.status != 11" style="background: #fff;padding: 10px;border-radius: 10px;">
<div class="title">运营订单备注</div> <div class="title">运营订单备注</div>
<textarea name="" id="" cols="30" rows="10" style="width: 100%;border: 1px solid #eee;"></textarea> <textarea name="" id="" cols="30" rows="10" style="width: 100%;border: 1px solid #eee;"></textarea>
<div class='btn' @tap="returnOrder">退款</div> <div class='btn' @click="returnOrder">退款</div>
</div> </div>
</div> </div>
</div> </div>
@ -68,12 +98,18 @@
<script> <script>
import { import {
returnOrder, returnOrder,
getOrderDetail,
returnOrNoOrder
} from "@/api/index"; } from "@/api/index";
import {
getByShopId
} from "@/api/app";
export default { export default {
name: "logisticsAddress", name: "logisticsAddress",
data() { data() {
return { return {
orderData: {} orderData: {},
returnFormData:{}
}; };
}, },
filters: { filters: {
@ -92,7 +128,128 @@
methods: { methods: {
initRecharge(data) { initRecharge(data) {
console.log('111112222', data); console.log('111112222', data);
this.orderData = data if(data.status == 7 || data.status == 11){
this.orderData = data
this.orderData.goodsList = this.orderData.items
this.orderData.deliveryInfo = this.orderData.mallDeliveryOrder
this.orderData.deliveryType = this.orderData.deliveryInfo.deliveryType
this.orderData.deliveryFee = this.orderData.deliveryInfo.deliveryFee
this.orderData.packageFee = data.mallOrder.packageFee
this.orderData.numberCode = this.orderData.mallDeliveryOrder.numberCode
console.log('88888', this.orderData);
}else{
getByShopId({
"shopId": data.shopId
}).then((res) => {
if (res.success) {
this.orderDetail(data.id,res.result)
}
});
}
},
orderDetail(id,shopTakeaway) {
getOrderDetail(id).then((res) => {
this.loading = false;
if (res.success) {
this.orderData = res.result
//
let price = this.orderData.goodsAmount+this.orderData.packageFee
if(this.orderData.orderType == 1){
this.orderData.chouyong = price/100 * shopTakeaway.commissionRateOne
this.orderData.yujishouru = price - this.orderData.chouyong
}else{
this.orderData.chouyong = price/100 * shopTakeaway.commissionRateMore
this.orderData.yujishouru = price - this.orderData.chouyong
}
}
});
},
returnAmountAllow(item,status){
let titleText = status == 1 ? '确定同意该申请吗?' : '确定拒绝该申请吗?';
//退
if(item.groupOrderIds != null && item.groupOrderIds != ''){
titleText += '该订单为面对面配送单,所有参团订单将同步处理';
for(let i = 0; i < this.returnData.length;i++){
if(item.groupOrderIds.indexOf(this.returnData[i].mallOrder.id) != -1){
//
this.groupOrderIdList.push(this.returnData[i]);
}
}
}else{
this.groupOrderIdList = []
}
this.$Modal.confirm({
title: "提示",
content: titleText,
loading: true,
onOk: () => {
this.$Modal.remove();
if(this.groupOrderIdList != [] && this.groupOrderIdList.length > 0){
for(let i = 0; i < this.groupOrderIdList.length;i++){
this.processReturn(this.groupOrderIdList[i], status);
}
}else{
this.processReturn(item, status);
}
},
});
},
processReturn(item,status){
console.log('ggggg',item)
console.log('hhhhh',status)
let url = ''
//退
if(item.status == 7){
//
if(status == 0){
this.returnFormData.status = 2
}else{
this.returnFormData.status = 1
}
}else if(item.status == 11){
//
if(status == 0){
this.returnFormData.status = 5
}else{
this.returnFormData.status = 4
}
}
console.log('12121212',item)
this.returnFormData.id = item.id;
this.returnFormData.linkId = item.linkId;
this.returnFormData.orderId = item.orderId;
this.returnFormData.deliveryType = item.mallOrder.deliveryType;
this.returnFormData.orderType = item.mallOrder.orderType;
this.returnFormData.refundAmount = item.refundAmount;
this.returnFormData.refundType = item.refundType;
this.returnFormData.refundTypeStatus = item.refundTypeStatus;
let that = this
returnOrNoOrder(this.returnFormData).then((res) => {
this.loading = false;
if (res.success) {
this.$Message.success("售后成功");
this.$emit('closePage')
}
});
},
getMinutesDiff(time1, time2) {
console.log('time1',time1)
console.log('time2',time2)
// Date 1
const date1 = time1 === 1 ? new Date() : new Date(time1);
const date2 = time2 === 1 ? new Date() : new Date(time2);
//
const diffMs = Math.abs(date2 - date1);
const diffMinutes = Math.ceil(diffMs / (1000 * 60));
return diffMinutes;
}, },
returnOrder(){ returnOrder(){
returnOrder({ returnOrder({

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

@ -19,10 +19,9 @@
<TabPane label="待取货" name="4"></TabPane> <TabPane label="待取货" name="4"></TabPane>
<TabPane label="待送达" name="5"></TabPane> <TabPane label="待送达" name="5"></TabPane>
<TabPane label="已完成" name="6"></TabPane> <TabPane label="已完成" name="6"></TabPane>
<TabPane label="待退款" name="7"></TabPane> <TabPane label="待退款/售后" name="11"></TabPane>
<TabPane label="已退款" name="8"></TabPane> <TabPane label="已退款" name="8"></TabPane>
<TabPane label="已取消" name="9"></TabPane> <TabPane label="已取消" name="9"></TabPane>
<TabPane label="售后中" name="11"></TabPane>
<TabPane label="已售后" name="12"></TabPane> <TabPane label="已售后" name="12"></TabPane>
</Tabs> </Tabs>
<Row v-show="openSearch" @keydown.enter.native="handleSearch"> <Row v-show="openSearch" @keydown.enter.native="handleSearch">
@ -80,7 +79,7 @@
</Card> </Card>
<!-- 订单详情 --> <!-- 订单详情 -->
<Modal :title="订单详情" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000"> <Modal :title="订单详情" v-model="Visiable" :mask-closable="false" :scrollabele="true" :width="1000">
<logistics-address v-if="Visiable" ref="dialog"></logistics-address> <logistics-address v-if="Visiable" @closePage="closePage" ref="dialog"></logistics-address>
<div slot="footer" v-show="Visiable"> <div slot="footer" v-show="Visiable">
<Button type="text" @click="Visiable = false">关闭</Button> <Button type="text" @click="Visiable = false">关闭</Button>
</div> </div>
@ -92,7 +91,8 @@
<script> <script>
import { import {
getOrderList getOrderList,
getReturnOrderList
} from "@/api/index"; } from "@/api/index";
import addEdit from "./addEdit.vue"; import addEdit from "./addEdit.vue";
import logisticsAddress from "@/views/sys/order-manage/logisticsAddress"; import logisticsAddress from "@/views/sys/order-manage/logisticsAddress";
@ -115,12 +115,18 @@
dropDownContent: "展开", dropDownContent: "展开",
dropDownIcon: "ios-arrow-down", dropDownIcon: "ios-arrow-down",
selectList: [], selectList: [],
returnForm:{
regionId: JSON.parse(this.getStore("user")).departmentId,
pageNum: 1,
pageSize: 10,
statusList: [0, 3],
},
searchForm: { searchForm: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
regionId: JSON.parse(this.getStore("user")).departmentId, regionId: JSON.parse(this.getStore("user")).departmentId,
searchType: 0, searchType: 0,
searchStatus:0, searchStatus:10,
shopName: "", shopName: "",
mobile:'', mobile:'',
userId: "" userId: ""
@ -150,24 +156,12 @@
width: 200, width: 200,
align: "center", align: "center",
}, },
{
title: "交易金额",
key: "companyName",
width: 100,
align: "center",
},
{ {
title: "订单总金额", title: "订单总金额",
key: "totalAmount", key: "totalAmount",
width: 130, width: 130,
align: "center", align: "center",
}, },
{
title: "商家优惠券金额",
key: "receiverName",
width: 150,
align: "center",
},
{ {
title: "平台优惠券金额", title: "平台优惠券金额",
key: "weight", key: "weight",
@ -195,28 +189,26 @@
let re = "" let re = ""
if (params.row.status == 0) { if (params.row.status == 0) {
re = "待支付"; re = "待支付";
} else if (params.row.status == 1) {
re = "待成团";
} else if (params.row.status == 2) { } else if (params.row.status == 2) {
re = "等待配送员接单";
} else if (params.row.status == 3 && params.row.deliveryType == 1) {
re = "配送员已接单";
} else if (params.row.status == 3 && params.row.deliveryType == 2) {
re = "待消费"; re = "待消费";
} else if (params.row.status == 3) { } else if (params.row.status == 4 && params.row.deliveryType == 1) {
re = "待接单"; re = "配送员已取货";
} else if (params.row.status == 4) {
re = "待取货";
} else if (params.row.status == 5) { } else if (params.row.status == 5) {
re = "待送达"; re = "订单已完成";
} else if (params.row.status == 6) { } else if (params.row.status == 6) {
re = "已完成"; re = "订单已取消";
} else if (params.row.status == 7) { } else if (params.row.status == 7) {
re = "待退款"; re = "同意退款";
} else if (params.row.status == 8) { } else if (params.row.status == 8) {
re = "已退款"; re = "订单已退款";
} else if (params.row.status == 9) {
re = "已取消";
} else if (params.row.status == 11) { } else if (params.row.status == 11) {
re = "售后中"; re = "售后中";
} else if (params.row.status == 12) { } else if (params.row.status == 12) {
re = "已售后"; re = "订单已售后";
} }
return h( return h(
"div", "div",
@ -264,6 +256,10 @@
init() { init() {
this.getLogisticsInfo() this.getLogisticsInfo()
}, },
closePage(){
this.Visiable = false;
this.getLogisticsInfo()
},
formatDateTime(isoString) { formatDateTime(isoString) {
if (!isoString) return '' if (!isoString) return ''
const date = new Date(isoString) const date = new Date(isoString)
@ -288,7 +284,11 @@
changeTab(v) { changeTab(v) {
this.searchForm.pageNum = 1; this.searchForm.pageNum = 1;
this.searchForm.searchStatus = v; this.searchForm.searchStatus = v;
this.getLogisticsInfo(); if(v == 11){
this.getReturnOrder()
}else{
this.getLogisticsInfo();
}
}, },
//1 //1
changeOrderTab(v){ changeOrderTab(v){
@ -314,6 +314,28 @@
this.tableSize = v; this.tableSize = v;
}, },
// //
getReturnOrder() {
this.loading = true;
getReturnOrderList(this.returnForm).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records
for(let i=0;i<this.data.length;i++){
if(this.data[i].status == 0){
this.data[i].status = 7
}else if(this.data[i].status == 3){
this.data[i].status = 11
}
this.data[i].receiverPhone = this.data[i].mallOrder.receiverPhone
this.data[i].shopName = this.data[i].mallOrder.shopName
this.data[i].totalAmount = this.data[i].mallOrder.totalAmount
}
this.total = res.result.total;
}
});
},
//
getLogisticsInfo() { getLogisticsInfo() {
getOrderList(this.searchForm).then((res) => { getOrderList(this.searchForm).then((res) => {
this.loading = false; this.loading = false;

Loading…
Cancel
Save