|
|
@@ -47,21 +47,32 @@
|
|
|
label="操作"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="getDetail(scope.row)"
|
|
|
- >详情</el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="warning"
|
|
|
- @click="handleStatus(scope.row)"
|
|
|
- >
|
|
|
- {{ scope.row.statusText }}
|
|
|
- </el-button>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- @click="deleteOrder(scope.row)"
|
|
|
- >删除</el-button>
|
|
|
+ <el-row>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="getDetail(scope.row)"
|
|
|
+ >详情</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleStatus(scope.row)"
|
|
|
+ >
|
|
|
+ {{ scope.row.statusText }}
|
|
|
+ </el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="deleteOrder(scope.row)"
|
|
|
+ >删除</el-button>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleLogistics(scope.row)"
|
|
|
+ >发货</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ @click="handleProgress(scope.row)"
|
|
|
+ >进度</el-button>
|
|
|
+ </el-row>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -105,11 +116,63 @@
|
|
|
</el-timeline-item>
|
|
|
</el-timeline>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="订单发货"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="orderLogisticsDialog"
|
|
|
+ width="30%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <el-form :model="orderLogisticsForm">
|
|
|
+ <el-form-item label="物流" label-width="120px" prop="tpl">
|
|
|
+ <el-select v-model="logisticsProgressForm.tpl">
|
|
|
+ <el-option value="顺丰" label="顺丰" />
|
|
|
+ <el-option value="中通" label="中通" />
|
|
|
+ <el-option value="韵达" label="韵达" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="物流订单号" label-width="120px">
|
|
|
+ <el-input
|
|
|
+ v-model="orderLogisticsForm.logisticsId"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-button style="float: right; padding: 10px" type="text" @click="submitLogistics">发货</el-button>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="物流进度"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="logisticsProgressDialog"
|
|
|
+ width="30%"
|
|
|
+ center
|
|
|
+ >
|
|
|
+ <el-form :model="logisticsProgressForm">
|
|
|
+ <el-form-item label="状态" label-width="120px" prop="subjectId">
|
|
|
+ <el-select v-model="logisticsProgressForm.status">
|
|
|
+ <el-option value="3" label="运输中" />
|
|
|
+ <el-option value="4" label="派送中" />
|
|
|
+ <el-option value="5" label="待取件" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="详情" label-width="120px">
|
|
|
+ <el-input
|
|
|
+ v-model="logisticsProgressForm.current"
|
|
|
+ style="margin-left: 5px"
|
|
|
+ type="textarea"
|
|
|
+ :rows="5"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-button style="float: right; padding: 10px" type="text" @click="putProgress">提交进度</el-button>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getOrderLogistics, getOrders } from '@/api/mall'
|
|
|
+import { getOrderLogistics, getOrders, putLogisticsProgress, putOrderLogistics } from '@/api/mall'
|
|
|
|
|
|
export default {
|
|
|
name: 'Order',
|
|
|
@@ -134,7 +197,19 @@ export default {
|
|
|
productId: null,
|
|
|
payDialog: false,
|
|
|
logisticsDialog: false,
|
|
|
- logisticsList: []
|
|
|
+ logisticsList: [],
|
|
|
+ logisticsProgressDialog: false,
|
|
|
+ logisticsProgressForm: {
|
|
|
+ orderId: null,
|
|
|
+ status: null,
|
|
|
+ current: null
|
|
|
+ },
|
|
|
+ orderLogisticsDialog: false,
|
|
|
+ orderLogisticsForm: {
|
|
|
+ orderId: null,
|
|
|
+ tpl: null,
|
|
|
+ logisticsId: null
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -200,6 +275,42 @@ export default {
|
|
|
this.getData(this.searchForm)
|
|
|
},
|
|
|
handleChange(value) {
|
|
|
+ },
|
|
|
+ handleLogistics(row) {
|
|
|
+ this.orderLogisticsForm.orderId = row.orderId
|
|
|
+ this.orderLogisticsDialog = true
|
|
|
+ },
|
|
|
+ submitLogistics() {
|
|
|
+ putOrderLogistics(this.orderLogisticsForm).then(resp => {
|
|
|
+ if (resp.code !== 0) {
|
|
|
+ this.$notify.warning({
|
|
|
+ message: resp.msg,
|
|
|
+ duration: 3000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.orderLogisticsForm.orderId = null
|
|
|
+ this.orderLogisticsForm.tpl = null
|
|
|
+ this.orderLogisticsForm.logisticsId = null
|
|
|
+ this.orderLogisticsDialog = false
|
|
|
+ },
|
|
|
+ handleProgress(row) {
|
|
|
+ this.logisticsProgressForm.orderId = row.orderId
|
|
|
+ this.logisticsProgressDialog = true
|
|
|
+ },
|
|
|
+ putProgress() {
|
|
|
+ putLogisticsProgress(this.logisticsProgressForm).then(resp => {
|
|
|
+ if (resp.code !== 0) {
|
|
|
+ this.$notify.warning({
|
|
|
+ message: resp.msg,
|
|
|
+ duration: 3000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.logisticsProgressDialog = false
|
|
|
+ this.logisticsProgressForm.orderId = null
|
|
|
}
|
|
|
}
|
|
|
}
|