Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
TFMOM
TF-MOM-WEB
Commits
2bc50d8a
Commit
2bc50d8a
authored
Nov 08, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料确认物料配套发放增加历史扫码录入功能
parent
b43a439b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
178 additions
and
51 deletions
+178
-51
header.vue
...views/taskExecution/components/ConfirmMaterial/header.vue
+178
-51
No files found.
applications/dee-mes/src/views/taskExecution/components/ConfirmMaterial/header.vue
View file @
2bc50d8a
...
...
@@ -83,6 +83,74 @@
</el-popover>
</
template
>
</el-table-column>
<el-table-column
v-if=
"flag"
:width=
"120"
label=
"历史扫码录入"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<el-popover
v-if=
"scope.row.materialType === '标准件' "
v-model=
"scope.row.popoverVisibleHistory"
placement=
"right"
width=
"260"
trigger=
"manual"
popper-class=
"scan-popper"
>
<div
class=
"content"
>
<el-form
:ref=
"'ruleForm' + scope.row.uuid"
:model=
"typing"
:rules=
"rules"
label-width=
"100px"
>
<el-form-item
v-show=
"scanIdShow"
label=
"扫码编码:"
prop=
"scanId"
>
<el-input
:ref=
"scope.row.uuid"
v-model=
"typing.scanId"
placeholder=
"请使用扫码枪录入"
@
change=
"getScanNameHistory"
/>
</el-form-item>
<el-form-item
v-show=
"!scanIdShow"
label=
"型号/件号:"
>
<el-input
v-model=
"typing.scanName"
placeholder=
"型号/件号 加载中..."
/>
</el-form-item>
<el-form-item
label=
"数量:"
prop=
"count"
>
<el-input
v-model=
"typing.count"
placeholder=
"请填写数量"
/>
</el-form-item>
</el-form>
<div
class=
"footer"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"resetForm('ruleForm' + scope.row.uuid, scope.row,'history')"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"submitForm('ruleForm' + scope.row.uuid, scope.row,'history')"
>
确定
</el-button>
</div>
</div>
<div
slot=
"reference"
>
<span
class=
"qiang"
title=
"扫码枪录入"
@
click=
"codeScanBar(scope.row,'history')"
/>
<span
class=
"scan"
title=
"扫码录入"
@
click=
"clickScan(scope.row,'history')"
/>
</div>
</el-popover>
</
template
>
</el-table-column>
<!-- <el-table-column
v-if="flag"
prop="extMaterial.isRecord"
...
...
@@ -113,6 +181,7 @@
align=
"center"
label=
"型号/件号"
sortable
:width=
"140"
show-overflow-tooltip
/>
<el-table-column
...
...
@@ -337,7 +406,8 @@ export default {
},
stateList
:
[],
flag
:
false
,
oriData
:
[]
// 本地row做了处理,需记录返回原数据,扫码时传给后端
oriData
:
[],
// 本地row做了处理,需记录返回原数据,扫码时传给后端
scanType
:
null
}
},
created
()
{},
...
...
@@ -393,6 +463,7 @@ export default {
arr
.
push
({
// weigthObj: null,
popoverVisible
:
false
,
popoverVisibleHistory
:
false
,
uuid
:
uuidv4
(),
...
p
,
actualWeightSelect
:
false
,
...
...
@@ -531,12 +602,26 @@ export default {
return
'scan-code'
}
},
resetForm
(
formName
,
row
)
{
resetForm
(
formName
,
row
,
type
)
{
if
(
type
===
'history'
)
{
row
.
popoverVisibleHistory
=
false
}
else
{
row
.
popoverVisible
=
false
}
this
.
scanIdShow
=
true
this
.
$refs
[
formName
].
resetFields
()
},
clickScan
(
row
)
{
clickScan
(
row
,
type
)
{
if
(
type
===
'history'
)
{
if
(
row
.
stateName
===
'已出库'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'已出库 不可扫码录入!'
,
type
:
'warning'
})
return
}
}
else
{
if
(
row
.
affirm
===
'已确认'
)
{
this
.
$message
({
showClose
:
true
,
...
...
@@ -545,11 +630,34 @@ export default {
})
return
}
this
.
rowId
=
row
.
id
}
this
.
rowId
=
row
.
extSupportingItemId
$
(
'#'
+
this
.
onlyUuid
).
click
()
this
.
scanType
=
type
if
(
type
===
'history'
)
{
row
.
popoverVisibleHistory
=
true
}
else
{
row
.
popoverVisible
=
true
}
},
codeScanBar
(
row
)
{
codeScanBar
(
row
,
type
)
{
if
(
type
===
'history'
)
{
if
(
row
.
stateName
===
'已出库'
)
{
this
.
$message
({
showClose
:
true
,
message
:
'已出库 不可扫码录入'
,
type
:
'warning'
})
return
}
this
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
id
===
row
.
id
)
{
row
.
popoverVisibleHistory
=
true
}
else
{
row
.
popoverVisibleHistory
=
false
}
})
}
else
{
if
(
row
.
affirm
===
'已确认'
)
{
this
.
$message
({
showClose
:
true
,
...
...
@@ -565,20 +673,25 @@ export default {
item
.
popoverVisible
=
false
}
})
this
.
rowId
=
row
.
id
}
this
.
rowId
=
row
.
extSupportingItemId
this
.
$nextTick
(()
=>
{
this
.
$refs
[
row
.
uuid
].
focus
()
})
},
getScanBar
(
info
)
{
this
.
typing
.
scanId
=
info
if
(
this
.
scanType
===
'history'
)
{
this
.
getScanNameHistory
(
info
)
}
else
{
this
.
getScanName
(
info
)
}
},
submitForm
(
formName
,
row
)
{
submitForm
(
formName
,
row
,
type
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
scanIdShow
=
true
this
.
getQRcode
(
row
)
this
.
getQRcode
(
row
,
type
)
this
.
$refs
[
formName
].
resetFields
()
}
else
{
return
false
...
...
@@ -588,33 +701,31 @@ export default {
/**
* **扫描胶漆合格证二维码记实**
*/
getQRcode
(
row
)
{
getQRcode
(
row
,
type
)
{
// 发送请求
// const id = this.row
Id
const
id
=
row
.
extSupportingItem
Id
const
scanId
=
this
.
typing
.
scanId
//
const count = this.typing.count
const
count
=
this
.
typing
.
count
const
currentRow
=
this
.
oriData
.
find
(
item
=>
item
.
jobOutId
===
row
.
jobOutId
)
||
{}
delete
currentRow
.
stateName
row
.
popoverVisible
=
false
row
.
stateName
=
'已出库'
post
(
`/ExtScanCodeRecord/scanErpSorting?erpJobId=
${
scanId
}
`
,
currentRow
,
)
let
requestUrl
=
''
let
param
=
{}
if
(
type
===
'history'
)
{
requestUrl
=
`/ExtScanCodeRecord/saveMaterialConfirmationHead?suppId=
${
id
}
&jbOutId=
${
scanId
}
&amount=
${
count
}
`
param
=
{}
}
else
{
requestUrl
=
`/ExtScanCodeRecord/scanErpSorting?erpJobId=
${
scanId
}
`
param
=
currentRow
}
post
(
requestUrl
,
param
)
.
then
((
res
)
=>
{
if
(
res
.
message
.
includes
(
'成功'
))
{
this
.
$message
({
showClose
:
true
,
message
:
'添加成功!'
,
type
:
'success'
})
}
else
{
this
.
$message
({
showClose
:
true
,
message
:
'添加失败'
,
type
:
'error'
})
}
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{
...
...
@@ -673,7 +784,23 @@ export default {
})
.
catch
((
err
)
=>
console
.
log
(
err
))
.
finally
(()
=>
{})
},
async
getScanNameHistory
(
value
)
{
this
.
scanIdShow
=
false
post
(
`/JobResponseOutStorage/getModelNo?id=
${
value
}
`
,
{}
)
.
then
((
res
)
=>
{
this
.
$set
(
this
.
typing
,
'scanName'
,
res
.
items
)
})
.
catch
((
err
)
=>
{
this
.
scanIdShow
=
true
console
.
log
(
err
)
})
.
finally
(()
=>
{})
}
}
}
</
script
>
...
...
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