|
|
@@ -525,7 +525,7 @@
|
|
|
</div>
|
|
|
<el-form-item>
|
|
|
<div style="text-align: right;">
|
|
|
- <el-button type="primary" @click="addBtn">保存</el-button>
|
|
|
+ <el-button :disabled="addBtndisabled" type="primary" @click="addBtn">保存</el-button>
|
|
|
<el-button @click="back()">取消</el-button>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
@@ -670,6 +670,7 @@ export default {
|
|
|
rateList: [],
|
|
|
budgeting:[],
|
|
|
rollcallarr:[],
|
|
|
+ addBtndisabled:false,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -719,7 +720,6 @@ export default {
|
|
|
this.cardPaymentOpData.payMoney = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
|
|
|
this.cardPaymentOpData.payThenMoney = this.cardPaymentOpData.payMoney
|
|
|
this.airTicketResOpData.price = parseFloat(parseFloat(this.airTicketResOpData.prePrice) * parseFloat(this.airTicketResOpData.clientNum)).toFixed(2)
|
|
|
- console.log('airTicketResOpData.clientName', this.airTicketResOpData.clientName);
|
|
|
},
|
|
|
//团组下拉框(下拉列表加载)
|
|
|
AirTicketResSelect() {
|
|
|
@@ -863,6 +863,7 @@ export default {
|
|
|
},
|
|
|
//点击保存事件
|
|
|
addBtn() {
|
|
|
+ this.addBtndisabled=true;
|
|
|
if (this.IsAuditGM == 1) {
|
|
|
|
|
|
this.$message.error('审核已通过,不可修改!');
|
|
|
@@ -889,67 +890,104 @@ export default {
|
|
|
formArr.forEach(item => { //根据表单的ref校验
|
|
|
checkForm(item)
|
|
|
})
|
|
|
+
|
|
|
Promise.all(resultArr).then(values => {
|
|
|
+ // that.airTicketResOpData.diId = parseInt(that.DiIdSelect);
|
|
|
+ // that.airTicketResOpData.createUserId = that.userId;
|
|
|
+ // var clientNameStr = ''
|
|
|
+ // that.airTicketResOpData.clientName.forEach(function (item) {
|
|
|
+ // clientNameStr += item + ","
|
|
|
+ // });
|
|
|
+ // that.airTicketResOpData.clientName = clientNameStr.substring(0, clientNameStr.length - 1)
|
|
|
+ // that.cardPaymentOpData.createUserId = that.userId;
|
|
|
+ // that.cardPaymentOpData.diId = parseInt(that.DiIdSelect);
|
|
|
+ // if (that.cardPaymentOpData.ctdId == '') {
|
|
|
+ // that.cardPaymentOpData.ctdId = 0;
|
|
|
+ // }
|
|
|
+ // if(that.cardPaymentOpData.payDId!=72){
|
|
|
+ // that.cardPaymentOpData.ctdId=0
|
|
|
+ // }
|
|
|
+ // var url = "/api/Groups/OpAirTicketRes"
|
|
|
+ // that.$axios({
|
|
|
+ // method: 'post',
|
|
|
+ // url: url,
|
|
|
+ // headers: {
|
|
|
+ // Authorization: 'Bearer ' + that.token
|
|
|
+ // },
|
|
|
+ // data: {
|
|
|
+ // status: that.status,
|
|
|
+ // airTicketResOpData: that.airTicketResOpData,
|
|
|
+ // cardPaymentOpData: that.cardPaymentOpData
|
|
|
+ // }
|
|
|
+ // }).then(function (res) {
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // that.$message({
|
|
|
+ // message: res.data.msg,
|
|
|
+ // type: 'success'
|
|
|
+ // });
|
|
|
+ // setTimeout(() => {
|
|
|
+ // that.back();
|
|
|
+ // }, 1000);
|
|
|
+ // } else {
|
|
|
+ // that.$message.error(res.data.msg);
|
|
|
+ // }
|
|
|
+ // }).catch(function (error) { // 此时必填完成,做保存后的业务操作
|
|
|
+ // console.log(error)
|
|
|
|
|
|
-
|
|
|
- that.airTicketResOpData.diId = parseInt(that.DiIdSelect);
|
|
|
- that.airTicketResOpData.createUserId = that.userId;
|
|
|
- var clientNameStr = ''
|
|
|
- that.airTicketResOpData.clientName.forEach(function (item) {
|
|
|
- clientNameStr += item + ","
|
|
|
- });
|
|
|
- that.airTicketResOpData.clientName = clientNameStr.substring(0, clientNameStr.length - 1)
|
|
|
- that.cardPaymentOpData.createUserId = that.userId;
|
|
|
- that.cardPaymentOpData.diId = parseInt(that.DiIdSelect);
|
|
|
- if (that.cardPaymentOpData.ctdId == '') {
|
|
|
- that.cardPaymentOpData.ctdId = 0;
|
|
|
- }
|
|
|
- if(that.cardPaymentOpData.payDId!=72){
|
|
|
- that.cardPaymentOpData.ctdId=0
|
|
|
- }
|
|
|
- var url = "/api/Groups/OpAirTicketRes"
|
|
|
- that.$axios({
|
|
|
- method: 'post',
|
|
|
- url: url,
|
|
|
- headers: {
|
|
|
- Authorization: 'Bearer ' + that.token
|
|
|
- },
|
|
|
- data: {
|
|
|
- status: that.status,
|
|
|
- airTicketResOpData: that.airTicketResOpData,
|
|
|
- cardPaymentOpData: that.cardPaymentOpData
|
|
|
+ // }).finally(() => {
|
|
|
+ // var ss = that.airTicketResOpData.clientName.split(',')
|
|
|
+ // if (ss.length != 0) {
|
|
|
+ // that.airTicketResOpData.clientName = [];
|
|
|
+ // ss.forEach(function (item) {
|
|
|
+ // if (item) {
|
|
|
+ // that.airTicketResOpData.clientName.push(parseInt(item))
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ new Promise(function (resolve, reject) {
|
|
|
+ that.airTicketResOpData.diId = parseInt(that.DiIdSelect);
|
|
|
+ that.airTicketResOpData.createUserId = that.userId;
|
|
|
+ that.cardPaymentOpData.createUserId = that.userId;
|
|
|
+ that.cardPaymentOpData.diId = parseInt(that.DiIdSelect);
|
|
|
+ if (that.cardPaymentOpData.ctdId == '') {
|
|
|
+ that.cardPaymentOpData.ctdId = 0;
|
|
|
}
|
|
|
- }).then(function (res) {
|
|
|
- if (res.data.code == 200) {
|
|
|
- that.$message({
|
|
|
- message: res.data.msg,
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- console.log('that.airTicketResOpData.clientName', that.airTicketResOpData.clientName)
|
|
|
- setTimeout(() => {
|
|
|
- that.back();
|
|
|
- }, 1000);
|
|
|
- } else {
|
|
|
- that.$message.error(res.data.msg);
|
|
|
+ if (that.cardPaymentOpData.payDId != 72) {
|
|
|
+ that.cardPaymentOpData.ctdId = 0
|
|
|
}
|
|
|
- }).catch(function (error) { // 此时必填完成,做保存后的业务操作
|
|
|
- console.log(error)
|
|
|
-
|
|
|
- }).finally(() => {
|
|
|
- var ss = that.airTicketResOpData.clientName.split(',')
|
|
|
- if (ss.length != 0) {
|
|
|
- that.airTicketResOpData.clientName = [];
|
|
|
- ss.forEach(function (item) {
|
|
|
- if (item) {
|
|
|
- that.airTicketResOpData.clientName.push(parseInt(item))
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- console.log('run finally code');
|
|
|
+ var url = "/api/Groups/OpAirTicketRes"
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ status: that.status,
|
|
|
+ airTicketResOpData: that.airTicketResOpData,
|
|
|
+ cardPaymentOpData: that.cardPaymentOpData
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ resolve();
|
|
|
+ } else {
|
|
|
+ reject();
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).then(() => {
|
|
|
+ that.addBtndisabled=false;
|
|
|
+ that.back();
|
|
|
+ }).catch(() => {
|
|
|
+ that.addBtndisabled=false;
|
|
|
})
|
|
|
-
|
|
|
}).catch(err => {
|
|
|
+ this.addBtndisabled=false;
|
|
|
this.$message.error('请完善信息在保存!');
|
|
|
return false;
|
|
|
})
|