|
@@ -44,9 +44,9 @@
|
|
|
>修改费用信息</el-button
|
|
|
>
|
|
|
<!-- <el-button size="mini" @click="showMessageDialog">发送站内信</el-button> -->
|
|
|
- <el-button size="mini" @click="showCloseOrderDialog"
|
|
|
+ <!-- <el-button size="mini" @click="showCloseOrderDialog"
|
|
|
>关闭订单</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<el-button size="mini" @click="showMarkOrderDialog"
|
|
|
>备注订单</el-button
|
|
|
>
|
|
@@ -56,7 +56,7 @@
|
|
|
>修改收货人信息</el-button
|
|
|
>
|
|
|
<!-- <el-button size="mini" @click="showMessageDialog">发送站内信</el-button> -->
|
|
|
- <el-button size="mini">取消订单</el-button>
|
|
|
+ <!-- <el-button size="mini">取消订单</el-button> -->
|
|
|
<el-button size="mini" @click="showMarkOrderDialog"
|
|
|
>备注订单</el-button
|
|
|
>
|
|
@@ -161,9 +161,16 @@
|
|
|
<el-col :span="6" class="table-cell">{{
|
|
|
order.receiverPostCode
|
|
|
}}</el-col>
|
|
|
- <el-col :span="6" class="table-cell">{{
|
|
|
- order | formatAddress
|
|
|
- }}</el-col>
|
|
|
+ <el-col :span="6" class="table-cell">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ :content="order | formatAddress"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
+ <p class="address">{{ order | formatAddress }}</p>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div style="margin-top: 20px">
|
|
@@ -305,6 +312,23 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div style="margin-top: 20px" class="flexbox">
|
|
|
+ <div>
|
|
|
+ <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
|
|
|
+ <span class="font-small">物流信息</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-button size="mini" @click="refreshCourierList">刷新物流</el-button>
|
|
|
+ </div>
|
|
|
+ <el-timeline :reverse="reverse">
|
|
|
+ <el-timeline-item
|
|
|
+ v-for="(activity, index) in activities"
|
|
|
+ :key="index"
|
|
|
+ :timestamp="activity.timestamp"
|
|
|
+ >
|
|
|
+ {{ activity.content }}
|
|
|
+ </el-timeline-item>
|
|
|
+ </el-timeline>
|
|
|
</el-card>
|
|
|
<el-dialog
|
|
|
title="修改收货人信息"
|
|
@@ -483,10 +507,13 @@ import {
|
|
|
closeOrder,
|
|
|
updateOrderNote,
|
|
|
deleteOrder,
|
|
|
+ getSelectCourier,
|
|
|
+ refreshCourier
|
|
|
} from "@/api/order";
|
|
|
import LogisticsDialog from "@/views/oms/order/components/logisticsDialog";
|
|
|
import { formatDate } from "@/utils/date";
|
|
|
import VDistpicker from "v-distpicker";
|
|
|
+import dayjs from "dayjs";
|
|
|
const defaultReceiverInfo = {
|
|
|
orderId: null,
|
|
|
receiverName: null,
|
|
@@ -517,16 +544,30 @@ export default {
|
|
|
messageDialogVisible: false,
|
|
|
message: { title: null, content: null },
|
|
|
closeDialogVisible: false,
|
|
|
- closeInfo: { note: '', id: '' },
|
|
|
+ closeInfo: { note: "", id: "" },
|
|
|
markOrderDialogVisible: false,
|
|
|
markInfo: { note: null },
|
|
|
logisticsDialogVisible: false,
|
|
|
+ reverse: false,
|
|
|
+ activities: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.id = this.list = this.$route.query.id;
|
|
|
getOrderDetail(this.id).then((response) => {
|
|
|
this.order = response.data;
|
|
|
+ if (this.order.deliverySn) {
|
|
|
+ getSelectCourier({ deliverySn: this.order.deliverySn }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.activities = JSON.parse(res.data.logistics).map((item) => {
|
|
|
+ return {
|
|
|
+ content: item.context,
|
|
|
+ timestamp: dayjs(item.time).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
filters: {
|
|
@@ -551,7 +592,9 @@ export default {
|
|
|
return "支付宝";
|
|
|
} else if (value === 2) {
|
|
|
return "微信";
|
|
|
- } else {
|
|
|
+ } else if(value ===3){
|
|
|
+ return "0元支付";
|
|
|
+ }else {
|
|
|
return "未支付";
|
|
|
}
|
|
|
},
|
|
@@ -730,7 +773,7 @@ export default {
|
|
|
},
|
|
|
showCloseOrderDialog() {
|
|
|
this.closeDialogVisible = true;
|
|
|
- this.closeInfo.note = '';
|
|
|
+ this.closeInfo.note = "";
|
|
|
this.closeInfo.id = this.id;
|
|
|
},
|
|
|
handleCloseOrder() {
|
|
@@ -761,7 +804,7 @@ export default {
|
|
|
showMarkOrderDialog() {
|
|
|
this.markOrderDialogVisible = true;
|
|
|
this.markInfo.id = this.id;
|
|
|
- this.markInfo.note = '';
|
|
|
+ this.markInfo.note = "";
|
|
|
},
|
|
|
handleMarkOrder() {
|
|
|
this.$confirm("是否要备注订单?", "提示", {
|
|
@@ -773,7 +816,11 @@ export default {
|
|
|
// params.append("id", this.markInfo.id);
|
|
|
// params.append("note", this.markInfo.note);
|
|
|
// params.append("status", this.order.status);
|
|
|
- let obj = {id:this.markInfo.id,note:this.markInfo.note,status:this.order.status}
|
|
|
+ let obj = {
|
|
|
+ id: this.markInfo.id,
|
|
|
+ note: this.markInfo.note,
|
|
|
+ status: this.order.status,
|
|
|
+ };
|
|
|
updateOrderNote(obj).then((response) => {
|
|
|
this.markOrderDialogVisible = false;
|
|
|
this.$message({
|
|
@@ -794,7 +841,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
// let params = new URLSearchParams();
|
|
|
// params.append("ids", [this.id]);
|
|
|
- let obj = {ids:this.id}
|
|
|
+ let obj = { ids: this.id };
|
|
|
deleteOrder(obj).then((response) => {
|
|
|
this.$message({
|
|
|
message: "删除成功!",
|
|
@@ -808,6 +855,20 @@ export default {
|
|
|
showLogisticsDialog() {
|
|
|
this.logisticsDialogVisible = true;
|
|
|
},
|
|
|
+ refreshCourierList(){
|
|
|
+ if (this.order.deliverySn) {
|
|
|
+ refreshCourier({ deliverySn: this.order.deliverySn }).then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.activities = JSON.parse(res.data.logistics).map((item) => {
|
|
|
+ return {
|
|
|
+ content: item.context,
|
|
|
+ timestamp: dayjs(item.time).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -857,6 +918,22 @@ export default {
|
|
|
font-size: 14px;
|
|
|
color: #303133;
|
|
|
}
|
|
|
+.address {
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ white-space: nowrap;
|
|
|
+ margin: 0;
|
|
|
+}
|
|
|
+.el-timeline {
|
|
|
+ padding-left: 0 !important;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+.flexbox {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
|