Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
64b2bbca
Commit
64b2bbca
authored
Sep 18, 2022
by
Marcus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
入仓表格表单验证
parent
a6abfda1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
editDialog.vue
src/views/ecw/order/warehousing/components/editDialog.vue
+19
-19
No files found.
src/views/ecw/order/warehousing/components/editDialog.vue
View file @
64b2bbca
...
...
@@ -49,13 +49,13 @@
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"handleDelete"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"handleAdd()"
></el-button>
</div>
<el-form
ref=
"tableForm"
:model=
"
form
"
:rules=
"tableFormRules"
size=
"mini"
>
<el-form
ref=
"tableForm"
:model=
"
tableData
"
:rules=
"tableFormRules"
size=
"mini"
>
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
label=
"箱数"
width=
"150px"
>
<template
v-slot=
"
{r,c,$index}">
<el-form-item
prop=
"cartonsNum
"
>
<el-form-item
:rules=
"tableFormRules.cartonsNum"
:prop=
"$index + '.cartonsNum'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
cartonsNum
}}
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGE_TYPE
,
tableData
[
$index
].
unit
)
}}
...
...
@@ -76,7 +76,7 @@
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"long
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge1"
:prop=
"$index + '.boxGauge1'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
boxGauge
?
tableData
[
$index
].
boxGauge
.
split
(
'
*
'
)[
0
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].boxGauge1"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
...
...
@@ -84,7 +84,7 @@
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"width
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge2"
:prop=
"$index + '.boxGauge2'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
boxGauge
?
tableData
[
$index
].
boxGauge
.
split
(
'
*
'
)[
1
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].boxGauge2"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
...
...
@@ -92,7 +92,7 @@
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"height
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge3"
:prop=
"$index + '.boxGauge3'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
boxGauge
?
tableData
[
$index
].
boxGauge
.
split
(
'
*
'
)[
2
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].boxGauge3"
placeholder=
""
@
blur=
"handleVolume($index)"
></el-input>
</el-form-item>
...
...
@@ -100,7 +100,7 @@
</el-table-column>
<el-table-column
label=
"体积(m³)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"volume
"
>
<el-form-item
:rules=
"tableFormRules.volume"
:prop=
"$index + '.volume'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
volume
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].volume"
placeholder=
""
></el-input>
</el-form-item>
...
...
@@ -108,7 +108,7 @@
</el-table-column>
<el-table-column
label=
"重量(Kg)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"weight
"
>
<el-form-item
:rules=
"tableFormRules.weight"
:prop=
"$index + '.weight'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
weight
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].weight"
placeholder=
""
></el-input>
</el-form-item>
...
...
@@ -116,7 +116,7 @@
</el-table-column>
<el-table-column
label=
"数量"
width=
"130px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"quantityAll
"
>
<el-form-item
:rules=
"tableFormRules.quantityAll"
:prop=
"$index + '.quantityAll'
"
>
<span
v-if=
"tableData[$index].id"
>
{{
tableData
[
$index
].
quantityAll
}}
</span>
<el-input
v-else
v-model.number=
"tableData[$index].quantityAll"
placeholder=
""
>
<template
slot=
"append"
>
个
</
template
>
...
...
@@ -180,13 +180,13 @@
<el-button
style=
"float: right;margin-left: 15px"
size=
"mini"
type=
"primary"
icon=
"el-icon-minus"
circle
@
click=
"handleDelete(1)"
></el-button>
<el-button
style=
"float: right"
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
circle
@
click=
"handleAdd(1)"
></el-button>
</div>
<el-form
ref=
"tableForm1"
:model=
"
form
"
:rules=
"tableFormRules"
size=
"mini"
>
<el-form
ref=
"tableForm1"
:model=
"
tableData1
"
:rules=
"tableFormRules"
size=
"mini"
>
<el-table
:data=
"tableData1"
style=
"width: 100%"
>
<el-table-column
label=
"箱数"
width=
"150px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"cartonsNum
"
>
<el-form-item
:rules=
"tableFormRules.cartonsNum"
:prop=
"$index + '.cartonsNum'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
cartonsNum
}}
{{
getDictDataLabel
(
DICT_TYPE
.
ECW_PACKAGE_TYPE
,
tableData1
[
$index
].
unit
)
}}
...
...
@@ -207,7 +207,7 @@
</el-table-column>
<el-table-column
label=
"长(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"long
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge1"
:prop=
"$index + '.boxGauge1'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
0
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].boxGauge1"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
...
...
@@ -215,7 +215,7 @@
</el-table-column>
<el-table-column
label=
"宽(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"width
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge2"
:prop=
"$index + '.boxGauge2'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
1
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].boxGauge2"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
...
...
@@ -223,7 +223,7 @@
</el-table-column>
<el-table-column
label=
"高(cm)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"height
"
>
<el-form-item
:rules=
"tableFormRules.boxGauge3"
:prop=
"$index + '.boxGauge3'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
boxGauge
?
tableData1
[
$index
].
boxGauge
.
split
(
'
*
'
)[
2
]
:
''
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].boxGauge3"
placeholder=
""
@
blur=
"handleVolume($index, 1)"
></el-input>
</el-form-item>
...
...
@@ -231,7 +231,7 @@
</el-table-column>
<el-table-column
label=
"体积(m³)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"volume
"
>
<el-form-item
:rules=
"tableFormRules.volume"
:prop=
"$index + '.volume'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
volume
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].volume"
placeholder=
""
></el-input>
</el-form-item>
...
...
@@ -239,7 +239,7 @@
</el-table-column>
<el-table-column
label=
"重量(Kg)"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"weight
"
>
<el-form-item
:rules=
"tableFormRules.weight"
:prop=
"$index + '.weight'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
weight
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].weight"
placeholder=
""
></el-input>
</el-form-item>
...
...
@@ -247,7 +247,7 @@
</el-table-column>
<el-table-column
label=
"数量"
width=
"130px"
>
<
template
v-slot=
"{r,c,$index}"
>
<el-form-item
prop=
"quantityAll
"
>
<el-form-item
:rules=
"tableFormRules.quantityAll"
:prop=
"$index + '.quantityAll'
"
>
<span
v-if=
"tableData1[$index].id"
>
{{
tableData1
[
$index
].
quantityAll
}}
</span>
<el-input
v-else
v-model.number=
"tableData1[$index].quantityAll"
placeholder=
""
>
<template
slot=
"append"
>
个
</
template
>
...
...
@@ -378,9 +378,9 @@ export default {
},
tableFormRules
:
{
cartonsNum
:
[{
required
:
true
,
message
:
"
箱数不能为空
"
,
trigger
:
"
blur
"
}],
long
:
[{
required
:
true
,
message
:
"
货物长不能为空
"
,
trigger
:
"
blur
"
}],
width
:
[{
required
:
true
,
message
:
"
货物宽不能为空
"
,
trigger
:
"
blur
"
}],
height
:
[{
required
:
true
,
message
:
"
货物高不能为空
"
,
trigger
:
"
blur
"
}],
boxGauge1
:
[{
required
:
true
,
message
:
"
货物长不能为空
"
,
trigger
:
"
blur
"
}],
boxGauge2
:
[{
required
:
true
,
message
:
"
货物宽不能为空
"
,
trigger
:
"
blur
"
}],
boxGauge3
:
[{
required
:
true
,
message
:
"
货物高不能为空
"
,
trigger
:
"
blur
"
}],
volume
:
[{
required
:
true
,
message
:
"
体积不能为空
"
,
trigger
:
"
blur
"
}],
weight
:
[{
required
:
true
,
message
:
"
重量不能为空
"
,
trigger
:
"
blur
"
}],
quantityAll
:
[{
required
:
true
,
message
:
"
数量不能为空
"
,
trigger
:
"
blur
"
}]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment