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
90ab9742
Commit
90ab9742
authored
Sep 12, 2024
by
wuqian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
质检
parent
bfb28e6e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
24 deletions
+145
-24
components.d.ts
+1
-0
src/components/LogList.vue
+2
-3
src/types/api/order.ts
+5
-0
src/views/order/Quarantine.vue
+96
-19
src/views/order/hook/useQuarantine.ts
+41
-2
No files found.
components.d.ts
View file @
90ab9742
...
@@ -37,6 +37,7 @@ declare module 'vue' {
...
@@ -37,6 +37,7 @@ declare module 'vue' {
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTabs
:
typeof
import
(
'element-plus/es'
)[
'ElTabs'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTag
:
typeof
import
(
'element-plus/es'
)[
'ElTag'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElTooltip
:
typeof
import
(
'element-plus/es'
)[
'ElTooltip'
]
ElUpload
:
typeof
import
(
'element-plus/es'
)[
'ElUpload'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
Icon
:
typeof
import
(
'./src/components/Icon.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
ImageView
:
typeof
import
(
'./src/components/ImageView.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
LogList
:
typeof
import
(
'./src/components/LogList.vue'
)[
'default'
]
...
...
src/components/LogList.vue
View file @
90ab9742
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
<div
v-for=
"l in logList"
v-for=
"l in logList"
:key=
"l.id"
:key=
"l.id"
class=
"log-item flex
flex-align-center
"
class=
"log-item flex"
>
>
<div
class=
"log-item-icon"
>
<div
class=
"log-item-icon"
>
<Icon
name=
"a-2labadianji3x"
/>
<Icon
name=
"a-2labadianji3x"
/>
...
@@ -54,11 +54,10 @@ defineProps({
...
@@ -54,11 +54,10 @@ defineProps({
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.log-item-content
{
.log-item-content
{
flex
:
1
;
flex
:
1
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
//
white-space
:
nowrap
;
}
}
</
style
>
</
style
>
src/types/api/order.ts
View file @
90ab9742
...
@@ -219,6 +219,7 @@ export interface QaData {
...
@@ -219,6 +219,7 @@ export interface QaData {
sourceType
?:
string
sourceType
?:
string
isCheck
?:
boolean
isCheck
?:
boolean
erpSubOrderNumber
?:
string
erpSubOrderNumber
?:
string
remark
?:
string
|
null
}
}
export
interface
InspectionData
{
export
interface
InspectionData
{
...
@@ -258,3 +259,7 @@ export interface Confirm {
...
@@ -258,3 +259,7 @@ export interface Confirm {
id
:
number
|
undefined
id
:
number
|
undefined
dataVersion
:
string
|
undefined
dataVersion
:
string
|
undefined
}
}
export
interface
shopRemark
{
resendNum
?:
number
|
undefined
|
null
remark
?:
string
|
undefined
|
null
}
src/views/order/Quarantine.vue
View file @
90ab9742
...
@@ -61,14 +61,14 @@
...
@@ -61,14 +61,14 @@
>
>
<
template
#
default
=
"{ row
}
"
>
<
template
#
default
=
"{ row
}
"
>
<
span
v
-
if
=
"row.num === row.shipmentNum - row.notPassNum"
<
span
v
-
if
=
"row.num === row.shipmentNum - row.notPassNum"
>
已发货
<
/spa
n
>
已发货
<
/spa
n
>
>
<
span
<
span
v
-
else
-
if
=
"
v
-
else
-
if
=
"
row.num !== row.shipmentNum - row.notPassNum &&
row.num !== row.shipmentNum - row.notPassNum &&
row.shipmentNum > 0
row.shipmentNum > 0
"
"
>
部分发货
<
/spa
n
>
部分发货
<
/spa
n
>
>
<
span
v
-
else
-
if
=
"row.shipmentNum === 0"
>
未发货
<
/span
>
<
span
v
-
else
-
if
=
"row.shipmentNum === 0"
>
未发货
<
/span
>
<
/template
>
<
/template
>
...
@@ -110,8 +110,7 @@
...
@@ -110,8 +110,7 @@
vertical-align: middle;
vertical-align: middle;
"
"
>
>
<
CircleCheck
<
CircleCheck
/>
/>
<
/el-icon
>
<
/el-icon
>
<
el
-
icon
<
el
-
icon
v
-
if
=
"!row.isCheck"
v
-
if
=
"!row.isCheck"
...
@@ -122,8 +121,7 @@
...
@@ -122,8 +121,7 @@
vertical-align: middle;
vertical-align: middle;
"
"
>
>
<
CircleClose
<
CircleClose
/>
/>
<
/el-icon
>
<
/el-icon
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
...
@@ -179,16 +177,14 @@
...
@@ -179,16 +177,14 @@
<
span
class
=
"value"
>
<
span
class
=
"value"
>
{{
{{
(
currentRow
.
lanshouRegion
||
''
)
+
(
currentRow
.
lanshouRegion
||
''
)
+
(
currentRow
.
lanshouAddress
||
''
)
||
'--'
(
currentRow
.
lanshouAddress
||
''
)
||
'--'
}}
}}
<
/span
>
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"left-qa-order-basic-info_item"
>
<
div
class
=
"left-qa-order-basic-info_item"
>
<
span
class
=
"label"
>
发货方式
:
<
/span
>
<
span
class
=
"label"
>
发货方式
:
<
/span
>
<
span
class
=
"value"
>
<
span
class
=
"value"
>
{{
{{
currentRow
.
shippingWay
==
1
?
'送货上门'
:
'快递'
||
'--'
}}
currentRow
.
shippingWay
==
1
?
'送货上门'
:
'快递'
||
'--'
}}
<
/span
>
<
/span
>
<
/div
>
<
/div
>
<
div
class
=
"left-qa-order-basic-info_item"
>
<
div
class
=
"left-qa-order-basic-info_item"
>
...
@@ -245,6 +241,18 @@
...
@@ -245,6 +241,18 @@
{{
currentRow
.
notPassNum
||
0
}}
{{
currentRow
.
notPassNum
||
0
}}
<
/span
>
<
/span
>
<
/div
>
<
/div
>
<
div
v
-
if
=
"currentRow.remark"
class
=
"order-count"
style
=
"line-height: 26px"
>
<
span
class
=
"order-count-label"
style
=
"margin-right: 6px"
>
不通过原因
:
<
/span
>
<
span
class
=
"order-norm-value"
>
{{
currentRow
.
remark
||
'-'
}}
<
/span
>
<
/div
>
<
/div
>
<
/div
>
<
div
<
div
v
-
if
=
"Object.keys(currentRow).length > 0"
v
-
if
=
"Object.keys(currentRow).length > 0"
...
@@ -262,32 +270,101 @@
...
@@ -262,32 +270,101 @@
<
div
class
=
"qa-pass-btn primary"
@
click
=
"onSuccessQc"
>
<
div
class
=
"qa-pass-btn primary"
@
click
=
"onSuccessQc"
>
质检通过
质检通过
<
/div
>
<
/div
>
<
div
class
=
"qa-pass-btn"
@
click
=
"onReissue"
>
打回重发
<
/div
>
<!--
<
div
class
=
"qa-pass-btn"
@
click
=
"onReissue"
>
打回重发
<
/div> --
>
<
div
class
=
"qa-pass-btn"
@
click
=
"onReissues"
>
打回重发
<
/div
>
<
/div
>
<
/div
>
<
div
v
-
else
class
=
"qa-pass-btn-success"
>
<
div
v
-
else
class
=
"qa-pass-btn-success"
>
<
img
<
img
src
=
"../../assets/images/yzj.png"
style
=
"width: 100%"
/>
src
=
"../../assets/images/yzj.png"
style
=
"width: 100%"
/>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<!--
重发原因弹窗
-->
<
el
-
dialog
v
-
model
=
"numVisible"
title
=
"提示"
:
close
-
on
-
click
-
modal
=
"false"
width
=
"600px"
top
=
"6vh"
>
<
el
-
form
ref
=
"formRef"
:
model
=
"formData"
label
-
width
=
"120px"
:
rules
=
"formRules"
>
<
el
-
form
-
item
label
=
"重发数量:"
prop
=
"resendNum"
>
<
el
-
input
v
-
model
=
"formData.resendNum"
type
=
"number"
clearable
placeholder
=
"请输入重发数量"
><
/el-input
>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"原因:"
prop
=
"remark"
>
<
el
-
input
v
-
model
=
"formData.remark"
placeholder
=
"请输入原因"
clearable
><
/el-input
>
<
/el-form-item
>
<
/el-form
>
<
template
#
footer
>
<
div
class
=
"dialog-footer"
>
<
el
-
button
size
=
"large"
@
click
=
"numVisible = false"
>
取消
<
/el-button
>
<
el
-
button
size
=
"large"
type
=
"primary"
@
click
=
"handleConfirm"
>
发货
<
/el-button
>
<
/div
>
<
/template
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
setup
lang
=
"ts"
>
<
script
setup
lang
=
"ts"
>
import
{
CircleClose
,
CircleCheck
}
from
'@element-plus/icons-vue'
import
{
CircleClose
,
CircleCheck
}
from
'@element-plus/icons-vue'
import
useQuarantine
from
'./hook/useQuarantine'
import
useQuarantine
from
'./hook/useQuarantine'
import
{
PropType
}
from
'vue'
import
{
PropType
,
ref
,
reactive
,
shallowRef
}
from
'vue'
import
{
QaData
}
from
'@/types/api/order'
import
{
QaData
,
shopRemark
}
from
'@/types/api/order'
import
{
type
FormInstance
}
from
'element-plus'
const
formRef
=
shallowRef
<
FormInstance
>
()
const
numVisible
=
ref
(
false
)
const
formData
=
reactive
<
shopRemark
>
({
resendNum
:
null
,
remark
:
''
,
}
)
const
formRules
=
reactive
({
resendNum
:
[
{
required
:
true
,
message
:
'请输入重发数量'
,
trigger
:
'blur'
,
}
,
],
remark
:
[
{
required
:
true
,
message
:
'请输入原因'
,
trigger
:
'blur'
,
}
,
],
}
)
const
props
=
defineProps
({
const
props
=
defineProps
({
quarantine
:
{
quarantine
:
{
type
:
Object
as
PropType
<
ReturnType
<
typeof
useQuarantine
>>
,
type
:
Object
as
PropType
<
ReturnType
<
typeof
useQuarantine
>>
,
required
:
true
,
required
:
true
,
}
,
}
,
}
)
}
)
const
onReissues
=
()
=>
{
formData
.
resendNum
=
null
formData
.
remark
=
''
numVisible
.
value
=
true
}
const
handleConfirm
=
async
()
=>
{
await
formRef
.
value
?.
validate
()
giveDelivery
(
formData
)
numVisible
.
value
=
false
}
const
{
const
{
sourceData
,
sourceData
,
allTotal
,
allTotal
,
...
@@ -296,8 +373,8 @@ const {
...
@@ -296,8 +373,8 @@ const {
currentRow
,
currentRow
,
onChangeTab
,
onChangeTab
,
onSuccessQc
,
onSuccessQc
,
onReissue
,
activeTab
,
activeTab
,
giveDelivery
,
onRowClick
,
onRowClick
,
}
=
props
.
quarantine
}
=
props
.
quarantine
const
tableRowClassName
=
({
row
}
:
{
row
:
QaData
}
)
=>
{
const
tableRowClassName
=
({
row
}
:
{
row
:
QaData
}
)
=>
{
...
...
src/views/order/hook/useQuarantine.ts
View file @
90ab9742
import
{
getQaOrderBySubOrderNumber
,
qaFinishedApi
}
from
'@/api/order'
import
{
getQaOrderBySubOrderNumber
,
qaFinishedApi
}
from
'@/api/order'
import
{
InspectionData
,
QaData
}
from
'@/types/api/order'
import
{
InspectionData
,
QaData
,
shopRemark
}
from
'@/types/api/order'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
useValue
}
from
'@/utils/hooks/useValue'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
showConfirm
}
from
'@/utils/ui'
import
{
computed
,
ref
}
from
'vue'
import
{
computed
,
ref
}
from
'vue'
...
@@ -146,6 +146,7 @@ export default function useQuarantine() {
...
@@ -146,6 +146,7 @@ export default function useQuarantine() {
billNumber
:
item
.
billNumber
||
''
,
billNumber
:
item
.
billNumber
||
''
,
version
:
item
.
version
||
''
,
version
:
item
.
version
||
''
,
passCount
:
item
.
passNum
||
0
,
passCount
:
item
.
passNum
||
0
,
remark
:
item
.
remark
||
''
,
}))
}))
await
qaFinishedApi
(
data
)
await
qaFinishedApi
(
data
)
sourceData
.
value
=
[]
sourceData
.
value
=
[]
...
@@ -221,6 +222,40 @@ export default function useQuarantine() {
...
@@ -221,6 +222,40 @@ export default function useQuarantine() {
yzjTotal
.
value
=
allTotal
.
value
-
dzjTotal
.
value
yzjTotal
.
value
=
allTotal
.
value
-
dzjTotal
.
value
qaInputRef
.
value
.
focus
()
qaInputRef
.
value
.
focus
()
}
}
// 新的onReissue
const
giveDelivery
=
(
form
:
shopRemark
)
=>
{
const
resendNum
=
form
.
resendNum
??
0
if
(
Number
(
resendNum
)
>
(
currentRow
.
value
.
shipmentNum
||
0
))
{
return
ElMessage
({
message
:
'重发数量不能大于发货数量'
,
type
:
'warning'
,
offset
:
window
.
innerHeight
/
2
,
})
}
if
(
resendNum
>
0
)
{
currentRow
.
value
.
notPassNum
=
Number
(
form
.
resendNum
)
currentRow
.
value
.
passNum
=
(
currentRow
.
value
.
shipmentNum
||
0
)
-
Number
(
form
.
resendNum
)
currentRow
.
value
[
'remark'
]
=
form
.
remark
??
null
_sourceData
.
value
.
forEach
((
item
)
=>
{
if
(
item
.
subOrderNumber
===
currentRow
.
value
.
subOrderNumber
)
{
item
.
isCheck
=
true
}
})
sourceData
.
value
=
_sourceData
.
value
allTotal
.
value
=
_sourceData
.
value
.
length
dzjTotal
.
value
=
_sourceData
.
value
.
filter
((
item
)
=>
!
item
.
isCheck
).
length
yzjTotal
.
value
=
allTotal
.
value
-
dzjTotal
.
value
}
else
{
return
ElMessage
({
message
:
'重发数量必须大于0!'
,
type
:
'warning'
,
offset
:
window
.
innerHeight
/
2
,
})
}
}
const
onReissue
=
()
=>
{
const
onReissue
=
()
=>
{
ElMessageBox
.
prompt
(
'请输入重量'
,
'提示'
,
{
ElMessageBox
.
prompt
(
'请输入重量'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
@@ -262,7 +297,10 @@ export default function useQuarantine() {
...
@@ -262,7 +297,10 @@ export default function useQuarantine() {
*/
*/
const
playAudio
=
(
key
:
string
)
=>
{
const
playAudio
=
(
key
:
string
)
=>
{
const
audio
=
new
Audio
()
const
audio
=
new
Audio
()
const
audioPath
=
new
URL
(
`../../../assets/audio/
${
key
}
.mp3`
,
import
.
meta
.
url
).
href
const
audioPath
=
new
URL
(
`../../../assets/audio/
${
key
}
.mp3`
,
import
.
meta
.
url
,
).
href
audio
.
src
=
audioPath
audio
.
src
=
audioPath
audio
.
play
()
audio
.
play
()
}
}
...
@@ -284,5 +322,6 @@ export default function useQuarantine() {
...
@@ -284,5 +322,6 @@ export default function useQuarantine() {
onSuccessQc
,
onSuccessQc
,
onReissue
,
onReissue
,
onRowClick
,
onRowClick
,
giveDelivery
,
}
}
}
}
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