|
|
@@ -59,6 +59,27 @@
|
|
|
<el-table-column label="实付金额" align="center" prop="payPrice" />
|
|
|
<el-table-column label="状态" align="center" prop="statusDesc" />
|
|
|
<el-table-column label="提交时间" align="center" prop="externalCreateTime" width="180"/>
|
|
|
+ <el-table-column label="物流单号" align="center" prop="deliverySn" width="150" show-overflow-tooltip />
|
|
|
+ <el-table-column label="物流状态" align="center" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template v-if="scope.row.deliveryStatus != null">
|
|
|
+ <template v-for="item in deliveryStatusOptions">
|
|
|
+ <span v-if="scope.row.deliveryStatus == item.dictValue" :key="item.dictValue">{{ item.dictLabel }}</span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="物流跟踪状态" align="center" width="120">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template v-if="scope.row.deliveryType != null">
|
|
|
+ <template v-for="item in deliveryTypeOptions">
|
|
|
+ <span v-if="scope.row.deliveryType == item.dictValue" :key="item.dictValue">{{ item.dictLabel }}</span>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <span v-else>-</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
|
@@ -83,6 +104,13 @@
|
|
|
v-hasPermi="['his:externalOrder:cancel']"
|
|
|
>取消
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ v-hasPermi="['his:externalOrder:express']"
|
|
|
+ @click="handleExpress(scope.row)"
|
|
|
+ v-if="scope.row.deliverySn"
|
|
|
+ >查看物流</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -145,11 +173,28 @@
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
+
|
|
|
+ <el-dialog :title="expressDialog.title" :visible.sync="expressDialog.open" width="700px" append-to-body>
|
|
|
+ <div style="margin-bottom: 10px;">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ v-hasPermi="['his:externalOrder:syncExpress']"
|
|
|
+ @click="handleSyncExpress(expressDialog.row)"
|
|
|
+ v-if="expressDialog.row && expressDialog.row.deliverySn"
|
|
|
+ >同步快递鸟物流状态</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table style="width: 100%" :data="traces" border>
|
|
|
+ <el-table-column label="操作时间" width="160" align="center" prop="AcceptTime" />
|
|
|
+ <el-table-column label="位置" align="center" prop="Location" />
|
|
|
+ <el-table-column label="描述" align="center" prop="AcceptStation" />
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listExternalOrder, getExternalOrder, auditExternalOrder, cancelExternalOrder } from "@/api/his/externalOrder";
|
|
|
+import { listExternalOrder, getExternalOrder, auditExternalOrder, cancelExternalOrder, getExternalOrderExpress, syncExternalOrderExpress } from "@/api/his/externalOrder";
|
|
|
|
|
|
export default {
|
|
|
name: "ExternalOrder",
|
|
|
@@ -165,6 +210,14 @@ export default {
|
|
|
title: "订单详情"
|
|
|
},
|
|
|
detail: null,
|
|
|
+ expressDialog: {
|
|
|
+ title: "物流信息",
|
|
|
+ open: false,
|
|
|
+ row: null
|
|
|
+ },
|
|
|
+ traces: [],
|
|
|
+ deliveryStatusOptions: [],
|
|
|
+ deliveryTypeOptions: [],
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
@@ -183,6 +236,12 @@ export default {
|
|
|
{ dictValue: 4, dictLabel: "已完成" },
|
|
|
{ dictValue: -3, dictLabel: "已取消" }
|
|
|
];
|
|
|
+ this.getDicts("sys_store_order_delivery_status").then(response => {
|
|
|
+ this.deliveryStatusOptions = response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("sys_delivery_type").then(response => {
|
|
|
+ this.deliveryTypeOptions = response.data;
|
|
|
+ });
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -239,6 +298,34 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}).catch(() => {});
|
|
|
+ },
|
|
|
+ handleExpress(row) {
|
|
|
+ this.expressDialog.row = row;
|
|
|
+ this.expressDialog.open = true;
|
|
|
+ this.traces = [];
|
|
|
+ getExternalOrderExpress(row.orderId).then(response => {
|
|
|
+ const express = response.data;
|
|
|
+ if (express != null && express.Traces != null) {
|
|
|
+ this.traces = express.Traces;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleSyncExpress(row) {
|
|
|
+ if (!row || !row.orderId) {
|
|
|
+ this.msgError("请选择订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定同步物流状态吗?", "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ return syncExternalOrderExpress(row.orderId);
|
|
|
+ }).then(() => {
|
|
|
+ this.msgSuccess("操作成功");
|
|
|
+ this.expressDialog.open = false;
|
|
|
+ this.getList();
|
|
|
+ }).catch(function() {});
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -248,4 +335,4 @@ export default {
|
|
|
.drawer-content {
|
|
|
padding: 20px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|