Commit 5b2a9c0f by 陈超

A

parent a32de5ad
......@@ -2,22 +2,21 @@ import request from '@/router/axios'
export function cancelOrderApi(query) {
return request({
url: '/admin/merchantMallOrder/merchantCancelOrder',
url: '/admin/merchantMallOrder/cancelOrder',
method: 'get',
params: query
})
}
export function delObj(parameter) {
export function deleteOrder(params) {
return request({
url: '/admin/merchantMallOrder',
url: '/admin/merchantMallOrder/deleteOrders',
method: 'delete',
params:parameter
params
})
}
export function fetchList(query) {
return request({
url: '/admin/merchantMallOrder/page',
......
......@@ -42,7 +42,7 @@
:before-close="handleClose">
<el-form ref="form" :model="orderForm">
<el-input type="textarea" v-model="orderForm.id" v-show="false">1111111111</el-input>
<el-input type="textarea" v-model="orderForm.mark"></el-input>
<el-input type="textarea" v-model="orderForm.mark" placeholder="请输入取消原因"></el-input>
<el-form-item>
<el-button type="primary" :loading="loading" @click="cancelOrder_cancel" style="float: left;margin-left: 20%;margin-top: 30px">取 消</el-button>
<el-button type="primary" :loading="loading" @click="cancelOrder_submit" style="float: right;margin-right: 20%;margin-top: 30px">确 认</el-button>
......@@ -105,7 +105,7 @@
</template>
<script>
import {getMerchantByAccount,fetchList, shipsImmediatelyApi, delObj, cancelOrderApi, viewLogisticsApi} from '@/api/mall/merchantMallorder'
import {getMerchantByAccount,fetchList, shipsImmediatelyApi, deleteOrder, cancelOrderApi, viewLogisticsApi} from '@/api/mall/merchantMallorder'
import {tableOption} from '@/const/crud/mall/merchantMallorder'
import {mapGetters} from 'vuex'
import {ZmMixin} from '@/mixins/ZmMixin.js'
......@@ -121,7 +121,7 @@
loading:false,
orderForm:{
id:'',
mark:"请输入取消原因",
mark:"",
},
form:{
id:0,
......@@ -183,7 +183,7 @@
this.$message.success('发货成功')
this.getList(this.page)
}).catch(e =>{
console.log('错误', e.message)
this.$error(e)
})
}
......@@ -259,8 +259,8 @@
return r.data
}).catch(e =>{
console.log('错误', e.message)
this.$message.error(e)
})
},
// 关闭对话框-查看物流
handleClose(done) {done();},
......@@ -327,13 +327,12 @@
},
// 删除
handleDel: function (row, index) {
this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return delObj({ids:row.orderNo})
return deleteOrder({ids: row.id})
}).then(data => {
this.$message.success('删除成功')
this.getList(this.page)
......@@ -355,7 +354,7 @@
cancelButtonText: '取消',
type: 'warning'
}).then(function () {
return delObj(ids)
return deleteOrder(ids)
}).then(data => {
this.$notify.success('删除成功')
this.$refs.crud.toggleSelection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment