jinhui.wang

version:0.5.4,航班维护页面修正

......@@ -42,5 +42,5 @@ module.exports = {
/**
* 版本号
*/
version:'version:0.5.3'
version:'version:0.5.4'
}
......
......@@ -212,43 +212,43 @@
<el-col :span="12">
<el-form-item label="高价百分比" prop="highPriceWeightPercent">
<el-input-number @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
<el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%"
v-model="form.highPriceWeightPercent" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价百分比" prop="lowPriceWeightPercent">
<el-input-number @change="LowHighAvailable" placeholder="请输入低价百分比" style="width:93%"
<el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%"
v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价可配重量" prop="HighAvailableWeight">
<el-form-item label="高价可配重量" prop="highAvailableWeight">
<el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%"
v-model="form.HighAvailableWeight" :precision="2"></el-input-number>
v-model="form.highAvailableWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价可配重量" prop="LowAvailableWeight">
<el-form-item label="低价可配重量" prop="lowAvailableWeight">
<el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%"
v-model="form.LowAvailableWeight" :precision="2"></el-input-number>
v-model="form.lowAvailableWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="高价已配重量" prop="HighAllocatedWeight">
<el-form-item label="高价已配重量" prop="highAllocatedWeight">
<el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%"
v-model="form.HighAllocatedWeight" :precision="2"></el-input-number>
v-model="form.highAllocatedWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="低价已配重量" prop="LowAllocatedWeight">
<el-form-item label="低价已配重量" prop="lowAllocatedWeight">
<el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%"
v-model="form.LowAllocatedWeight" :precision="2"></el-input-number>
v-model="form.lowAllocatedWeight" :precision="2"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -286,6 +286,8 @@
name: "findAllFltData",
data() {
return {
//高价百分比是否打开
ishighPriceWeightPercent:true,
//form属性禁用状态
formdisabled: {
//航班号
......@@ -360,7 +362,7 @@
rules: {
fltNo: [{
required: true,
message: "原航班号不能为空",
message: "ACCS原航班号不能为空",
trigger: "blur"
}],
fltDate: [{
......@@ -394,7 +396,7 @@
findFltCommonConf(this.form).then(response => {
if (response.code == 200) {
//额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑
if (response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) {
if (response.data!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) {
this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent);
// this.form.extraWeightPercent=response.data.extraWeightPercent;
} else {
......@@ -402,28 +404,29 @@
//this.form.extraWeightPercent=response.data.extraWeightPercent=0;
}
//是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑
if (response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) {
if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) {
this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false;
} else {
this.form.highLowPriceFlg = true;
this.$set(this.form, "highLowPriceFlg", true);
//this.form.highLowPriceFlg = true;
}
//是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑;
if (response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) {
if (response.data!=null &&response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) {
this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false;
} else {
this.form.isNeedRequired = false;
}
//高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑
if (response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent !=
if (response.data!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent !=
undefined) {
this.form.highPriceWeightPercent = response.data.highPriceWeightPercent;
} else {
this.form.highPriceWeightPercent = response.data.highPriceWeightPercent = 60;
this.form.highPriceWeightPercent = 60;
}
if (response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) {
if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) {
this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent;
} else {
this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent = 40;
this.form.lowPriceWeightPercent = 40;
}
this.LowHighAvailable();
} else {
......@@ -528,8 +531,8 @@
this.form.id = null;
this.form.statusId = this.flightStatuslist[0].id;
this.form.alloctedWeight = 0; //已配重量
this.form.LowAllocatedWeight = 0; //低价已配重量
this.form.HighAllocatedWeight = 0; //高价已配重量
this.form.lowAllocatedWeight = 0; //低价已配重量
this.form.highAllocatedWeight = 0; //高价已配重量
//航班号
this.formdisabled.fltNo = false;
......@@ -549,6 +552,7 @@
//判断是否开启高地价
if (this.form.highLowPriceFlg) {
this.ishighPriceWeightPercent=false;
let Weight = 0;
//计算实际重量
if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) {
......@@ -556,24 +560,27 @@
}
//高价可配
if (this.form.highPriceWeightPercent > 0) {
this.$set(this.form, "HighAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent);
this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form
.highPriceWeightPercent / 100));
// this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100)
} else {
this.$set(this.form, "HighAvailableWeight", 0);
this.$set(this.form, "highAvailableWeight", 0);
// this.form.HighAvailableWeight = 0;
}
//低价可配
if (this.form.lowPriceWeightPercent > 0) {
this.$set(this.form, "LowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
.HighAvailableWeight);
//this.form.LowAvailableWeight = Weightall - this.form.HighAvailableWeight;
this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form
.highAvailableWeight);
//this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight;
} else {
this.$set(this.form, "LowAvailableWeight", 0);
// this.form.LowAvailableWeight = 0;
this.$set(this.form, "lowAvailableWeight", 0);
// this.form.lowAvailableWeight = 0;
}
}else{
this.ishighPriceWeightPercent=true;
}
},
......@@ -656,8 +663,7 @@
let formdata = JSON.parse(JSON.stringify(this.form));
//高价百分比和低价百分比和不可以大于100
if (this.form.highLowPriceFlg && formdata.highPriceWeightPercent + formdata.lowPriceWeightPercent !=
100) {
if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) {
this.$message.warning("请正确填写高低价百分比");
return;
}
......