Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
NLT-e-cigarette
Project
Project
Details
Activity
Releases
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
张伯涛
NLT-e-cigarette
Commits
b9f3b430
Commit
b9f3b430
authored
Sep 04, 2022
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改新增物料勾选问题
parent
25ab9260
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
ModelDetails.vue
src/views/productionInfo/ModelDetails.vue
+12
-7
No files found.
src/views/productionInfo/ModelDetails.vue
View file @
b9f3b430
...
...
@@ -474,6 +474,8 @@ export default {
replaceMaterialList
:
[],
// 记录成品料号回显
endMaterialList
:
[],
// 存一下记录成品料号回显
beforeEndMaterialList
:
[],
// 刷新table num值
tableNum
:
0
,
// 表格第一行数据
...
...
@@ -579,7 +581,6 @@ export default {
if
(
this
.
$store
.
getters
.
searchParams
[
this
.
$route
.
path
])
{
const
{
searchParams
}
=
this
.
$store
.
getters
;
const
{
path
}
=
this
.
$route
const
param
=
JSON
.
parse
(
searchParams
[
path
])
// 保留着的查询条件
console
.
log
(
param
)
this
.
workingLoading
=
param
.
data
.
workingLoading
,
this
.
factory
=
param
.
data
.
factory
,
this
.
htmlType
=
param
.
data
.
htmlType
,
...
...
@@ -758,7 +759,7 @@ export default {
})
this
.
form
.
modelCodeList
=
this
.
form
.
modelCode
.
join
(
';'
)
this
.
positionList
=
this
.
initTableData
(
res
.
data
.
stationList
)
console
.
log
(
this
.
form
.
modelCodeList
)
//
console.log(this.form.modelCodeList)
})
}
else
if
(
this
.
htmlType
===
'2'
)
{
nltordermodelDetail
(
params
).
then
(
res
=>
{
...
...
@@ -917,9 +918,11 @@ export default {
}
})
}
else
if
(
this
.
type
===
'3'
)
{
console
.
log
(
'this.endMaterialList'
,
this
.
endMaterialList
)
this
.
endMaterialList
.
forEach
(
item
=>
{
this
.
addMaterialMap
[
item
.
businessId
]
=
item
})
// 遍历列表数据
this
.
selectPartNum
.
forEach
(
item
=>
{
if
(
this
.
addMaterialMap
[
item
.
businessId
])
{
this
.
$nextTick
(()
=>
{
...
...
@@ -1050,8 +1053,8 @@ export default {
})
}
// 勾选数据 添加
console
.
log
(
this
.
addMaterialMap
,
'this.addMaterialMap[item.businessId]'
)
console
.
log
(
data
,
'data'
)
//
console.log(this.addMaterialMap, 'this.addMaterialMap[item.businessId]')
//
console.log(data, 'data')
data
.
forEach
(
item
=>
{
this
.
addMaterialMap
[
item
.
businessId
]
=
item
})
...
...
@@ -1060,6 +1063,9 @@ export default {
for
(
const
key
in
this
.
addMaterialMap
)
{
this
.
addMaterialList
.
push
(
this
.
addMaterialMap
[
key
])
}
// 勾选改变后最终的list也变
this
.
endMaterialList
=
this
.
addMaterialList
console
.
log
(
'selectChange'
,
this
.
addMaterialList
)
}
},
// 禁用
...
...
@@ -1301,7 +1307,6 @@ export default {
})
}
else
if
(
this
.
htmlType
===
'3'
)
{
nltmodelAdd
(
params
).
then
(
res
=>
{
console
.
log
(
'aaaaaaaaaaaaaaaaa'
)
this
.
$message
.
success
(
'新增成功'
)
this
.
queryParams
=
this
.
$options
.
data
().
queryParams
this
.
positionList
=
this
.
$options
.
data
().
positionList
...
...
@@ -1358,7 +1363,6 @@ export default {
return
}
}
console
.
log
(
'aaaaaaaaaaaaa'
,
this
.
form
.
modelType
,
this
.
addPositionListOne
[
0
].
staType
,
this
.
positionList
)
if
(
this
.
form
.
modelType
===
'3'
&&
this
.
positionList
.
length
===
1
)
{
if
(
this
.
addPositionListOne
[
0
].
staType
!==
'1'
)
{
this
.
$message
.
error
(
'包装测试的第二工站必须为测试工站'
)
...
...
@@ -1412,6 +1416,7 @@ export default {
cancelChoicePart
()
{
this
.
openPartNo
=
false
this
.
modelCodeOne
=
''
this
.
endMaterialList
=
this
.
beforeEndMaterialList
},
// 确定关闭选择成品料号弹窗
submitChoicePart
()
{
...
...
@@ -1445,7 +1450,6 @@ export default {
this
.
$message
.
error
(
'请选择成品物料'
)
return
}
console
.
log
(
this
.
addMaterialList
,
'this.addMaterialList'
)
this
.
form
.
modelCode
=
[]
this
.
form
.
materId
=
[]
this
.
addMaterialList
.
forEach
(
item
=>
{
...
...
@@ -1453,6 +1457,7 @@ export default {
this
.
form
.
materId
.
push
(
item
.
businessId
)
})
this
.
endMaterialList
=
this
.
addMaterialList
this
.
beforeEndMaterialList
=
this
.
addMaterialList
// 存一下
this
.
form
.
modelCodeList
=
this
.
form
.
modelCode
.
join
(
';'
)
this
.
$refs
.
form
.
clearValidate
(
'modelCode'
)
}
...
...
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