|
@@ -12,7 +12,6 @@
|
|
|
@search-reset="searchReset"
|
|
|
@size-change="sizeChange"
|
|
|
@current-change="currentChange"
|
|
|
- @row-click="rowClick"
|
|
|
>
|
|
|
<template slot="menuLeft">
|
|
|
<el-button
|
|
@@ -24,14 +23,14 @@
|
|
|
刷新
|
|
|
</el-button>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<!-- 发货状态列插槽 -->
|
|
|
<template slot="shipmentStatus" slot-scope="{row}">
|
|
|
<el-tag :type="getStatusType(row.shipmentStatus)">
|
|
|
{{ getStatusText(row.shipmentStatus) }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<!-- 操作列插槽 -->
|
|
|
<template slot="menu" slot-scope="{row}">
|
|
|
<el-button
|
|
@@ -51,7 +50,7 @@
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
-
|
|
|
+
|
|
|
<!-- 发货明细对话框 -->
|
|
|
<el-dialog
|
|
|
title="发货明细"
|
|
@@ -74,7 +73,7 @@
|
|
|
>
|
|
|
</avue-crud>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+
|
|
|
<!-- 物流跟踪对话框 -->
|
|
|
<el-dialog
|
|
|
title="物流跟踪信息"
|
|
@@ -101,7 +100,7 @@
|
|
|
{{ row.trackingStatus }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
-
|
|
|
+
|
|
|
<!-- 异常状态列插槽 -->
|
|
|
<template slot="isException" slot-scope="{row}">
|
|
|
<el-tag :type="row.isException ? 'danger' : 'success'">
|
|
@@ -130,7 +129,7 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
data: [],
|
|
|
-
|
|
|
+
|
|
|
// 明细相关
|
|
|
detailDialogVisible: false,
|
|
|
detailLoading: false,
|
|
@@ -141,7 +140,7 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
currentShipment: null,
|
|
|
-
|
|
|
+
|
|
|
// 跟踪相关
|
|
|
trackingDialogVisible: false,
|
|
|
trackingLoading: false,
|
|
@@ -151,7 +150,7 @@ export default {
|
|
|
currentPage: 1,
|
|
|
total: 0
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 主表配置
|
|
|
option: {
|
|
|
height: 'auto',
|
|
@@ -249,7 +248,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 明细表配置
|
|
|
detailOption: {
|
|
|
height: 400,
|
|
@@ -291,7 +290,7 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 跟踪表配置
|
|
|
trackingOption: {
|
|
|
height: 400,
|
|
@@ -344,15 +343,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
computed: {
|
|
|
...mapGetters(['permission'])
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
created() {
|
|
|
this.onLoad()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
methods: {
|
|
|
// 获取发货状态类型
|
|
|
getStatusType(status) {
|
|
@@ -365,7 +364,7 @@ export default {
|
|
|
}
|
|
|
return statusMap[status] || 'info'
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 获取发货状态文本
|
|
|
getStatusText(status) {
|
|
|
const statusMap = {
|
|
@@ -377,7 +376,7 @@ export default {
|
|
|
}
|
|
|
return statusMap[status] || '未知'
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 获取跟踪状态类型
|
|
|
getTrackingStatusType(status) {
|
|
|
if (status.includes('运输中') || status.includes('在途')) {
|
|
@@ -389,7 +388,7 @@ export default {
|
|
|
}
|
|
|
return 'info'
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 加载数据
|
|
|
onLoad() {
|
|
|
this.loading = true
|
|
@@ -406,7 +405,7 @@ export default {
|
|
|
this.loading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 搜索
|
|
|
searchChange(params, done) {
|
|
|
this.query = params
|
|
@@ -414,38 +413,38 @@ export default {
|
|
|
this.onLoad()
|
|
|
done()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 重置搜索
|
|
|
searchReset() {
|
|
|
this.query = {}
|
|
|
this.page.currentPage = 1
|
|
|
this.onLoad()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 分页大小改变
|
|
|
sizeChange(pageSize) {
|
|
|
this.page.pageSize = pageSize
|
|
|
this.onLoad()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 当前页改变
|
|
|
currentChange(currentPage) {
|
|
|
this.page.currentPage = currentPage
|
|
|
this.onLoad()
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 行点击
|
|
|
rowClick(row, column, event) {
|
|
|
this.viewDetails(row)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 查看明细
|
|
|
viewDetails(row) {
|
|
|
this.currentShipment = row
|
|
|
this.detailDialogVisible = true
|
|
|
this.loadShipmentDetails(row.shipmentNo)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 加载发货明细
|
|
|
loadShipmentDetails(shipmentNo) {
|
|
|
this.detailLoading = true
|
|
@@ -462,26 +461,26 @@ export default {
|
|
|
this.detailLoading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 明细分页大小改变
|
|
|
detailSizeChange(pageSize) {
|
|
|
this.detailPage.pageSize = pageSize
|
|
|
this.loadShipmentDetails(this.currentShipment.shipmentNo)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 明细当前页改变
|
|
|
detailCurrentChange(currentPage) {
|
|
|
this.detailPage.currentPage = currentPage
|
|
|
this.loadShipmentDetails(this.currentShipment.shipmentNo)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 查看物流跟踪
|
|
|
viewTracking(row) {
|
|
|
this.currentShipment = row
|
|
|
this.trackingDialogVisible = true
|
|
|
this.loadTrackingInfo(row.shipmentNo)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 加载物流跟踪信息
|
|
|
loadTrackingInfo(shipmentNo) {
|
|
|
this.trackingLoading = true
|
|
@@ -498,13 +497,13 @@ export default {
|
|
|
this.trackingLoading = false
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 跟踪分页大小改变
|
|
|
trackingSizeChange(pageSize) {
|
|
|
this.trackingPage.pageSize = pageSize
|
|
|
this.loadTrackingInfo(this.currentShipment.shipmentNo)
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// 跟踪当前页改变
|
|
|
trackingCurrentChange(currentPage) {
|
|
|
this.trackingPage.currentPage = currentPage
|
|
@@ -526,4 +525,4 @@ export default {
|
|
|
::v-deep .avue-crud__search .el-form-item {
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|