Commit aab75da8 authored by youjie's avatar youjie

no message

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