Showing
2 changed files
with
61 additions
and
51 deletions
| ... | @@ -128,7 +128,7 @@ export const inputBlurValidate = { | ... | @@ -128,7 +128,7 @@ export const inputBlurValidate = { |
| 128 | this.validateForm = true; | 128 | this.validateForm = true; |
| 129 | } else { | 129 | } else { |
| 130 | this.$refs.minNumOfPieces.innerHTML = ""; | 130 | this.$refs.minNumOfPieces.innerHTML = ""; |
| 131 | - this.$refs.minNumOfPieces.innerHTML = "件数不得小于1"; | 131 | + this.$refs.minNumOfPieces.innerHTML = "最大件数不得小于1"; |
| 132 | this.validateForm = false; | 132 | this.validateForm = false; |
| 133 | } | 133 | } |
| 134 | // 最大件数为空最小件数有值的情况下 | 134 | // 最大件数为空最小件数有值的情况下 |
| ... | @@ -137,8 +137,7 @@ export const inputBlurValidate = { | ... | @@ -137,8 +137,7 @@ export const inputBlurValidate = { |
| 137 | this.validateForm = true; | 137 | this.validateForm = true; |
| 138 | } else { | 138 | } else { |
| 139 | this.$refs.minNumOfPieces.innerHTML = ""; | 139 | this.$refs.minNumOfPieces.innerHTML = ""; |
| 140 | - this.$refs.minNumOfPieces.innerHTML = "件数不得小于1"; | 140 | + this.validateForm = true; |
| 141 | - this.validateForm = false; | ||
| 142 | } | 141 | } |
| 143 | // 左右区间 都为空的情况下 | 142 | // 左右区间 都为空的情况下 |
| 144 | if ( | 143 | if ( |
| ... | @@ -218,33 +217,42 @@ export const inputBlurValidate = { | ... | @@ -218,33 +217,42 @@ export const inputBlurValidate = { |
| 218 | this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位"; | 217 | this.$refs.minWeight.innerHTML = "请输入正整数,小数保留5位"; |
| 219 | } | 218 | } |
| 220 | } | 219 | } |
| 220 | + } else { | ||
| 221 | + this.validateForm = true; | ||
| 222 | + this.$refs.minWeight.innerHTML = ""; | ||
| 221 | } | 223 | } |
| 222 | return this.validateForm; | 224 | return this.validateForm; |
| 223 | }, | 225 | }, |
| 224 | // 报价值【申报价值可以为空为0】 | 226 | // 报价值【申报价值可以为空为0】 |
| 225 | validateCustomVal(value, customVal) { | 227 | validateCustomVal(value, customVal) { |
| 228 | + let coin = { | ||
| 229 | + minCNYCustomVal: "minCNYCustomVal", | ||
| 230 | + maxCNYCustomVal: "minCNYCustomVal", | ||
| 231 | + minSUDCustomVal: "minSUDCustomVal", | ||
| 232 | + maxSUDCustomVal: "minSUDCustomVal", | ||
| 233 | + }; | ||
| 234 | + let currency = { | ||
| 235 | + minCNYCustomVal: 2000, | ||
| 236 | + maxCNYCustomVal: 2000, | ||
| 237 | + minSUDCustomVal: 600, | ||
| 238 | + maxSUDCustomVal: 600, | ||
| 239 | + }; | ||
| 240 | + let markCoin = false; | ||
| 226 | if (value.length) { | 241 | if (value.length) { |
| 227 | this[customVal] = Number(value); | 242 | this[customVal] = Number(value); |
| 228 | - let coin = { | 243 | + // 其中一个有值的情况下 |
| 229 | - minCNYCustomVal: "minCNYCustomVal", | ||
| 230 | - maxCNYCustomVal: "minCNYCustomVal", | ||
| 231 | - minSUDCustomVal: "minSUDCustomVal", | ||
| 232 | - maxSUDCustomVal: "minSUDCustomVal", | ||
| 233 | - }; | ||
| 234 | - let currency = { | ||
| 235 | - minCNYCustomVal: 2000, | ||
| 236 | - maxCNYCustomVal: 2000, | ||
| 237 | - minSUDCustomVal: 600, | ||
| 238 | - maxSUDCustomVal: 600, | ||
| 239 | - }; | ||
| 240 | - let markCoin = false; | ||
| 241 | if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { | 244 | if (customVal == "minCNYCustomVal" || customVal == "maxCNYCustomVal") { |
| 242 | if (this.minCNYCustomVal && this.maxCNYCustomVal) { | 245 | if (this.minCNYCustomVal && this.maxCNYCustomVal) { |
| 243 | this.validateForm = false; | 246 | this.validateForm = false; |
| 244 | markCoin = | 247 | markCoin = |
| 245 | Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal); | 248 | Number(this.maxCNYCustomVal) < Number(this.minCNYCustomVal); |
| 249 | + } else { | ||
| 250 | + this.validateForm = true; | ||
| 251 | + this.$refs[coin[customVal]].innerHTML = ""; | ||
| 246 | } | 252 | } |
| 247 | - } else { | 253 | + } |
| 254 | + // 都有值的情况下 | ||
| 255 | + else { | ||
| 248 | if (this.minSUDCustomVal && this.maxSUDCustomVal) { | 256 | if (this.minSUDCustomVal && this.maxSUDCustomVal) { |
| 249 | this.validateForm = false; | 257 | this.validateForm = false; |
| 250 | markCoin = | 258 | markCoin = |
| ... | @@ -258,28 +266,31 @@ export const inputBlurValidate = { | ... | @@ -258,28 +266,31 @@ export const inputBlurValidate = { |
| 258 | this.$refs[coin[customVal]].innerHTML = ""; | 266 | this.$refs[coin[customVal]].innerHTML = ""; |
| 259 | this.$refs[coin[customVal]].innerHTML = | 267 | this.$refs[coin[customVal]].innerHTML = |
| 260 | "最小申报价值不得大于最大申报价值"; | 268 | "最小申报价值不得大于最大申报价值"; |
| 261 | - } else if (this[customVal] > currency[customVal]) { | ||
| 262 | - this.validateForm = false; | ||
| 263 | - this.$refs[coin[customVal]].innerHTML = ""; | ||
| 264 | - this.$refs[ | ||
| 265 | - coin[customVal] | ||
| 266 | - ].innerHTML = `最大申报值不得大于${currency[customVal]}`; | ||
| 267 | - } else { | ||
| 268 | - this.validateForm = true; | ||
| 269 | - this.$refs[coin[customVal]].innerHTML = ""; | ||
| 270 | } | 269 | } |
| 270 | + // 判断申报价值不得大于上限 | ||
| 271 | + // else if (this[customVal] > currency[customVal]) { | ||
| 272 | + // this.validateForm = false; | ||
| 273 | + // this.$refs[coin[customVal]].innerHTML = ""; | ||
| 274 | + // this.$refs[ | ||
| 275 | + // coin[customVal] | ||
| 276 | + // ].innerHTML = `最大申报值不得大于${currency[customVal]}`; | ||
| 277 | + // } else { | ||
| 278 | + // this.validateForm = true; | ||
| 279 | + // this.$refs[coin[customVal]].innerHTML = ""; | ||
| 280 | + // } | ||
| 271 | } else { | 281 | } else { |
| 272 | if (value.length) { | 282 | if (value.length) { |
| 273 | - if (Number(value) > currency[customVal]) { | 283 | + // 判断申报价值不得大于上限 |
| 274 | - this.validateForm = false; | 284 | + // if (Number(value) > currency[customVal]) { |
| 275 | - this.$refs[coin[customVal]].innerHTML = ""; | 285 | + // this.validateForm = false; |
| 276 | - this.$refs[ | 286 | + // this.$refs[coin[customVal]].innerHTML = ""; |
| 277 | - coin[customVal] | 287 | + // this.$refs[ |
| 278 | - ].innerHTML = `最大申报值不得大于${currency[customVal]}`; | 288 | + // coin[customVal] |
| 279 | - } else { | 289 | + // ].innerHTML = `最大申报值不得大于${currency[customVal]}`; |
| 280 | - this.validateForm = true; | 290 | + // } else { |
| 281 | - this.$refs[coin[customVal]].innerHTML = ""; | 291 | + // this.validateForm = true; |
| 282 | - } | 292 | + // this.$refs[coin[customVal]].innerHTML = ""; |
| 293 | + // } | ||
| 283 | } | 294 | } |
| 284 | } | 295 | } |
| 285 | } else { | 296 | } else { |
| ... | @@ -287,6 +298,9 @@ export const inputBlurValidate = { | ... | @@ -287,6 +298,9 @@ export const inputBlurValidate = { |
| 287 | this.$refs[coin[customVal]].innerHTML = ""; | 298 | this.$refs[coin[customVal]].innerHTML = ""; |
| 288 | this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值"; | 299 | this.$refs[coin[customVal]].innerHTML = "请输入正确申报价值"; |
| 289 | } | 300 | } |
| 301 | + } else { | ||
| 302 | + this.validateForm = true; | ||
| 303 | + this.$refs[coin[customVal]].innerHTML = ""; | ||
| 290 | } | 304 | } |
| 291 | return this.validateForm; | 305 | return this.validateForm; |
| 292 | }, | 306 | }, | ... | ... |
| ... | @@ -71,20 +71,18 @@ | ... | @@ -71,20 +71,18 @@ |
| 71 | <el-button type="primary" v-if="val.status === '3'" size="mini" | 71 | <el-button type="primary" v-if="val.status === '3'" size="mini" |
| 72 | icon="el-icon-video-pause" @click="changeStatus(idx)"> | 72 | icon="el-icon-video-pause" @click="changeStatus(idx)"> |
| 73 | 启 用</el-button> | 73 | 启 用</el-button> |
| 74 | - <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" | 74 | + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" @click="del(idx)"> |
| 75 | - @click="del(idx)">删 | 75 | + 删 除</el-button> |
| 76 | - 除 | ||
| 77 | - </el-button> | ||
| 78 | <div v-if="(routeSatus.indexOf('flightInformationMaintenance') >= 0)" | 76 | <div v-if="(routeSatus.indexOf('flightInformationMaintenance') >= 0)" |
| 79 | style="display: inline-block;"> | 77 | style="display: inline-block;"> |
| 80 | <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> | 78 | <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> |
| 81 | </div> | 79 | </div> |
| 82 | <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" | 80 | <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" |
| 83 | - style="display: inline-block;"> | 81 | + style="display: inline-block;"> |
| 84 | - <span | 82 | + <span |
| 85 | - v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span | 83 | + v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span |
| 86 | - v-else>普通规则</span> | 84 | + v-else>普通规则</span> |
| 87 | - </div> | 85 | + </div> |
| 88 | <el-divider></el-divider> | 86 | <el-divider></el-divider> |
| 89 | <el-col :span="24"> | 87 | <el-col :span="24"> |
| 90 | <el-form-item label="始发站"> | 88 | <el-form-item label="始发站"> |
| ... | @@ -216,7 +214,7 @@ | ... | @@ -216,7 +214,7 @@ |
| 216 | <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" | 214 | <el-col v-for="item in checkBoxItem.cargoStatus" :span="3" |
| 217 | :key="item.id"> | 215 | :key="item.id"> |
| 218 | <el-checkbox v-if="item.status === 1" :label="item.chineseName" | 216 | <el-checkbox v-if="item.status === 1" :label="item.chineseName" |
| 219 | - :name="item.chineseName" :key="item.code"> | 217 | + :name="item.chineseName" :key="item.code" disabled> |
| 220 | <Tooltips :content="item.chineseName" :refName="item.code"> | 218 | <Tooltips :content="item.chineseName" :refName="item.code"> |
| 221 | </Tooltips> | 219 | </Tooltips> |
| 222 | </el-checkbox> | 220 | </el-checkbox> |
| ... | @@ -326,15 +324,13 @@ | ... | @@ -326,15 +324,13 @@ |
| 326 | <el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause" | 324 | <el-button type="primary" v-if="val.status === '3'" size="mini" icon="el-icon-video-pause" |
| 327 | @click="changeStatus(idx)"> | 325 | @click="changeStatus(idx)"> |
| 328 | 启 用</el-button> | 326 | 启 用</el-button> |
| 329 | - <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px" | 327 | + <el-button v-if="val.id" type="danger" size="mini" icon="el-icon-delete" style="margin-right:10px" @click="del(idx)"> |
| 330 | - @click="del(idx)">删 除 | 328 | + 删 除</el-button> |
| 331 | - </el-button> | ||
| 332 | <div v-if="routeSatus.indexOf('flightInformationMaintenance') >= 0" style="display: inline-block;"> | 329 | <div v-if="routeSatus.indexOf('flightInformationMaintenance') >= 0" style="display: inline-block;"> |
| 333 | <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> | 330 | <span v-if="val.id">日期级别规则</span><span v-else>普通规则</span> |
| 334 | </div> | 331 | </div> |
| 335 | <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" style="display: inline-block;"> | 332 | <div v-else-if="(routeSatus.indexOf('FlightAllocConfig') >= 0)" style="display: inline-block;"> |
| 336 | - <span | 333 | + <span v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span |
| 337 | - v-if="infoForm.fltDate != null && infoForm.fltDate != '' && infoForm.fltDate != ' '">日期级别规则</span><span | ||
| 338 | v-else>普通规则</span> | 334 | v-else>普通规则</span> |
| 339 | </div> | 335 | </div> |
| 340 | <el-divider></el-divider> | 336 | <el-divider></el-divider> | ... | ... |
-
Please register or login to post a comment