Commit ffb6465a authored by youjie's avatar youjie

no message

parent 171d3661
...@@ -139,6 +139,8 @@ ...@@ -139,6 +139,8 @@
props: ["OrderList","pagesTitle"], props: ["OrderList","pagesTitle"],
data() { data() {
return { return {
S_CheckBranchOrder: false,
S_CheckAllOrder: false,
queryObj:null, queryObj:null,
cdState: false, cdState: false,
copyId: 0, copyId: 0,
...@@ -259,7 +261,7 @@ ...@@ -259,7 +261,7 @@
this.$router.push({ this.$router.push({
name: 'groupTourOrderByTuan', name: 'groupTourOrderByTuan',
query: { query: {
id: row.tcid, id: row.TCID,
tcmun: row.TCNUM, tcmun: row.TCNUM,
blank: "y", blank: "y",
} }
...@@ -276,7 +278,7 @@ ...@@ -276,7 +278,7 @@
if (row.OrderType == 1) { if (row.OrderType == 1) {
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
data[0].path = 'myCustomerOrderAllType' data[0].path = 'myCustomerOrderAllType'
}else{ }else{
data[0].path = 'customerOrderAllType' data[0].path = 'customerOrderAllType'
...@@ -287,7 +289,7 @@ ...@@ -287,7 +289,7 @@
}else{ }else{
let name = '' let name = ''
if (row.OrderType == 6) { if (row.OrderType == 6) {
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
name = 'VisaProductEditOrder' name = 'VisaProductEditOrder'
}else{ }else{
name = 'VisaProductEditOrderOP' name = 'VisaProductEditOrderOP'
...@@ -296,7 +298,7 @@ ...@@ -296,7 +298,7 @@
name: name, name: name,
}); });
}else if (row.OrderType == 2) {//跟团 一日游 }else if (row.OrderType == 2) {//跟团 一日游
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
if(row.TravelType==1){ if(row.TravelType==1){
name = 'groupTourOrder' name = 'groupTourOrder'
}else{ }else{
...@@ -307,14 +309,14 @@ ...@@ -307,14 +309,14 @@
} }
} }
else if (row.OrderType == 3) {//酒店 else if (row.OrderType == 3) {//酒店
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
name = 'singleProductHotelOrder' name = 'singleProductHotelOrder'
}else{ }else{
name = 'singleProductHotelOrderOP' name = 'singleProductHotelOrderOP'
} }
} }
else if (row.OrderType == 4) {//门票 else if (row.OrderType == 4) {//门票
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
name = 'SingleticketOrderList' name = 'SingleticketOrderList'
}else{ }else{
name = 'SingleticketOrderListOP' name = 'SingleticketOrderListOP'
...@@ -370,7 +372,7 @@ ...@@ -370,7 +372,7 @@
if(pageData&&pageData.length>0){ if(pageData&&pageData.length>0){
OrderType = pageData[0].OrderType OrderType = pageData[0].OrderType
} }
if(this.pagesTitle=='销售'){ if(this.pagesTitle=='销售'||(this.S_CheckBranchOrder&&this.S_CheckAllOrder)){
name = 'CharterOrderList' name = 'CharterOrderList'
}else{ }else{
name = 'CharterOrderListOP' name = 'CharterOrderListOP'
...@@ -386,415 +388,18 @@ ...@@ -386,415 +388,18 @@
} }
}) })
}, },
// 获取订单状态枚举
// 签证状态
AmendVisa(){
},
// 签证
CheckOutDetails(){
},
// 提成
commissionDetails(){
},
// 修改订单状态
modifyStatus(row){
},
// 查看出票状态
viewCredentials(item){
},
isOffset(row, index, num){
this.makeAdocument(row, index, num,'Offset')
setTimeout(()=>{
this.cdState = true
},100)
},
submit2(){
if(this.loading3) return
this.$refs['msgParameter'].validate((valid) => {
if (valid) {
this.setFormMsg2()
} else {
return false;
}
});
},
setFormMsg2(){
if(this.msgParameter.MailingState=='1'){
this.msgParameter.MailingAddress = ''
}
let m = {
IsUpdateMailing: 1,
OrderId: this.msgParameter.OrderId,
CouponsId: this.msgParameter.CouponsId,
Money: this.msgParameter.Money,
UseDate: this.msgParameter.UseDate,
Birthday: this.msgParameter.Birthday,
DetailList: this.msgParameter.DetailList,
MailingState: this.msgParameter.MailingState,//邮寄状态 1自取 2邮寄
MailingAddress: this.msgParameter.MailingAddress,//MailingState =2 填写邮寄
Name: this.msgParameter.Name,
EName: this.msgParameter.EName,
Sex: this.msgParameter.Sex,//1男2女
Mobile: this.msgParameter.Mobile,
Remark: this.msgParameter.Remark,
}
this.loading3 = true
this.apipost("ticket_post_SetSaleTicketOrder", m,
res => {
this.loading3 = false
if (res.data.resultCode == 1) {
this.Success('变更成功');
this.$emit('success')
this.ChangeOrderDialog = false
} else {
this.Error('变更失败')
}
},
err => {
this.loading3 = false
this.Error(err.message)
});
},
// 上传旅客名单
uploadHandleChange(){
if(this.loading) return
let msg = {
OrderId: this.uploadOrderId,
GuestFileList: [this.GuestFile]
}
this.loading = true
this.apipost(
"dict_post_SetSaleOrderGuestFile",msg,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.uploadOrderId=0
this.GuestFile=''
this.$emit("success");
} else {
this.Error(res.data.message);
}
},
err => {
this.loading = false;
}
);
},
// 单据详情
openDetails(item) {
let query = {
id: item.FrID
};
this.$router.push({
path: "/FinancialDocumentsDetail",
query
});
},
// 制作单据
makeAdocument(row, index, num, Offset) {
let type = 0
if(num==3){
type = 2
}else{
type = num
}
let data = {
// path: "ChoiceAddFinancialDocuments",
type: type,
OtherType: 55,
ReFinanceId: row.OrderId,
ReFinanceId2: num,
GuestId: row.GuestId,
RelevanceFrId: row.selectedType, // 单据类型
}
this.BillMakingMsg.ReFinanceId = row.OrderId;
this.BillMakingMsg.ReFinanceId2 = num;
this.BillMakingMsg.OtherType = 55;
let text = "";
let query = {};
if (num == 1) {
text = "收款";
} else if (num == 2) {
text = "付款";
} else if (num == 3) {
text = "成本";
}
query = {
blank: "y",
tab: `新增${text}单据`,
Type: type,
crmOrderObj: JSON.stringify(data)
};
this.$store.commit("ChoiceAddFinancialDocuments");
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
return
this.queryObj = query
if(!Offset){
this.$store.commit("ChoiceAddFinancialDocuments");
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
}
},
// 订单明细
goRoomDetails(obj, title) {
var path
if(title==='订房详情'){
path = "roomReservationsDetails";
if (this.userInfo.RB_Group_id == 91) {
path = "roomReservationsDetails_swt";
}
this.$router.push({
name: path,
query: {
id: obj.OrderId,
OrderType: 1,
blank: "y",
tab: title
}
});
}else{//变更预定
this.$router.push({
name: 'CharterPreview',
query: {
OrderId: obj.OrderId,
id: obj.ProductId,
blank: "y",
tab: title
}
});
}
},
clickRightButtom(item, type) {
// 0取消订单 1确认订单 2收损
this.msg.OrderId = item.OrderId;
this.msg.SelffetchAddress = item.SelffetchAddress
this.items = item
this.typeState = type
if (type == 0) {
if (!this.loading0) {
this.cancelOrderId = item.OrderId
// 销售 OP
if(this.Title!='销售'){
this.cancelOrderDialog = true;
}else{
let that = this
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.cancelOrderHandler()
}).catch(err=>{
this.loading0= false
})
}
}
} else if (type == 1) {
if (!this.loading1) {
this.confirmFun(item, type);
}
}else if (type == 2) {
if (!this.loading2) {
this.outerVisible = true;
this.msg.LossMoney = item.LossMoney ? item.LossMoney : 0;
}
}
},
// 销售取消订单
cancelOrder() {
let that = this
if (this.loading0) return;
that.$confirm(`是否确定取消订单?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.loading0 = true
this.apipost("ticket_post_CancelSaleTicketOrder", {
OrderId: this.cancelOrderId,
IsOPCancel: this.Title!='销售'?1:0,
Remark: 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.loading0= false
})
}).catch(()=>{
this.loading0 = false
})
},
//提交
submitForm(msg) {
//提交创建、修改表单
this.$refs[msg].validate(valid => {
if (valid) {
if (!this.loading2) {
this.saveUpdate();
}
} else {
// this.Error("请完成必填项");
return false;
}
});
},
cancelOrderHandler() {
if (this.cancelRemark == ""&&this.Title!='销售') {
this.Error("请填写取消订单的缘由");
return;
}
if (this.loading0) return;
this.loading0 = true
this.apipost(
"CarSingle_post_CancelSaleCarOrder",
{
OrderId: this.cancelOrderId,
IsOPCancel: this.Title!='销售'?1:0,
Remark: this.Title!='销售'?this.cancelRemark:''
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.cancelOrderDialog=false
this.cancelOrderId=0
this.cancelRemark=''
this.$emit("success");
} else {
this.Error(res.data.message);
}
this.loading0 = false;
},
err => {
this.loading0 = false;
}
);
},
saveUpdate() {
let text = '是否确认设置收损?'
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.loading2 = true;
this.apipost(
"CarSingle_post_SetAdminCarOrderState",
{
OrderId: this.msg.OrderId,
State: this.typeState,
LossMoney: this.msg.LossMoney,
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
this.loading2 = false;
this.outerVisible = false;
},
err => {
(this.loading2 = false), (this.outerVisible = false);
}
);
})
.catch(() => {});
},
confirmFun(item,type) {
let text = '是否确认订单?'
this.$confirm(text, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
this.loading1 = true;
this.apipost(
"CarSingle_post_SetAdminCarOrderState",
{
OrderId: item.OrderId,
State: type,
LossMoney: type==2?this.msg.LossMoney:'',
},
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.$emit("success");
} else {
this.Error(res.data.message);
}
this.loading1 = false;
},
err => {
this.loading1 = false;
}
);
})
.catch(() => {
this.$message.info("已取消!");
});
},
//复制信息
CopyHandler(item) {
this.copyId = item.OrderId;
setTimeout(() => {
this.copyId = 0;
}, 2000);
},
setEdate() {
return this.addMoth(new Date().Format("yyyy-MM-dd"), 1);
},
addMoth(d, m) {
let ds = d.split("-"),
_d = ds[2] - 0;
let nextM = new Date(ds[0], ds[1] - 1 + m + 1, 0);
let max = nextM.getDate();
d = new Date(ds[0], ds[1] - 1 + m, _d > max ? max : _d);
return d
.toLocaleDateString()
.match(/\d+/g)
.join("-");
},
com_onresize() {
//clientHeight的值由DIV内容的实际高度和CSS中的padding值决定,
var contentsHeight = document.body.clientHeight;
var h = contentsHeight - 50 - 180 - 40;
if (h < 110) {
return;
}
//设置table的行高
// this.tableHeight = h;
}
}, },
mounted() { mounted() {
let userInfo = this.getLocalStorage();
let ActionMenuCode = userInfo.ActionMenuCode;
this.userInfo = this.getLocalStorage(); this.userInfo = this.getLocalStorage();
//自适应高度调节 // 判断是否销售
this.com_onresize(); if (ActionMenuCode.indexOf('S_CheckBranchOrder') != -1 ){
window.onresize = () => { this.S_CheckBranchOrder = true
this.com_onresize(); }if (ActionMenuCode.indexOf('S_CheckAllOrder') != -1 ){
}; this.S_CheckAllOrder = true
}
} }
}; };
</script> </script>
......
...@@ -583,8 +583,8 @@ ...@@ -583,8 +583,8 @@
this.msg.StartTime = this.getBeforeDate(31, new Date()) this.msg.StartTime = this.getBeforeDate(31, new Date())
this.msg.EndTime = this.getBeforeDate(0, new Date()) this.msg.EndTime = this.getBeforeDate(0, new Date())
this.DatelistBM = [new Date(this.msg.StartTime),new Date()] this.DatelistBM = [new Date(this.msg.StartTime),new Date()]
// this.GetOrderStatusEnumList() // this.GetOrderStatusEnumList()//订单状态
this.GetTicketStatusEnumList() // this.GetTicketStatusEnumList()//出票状态
this.GetOrderTypeEnumList() this.GetOrderTypeEnumList()
this.getLineList() this.getLineList()
this.Datelist = this.getyMDOne() this.Datelist = this.getyMDOne()
......
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