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
a2611cdb
Commit
a2611cdb
authored
Aug 10, 2026
by
wusiyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 订单添加质检流程 #1009863
parent
012b8e9c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
34 deletions
+47
-34
src/views/order/components/FastProduction.vue
+21
-7
src/views/order/factoryOrderNew/component/QualityFailDialog.vue
+25
-22
src/views/order/factoryOrderNew/index.vue
+1
-5
No files found.
src/views/order/components/FastProduction.vue
View file @
a2611cdb
...
...
@@ -553,6 +553,20 @@ const props = withDefaults(
)
const
emit
=
defineEmits
([
'update:detailVisible'
,
'close'
,
'onSuccess'
])
// 获取自动完成上一单勾选缓存
const
getCachedQualityAutoSure
=
(
fallback
:
boolean
)
=>
{
const
cached
=
localStorage
.
getItem
(
'qualityScanAutoSure'
)
if
(
cached
===
null
)
return
fallback
return
cached
===
'true'
}
// 缓存自动完成上一单勾选
watch
(
isAutoSure
,
(
val
)
=>
{
if
(
props
.
fastKey
===
'qualityScan'
)
{
localStorage
.
setItem
(
'qualityScanAutoSure'
,
String
(
val
))
}
})
const
qualityFailDialogRef
=
ref
<
InstanceType
<
typeof
QualityFailDialog
>>
()
const
historyKeyFromDetail
=
(
d
:
FastProductionDetail
):
string
=>
{
...
...
@@ -647,12 +661,9 @@ watch(
const
len
=
historyData
.
value
if
(
len
.
length
>
0
&&
[
'fastProduction'
,
'fastReceipt'
,
'productionScan'
,
'qualityScan'
,
].
includes
(
props
.
fastKey
)
[
'fastProduction'
,
'fastReceipt'
,
'productionScan'
].
includes
(
props
.
fastKey
,
)
)
{
confirmQuery
(
len
,
0
)
}
...
...
@@ -661,7 +672,10 @@ watch(
trackingNumberRef
.
value
&&
trackingNumberRef
.
value
.
focus
()
TrackingNumber
.
value
=
''
isAutoSure
.
value
=
props
.
defaultAutoSure
isAutoSure
.
value
=
props
.
fastKey
===
'qualityScan'
?
getCachedQualityAutoSure
(
props
.
defaultAutoSure
)
:
props
.
defaultAutoSure
sendNum
.
value
=
0
if
(
props
.
fastKey
===
'qualityScan'
)
{
initPrintDevice
()
...
...
src/views/order/factoryOrderNew/component/QualityFailDialog.vue
View file @
a2611cdb
...
...
@@ -11,9 +11,13 @@
<div
class=
"mb-10"
>
{{
qualityPassed
?
'确定质检通过吗?'
:
'确定质检不通过吗?'
}}
</div>
<ElFormItem
v-if=
"!qualityPassed"
label=
"原因"
prop=
"reasonKey"
>
<ElFormItem
v-if=
"!qualityPassed"
label=
"原因"
prop=
"qualify_problem_type"
>
<ElSelect
v-model=
"form.
reasonKey
"
v-model=
"form.
qualify_problem_type
"
placeholder=
"请选择不通过原因"
style=
"width: 100%"
clearable
...
...
@@ -29,12 +33,12 @@
</ElSelect>
</ElFormItem>
<ElFormItem
v-if=
"!qualityPassed && form.
reasonKey
=== 5"
v-if=
"!qualityPassed && form.
qualify_problem_type
=== 5"
label=
"具体原因"
prop=
"quali
fy_problem_type
"
prop=
"quali
tyIssues
"
>
<ElInput
v-model=
"form.quali
fy_problem_type
"
v-model=
"form.quali
tyIssues
"
placeholder=
"请输入不通过原因"
clearable
/>
...
...
@@ -74,21 +78,21 @@ const updateParams = ref<{ id: number; version?: number }[]>([])
const
reasonOptions
=
ref
<
QualityTypeItem
[]
>
([])
const
form
=
reactive
<
{
reasonKey
:
number
|
string
|
undefined
quali
fy_problem_type
:
string
qualify_problem_type
:
number
|
string
quali
tyIssues
:
string
}
>
({
reasonKey
:
undefined
,
qualify_problem_type
:
''
,
qualityIssues
:
''
,
})
const
rules
=
computed
<
FormRules
>
(()
=>
{
if
(
qualityPassed
.
value
)
return
{}
const
result
:
FormRules
=
{
reasonKey
:
[
qualify_problem_type
:
[
{
required
:
true
,
message
:
'请选择不通过原因'
,
trigger
:
'change'
},
],
}
if
(
form
.
reasonKey
&&
form
.
reasonKey
===
5
)
{
if
(
form
.
qualify_problem_type
&&
form
.
qualify_problem_type
===
5
)
{
result
.
qualify_problem_type
=
[
{
required
:
true
,
message
:
'请输入不通过原因'
,
trigger
:
'blur'
},
]
...
...
@@ -107,8 +111,14 @@ const loadReasons = async () => {
}
const
handleReasonChange
=
()
=>
{
form
.
qualify_problem_type
=
''
formRef
.
value
?.
clearValidate
(
'qualify_problem_type'
)
form
.
qualityIssues
=
form
.
qualify_problem_type
===
5
?
''
:
reasonOptions
.
value
.
find
(
(
item
)
=>
item
.
key
===
form
.
qualify_problem_type
,
)?.
value
||
''
formRef
.
value
?.
clearValidate
(
'qualityIssues'
)
}
const
open
=
(
...
...
@@ -122,8 +132,8 @@ const open = (
}))
qualityPassed
.
value
=
passed
source
.
value
=
sourceType
form
.
reasonKey
=
undefined
form
.
qualify_problem_type
=
''
form
.
qualityIssues
=
''
visible
.
value
=
true
if
(
!
passed
)
void
loadReasons
()
}
...
...
@@ -138,19 +148,12 @@ const handleSubmit = async () => {
if
(
!
qualityPassed
.
value
)
{
await
formRef
.
value
.
validate
()
}
const
selected
=
reasonOptions
.
value
.
find
(
(
item
)
=>
item
.
key
===
form
.
reasonKey
,
)
submitLoading
.
value
=
true
try
{
const
params
=
{
...
form
,
updateParams
:
updateParams
.
value
,
qualityIssues
:
qualityPassed
.
value
?
''
:
selected
?.
value
||
''
,
qualify_problem_type
:
qualityPassed
.
value
?
''
:
form
.
reasonKey
===
5
?
form
.
qualify_problem_type
:
(
form
.
reasonKey
as
number
|
string
),
qualityPassed
:
qualityPassed
.
value
,
source
:
source
.
value
,
}
...
...
src/views/order/factoryOrderNew/index.vue
View file @
a2611cdb
...
...
@@ -1154,11 +1154,7 @@
pending
-
order
-
label
=
"操作单号"
please
-
scan
-
tip
=
"请扫码操作单号"
search
-
input
-
audio
-
tip
=
"请录入操作单号"
:
history
-
storage
-
key
=
"
fastKey === 'qualityScan'
? 'historyFactoryOrderNewQualityData'
: 'historyFactoryOrderNewData'
"
history
-
storage
-
key
=
"historyFactoryOrderNewData"
tracking
-
placeholder
=
"扫描枪输入操作单号"
:
query
-
api
=
"getOperationByNo"
:
complete
-
api
=
"completeOperationById"
...
...
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