Commit 38f6e49e by cpa

修改立即发货

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