Commit 892de258 authored by youjie's avatar youjie

no message

parent f96591fc
......@@ -302,7 +302,8 @@
</template>
<li>
<el-form-item label="用车人数" prop="PeopleNum">
<el-input-number v-model="msg.PeopleNum" :min="1" placeholder="请输入用车人数"/>
<el-input-number v-model="msg.PeopleNum" :min="1" :max="SeatNum"
placeholder="请输入用车人数" @change="getBusType"/>
</el-form-item>
</li>
<li>
......@@ -344,9 +345,9 @@
</li>
<li class="bottom">
<el-form-item label="车型" prop="BusType">
<el-select class="w200" filterable v-model='msg.BusType'>
<el-select class="w200" filterable v-model='msg.BusType' @change="getBusType">
<el-option v-for='(item,index) in vehicletop'
:label='item.Name'
:label='item.Name +`(${item.SeatNum}座)`'
:value='item.Id'
:key='item.Id'>
</el-option>
......@@ -570,7 +571,8 @@
TripInfo: ''
},
vehicletop: [],
listvehicle: []
listvehicle: [],
SeatNum:0
};
},
methods: {
......@@ -578,6 +580,20 @@
deleteLine(index){
this.msg.details.splice(index,1)
this.msg.details.UseDayNum = this.msg.details.length
},
// 获取车型座位数
getBusType(){
if(this.vehicletop&&this.vehicletop.length>0){
this.vehicletop.forEach(x=>{
if(x.Id===this.msg.BusType){
console.log(x)
this.SeatNum = x.SeatNum
if(this.msg.PeopleNum>x.SeatNum){
this.msg.PeopleNum = x.SeatNum
}
}
})
}
},
checkInteger() {
let that= this
......@@ -603,8 +619,10 @@
// UseTime: '',//接送机时间
TripInfo: '',//行程信息
})
})
this.msg.details = JSON.parse(JSON.stringify(details2))
}
}
}
......@@ -672,13 +690,14 @@
});
},
// 获取车型下拉
vehicleinit() {
async vehicleinit() {
// tripbus_GetSellBusTypeList"
this.apipost("tripbus_GetSellBusTypeList", {},
await this.apipost("tripbus_GetSellBusTypeList", {},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.vehicletop = res.data.data
} else {
this.Error(res.data.message)
}
......@@ -740,7 +759,7 @@
details: res.data.data.details
}
this.isCheck = true
this.getBusType()
}
})
......@@ -751,6 +770,11 @@
let userInfo = this.getLocalStorage();
this.msg.UseCompName = userInfo.GroupName
this.msg.UseName = userInfo.emName
if(this.msg.Id>0){
setTimeout(()=>{
this.getOrderInfo()
},100)
}
},
created() {
if(this.$route.query&&this.$route.query.Id){
......@@ -760,9 +784,7 @@
}
this.vehicleinit()
this.vehicleList()
if(this.msg.Id>0){
this.getOrderInfo()
}
}
};
......
......@@ -998,46 +998,6 @@
State: '',//状态 1确认 2已邮寄 3设置自提 4收损
SelffetchAddress: ''
},
msgParameter: {
IsUpdateMailing: 1,
OrderId: 0,
Money: 0.0,
Remark: '',
MailingState: '1',//邮寄状态 1自取 2邮寄
MailingAddress: '',//MailingState =2 填写邮寄
UseDate:'',//门票日期
Name:'',
EName:'',
Sex: '1',//1男2女
Birthday: '',
Mobile:'',
CouponsId:'',//景点id
DetailList:[],
},
rules2:{
Name: [{
required: true,
message: '请输入中文名',
trigger: 'blur'
}],
EName: [{
required: true,
message: '请输入英文名',
trigger: 'blur'
}],
Mobile: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{
pattern: this.$commonUtils.Regex.el_ISphone,
message: "请输入正确的电话"
}
],
MailingAddress: [{
required: true,
message: '请输入邮寄地址',
trigger: 'blur'
}],
},
outerVisible: false,
rules: {
State: [
......@@ -1173,92 +1133,6 @@
}
}, err => {})
},
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)
});
},
uploadFileBtn(file){
let ft = file.file.name.substring(file.file.name.lastIndexOf('.') + 1, file.file.name.length).toUpperCase();
let typeOk = false;
let FileName = file.file.name.substring(0,file.file.name.lastIndexOf("."))
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
this.UploadSelfFileT(path, newArr, x => {
this.GuestFile = this.domainManager().ViittoFileUrl + x.data.FilePath
this.uploadHandleChange()
}, 1);
},
// 上传旅客名单
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 = {
......@@ -1271,7 +1145,7 @@
},
// 制作单据
makeAdocument(row, index, num, name) {
this.BillMakingMsg.ReFinanceId = row.OrderId;
this.BillMakingMsg.ReFinanceId = row.Id;
this.BillMakingMsg.ReFinanceId2 = num;
this.BillMakingMsg.OtherType = 68;
let text = "";
......@@ -1489,9 +1363,9 @@
}).then(() => {
this.loading0 = true
this.apipost("ticket_post_CancelSaleTicketOrder", {
OrderId: this.cancelOrderId,
Id: this.cancelOrderId,
IsOPCancel: this.Title!='销售'?1:0,
Remark: this.cancelRemark
CancelRemark: this.cancelRemark
},
res => {
this.loading0= false
......
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