Commit 38f6e49e by cpa

修改立即发货

parent 71842b8f
......@@ -33,7 +33,7 @@ export function putObj(obj) {
})
}
export function shipsImmediately(query) {
export function shipsImmediatelyApi(query) {
return request({
url: '/admin/merchantMallOrder/shipsImmediately',
method: 'put',
......
......@@ -39,7 +39,7 @@
title="取消订单" :visible.sync="cancelOrderDialog" width="40%"
:before-close="handleClose">
<el-form ref="form" :model="orderForm">
<el-input type="textarea" v-model="orderForm.orderNo" v-show="false">1111111111</el-input>
<el-input type="textarea" v-model="orderForm.orderNo" v-show="false">1111111111</el-input>
<el-input type="textarea" v-model="orderForm.mark"></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>
......@@ -103,7 +103,7 @@
</template>
<script>
import {fetchList,shipsImmediately,delObj,cancelOrderApi} from '@/api/mall/merchantMallorder'
import {fetchList,shipsImmediatelyApi,delObj,cancelOrderApi} from '@/api/mall/merchantMallorder'
import {tableOption} from '@/const/crud/mall/merchantMallorder'
import {mapGetters} from 'vuex'
export default {
......@@ -119,9 +119,8 @@
mark:"请输入取消原因",
},
form:{
orderNo:0,
expressCompany:2,//快递公司
expressCompany:'',//快递公司
waybillNo:'',//快递单号
},
dialogVisibleShipsImmediately:false,//立即发货对话框
......@@ -171,12 +170,18 @@
// 取消订单-确认
cancelOrder_submit(){
this.cancelOrderDialog=false
cancelOrderApi(this.orderForm).then(r => {
this.$message.success('发货成功')
this.getList(this.page)
}).catch(e =>{
console.log('错误', e.message)
})
if(this.orderForm.mark.length<=0){
this.orderForm.mark='未填写备注'
return
}else {
cancelOrderApi(this.orderForm).then(r => {
this.$message.success('发货成功')
this.getList(this.page)
}).catch(e =>{
console.log('错误', e.message)
})
}
},
// 取消订单
cancelOrderButAuth: function (row) {
......@@ -196,26 +201,26 @@
this.$axios.get("/admin/merchantMallOrder/isNeedMailed",{
params:{orderNo:row.orderNo},
}).then(response => {
alert(JSON.stringify(response.data))
if(response.data){console.log("需邮寄,填写信息")}else {console.log("无需邮寄,二次确认即可")}
// if(response.data.data){
// this.form.orderNo=row.orderNo
// this.dialogVisibleShipsImmediately = true
// }else {
// // 虚拟商品 二次确认直接发货
// this.$confirm('是否确认发货?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(data => {
// shipsImmediately(this.form).then(r => {
// this.$message.success('发货成功')
// this.getList(this.page)
// }).catch(e =>{
// console.log('错误', e.message)
// })
// })
// }
console.log(JSON.stringify(response.data.data))
if(response.data.data===true){
console.log("需邮寄,填写信息")
this.dialogVisibleShipsImmediately = true
} else {
console.log("无需邮寄,二次确认即可")
this.$confirm('是否确认发货?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(data => {
shipsImmediatelyApi(this.form).then(r => {
this.$message.success('发货成功')
this.getList(this.page)
}).catch(e => {
console.log('错误', e.message)
})
})
}
}, error => {
console.log('错误', error.message)
})
......@@ -223,7 +228,7 @@
},
// 确认发货-提交按钮
confirmDelivery(){
shipsImmediately(this.form).then(r => {
shipsImmediatelyApi(this.form).then(r => {
this.dialogVisibleShipsImmediately = false
this.$message.success('发货成功')
this.getList(this.page)
......
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