Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qinjianhui
factory_front
Commits
7a7d4b5b
Commit
7a7d4b5b
authored
Dec 02, 2025
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:添加排版类型校验
parent
2e5ae693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
104 additions
and
31 deletions
+104
-31
src/views/order/podUsSchedulingRules/index.vue
+104
-31
No files found.
src/views/order/podUsSchedulingRules/index.vue
View file @
7a7d4b5b
...
...
@@ -171,8 +171,12 @@
--el-switch-off-color: #f56c6c;
"
/>
<div
style=
"color: #606266; margin-left: 155px; margin-right: 10px"
>
状态:
</div>
<div
style=
"color: #606266; margin-left: 155px; margin-right: 10px"
>
状态:
</div>
<el-switch
v-model=
"editForm.status"
active-value=
"ACTIVE"
...
...
@@ -187,42 +191,69 @@
"
/>
</div>
<div
v-if=
"editForm.isAuto"
>
<el-row
:gutter=
"40"
>
<el-col
:span=
"380"
>
<el-form-item
label=
"排版类型:"
<el-form-item
label=
"排版类型:"
prop=
"type"
label-width=
"100"
:rules=
"editForm.isAuto ? [
{ required: true, message: '请选择排版类型', trigger: 'change' }
] : []"
:rules=
"
editForm.isAuto
? [
{
required: true,
message: '请选择排版类型',
trigger: 'change',
},
]
: []
"
>
<el-radio-group
v-model=
"editForm.type"
:required=
"editForm.isAuto"
>
<el-radio-group
v-model=
"editForm.type"
:required=
"editForm.isAuto"
@
change=
"() =>
{
if (editForm.thArrangeMax) {
editFormRef?.validateField('thArrangeMax')
}
}"
>
<el-radio
label=
"tiff"
>
tiff排版
</el-radio>
<el-radio
label=
"png"
>
png排版
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"排版宽度:"
<el-form-item
label=
"排版宽度:"
prop=
"templateWidth"
label-width=
"100"
:rules=
"editForm.isAuto ? [
{ required: true, message: '请选择排版宽度', trigger: 'change' }
] : []"
:rules=
"
editForm.isAuto
? [
{
required: true,
message: '请选择排版宽度',
trigger: 'change',
},
]
: []
"
>
<el-radio-group
v-model=
"editForm.templateWidth"
:required=
"editForm.isAuto"
>
<el-radio-group
v-model=
"editForm.templateWidth"
:required=
"editForm.isAuto"
>
<el-radio
:value=
"42"
>
40+2cm
</el-radio>
<el-radio
:value=
"60"
>
60cm
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<div
style=
"color: #f56c6c; margin: 5px 0"
>
<!-- 注:系统限制烫画工艺一个批次不超过50个生产单! -->
注:系统限制烫画工艺排TIFF类型一个批次生产单件数不超过40,排PNG类型一个批次生产单件数不超过100!
...
...
@@ -232,18 +263,7 @@
label=
"烫画类工艺自动排单一个批次里生产单件数的最大值为:"
prop=
"thArrangeMax"
label-width=
"380"
:rules=
"[
{
required: true,
message: '请输入数量',
trigger: ['blur'],
},
{
pattern: /^\d+$/,
message: '请输入整数',
trigger: ['blur', 'change'],
},
]"
:rules=
"thArrangeMaxRules"
>
<el-input
v-model=
"editForm.thArrangeMax"
...
...
@@ -300,9 +320,11 @@ import {
import
{
Plus
,
Minus
}
from
'@element-plus/icons-vue'
import
LogDialog
from
'.././components/dialog.tsx'
import
CustomizeForm
from
'@/components/CustomizeForm.tsx'
import
{
Edit
}
from
'@element-plus/icons-vue'
import
{
debounce
}
from
'lodash-es'
import
type
{
FormInstance
}
from
'element-plus'
import
{
computed
}
from
'vue'
import
type
{
FormItemRule
}
from
'element-plus'
const
editForm
=
ref
<
BaseForm
>
({
isAuto
:
false
,
status
:
'ACTIVE'
})
const
tableData
=
ref
([])
...
...
@@ -333,7 +355,7 @@ onMounted(() => {
const
dialogVisible
=
ref
(
false
)
const
editFormRef
=
ref
<
InstanceType
<
typeof
CustomizeForm
>
|
null
>
(
null
)
const
editFormRef
=
ref
<
FormInstance
|
null
>
(
null
)
const
paramsList
=
ref
([
'craft_type'
])
...
...
@@ -345,6 +367,57 @@ const rulesList = ref([
])
/**
* @description: 烫画类工艺自动排单最大值的校验规则
*/
const
thArrangeMaxRules
=
computed
(()
=>
{
return
[
{
required
:
true
,
message
:
'请输入数量'
,
trigger
:
[
'blur'
],
},
{
pattern
:
/^
\d
+$/
,
message
:
'请输入整数'
,
trigger
:
[
'blur'
,
'change'
],
},
{
validator
:
(
_rule
:
FormItemRule
,
value
:
string
|
number
|
undefined
,
callback
:
(
error
?:
Error
)
=>
void
)
=>
{
if
(
!
value
)
{
callback
()
return
}
const
numValue
=
Number
(
value
)
if
(
isNaN
(
numValue
))
{
callback
()
return
}
if
(
editForm
.
value
.
type
===
'tiff'
)
{
if
(
numValue
>
40
)
{
callback
(
new
Error
(
'排版类型为TIFF时,最大值不能超过40'
))
}
else
{
callback
()
}
}
else
if
(
editForm
.
value
.
type
===
'png'
)
{
if
(
numValue
>
100
)
{
callback
(
new
Error
(
'排版类型为PNG时,最大值不能超过100'
))
}
else
{
callback
()
}
}
else
{
callback
()
}
},
trigger
:
[
'blur'
,
'change'
],
},
]
})
/**
* @description: 取消按钮
*/
function
cancelFn
()
{
...
...
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