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-10-17 15:46:23 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
71fc80e4c521877fd40c9719cd5d3a6e545b9228
71fc80e4
2 parents
cbc96716
a6cd0b94
Merge branch 'et86-black' into et86
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
15 deletions
src/utils/mixins.js
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
src/views/et86Config/et86RuleConfig/edit/index.vue
src/views/et86Config/et86RuleConfig/edit/mixins/index.js
src/utils/mixins.js
View file @
71fc80e
...
...
@@ -33,6 +33,9 @@ export const inputBlurValidate = {
)
{
this
.
validateForm
=
true
;
this
.
$refs
.
minWeight
.
innerHTML
=
""
;
}
else
{
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
}
// 最小重量有值的情况下
...
...
@@ -62,6 +65,15 @@ export const inputBlurValidate = {
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
}
},
// 最大重量失焦事件
...
...
@@ -110,8 +122,31 @@ export const inputBlurValidate = {
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minWeight
.
innerHTML
=
"请输入有效重量,小数保留5位"
;
}
}
},
validateNumber
(
number
)
{
// 首先检查是否为合法数字
if
(
isNaN
(
number
))
{
return
"请输入有效数字"
;
}
// 然后检查是否大于0
if
(
number
<=
0
)
{
return
"请输入大于0的数字"
;
}
// 如果通过了以上两个条件,则表示数字合法
return
"数字合法"
;
},
// 人民币最小申报价值
inputCNYBlurMin
({
target
},
customVal
)
{
// 申报价值最小值和最大值都为空的情况下
...
...
@@ -163,6 +198,17 @@ export const inputBlurValidate = {
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
},
// 人民币最大申报价值
...
...
@@ -217,6 +263,17 @@ export const inputBlurValidate = {
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minCNYCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
},
// 美元最小申报价值
...
...
@@ -272,6 +329,17 @@ export const inputBlurValidate = {
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
},
// 美元最大申报价值
...
...
@@ -328,6 +396,17 @@ export const inputBlurValidate = {
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
else
{
if
(
target
.
value
&&
isNaN
(
target
.
value
))
{
this
.
validateForm
=
false
;
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
if
(
Number
(
target
.
value
)
<
0
)
{
this
.
validateForm
=
false
;
this
.
$refs
.
minSUDCustomVal
.
innerHTML
=
"请输入有效申报价值,小数保留2位"
;
}
}
},
// 校验件数方法 【件数可以为空但件数不得为0】只能输入正整数
...
...
src/views/allocationConfig/flightAllocConfig/components/RouteInfo.vue
View file @
71fc80e
...
...
@@ -139,7 +139,7 @@
type="textarea"
v-model="item.includeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_
;P_
"
placeholder="URSA之间用分号分隔,例:F1_;F2_;F3_"
>
</el-input>
</el-form-item>
...
...
@@ -151,7 +151,7 @@
type="textarea"
v-model="item.notIncludeUrsa"
:rows="4"
placeholder="URSA之间用分号分隔,例:F1;F2;F3
;P
"
placeholder="URSA之间用分号分隔,例:F1;F2;F3"
>
</el-input>
</el-form-item>
...
...
src/views/allocationConfig/flightAllocConfig/flightRouteInfo/index.vue
View file @
71fc80e
...
...
@@ -164,7 +164,6 @@ export default {
// 保存 【新增/修改航线规则设置】
saveSubmit(item, index) {
item.flightRoute = item.route || item.flightRoute;
item.ruleDate = item.ruleDate || this.queryForm.flightDate;
let parmas = JSON.parse(JSON.stringify(item));
this.returnString(parmas, "cargoType");
this.returnString(parmas, "typeOfGoods");
...
...
@@ -204,6 +203,7 @@ export default {
let validate = validateForm.some((key) => parmas[key]);
if (validate) {
this.loading = true;
parmas.ruleDate = item.ruleDate || this.queryForm.flightDate;
updateOrAddFlight(parmas)
.then((res) => {
const { code, msg, data } = res;
...
...
src/views/et86Config/et86RuleConfig/edit/index.vue
View file @
71fc80e
...
...
@@ -225,7 +225,7 @@
maxlength="1000"
show-word-limit
:rows="4"
placeholder="URSA之间用分号分隔,例:
F1_;F2_;F3_;P
_"
placeholder="URSA之间用分号分隔,例:
P_;W_;A
_"
:disabled="!getRouter"
@blur="includeUrsa"
></el-input>
...
...
@@ -254,7 +254,7 @@
maxlength="1000"
show-word-limit
:rows="4"
placeholder="URSA之间用分号分隔,例:F1;F2;F3
;P
"
placeholder="URSA之间用分号分隔,例:F1;F2;F3"
:disabled="!getRouter"
@blur="notIncludeUrsa"
></el-input>
...
...
@@ -307,7 +307,7 @@
<el-col :span="10">
<el-input
v-model.trim="queryForm.minNumOfPieces"
placeholder="最
少
件数"
placeholder="最
小
件数"
@blur="inputBlurMinPieces($event)"
:disabled="!getRouter"
></el-input>
...
...
@@ -317,7 +317,7 @@
<el-col :span="10">
<el-input
v-model.trim="queryForm.maxNumOfPieces"
placeholder="最
多
件数"
placeholder="最
大
件数"
@blur="inputBlurMaxPieces($event)"
:disabled="!getRouter"
></el-input>
...
...
@@ -422,7 +422,7 @@
<script>
import YlForm from "@/components/YlForm";
import YlTable from "@/components/YlTable";
import YlElInputNumber from "../components/input-number"
import YlElInputNumber from "../components/input-number"
;
import { inputBlurValidate } from "@/utils/mixins";
import { tableAttr } from "./tableConfig";
import {
...
...
@@ -440,7 +440,7 @@ export default {
components: {
YlForm,
YlTable,
YlElInputNumber
YlElInputNumber
,
},
mixins: [indexMixins, inputBlurValidate],
data() {
...
...
@@ -486,11 +486,9 @@ export default {
computed: {
// 获取路由参数
getRouter() {
if (this.$route.query.name == "add") {
if (this.$route.query.name == "add"
|| this.$route.query.name == "edit"
) {
return "保存";
} else if (this.$route.query.name == "edit") {
return "修改";
} else {
}else {
return false;
}
},
...
...
@@ -646,6 +644,7 @@ export default {
this.tableData[this.currentIndex].flightRoute = "";
}
}
this.tableData[this.currentIndex].flightRoute = "";
})
.catch(() => {});
},
...
...
src/views/et86Config/et86RuleConfig/edit/mixins/index.js
View file @
71fc80e
...
...
@@ -132,7 +132,7 @@ export default {
this
.
ursaError
=
"填写的URSA已重复"
;
}
if
(
ursaMark
&&
!
ursaInfo
.
inUrsa
)
{
this
.
ursaError
=
"URSA包含之间用分号分隔,例:P
2_;P3_;P
_"
;
this
.
ursaError
=
"URSA包含之间用分号分隔,例:P
_;W_;A
_"
;
}
if
(
ursaMark
&&
!
ursaInfo
.
repeat
&&
ursaInfo
.
inUrsa
)
{
this
.
ursaError
=
""
;
...
...
@@ -142,7 +142,7 @@ export default {
this
.
notUrsaError
=
"填写的URSA已重复"
;
}
if
(
!
ursaMark
&&
!
ursaInfo
.
inUrsa
)
{
this
.
notUrsaError
=
"URSA不包含之间用分号分隔,例:
P2;P3;P
"
;
this
.
notUrsaError
=
"URSA不包含之间用分号分隔,例:
F1;F2;F3
"
;
}
if
(
!
ursaMark
&&
!
ursaInfo
.
repeat
&&
ursaInfo
.
inUrsa
)
{
this
.
notUrsaError
=
""
;
...
...
Please
register
or
login
to post a comment