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
d9d2d050
Commit
d9d2d050
authored
Jun 11, 2022
by
秦嘉
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物料
parent
4f8be43f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
72 deletions
+17
-72
material.js
src/api/material.js
+1
-34
MaterialFile.vue
src/views/productionInfo/MaterialFile.vue
+16
-38
No files found.
src/api/material.js
View file @
d9d2d050
...
...
@@ -37,13 +37,12 @@ export function changeStaStatus(data) {
// 修改物料表
export
function
updateMaterial
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/nltifsmaterial/update/'
+
businessId
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/
x-www-form-urlencoded
'
'Content-Type'
:
'application/
json
'
}
})
}
...
...
@@ -58,38 +57,6 @@ export function exportMater(query) {
})
}
// 查询配置列表
export
function
listEdit
(
query
)
{
return
request
({
url
:
'/nltmaterialedit/queryNltMaterialEdits'
,
method
:
'get'
,
params
:
query
})
}
// 新增配置
export
function
addEdit
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/nltmaterialedit/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
// 新增配置规则
export
function
addEditRules
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/nltmaterialeditrules/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
})
}
src/views/productionInfo/MaterialFile.vue
View file @
d9d2d050
...
...
@@ -183,7 +183,7 @@
</el-form-item>
</el-form>
<div>
配置SN规则
</div>
<div
style=
"margin-top: 20px; border: 1px solid gray; padding: 10px"
v-for=
"(item, index) in
snRules
List"
>
<div
style=
"margin-top: 20px; border: 1px solid gray; padding: 10px"
v-for=
"(item, index) in
form.nltMaterialEdit
List"
>
<el-form
ref=
"form1"
:rules=
"rules1"
:model=
"item"
size=
"small"
label-width=
"120px"
>
<el-row>
<el-col
:span=
"13"
>
...
...
@@ -251,11 +251,9 @@
<
script
>
import
{
addEdit
,
addEditRules
,
changeStaStatus
,
exportMater
,
getMaterial
,
listEdit
,
listMaterial
,
updateMaterial
}
from
'@/api/material'
...
...
@@ -292,12 +290,6 @@ export default {
Loading
:
true
,
// 遮罩2
Loading1
:
true
,
// sn规则数据
snRulesList
:
[
{
nltMaterialEditRules
:
[]
}
],
// 物料表数据
materialList
:
[],
// 表格总条数
...
...
@@ -414,7 +406,12 @@ export default {
getMaterial
(
row
.
businessId
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
Loading1
=
false
this
.
getEditList
(
row
)
this
.
form
.
nltMaterialEditList
.
forEach
(
item
=>
{
if
(
item
.
nltMaterialEditRules
.
length
===
0
)
{
item
.
nltMaterialEditRules
=
[{
ruleByte
:
''
,
rules
:
''
}]
}
})
console
.
log
(
this
.
form
)
})
},
// 状态修改方法
...
...
@@ -447,18 +444,6 @@ export default {
this
.
Loading
=
false
})
},
// 获取配置数据
getEditList
(
row
)
{
listEdit
({
materId
:
row
.
businessId
}).
then
(
response
=>
{
this
.
snRulesList
=
response
.
data
this
.
snRulesList
.
forEach
(
item
=>
{
if
(
item
.
nltMaterialEditRules
.
length
===
0
)
{
item
.
nltMaterialEditRules
=
[{
ruleByte
:
''
,
rules
:
''
}]
}
console
.
log
(
item
)
})
})
},
// 对话框取消按钮
cancel
()
{
this
.
open
=
false
...
...
@@ -468,22 +453,15 @@ export default {
submitForm
()
{
this
.
$refs
[
'form'
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$refs
[
'form1'
].
validate
(
valid1
=>
{
if
(
valid1
)
{
this
.
$refs
[
'form2'
].
validate
(
valid2
=>
{
if
(
valid2
)
{
updateMaterial
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$message
({
message
:
'修改成功'
,
type
:
'success'
})
this
.
open
=
false
this
.
getMatTable
()
}
})
}
console
.
log
(
this
.
form
,
'这是修改后的form'
)
updateMaterial
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
$message
({
message
:
'修改成功'
,
type
:
'success'
})
this
.
open
=
false
this
.
getMatTable
()
}
})
}
...
...
@@ -492,7 +470,7 @@ export default {
// 增加SN规则方法
addSNRules
()
{
let
temp
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form1
))
this
.
snRules
List
.
push
(
temp
)
this
.
form
.
nltMaterialEdit
List
.
push
(
temp
)
},
// 增加SN规则方法2
addSNRule
(
item
,
index
)
{
...
...
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