Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
lxyl-vue
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
李苏
lxyl-vue
Commits
dfd98b05
Commit
dfd98b05
authored
Dec 26, 2023
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检验单调整
parent
1e63bf83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
+55
-5
tzqd.vue
src/views/ccgl/ckgl/jhd/tzqd.vue
+27
-4
add.vue
src/views/ccgl/zlgl/jyd/top/add.vue
+28
-1
No files found.
src/views/ccgl/ckgl/jhd/tzqd.vue
View file @
dfd98b05
...
...
@@ -116,7 +116,7 @@
editTableTitle
:
[{
label
:
'唯一码'
,
prop
:
'packCode'
,
width
:
1
0
0
,
width
:
1
3
0
,
},
{
label
:
'名称'
,
...
...
@@ -230,9 +230,13 @@
methods
:
{
save
(){
/* 源数据*/
let
originalList
=
this
.
original
.
map
(
item
=>
item
.
packid
)
let
originalMap
=
{}
let
originalList
=
this
.
original
.
map
(
item
=>
{
originalMap
[
item
.
packid
]
=
item
.
jhsl
return
item
.
packid
})
/* 现有数据*/
let
nowList
=
this
.
editTableConfig
.
editTableData
.
map
(
item
=>
item
.
id
)
let
nowList
=
this
.
editTableConfig
.
editTableData
.
map
(
item
=>
item
.
pack
id
)
/* 遍历删除的数据*/
let
delArr
=
this
.
original
.
filter
(
item
=>
{
if
(
!
nowList
.
includes
(
item
.
packid
)){
...
...
@@ -245,8 +249,27 @@
})
/* 新增的数据*/
let
addArr
=
[]
/* 修改的数据*/
let
editArr
=
[]
this
.
editTableConfig
.
editTableData
/* 未修改的数据*/
let
noeditArr
=
[]
this
.
editTableConfig
.
editTableData
.
forEach
(
item
=>
{
if
(
originalList
.
includes
(
item
.
packid
)){
/* 如果新数据在源数据也有*/
if
(
item
.
jhsl
==
originalMap
.
jhsl
){
noeditArr
.
push
(
item
)
}
else
{
item
.
flag
=
'U'
editArr
.
push
(
item
)
}
}
else
{
/* 如果没有那么就是新增数据*/
item
.
flag
=
'I'
addArr
.
push
(
item
)
}
})
let
finList
=
[...
delArr
,...
editArr
,...
addArr
,...
noeditArr
]
console
.
log
(
finList
)
},
/* 计算保存
n为新值
...
...
src/views/ccgl/zlgl/jyd/top/add.vue
View file @
dfd98b05
...
...
@@ -93,6 +93,31 @@
field
:
"packmxSl"
,
width
:
140
},
{
title
:
"装托数量"
,
field
:
"ztsl"
,
width
:
140
},
{
title
:
"容器状态"
,
field
:
"rqZt"
,
width
:
140
,
transform
:
{
"url"
:
"wms/jcsj/rq/init/zt"
,
"label"
:
"name"
,
"value"
:
"id"
}
},
{
title
:
"包装状态"
,
field
:
"packZt"
,
width
:
140
,
transform
:
{
"url"
:
"wms/jcsj/pack/init/zt"
,
"label"
:
"name"
,
"value"
:
"id"
}
},
{
title
:
"维护人"
,
field
:
"whr"
...
...
@@ -131,7 +156,9 @@
save
(){
let
list
=
this
.
$refs
.
basePage
.
$refs
.
TablePager
.
selectedList
||
[]
if
(
list
.
length
!=
0
){
this
.
$post
(
'lxyl/zlgl/ukcjyd/add'
,
list
).
then
(
res
=>
{
this
.
$post
(
'lxyl/zlgl/ukcjyd/add'
,{
list
}).
then
(
res
=>
{
if
(
res
.
success
){
this
.
app
.
showDialog
=
false
this
.
app
.
refresh
()
...
...
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