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
72e6be7a
Commit
72e6be7a
authored
May 08, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单独分类表格,引用数据统一改变
parent
dbb68e96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
101 additions
and
15 deletions
+101
-15
rkqd.vue
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
+101
-15
No files found.
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
View file @
72e6be7a
...
...
@@ -12,10 +12,25 @@
</BasePage>
<!-- 静态编辑表格-->
<div
lass=
"min_full"
style=
"height: 50%;"
>
<EditTable
ref=
"editTable"
:app=
'editTableConfig'
>
</EditTable>
<div
lass=
"min_full"
style=
"height: 50%;display: flex;"
>
<div
style=
"height: 100%;width: 70%;"
>
<EditTable
ref=
"editTable"
:app=
'editTableConfig'
>
</EditTable>
</div>
<div
style=
"height: 100%;width: 30%;"
>
<EditTable
ref=
"editTable1"
:app=
'editTableConfig2'
>
<
template
slot=
"tabCustom"
>
<el-table-column
label=
"操作"
width=
"90"
header-align=
"center"
fixed=
"right"
>
<template
slot-scope=
"scope"
>
<el-button
style=
"text-align: center;color: red;width: 100%;"
@
click
.
native
.
prevent=
"cz(scope.row)"
type=
"text"
size=
"small"
>
<i
class=
"el-icon-delete"
></i>
重置
</el-button>
</
template
>
</el-table-column>
</template>
</EditTable>
</div>
</div>
...
...
@@ -117,8 +132,8 @@
editTableConfig
:
{
editTableTitle
:
[{
label
:
'仓库'
,
prop
:
'ck
id
'
,
width
:
1
3
0
,
prop
:
'ck
Name
'
,
width
:
1
8
0
,
},
{
label
:
'批号'
,
...
...
@@ -130,17 +145,59 @@
prop
:
'packCode'
,
width
:
130
,
},
{
label
:
'库位'
,
prop
:
'kwCode'
,
width
:
130
,
},
{
label
:
'库存数量'
,
prop
:
'kcsl'
,
width
:
130
,
},
{
label
:
'库位'
,
prop
:
'kwCode'
,
// width: 130,
},
// {
// label: "检出数量",
// prop: "jhsl",
// width: 180,
// allowEdit: true,
// type: 'inputNumber',
// blur: toFixed(null),
// change: (row) => {
// row.jhsl = parseInt(row.jhsl)
// /*row.oldJhsl
// row.kcsl
// */
// if (row.jhsl
<
0
)
{
// this.$warning('数量无效')
// row.jhsl = row.oldJhsl
// return
// }
// if (row.jhsl > row.oldKcsl) {
// this.$warning('数量不能大于原库存数量')
// row.jhsl = row.oldJhsl
// return
// }
// /* 数量为合理数量时*/
// let jhsl = parseInt(row.jhsl)
// let oldJhsl = parseInt(row.oldJhsl)
// let slc = jhsl - oldJhsl
// row.kcsl = row.kcsl - slc
// this.$refs.basePage.$refs.TablePager.tableData.forEach(item => {
// if (item.id == this.$id) {
// item.jhsl = item.jhsl + slc
// }
// })
// /* 记录当前的拣货数量*/
// row.oldJhsl = row.jhsl
// }
// },
],
editTableData
:
[]
},
editTableConfig2
:{
editTableTitle
:[
{
label
:
"检出数量"
,
prop
:
"jhsl"
,
width
:
180
,
...
...
@@ -176,19 +233,47 @@
row
.
oldJhsl
=
row
.
jhsl
}
},
],
editTableData
:
[]
},],
editTableData
:[]
}
}
},
methods
:
{
cz
(
row
){
console
.
log
(
row
)
row
.
jhsl
=
parseInt
(
0
)
/*row.oldJhsl
row.kcsl
*/
if
(
row
.
jhsl
<
0
)
{
this
.
$warning
(
'数量无效'
)
row
.
jhsl
=
row
.
oldJhsl
return
}
if
(
row
.
jhsl
>
row
.
oldKcsl
)
{
this
.
$warning
(
'数量不能大于原库存数量'
)
row
.
jhsl
=
row
.
oldJhsl
return
}
/* 数量为合理数量时*/
let
jhsl
=
parseInt
(
row
.
jhsl
)
let
oldJhsl
=
parseInt
(
row
.
oldJhsl
)
let
slc
=
jhsl
-
oldJhsl
row
.
kcsl
=
row
.
kcsl
-
slc
this
.
$refs
.
basePage
.
$refs
.
TablePager
.
tableData
.
forEach
(
item
=>
{
if
(
item
.
id
==
this
.
$id
)
{
item
.
jhsl
=
item
.
jhsl
+
slc
}
})
/* 记录当前的拣货数量*/
row
.
oldJhsl
=
row
.
jhsl
},
pageQueryFinally
(
list
)
{
console
.
log
(
'清空明细list'
)
this
.
detailList
=
{}
this
.
editTableConfig
.
editTableData
=
[]
this
.
editTableConfig2
.
editTableData
=
[]
list
.
forEach
((
item
)
=>
{
/* 剩余拣货数量==yfsl*/
let
alljhsl
=
item
.
yfsl
...
...
@@ -233,6 +318,7 @@
this
.
$emit
(
'getRow'
,
val
)
this
.
$id
=
val
.
id
this
.
editTableConfig
.
editTableData
=
this
.
detailList
[
this
.
$id
]
this
.
editTableConfig2
.
editTableData
=
this
.
detailList
[
this
.
$id
]
},
demo
(
ctx
)
{
if
(
ctx
.
singleItem
&&
ctx
.
singleItem
.
id
)
{
...
...
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