Showing
2 changed files
with
37 additions
and
31 deletions
| ... | @@ -212,43 +212,43 @@ | ... | @@ -212,43 +212,43 @@ |
| 212 | 212 | ||
| 213 | <el-col :span="12"> | 213 | <el-col :span="12"> |
| 214 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> | 214 | <el-form-item label="高价百分比" prop="highPriceWeightPercent"> |
| 215 | - <el-input-number @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" | 215 | + <el-input-number :disabled="ishighPriceWeightPercent" @change="LowHighAvailable" placeholder="请输入高价百分比" style="width:93%" |
| 216 | v-model="form.highPriceWeightPercent" :precision="2"></el-input-number> | 216 | v-model="form.highPriceWeightPercent" :precision="2"></el-input-number> |
| 217 | </el-form-item> | 217 | </el-form-item> |
| 218 | </el-col> | 218 | </el-col> |
| 219 | 219 | ||
| 220 | <el-col :span="12"> | 220 | <el-col :span="12"> |
| 221 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> | 221 | <el-form-item label="低价百分比" prop="lowPriceWeightPercent"> |
| 222 | - <el-input-number @change="LowHighAvailable" placeholder="请输入低价百分比" style="width:93%" | 222 | + <el-input-number :disabled="true" placeholder="请输入低价百分比" style="width:93%" |
| 223 | v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number> | 223 | v-model="form.lowPriceWeightPercent" :precision="2"></el-input-number> |
| 224 | </el-form-item> | 224 | </el-form-item> |
| 225 | </el-col> | 225 | </el-col> |
| 226 | 226 | ||
| 227 | <el-col :span="12"> | 227 | <el-col :span="12"> |
| 228 | - <el-form-item label="高价可配重量" prop="HighAvailableWeight"> | 228 | + <el-form-item label="高价可配重量" prop="highAvailableWeight"> |
| 229 | 229 | ||
| 230 | <el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%" | 230 | <el-input-number :disabled="true" placeholder="请输入高价可配重量" style="width:93%" |
| 231 | - v-model="form.HighAvailableWeight" :precision="2"></el-input-number> | 231 | + v-model="form.highAvailableWeight" :precision="2"></el-input-number> |
| 232 | </el-form-item> | 232 | </el-form-item> |
| 233 | </el-col> | 233 | </el-col> |
| 234 | <el-col :span="12"> | 234 | <el-col :span="12"> |
| 235 | - <el-form-item label="低价可配重量" prop="LowAvailableWeight"> | 235 | + <el-form-item label="低价可配重量" prop="lowAvailableWeight"> |
| 236 | <el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%" | 236 | <el-input-number :disabled="true" placeholder="请输入低价可配重量" style="width:93%" |
| 237 | - v-model="form.LowAvailableWeight" :precision="2"></el-input-number> | 237 | + v-model="form.lowAvailableWeight" :precision="2"></el-input-number> |
| 238 | </el-form-item> | 238 | </el-form-item> |
| 239 | </el-col> | 239 | </el-col> |
| 240 | 240 | ||
| 241 | 241 | ||
| 242 | <el-col :span="12"> | 242 | <el-col :span="12"> |
| 243 | - <el-form-item label="高价已配重量" prop="HighAllocatedWeight"> | 243 | + <el-form-item label="高价已配重量" prop="highAllocatedWeight"> |
| 244 | <el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%" | 244 | <el-input-number :disabled="true" placeholder="请输入高价已配重量" style="width:93%" |
| 245 | - v-model="form.HighAllocatedWeight" :precision="2"></el-input-number> | 245 | + v-model="form.highAllocatedWeight" :precision="2"></el-input-number> |
| 246 | </el-form-item> | 246 | </el-form-item> |
| 247 | </el-col> | 247 | </el-col> |
| 248 | <el-col :span="12"> | 248 | <el-col :span="12"> |
| 249 | - <el-form-item label="低价已配重量" prop="LowAllocatedWeight"> | 249 | + <el-form-item label="低价已配重量" prop="lowAllocatedWeight"> |
| 250 | <el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%" | 250 | <el-input-number :disabled="true" placeholder="请输入低价已配重量" style="width:93%" |
| 251 | - v-model="form.LowAllocatedWeight" :precision="2"></el-input-number> | 251 | + v-model="form.lowAllocatedWeight" :precision="2"></el-input-number> |
| 252 | </el-form-item> | 252 | </el-form-item> |
| 253 | </el-col> | 253 | </el-col> |
| 254 | <el-col :span="12"> | 254 | <el-col :span="12"> |
| ... | @@ -286,6 +286,8 @@ | ... | @@ -286,6 +286,8 @@ |
| 286 | name: "findAllFltData", | 286 | name: "findAllFltData", |
| 287 | data() { | 287 | data() { |
| 288 | return { | 288 | return { |
| 289 | + //高价百分比是否打开 | ||
| 290 | + ishighPriceWeightPercent:true, | ||
| 289 | //form属性禁用状态 | 291 | //form属性禁用状态 |
| 290 | formdisabled: { | 292 | formdisabled: { |
| 291 | //航班号 | 293 | //航班号 |
| ... | @@ -360,7 +362,7 @@ | ... | @@ -360,7 +362,7 @@ |
| 360 | rules: { | 362 | rules: { |
| 361 | fltNo: [{ | 363 | fltNo: [{ |
| 362 | required: true, | 364 | required: true, |
| 363 | - message: "原航班号不能为空", | 365 | + message: "ACCS原航班号不能为空", |
| 364 | trigger: "blur" | 366 | trigger: "blur" |
| 365 | }], | 367 | }], |
| 366 | fltDate: [{ | 368 | fltDate: [{ |
| ... | @@ -394,7 +396,7 @@ | ... | @@ -394,7 +396,7 @@ |
| 394 | findFltCommonConf(this.form).then(response => { | 396 | findFltCommonConf(this.form).then(response => { |
| 395 | if (response.code == 200) { | 397 | if (response.code == 200) { |
| 396 | //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 | 398 | //额外增重百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置为0,不可编辑 |
| 397 | - if (response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) { | 399 | + if (response.data!=null && response.data.extraWeightPercent != null && response.data.extraWeightPercent != undefined) { |
| 398 | this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent); | 400 | this.$set(this.form, "extraWeightPercent", response.data.extraWeightPercent); |
| 399 | // this.form.extraWeightPercent=response.data.extraWeightPercent; | 401 | // this.form.extraWeightPercent=response.data.extraWeightPercent; |
| 400 | } else { | 402 | } else { |
| ... | @@ -402,28 +404,29 @@ | ... | @@ -402,28 +404,29 @@ |
| 402 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; | 404 | //this.form.extraWeightPercent=response.data.extraWeightPercent=0; |
| 403 | } | 405 | } |
| 404 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 | 406 | //是否开启高低价:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否开启高低价’ 为是,不可编辑 |
| 405 | - if (response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) { | 407 | + if (response.data!=null &&response.data.highLowPriceFlg != null && response.data.highLowPriceFlg != undefined) { |
| 406 | this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false; | 408 | this.form.highLowPriceFlg = response.data.highLowPriceFlg === 1 ? true : false; |
| 407 | } else { | 409 | } else { |
| 408 | - this.form.highLowPriceFlg = true; | 410 | + this.$set(this.form, "highLowPriceFlg", true); |
| 411 | + //this.form.highLowPriceFlg = true; | ||
| 409 | } | 412 | } |
| 410 | //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; | 413 | //是否预审:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘是否预审’ 为否,不可编辑; |
| 411 | - if (response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) { | 414 | + if (response.data!=null &&response.data.isNeedRequired != null && response.data.isNeedRequired != undefined) { |
| 412 | this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false; | 415 | this.form.isNeedRequired = response.data.isNeedRequired === 1 ? true : false; |
| 413 | } else { | 416 | } else { |
| 414 | this.form.isNeedRequired = false; | 417 | this.form.isNeedRequired = false; |
| 415 | } | 418 | } |
| 416 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 | 419 | //高/低价百分比:根据已存在的相同航班号对应的最新值进行设置,如果无相同航班号,按照默认设置‘高价百分比’60%,‘低价百分比’40%,不可编辑 |
| 417 | - if (response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent != | 420 | + if (response.data!=null &&response.data.highPriceWeightPercent != null && response.data.highPriceWeightPercent != |
| 418 | undefined) { | 421 | undefined) { |
| 419 | this.form.highPriceWeightPercent = response.data.highPriceWeightPercent; | 422 | this.form.highPriceWeightPercent = response.data.highPriceWeightPercent; |
| 420 | } else { | 423 | } else { |
| 421 | - this.form.highPriceWeightPercent = response.data.highPriceWeightPercent = 60; | 424 | + this.form.highPriceWeightPercent = 60; |
| 422 | } | 425 | } |
| 423 | - if (response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) { | 426 | + if (response.data!=null &&response.data.lowPriceWeightPercent != null && response.data.lowPriceWeightPercent != undefined) { |
| 424 | this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent; | 427 | this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent; |
| 425 | } else { | 428 | } else { |
| 426 | - this.form.lowPriceWeightPercent = response.data.lowPriceWeightPercent = 40; | 429 | + this.form.lowPriceWeightPercent = 40; |
| 427 | } | 430 | } |
| 428 | this.LowHighAvailable(); | 431 | this.LowHighAvailable(); |
| 429 | } else { | 432 | } else { |
| ... | @@ -528,8 +531,8 @@ | ... | @@ -528,8 +531,8 @@ |
| 528 | this.form.id = null; | 531 | this.form.id = null; |
| 529 | this.form.statusId = this.flightStatuslist[0].id; | 532 | this.form.statusId = this.flightStatuslist[0].id; |
| 530 | this.form.alloctedWeight = 0; //已配重量 | 533 | this.form.alloctedWeight = 0; //已配重量 |
| 531 | - this.form.LowAllocatedWeight = 0; //低价已配重量 | 534 | + this.form.lowAllocatedWeight = 0; //低价已配重量 |
| 532 | - this.form.HighAllocatedWeight = 0; //高价已配重量 | 535 | + this.form.highAllocatedWeight = 0; //高价已配重量 |
| 533 | 536 | ||
| 534 | //航班号 | 537 | //航班号 |
| 535 | this.formdisabled.fltNo = false; | 538 | this.formdisabled.fltNo = false; |
| ... | @@ -549,6 +552,7 @@ | ... | @@ -549,6 +552,7 @@ |
| 549 | 552 | ||
| 550 | //判断是否开启高地价 | 553 | //判断是否开启高地价 |
| 551 | if (this.form.highLowPriceFlg) { | 554 | if (this.form.highLowPriceFlg) { |
| 555 | + this.ishighPriceWeightPercent=false; | ||
| 552 | let Weight = 0; | 556 | let Weight = 0; |
| 553 | //计算实际重量 | 557 | //计算实际重量 |
| 554 | if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) { | 558 | if (this.form.highPriceWeightPercent > 0 || this.form.lowPriceWeightPercent > 0) { |
| ... | @@ -556,24 +560,27 @@ | ... | @@ -556,24 +560,27 @@ |
| 556 | } | 560 | } |
| 557 | //高价可配 | 561 | //高价可配 |
| 558 | if (this.form.highPriceWeightPercent > 0) { | 562 | if (this.form.highPriceWeightPercent > 0) { |
| 559 | - this.$set(this.form, "HighAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | 563 | + this.$set(this.form, "lowPriceWeightPercent", 100-this.form.highPriceWeightPercent); |
| 564 | + this.$set(this.form, "highAvailableWeight", (Weight - this.form.alloctedWeight) * (this.form | ||
| 560 | .highPriceWeightPercent / 100)); | 565 | .highPriceWeightPercent / 100)); |
| 561 | // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) | 566 | // this.form.HighAvailableWeight = Weightall * (this.form.highPriceWeightPercent / 100) |
| 562 | } else { | 567 | } else { |
| 563 | - this.$set(this.form, "HighAvailableWeight", 0); | 568 | + this.$set(this.form, "highAvailableWeight", 0); |
| 564 | // this.form.HighAvailableWeight = 0; | 569 | // this.form.HighAvailableWeight = 0; |
| 565 | } | 570 | } |
| 566 | //低价可配 | 571 | //低价可配 |
| 567 | if (this.form.lowPriceWeightPercent > 0) { | 572 | if (this.form.lowPriceWeightPercent > 0) { |
| 568 | 573 | ||
| 569 | - this.$set(this.form, "LowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form | 574 | + this.$set(this.form, "lowAvailableWeight", (Weight - this.form.alloctedWeight) - this.form |
| 570 | - .HighAvailableWeight); | 575 | + .highAvailableWeight); |
| 571 | - //this.form.LowAvailableWeight = Weightall - this.form.HighAvailableWeight; | 576 | + //this.form.lowAvailableWeight = Weightall - this.form.HighAvailableWeight; |
| 572 | } else { | 577 | } else { |
| 573 | - this.$set(this.form, "LowAvailableWeight", 0); | 578 | + this.$set(this.form, "lowAvailableWeight", 0); |
| 574 | - // this.form.LowAvailableWeight = 0; | 579 | + // this.form.lowAvailableWeight = 0; |
| 575 | } | 580 | } |
| 576 | 581 | ||
| 582 | + }else{ | ||
| 583 | + this.ishighPriceWeightPercent=true; | ||
| 577 | } | 584 | } |
| 578 | 585 | ||
| 579 | }, | 586 | }, |
| ... | @@ -656,8 +663,7 @@ | ... | @@ -656,8 +663,7 @@ |
| 656 | let formdata = JSON.parse(JSON.stringify(this.form)); | 663 | let formdata = JSON.parse(JSON.stringify(this.form)); |
| 657 | 664 | ||
| 658 | //高价百分比和低价百分比和不可以大于100 | 665 | //高价百分比和低价百分比和不可以大于100 |
| 659 | - if (this.form.highLowPriceFlg && formdata.highPriceWeightPercent + formdata.lowPriceWeightPercent != | 666 | + if (this.form.highLowPriceFlg && (formdata.highPriceWeightPercent>100||formdata.highPriceWeightPercent<0) ) { |
| 660 | - 100) { | ||
| 661 | this.$message.warning("请正确填写高低价百分比"); | 667 | this.$message.warning("请正确填写高低价百分比"); |
| 662 | return; | 668 | return; |
| 663 | } | 669 | } | ... | ... |
-
Please register or login to post a comment