Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Fedex
/
imac-vue
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Elements-SY
2023-09-22 11:58:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f6cc0691a816b823ba6763a611f5fbf675be44b
2f6cc069
1 parent
0af9a4f1
modify
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
28 deletions
src/utils/mixins.js
src/views/basicInformation/flightInformationMaintenance/index.vue
src/views/et86Config/et86RuleConfig/edit/index.vue
src/utils/mixins.js
View file @
2f6cc06
...
...
@@ -225,59 +225,64 @@ export const inputBlurValidate = {
},
// 报价值【申报价值可以为空为0】
validateCustomVal
(
value
,
customVal
)
{
// 先判断输入的值是否符合符合规则,再判断申报价值区间
let
coin
=
{
minCNYCustomVal
:
"minCNYCustomVal"
,
maxCNYCustomVal
:
"minCNYCustomVal"
,
minSUDCustomVal
:
"minSUDCustomVal"
,
maxSUDCustomVal
:
"minSUDCustomVal"
,
};
// 区间范围
let
currency
=
{
minCNYCustomVal
:
2000
,
maxCNYCustomVal
:
2000
,
minSUDCustomVal
:
600
,
maxSUDCustomVal
:
600
,
};
let
markCoin
=
false
;
if
(
value
.
length
)
{
this
[
customVal
]
=
Number
(
value
);
if
(
/^
(
0|
[
1-9
]\d
*
)(
.
\d{1,2})?
$/
.
test
(
this
[
customVal
]))
{
// 其中一个有值的情况下人民币
if
(
customVal
==
"minCNYCustomVal"
||
customVal
==
"maxCNYCustomVal"
)
{
if
(
customVal
==
"minCNYCustomVal"
||
customVal
==
"maxCNYCustomVal"
)
{
// 如果人民币两个都有值的情况下
if
(
this
.
minCNYCustomVal
&&
this
.
maxCNYCustomVal
)
{
// 判断右区间是否大于左区间
if
(
Number
(
this
.
maxCNYCustomVal
)
<
Number
(
this
.
minCNYCustomVal
))
{
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
"最小申报价值不得大于最大申报价值"
;
this
.
validateForm
=
false
;
markCoin
=
Number
(
this
.
maxCNYCustomVal
)
<
Number
(
this
.
minCNYCustomVal
);
}
else
{
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
""
;
this
.
validateForm
=
true
;
}
}
else
{
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
""
;
this
.
validateForm
=
true
;
}
}
// 都有值的情况下美元
else
{
// 其中一个有值的情况下美元
if
(
customVal
==
"minSUDCustomVal"
||
customVal
==
"maxSUDCustomVal"
)
{
// 如果美元两个都有值的情况下
if
(
this
.
minSUDCustomVal
&&
this
.
maxSUDCustomVal
)
{
// 判断右区间是否大于左区间
if
(
Number
(
this
.
maxSUDCustomVal
)
<
Number
(
this
.
minSUDCustomVal
))
{
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
"最小申报价值不得大于最大申报价值"
;
this
.
validateForm
=
false
;
markCoin
=
Number
(
this
.
maxSUDCustomVal
)
<
Number
(
this
.
minSUDCustomVal
)
;
}
}
else
{
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
""
;
this
.
validateForm
=
true
;
}
if
(
/^
(
0|
[
1-9
]\d
*
)(
.
\d{1,2})?
$/
.
test
(
this
[
customVal
]))
{
if
(
this
[
customVal
]
>=
0
)
{
if
(
markCoin
)
{
this
.
validateForm
=
false
;
}
else
{
this
.
validateForm
=
true
;
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
""
;
this
.
$refs
[
coin
[
customVal
]].
innerHTML
=
"最小申报价值不得大于最大申报价值"
;
}
// 判断申报价值不得大于上限
// else if (this[customVal] > currency[customVal]) {
// this.validateForm = false;
// this.$refs[coin[customVal]].innerHTML = "";
// this.$refs[
// coin[customVal]
// ].innerHTML = `最大申报值不得大于${currency[customVal]}`;
// } else {
// this.validateForm = true;
// this.$refs[coin[customVal]].innerHTML = "";
// }
}
}
else
{
this
.
validateForm
=
false
;
...
...
src/views/basicInformation/flightInformationMaintenance/index.vue
View file @
2f6cc06
...
...
@@ -1001,6 +1001,9 @@ export default {
//总重量更新
// formdata.totalWeight = this.Weightall()
formdata.route = this.form.route.toString().replace(/,/g, ';')
if(this.form.extraWeightPercent == undefined || this.form.extraWeightPercent == null){
formdata.extraWeightPercent = 0
}
//处理数据
saveOrUpdate(formdata).then((response) => {
if (response.code === 200) {
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
2f6cc06
...
...
@@ -520,7 +520,8 @@ export default {
const { code, data, msg } = res;
if (code == 200) {
data.list.flightRankDtoList.map((item) => {
if (name == "view") { // 跳转页面传过来的字段值等于view展示查看
if (name == "view") {
// 跳转页面传过来的字段值等于view展示查看
item.edit = true;
} else {
item.edit = false;
...
...
@@ -535,7 +536,8 @@ export default {
// ET86配舱航班顺位列表
this.tableData = data.list.flightRankDtoList;
Object.keys(data.list.fltRuleDto).map((key) => {
if (key == "multiHs") { // N为单品名,Y为多品名
if (key == "multiHs") {
// N为单品名,Y为多品名
if (data.list.fltRuleDto[key] == "N") {
data.list.fltRuleDto[key] = true;
} else {
...
...
@@ -696,6 +698,7 @@ export default {
// 表单提交
submitForm(formName) {
this.$refs[formName].validate((valid) => {
console.log(this.queryForm, valid);
if (valid) {
// 爆仓是否继续配舱
const newtTableData = JSON.parse(JSON.stringify(this.tableData));
...
...
Please
register
or
login
to post a comment