Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
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
李俊赕
self-support
Commits
b45390ec
Commit
b45390ec
authored
Aug 30, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 不用物料逻辑处理
parent
71d0f65b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
11 deletions
+18
-11
XhParts.vue
src/components/createCom/XhParts.vue
+15
-11
parts.vue
src/pages/order/parts.vue
+3
-0
No files found.
src/components/createCom/XhParts.vue
View file @
b45390ec
...
@@ -91,8 +91,8 @@ export default {
...
@@ -91,8 +91,8 @@ export default {
methods
:
{
methods
:
{
getWorkOrderParts
()
{
getWorkOrderParts
()
{
// this.lists = JSON.parse(this.dataValue) || []
// this.lists = JSON.parse(this.dataValue) || []
cons
ole
.
log
(
"this.dataValue"
,
this
.
dataValue
)
cons
t
lists
=
this
.
dataValue
?
JSON
.
parse
(
this
.
dataValue
)
:
[]
this
.
lists
=
this
.
dataValue
?
JSON
.
parse
(
this
.
dataValue
)
:
[]
this
.
lists
=
lists
.
filter
(
v
=>
v
.
name
)
},
},
partsChange
(
val
,
index
)
{
partsChange
(
val
,
index
)
{
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
this
.
$set
(
this
.
lists
[
index
],
'quantity'
,
val
)
...
@@ -114,6 +114,7 @@ export default {
...
@@ -114,6 +114,7 @@ export default {
}
}
},
},
valChange
(
val
)
{
valChange
(
val
)
{
if
(
val
)
{
val
.
forEach
((
v
)
=>
{
val
.
forEach
((
v
)
=>
{
const
index
=
this
.
lists
.
findIndex
((
k
)
=>
k
.
part_id
===
v
.
part_id
)
const
index
=
this
.
lists
.
findIndex
((
k
)
=>
k
.
part_id
===
v
.
part_id
)
if
(
index
<
0
)
{
if
(
index
<
0
)
{
...
@@ -122,7 +123,10 @@ export default {
...
@@ -122,7 +123,10 @@ export default {
this
.
$set
(
this
.
lists
,
index
,
v
)
this
.
$set
(
this
.
lists
,
index
,
v
)
}
}
})
})
this
.
valueChange
(
this
.
lists
)
}
else
{
this
.
lists
=
[]
}
this
.
valueChange
(
JSON
.
stringify
(
val
?
this
.
lists
:
[{}]))
},
},
toParts
()
{
toParts
()
{
uni
.
navigateTo
({
uni
.
navigateTo
({
...
...
src/pages/order/parts.vue
View file @
b45390ec
...
@@ -119,6 +119,9 @@
...
@@ -119,6 +119,9 @@
this
.
$u
.
route
({
type
:
'back'
})
this
.
$u
.
route
({
type
:
'back'
})
},
},
cancel
()
{
cancel
()
{
let
pages
=
getCurrentPages
();
let
prevPage
=
pages
[
pages
.
length
-
2
];
//上一个页面
prevPage
.
$vm
.
$refs
[
'fileChildParts'
][
0
].
valChange
()
this
.
$u
.
route
({
type
:
'back'
})
this
.
$u
.
route
({
type
:
'back'
})
},
},
qnFile
(
src
)
{
qnFile
(
src
)
{
...
...
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