|
|
@@ -25,6 +25,7 @@
|
|
|
操作该数据<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="edit" @click.native="handleDel(scope.row)" v-if="permission.hasPermission(`shop/edit`)">删除订单</el-dropdown-item>
|
|
|
<el-dropdown-item command="edit" @click.native="handleEdit(scope.row)" v-if="permission.hasPermission(`shop/edit`)">编辑订单</el-dropdown-item>
|
|
|
<el-dropdown-item command="delivery" @click.native="handleShowDeliveryDialog(scope.row)" v-if="permission.hasPermission(`shop/order-delivery`) && scope.row['STATUS'] === '1' && scope.row['DELIVERY_STATUS'] === '0' ">发货</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
@@ -133,6 +134,34 @@
|
|
|
handleEdit() {
|
|
|
// 进入修改订单页面
|
|
|
},
|
|
|
+ handleDel(row) {
|
|
|
+ let orderSn = row.SN.value // order订单表的编号
|
|
|
+ this.$confirm(`确定要删除当前数据吗?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 删除订单
|
|
|
+ let postData = {
|
|
|
+ orderSn
|
|
|
+ }
|
|
|
+ return network.postData('shop/delete-order', postData).then(response => {
|
|
|
+ console.log(response);
|
|
|
+ this.$message({
|
|
|
+ message: response,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.submitButtonStat = false
|
|
|
+ this.$router.go(-1)
|
|
|
+ }).catch(() => {
|
|
|
+ this.submitButtonStat = false
|
|
|
+ })
|
|
|
+ }).then(response => {
|
|
|
+
|
|
|
+ }).catch(response => {
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
// 显示发货对话框
|
|
|
handleShowDeliveryDialog(row) {
|
|
|
this.dialogDeliveryVisible = true
|