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
65e252f0
Commit
65e252f0
authored
May 08, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
关联明细表
parent
d863d867
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
103 deletions
+103
-103
rkqd.vue
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
+103
-103
No files found.
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
View file @
65e252f0
<
template
>
<div
class=
"min_full"
style=
"height: 100%;border: 0px;"
>
<BasePage
@
pageQueryFinally=
'pageQueryFinally'
@
getRow=
'getRow'
ref=
"basePage"
:power=
'power'
:toolButton=
'false'
class=
"min_full"
style=
"height: 50%;"
:showPagination=
'false'
:autoQuery
=
'false'
:config=
"config"
>
<div
class=
"min_full"
style=
"height: 100%;border: 0px;"
>
<BasePage
@
pageQueryFinally=
'pageQueryFinally'
@
getRow=
'getRow'
ref=
"basePage"
:power=
'power'
:toolButton
=
'false'
class=
"min_full"
style=
"height: 50%;"
:showPagination=
'false'
:autoQuery=
'false'
:config=
"config"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
...
...
@@ -39,10 +39,10 @@
},
mixins
:[
wlsx
,
wlphsx
],
mixins
:
[
wlsx
,
wlphsx
],
data
()
{
return
{
detailList
:{
detailList
:
{
},
power
:
{
...
...
@@ -71,40 +71,40 @@
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"物料规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
180
},
{
title
:
"计量单位"
,
field
:
"jldwName"
,
width
:
100
,
},
{
title
:
"应发数量"
,
field
:
"yfsl"
,
width
:
100
,
},
{
title
:
"物料规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
180
},
{
title
:
"计量单位"
,
field
:
"jldwName"
,
width
:
100
,
},
{
title
:
"应发数量"
,
field
:
"yfsl"
,
width
:
100
,
},
{
title
:
"拣货数量"
,
field
:
"jhsl"
,
width
:
100
,
},
{
title
:
"制令号"
,
field
:
"zlh"
,
width
:
180
,
},
title
:
"拣货数量"
,
field
:
"jhsl"
,
width
:
100
,
},
{
title
:
"制令号"
,
field
:
"zlh"
,
width
:
180
,
},
{
title
:
"备注"
,
field
:
"bz"
,
...
...
@@ -115,8 +115,7 @@
},
editTableConfig
:
{
editTableTitle
:[
{
editTableTitle
:
[{
label
:
'仓库'
,
prop
:
'ckid'
,
width
:
130
,
...
...
@@ -149,32 +148,32 @@
type
:
'inputNumber'
,
blur
:
toFixed
(
null
),
change
:
(
row
)
=>
{
row
.
jhsl
=
parseInt
(
row
.
jhsl
)
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
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
}
},
...
...
@@ -186,58 +185,59 @@
},
methods
:
{
pageQueryFinally
(
list
){
pageQueryFinally
(
list
)
{
console
.
log
(
'清空明细list'
)
this
.
detailList
=
{}
this
.
editTableConfig
.
editTableData
=
[]
list
.
forEach
((
item
)
=>
{
this
.
detailList
=
{}
this
.
editTableConfig
.
editTableData
=
[]
list
.
forEach
((
item
)
=>
{
/* 剩余拣货数量==yfsl*/
let
alljhsl
=
item
.
yfsl
this
.
$post
(
'lxyl/rkgl/jhtz/queryAndCalcPkjhtz'
,{
let
alljhsl
=
item
.
yfsl
this
.
$post
(
'lxyl/rkgl/jhtz/queryAndCalcPkjhtz'
,
{
"cktzId"
:
this
.
$refs
.
basePage
.
queryParams
.
mid
,
"wlid"
:
item
.
wlid
,
"wlph"
:
item
.
wlph
,
"zlh"
:
item
.
zlh
}).
then
(
res
=>
{
this
.
detailList
[
item
.
id
]
=
res
.
data
.
records
||
[]
let
kcList
=
this
.
detailList
[
item
.
id
]
"wlid"
:
item
.
wlid
,
"wlph"
:
item
.
wlph
,
"zlh"
:
item
.
zlh
}).
then
(
res
=>
{
this
.
detailList
[
item
.
id
]
=
res
.
data
.
records
||
[]
let
kcList
=
this
.
detailList
[
item
.
id
]
/* 开始扣除库存 kcsl*/
kcList
.
forEach
(
kcitem
=>
{
kcitem
.
oldKcsl
=
kcitem
.
kcsl
kcitem
.
jhsl
=
0
kcitem
.
oldJhsl
=
0
if
(
alljhsl
==
0
){
console
.
log
(
'应发数量分配完毕'
)
}
else
if
(
kcitem
.
kcsl
>=
alljhsl
){
/* 当kc数量大于剩余分配数量*/
console
.
log
(
'kc数量大于剩余分配数量,分配结束'
)
kcitem
.
kcsl
=
kcitem
.
kcsl
-
alljhsl
kcitem
.
jhsl
=
alljhsl
kcitem
.
oldJhsl
=
kcitem
.
jhsl
alljhsl
=
0
}
else
if
(
kcitem
.
kcsl
<
alljhsl
){
console
.
log
(
'kc数量小于剩余分配数量,全部分配继续下个数据'
)
alljhsl
=
alljhsl
-
kcitem
.
kcsl
kcitem
.
jhsl
=
kcitem
.
kcsl
kcitem
.
oldJhsl
=
kcitem
.
jhsl
kcitem
.
kcsl
=
0
}
kcList
.
forEach
(
kcitem
=>
{
kcitem
.
cktzmxid
=
item
.
id
kcitem
.
oldKcsl
=
kcitem
.
kcsl
kcitem
.
jhsl
=
0
kcitem
.
oldJhsl
=
0
if
(
alljhsl
==
0
)
{
console
.
log
(
'应发数量分配完毕'
)
}
else
if
(
kcitem
.
kcsl
>=
alljhsl
)
{
/* 当kc数量大于剩余分配数量*/
console
.
log
(
'kc数量大于剩余分配数量,分配结束'
)
kcitem
.
kcsl
=
kcitem
.
kcsl
-
alljhsl
kcitem
.
jhsl
=
alljhsl
kcitem
.
oldJhsl
=
kcitem
.
jhsl
alljhsl
=
0
}
else
if
(
kcitem
.
kcsl
<
alljhsl
)
{
console
.
log
(
'kc数量小于剩余分配数量,全部分配继续下个数据'
)
alljhsl
=
alljhsl
-
kcitem
.
kcsl
kcitem
.
jhsl
=
kcitem
.
kcsl
kcitem
.
oldJhsl
=
kcitem
.
jhsl
kcitem
.
kcsl
=
0
}
})
item
.
jhsl
=
item
.
yfsl
-
alljhsl
item
.
jhsl
=
item
.
yfsl
-
alljhsl
})
})
},
getRow
(
val
){
this
.
$emit
(
'getRow'
,
val
)
this
.
$id
=
val
.
id
this
.
editTableConfig
.
editTableData
=
this
.
detailList
[
this
.
$id
]
getRow
(
val
)
{
this
.
$emit
(
'getRow'
,
val
)
this
.
$id
=
val
.
id
this
.
editTableConfig
.
editTableData
=
this
.
detailList
[
this
.
$id
]
},
demo
(
ctx
){
if
(
ctx
.
singleItem
&&
ctx
.
singleItem
.
id
)
{
demo
(
ctx
)
{
if
(
ctx
.
singleItem
&&
ctx
.
singleItem
.
id
)
{
console
.
log
(
ctx
.
singleItem
)
}
else
{
}
else
{
this
.
$warning
(
'请选中一条数据'
)
}
}
...
...
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