Commit 5b2a9c0f by 陈超

A

parent a32de5ad
...@@ -2,22 +2,21 @@ import request from '@/router/axios' ...@@ -2,22 +2,21 @@ import request from '@/router/axios'
export function cancelOrderApi(query) { export function cancelOrderApi(query) {
return request({ return request({
url: '/admin/merchantMallOrder/merchantCancelOrder', url: '/admin/merchantMallOrder/cancelOrder',
method: 'get', method: 'get',
params: query params: query
}) })
} }
export function delObj(parameter) { export function deleteOrder(params) {
return request({ return request({
url: '/admin/merchantMallOrder', url: '/admin/merchantMallOrder/deleteOrders',
method: 'delete', method: 'delete',
params:parameter params
}) })
} }
export function fetchList(query) { export function fetchList(query) {
return request({ return request({
url: '/admin/merchantMallOrder/page', url: '/admin/merchantMallOrder/page',
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
:before-close="handleClose"> :before-close="handleClose">
<el-form ref="form" :model="orderForm"> <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.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-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_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> <el-button type="primary" :loading="loading" @click="cancelOrder_submit" style="float: right;margin-right: 20%;margin-top: 30px">确 认</el-button>
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</template> </template>
<script> <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 {tableOption} from '@/const/crud/mall/merchantMallorder'
import {mapGetters} from 'vuex' import {mapGetters} from 'vuex'
import {ZmMixin} from '@/mixins/ZmMixin.js' import {ZmMixin} from '@/mixins/ZmMixin.js'
...@@ -121,7 +121,7 @@ ...@@ -121,7 +121,7 @@
loading:false, loading:false,
orderForm:{ orderForm:{
id:'', id:'',
mark:"请输入取消原因", mark:"",
}, },
form:{ form:{
id:0, id:0,
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
this.$message.success('发货成功') this.$message.success('发货成功')
this.getList(this.page) this.getList(this.page)
}).catch(e =>{ }).catch(e =>{
console.log('错误', e.message) this.$error(e)
}) })
} }
...@@ -259,8 +259,8 @@ ...@@ -259,8 +259,8 @@
return r.data return r.data
}).catch(e =>{ }).catch(e =>{
console.log('错误', e.message) console.log('错误', e.message)
this.$message.error(e)
}) })
}, },
// 关闭对话框-查看物流 // 关闭对话框-查看物流
handleClose(done) {done();}, handleClose(done) {done();},
...@@ -327,13 +327,12 @@ ...@@ -327,13 +327,12 @@
}, },
// 删除 // 删除
handleDel: function (row, index) { handleDel: function (row, index) {
this.$confirm('是否确认删除?', '提示', { this.$confirm('是否确认删除?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function () {
return delObj({ids:row.orderNo}) return deleteOrder({ids: row.id})
}).then(data => { }).then(data => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getList(this.page) this.getList(this.page)
...@@ -355,7 +354,7 @@ ...@@ -355,7 +354,7 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function () {
return delObj(ids) return deleteOrder(ids)
}).then(data => { }).then(data => {
this.$notify.success('删除成功') this.$notify.success('删除成功')
this.$refs.crud.toggleSelection(); 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