Commit aab75da8 authored by youjie's avatar youjie

no message

parent 89808387
...@@ -1026,7 +1026,13 @@ export default { ...@@ -1026,7 +1026,13 @@ export default {
if (type == 0) { if (type == 0) {
if (!this.loading0) { if (!this.loading0) {
this.cancelOrderId = item.OrderId this.cancelOrderId = item.OrderId
this.cancelOrderDialog = true; // 地接 销售 OP
if(this.pagesTitle!='销售'){
this.cancelOrderDialog = true;
}else{
this.cancelOrder()
}
} }
} else if (type == 1) { } else if (type == 1) {
if (!this.loading1) { if (!this.loading1) {
...@@ -1040,6 +1046,35 @@ export default { ...@@ -1040,6 +1046,35 @@ export default {
} }
} }
}, },
// 销售取消订单
cancelOrder() {
let that = this
if (this.loading0) return;
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading0 = true
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.cancelOrderId
},
res => {
this.loading0= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading0= false
})
}).catch(()=>{
this.loading0 = false
})
},
//提交 //提交
submitForm(msg) { submitForm(msg) {
//提交创建、修改表单 //提交创建、修改表单
...@@ -1061,9 +1096,7 @@ export default { ...@@ -1061,9 +1096,7 @@ export default {
} }
if (this.loading0) return; if (this.loading0) return;
this.loading0 = true this.loading0 = true
// 地接 销售 OP this.apipost(
if(this.pagesTitle!='销售'){
this.apipost(
"dict_post_CancelAdminCustomerOrder", "dict_post_CancelAdminCustomerOrder",
{ {
OrderId: this.cancelOrderId, OrderId: this.cancelOrderId,
...@@ -1084,40 +1117,10 @@ export default { ...@@ -1084,40 +1117,10 @@ export default {
err => { err => {
this.loading0 = false; this.loading0 = false;
} }
); );
}else{
this.cancelOrder()
}
}, },
// 销售 OP 取消订单
cancelOrder() {
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.cancelOrderId,
CancelRemark: this.cancelRemark
},
res => {
this.loading0= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading0= false
})
}).catch(()=>{
this.loading0 = false
})
},
saveUpdate() { saveUpdate() {
this.$confirm("是否确认设置收损?", "提示", { this.$confirm("是否确认设置收损?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
......
...@@ -693,26 +693,26 @@ ...@@ -693,26 +693,26 @@
}, },
mounted() { mounted() {
// 当前日期小于20天更新数据 // 当前日期小于20天更新数据
let oldCars = [] // let oldCars = []
let newCars = [] // let newCars = []
let states = true // let states = true
oldCars = JSON.parse(localStorage.getItem("cars")) // oldCars = JSON.parse(localStorage.getItem("cars"))
if(oldCars){ // if(oldCars){
oldCars.forEach(item=>{ // oldCars.forEach(item=>{
if(item.Date<this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))){ // if(item.Date<this.getBeforeDate(-20,new Date().Format("yyyy-MM-dd"))){
states = false // states = false
}else{ // }else{
newCars.push(item) // newCars.push(item)
} // }
}) // })
if(!states){ // if(!states){
this.HotelLength = newCars.length // this.HotelLength = newCars.length
localStorage.removeItem("cars") // localStorage.removeItem("cars")
localStorage.setItem("cars",JSON.stringify(newCars)) // localStorage.setItem("cars",JSON.stringify(newCars))
localStorage.removeItem('HotelLength') // localStorage.removeItem('HotelLength')
localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength)) // localStorage.setItem('HotelLength',JSON.stringify(this.HotelLength))
} // }
} // }
this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0 this.HotelLength = localStorage.getItem("HotelLength")?localStorage.getItem("HotelLength"):0
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
font-weight: bold; font-weight: bold;
} }
.content-picker-text{ .content-picker-text{
height: 183px; height: 192px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
<div class="content-box" style="margin: 0;"> <div class="content-box" style="margin: 0;">
<div class="content-header"> <div class="content-header" style="padding: 9px 10px;">
<span>新日期预定</span> <span>新日期预定</span>
<div> <div>
<el-date-picker class="w150" v-model="newDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :picker-options="beforeCheck"></el-date-picker> <el-date-picker class="w150" v-model="newDate" type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" :picker-options="beforeCheck"></el-date-picker>
...@@ -485,17 +485,16 @@ ...@@ -485,17 +485,16 @@
if (cando) { if (cando) {
this.deleteHotelsHandler(x, y) this.deleteHotelsHandler(x, y)
} else { } else {
if(this.loading) return
this.loading = true
this.cancelOrder() this.cancelOrder()
} }
}, },
// OP取消订单
cancelOrderHandler() { cancelOrderHandler() {
if (this.loading) return;
if (this.cancelRemark == "") { if (this.cancelRemark == "") {
this.Error("请填写取消订单的缘由"); this.Error("请填写取消订单的缘由");
return; return;
} }
if (this.loading) return;
this.loading = true this.loading = true
let that = this let that = this
that.$confirm(`是否确定取消订单?`, '提示', { that.$confirm(`是否确定取消订单?`, '提示', {
...@@ -503,11 +502,10 @@ ...@@ -503,11 +502,10 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
if(this.pagesTitle!='销售'){
this.apipost( this.apipost(
"dict_post_CancelAdminCustomerOrder", "dict_post_CancelAdminCustomerOrder",
{ {
OrderId: this.cancelOrderId, OrderId: this.orderId,
CancelRemark: this.cancelRemark CancelRemark: this.cancelRemark
},res => { },res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -520,31 +518,11 @@ ...@@ -520,31 +518,11 @@
} else { } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
this.loading0 = false; this.loading = false;
}, },
err => { err => {
this.loading0 = false; this.loading = false;
}); });
}else{
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.orderId
},res => {
this.loading= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
let path = 'singleProductHotelOrder'
if(!this.pagesTitle) return
this.$router.push({
name: path
});
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading= false
})
}
}).catch(()=>{ }).catch(()=>{
this.loading = false this.loading = false
...@@ -552,7 +530,41 @@ ...@@ -552,7 +530,41 @@
}, },
// 取消订单 // 取消订单
cancelOrder() { cancelOrder() {
this.cancelOrderDialog = true if(this.pagesTitle!='销售'){
this.cancelOrderDialog = true
}else{
if (this.loading) return;
this.loading = true
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.apipost("dict_post_CancelSaleCustomerOrder", {
OrderId: this.orderId
},res => {
this.loading= false
if (res.data.resultCode == 1) {
this.Success(res.data.message);
let path = 'singleProductHotelOrder'
if(!this.pagesTitle) return
this.$router.push({
name: path
});
} else {
this.Error(res.data.message);
}
}).catch(err=>{
this.Error(err.message)
this.loading= false
})
}).catch(()=>{
this.loading = false
})
}
}, },
//删除酒店 //删除酒店
deleteHotelsHandler(x, y) { deleteHotelsHandler(x, y) {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<div class="list-content-box" v-for="(y,i) in x.Hotels"> <div class="list-content-box" v-for="(y,i) in x.Hotels">
<div class="list-operation"> <div class="list-operation">
<div> <div>
<button class="hollowFixedBtn" type="primary" @click="setEditorHandler(y)"> <button v-if="x.Date>OptionalTime" class="hollowFixedBtn" type="primary" @click="setEditorHandler(y)">
<i class="el-icon-edit"></i> <i class="el-icon-edit"></i>
</button> </button>
<button class="normalBtn" type="primary" @click="removeHotelHandler(xi,i)"> <button class="normalBtn" type="primary" @click="removeHotelHandler(xi,i)">
...@@ -134,6 +134,7 @@ ...@@ -134,6 +134,7 @@
}, },
data() { data() {
return { return {
OptionalTime: this.getBeforeDate(-19,new Date().Format('yyyy-MM-dd')),//可编辑时间
cars: [], cars: [],
HotelLength: 0, HotelLength: 0,
addNum: 1, addNum: 1,
......
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