|
@@ -47,9 +47,6 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
-
|
|
|
- </div>
|
|
|
- <div style="display: flex;">
|
|
|
<div style="width: 25%;">
|
|
|
<el-form-item label="出访国家:" prop="visitCountry" label-width="160px">
|
|
|
<el-input placeholder="出访国家" v-model="delegationInfo.visitCountry" :disabled="true">
|
|
@@ -57,16 +54,56 @@
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
</el-form>
|
|
|
<el-form :model="OpTicketBlackCodeData" :rules="OpTicketBlackCodeRules" ref="OpTicketBlackCodeData"
|
|
|
label-width="100px" class="demo-ruleForm">
|
|
|
<div style="display: flex;">
|
|
|
- <div style="width: 25%;">
|
|
|
- <el-form-item label="团组名称:" label-width="160px">
|
|
|
+ <div style="width: 60%;">
|
|
|
+ <el-form-item label="黑屏代码:" prop="blackCode" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="14" placeholder="黑屏代码"
|
|
|
+ v-model="OpTicketBlackCodeData.blackCode"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 40%;">
|
|
|
+ <el-form-item label="全价说明:" prop="price" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="3" placeholder="全价说明"
|
|
|
+ v-model="OpTicketBlackCodeData.price"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="现价说明:" prop="nowPrice" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="3" placeholder="现价说明"
|
|
|
+ v-model="OpTicketBlackCodeData.nowPrice"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="公务舱单价:" prop="bcPrice" label-width="160px">
|
|
|
+ <el-input placeholder="公务舱单价" v-model="OpTicketBlackCodeData.bcPrice">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="经济舱单价:" prop="ecPrice" label-width="160px">
|
|
|
+ <el-input placeholder="经济舱单价" v-model="OpTicketBlackCodeData.ecPrice">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div style="width: 60%;">
|
|
|
+ <el-form-item label="备注:" prop="remark" label-width="160px">
|
|
|
+ <el-input type="textarea" :rows="3" placeholder="备注"
|
|
|
+ v-model="OpTicketBlackCodeData.remark"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
+ <div style="width: 40%;text-align:right;margin-top: 2%;">
|
|
|
+ <div>
|
|
|
+ <el-button type="primary" @click="addBtn">保存</el-button>
|
|
|
+ <router-link to='/home/TicketBlackCode'>
|
|
|
+ <el-button>取消</el-button>
|
|
|
+ </router-link>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</el-form>
|
|
|
|
|
|
</div>
|
|
@@ -92,13 +129,30 @@ export default {
|
|
|
blackCode: '',
|
|
|
price: '',
|
|
|
nowPrice: '',
|
|
|
- bcPrice: 0,
|
|
|
- ecPrice: 0,
|
|
|
+ bcPrice: '',
|
|
|
+ ecPrice: '',
|
|
|
createUserId: 0,
|
|
|
+ remark: ''
|
|
|
},
|
|
|
- OpTicketBlackCodeRules: [
|
|
|
-
|
|
|
- ]
|
|
|
+ OpTicketBlackCodeRules: {
|
|
|
+ blackCode: [
|
|
|
+ { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
|
|
|
+ ],
|
|
|
+ price: [
|
|
|
+ { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
|
|
|
+ ],
|
|
|
+ nowPrice: [
|
|
|
+ { required: true, message: '该信息为必填信息', trigger: ['blur', 'change'] },
|
|
|
+ ],
|
|
|
+ bcPrice: [
|
|
|
+ { required: true, message: '请输入机票单价', trigger: ['blur', 'change'] },
|
|
|
+ { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
|
|
|
+ ],
|
|
|
+ ecPrice: [
|
|
|
+ { required: true, message: '请输入机票单价', trigger: ['blur', 'change'] },
|
|
|
+ { pattern: /^(([1-9]?\d{0,8}(\.\d{1,2})?)|999999999|999999999\.(0){1,2})$/, message: '请输入正确的金额(最多2位小数)' }
|
|
|
+ ],
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -128,6 +182,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
QueryTicketBlackCodeById() {
|
|
|
+ debugger
|
|
|
var url = "/api/Resource/QueryTicketBlackCodeById"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
@@ -137,20 +192,25 @@ export default {
|
|
|
Authorization: 'Bearer ' + this.token
|
|
|
},
|
|
|
data: {
|
|
|
- Id: that.Id,
|
|
|
- DiId: this.DiId
|
|
|
+ Id: that.id,
|
|
|
+ DiId: that.DiId
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
if (res.data.code == 200) {
|
|
|
+ debugger
|
|
|
that.delegationInfo = res.data.data.delegationInfo
|
|
|
that.airGroupCostParameter = res.data.data.groupCostParameter
|
|
|
if (res.data.data.ticketBlackCode != null) {
|
|
|
+ debugger
|
|
|
var TicketBlackCode = res.data.data.ticketBlackCode
|
|
|
+ that.OpTicketBlackCodeData.id = TicketBlackCode.id
|
|
|
+ that.OpTicketBlackCodeData.diId = TicketBlackCode.diId
|
|
|
that.OpTicketBlackCodeData.blackCode = TicketBlackCode.blackCode
|
|
|
that.OpTicketBlackCodeData.price = TicketBlackCode.price
|
|
|
that.OpTicketBlackCodeData.nowPrice = TicketBlackCode.nowPrice
|
|
|
that.OpTicketBlackCodeData.bcPrice = TicketBlackCode.bcPrice
|
|
|
that.OpTicketBlackCodeData.ecPrice = TicketBlackCode.ecPrice
|
|
|
+ that.OpTicketBlackCodeData.remark = TicketBlackCode.remark
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -160,11 +220,47 @@ export default {
|
|
|
},
|
|
|
//团组下拉框选择事件
|
|
|
AirTicketResChange() {
|
|
|
-
|
|
|
+ this.QueryTicketBlackCodeById()
|
|
|
},
|
|
|
//点击保存事件
|
|
|
addBtn() {
|
|
|
+ if (this.DiId == null && this.DiId == undefined && this.DiId == "") {
|
|
|
+ this.$message.error("请选择团组名称");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const that = this;
|
|
|
+ that.$refs.OpTicketBlackCodeData.validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ var url = "/api/Resource/OpTicketBlackCode"
|
|
|
+ that.OpTicketBlackCodeData.createUserId = that.userId;
|
|
|
+ that.OpTicketBlackCodeData.diId = that.DiId
|
|
|
+ that.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: that.OpTicketBlackCodeData
|
|
|
+ }).then(function (res) {
|
|
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$message({
|
|
|
+ message: res.data.msg,
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ setTimeout(() => {
|
|
|
+ that.$router.push('/home/TicketBlackCode')
|
|
|
+ }, 3000);
|
|
|
+ that.loading = true;
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error('请完善信息在保存!');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -178,13 +274,13 @@ export default {
|
|
|
this.DelegationSelectFun()
|
|
|
var that = this
|
|
|
if (that.DiId != undefined && that.id != undefined) {
|
|
|
- that.status = 2;
|
|
|
- //that.isShow = true
|
|
|
+ that.OpTicketBlackCodeData.status = 2;
|
|
|
+ that.isShow = true
|
|
|
} else {
|
|
|
that.isShow = false
|
|
|
- //that.status = 1;
|
|
|
+ that.OpTicketBlackCodeData.status = 1;
|
|
|
}
|
|
|
- this.QueryTicketBlackCodeById();
|
|
|
+ that.QueryTicketBlackCodeById();
|
|
|
}
|
|
|
}
|
|
|
</script>
|