|
|
@@ -72,7 +72,7 @@
|
|
|
<el-table-column prop="cancelTime" label="取消时间" width="140"> </el-table-column>
|
|
|
<el-table-column prop="confirmTime" label="确认时间" width="140"> </el-table-column>
|
|
|
<el-table-column prop="delegateTime" label="托管时间" width="140"> </el-table-column>
|
|
|
- <el-table-column label="操作" align="center" fixed="right" min-width="150">
|
|
|
+ <el-table-column label="操作" align="center" fixed="right" min-width="250">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-button
|
|
|
@click="shipRow(row)"
|
|
|
@@ -83,6 +83,15 @@
|
|
|
>
|
|
|
发货
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="cancelShip(row)"
|
|
|
+ v-if="row.status == 'NOT_SHIPPED' || row.status == 'SHIPPED'"
|
|
|
+ type="success"
|
|
|
+ size="mini"
|
|
|
+ plain
|
|
|
+ >
|
|
|
+ 取消发货
|
|
|
+ </el-button>
|
|
|
<!-- <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button> -->
|
|
|
<el-button @click="cancel(row)" type="danger" size="mini" plain v-if="row.status === 'NOT_PAID'">
|
|
|
取消订单
|
|
|
@@ -244,6 +253,39 @@ export default {
|
|
|
};
|
|
|
this.$refs.ship.show = true;
|
|
|
},
|
|
|
+ cancelShip(row) {
|
|
|
+ this.$msgbox({
|
|
|
+ title: '提示',
|
|
|
+ message: '确定取消发货?',
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'info',
|
|
|
+ beforeClose: (action, instance, done) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
+ instance.confirmButtonLoading = true;
|
|
|
+ instance.confirmButtonText = '执行中...';
|
|
|
+ this.$http
|
|
|
+ .post('/order/cancelShip', {
|
|
|
+ orderId: row.id
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ done();
|
|
|
+ this.getData();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
+ done();
|
|
|
+ this.$message.error(e.error);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ done();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
editRow(row) {
|
|
|
this.$router.push({
|
|
|
path: '/orderEdit',
|