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
921f3472
Commit
921f3472
authored
May 08, 2024
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出库单单独开
parent
6340a299
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
492 additions
and
0 deletions
+492
-0
index.vue
src/views/ccgl/ckgl/jhd/top/ackdk/index.vue
+76
-0
rkd.vue
src/views/ccgl/ckgl/jhd/top/ackdk/rkd.vue
+170
-0
rkqd.vue
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
+246
-0
No files found.
src/views/ccgl/ckgl/jhd/top/ackdk/index.vue
0 → 100644
View file @
921f3472
<
template
>
<DefaultDialog
:app=
'app'
>
<div
slot=
"form"
style=
"display: flex;height: 78vh;"
>
<div
class=
"full"
>
<el-tabs
class=
"full"
v-model=
"activeName"
>
<el-tab-pane
class=
"full"
label=
"出库单"
name=
"first"
>
<Rkd
@
getRow=
'getRow'
/>
</el-tab-pane>
<el-tab-pane
class=
"full"
label=
"出库单明细"
name=
"second"
>
<Rkqd
ref=
"rkqd"
/>
</el-tab-pane>
</el-tabs>
</div>
</div>
<div
slot=
"reFooter"
class=
"refooter"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"app.showDialog=false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"save()"
>
保 存
</el-button>
</span>
</div>
</DefaultDialog>
</
template
>
<
script
>
import
Rkd
from
'./rkd.vue'
import
Rkqd
from
'./rkqd.vue'
export
default
{
components
:
{
Rkd
,
Rkqd
},
props
:
{
app
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
async
mounted
()
{
},
data
()
{
return
{
row
:{},
activeName
:
'first'
}
},
methods
:
{
save
()
{
let
list
=
this
.
$refs
.
rkqd
.
detailList
console
.
log
(
list
)
},
getRow
(
val
)
{
this
.
row
=
val
this
.
$refs
.
rkqd
.
$refs
.
basePage
.
queryParams
.
mid
=
val
.
id
this
.
$refs
.
rkqd
.
$refs
.
basePage
.
$refs
[
'TablePager'
].
pageQuery
({
// setFirstCurrent: true
})
this
.
activeName
=
'second'
}
}
}
</
script
>
<
style
scoped
>
::v-deep
.el-tabs__content
{
height
:
calc
(
100%
-
50px
);
}
::v-deep
.el-tabs__nav-scroll
{
padding-left
:
10px
;
}
</
style
>
src/views/ccgl/ckgl/jhd/top/ackdk/rkd.vue
0 → 100644
View file @
921f3472
<
template
>
<BasePage
:setFirstCurrent=
'false'
:power=
'power'
@
getRow=
'getRow'
class=
"min_full"
style=
"height: 100%;"
:config=
"config"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!--
<el-button
@
click=
"demo(ctx.basePage)"
size=
'mini'
type=
"primary"
>
直接入库
</el-button>
-->
</
template
>
</BasePage>
</template>
<
script
>
// import Edit from './edit.vue'
export
default
{
data
()
{
return
{
power
:{
add
:
false
,
copy
:
false
,
delButton
:
false
,
editButton
:
false
,
operateButtons
:
false
,
workFlow
:
false
,
/* 表格 */
showSelection
:
false
,
saveSelected
:
false
},
config
:
{
queryDetail
:
true
,
/* 基本配置*/
url
:
'lxyl/ckgl/cktz'
,
queryUrl
:
'wms/ckgl/jhtz/query/cktz'
,
tableTitle
:
[
{
title
:
"出库单号"
,
field
:
"djid"
,
width
:
140
},
{
title
:
"业务日期"
,
field
:
"ywrq"
,
fieldType
:
'ftDate'
},
{
title
:
"事务类型"
,
field
:
"swlxName"
,
width
:
100
},
{
title
:
"仓库"
,
field
:
"ckid"
,
width
:
140
,
hidden
:
true
},
{
title
:
"仓库"
,
field
:
"ckName"
,
width
:
140
},
// {
// title: "需求日期",
// field: "xqrq",
// fieldType: 'ftDate'
// },
{
title
:
"部门"
,
field
:
"bmName"
,
width
:
140
},
{
title
:
"货主"
,
field
:
"hzName"
,
width
:
140
},
{
title
:
"备注"
,
field
:
"bz"
,
width
:
240
},
{
title
:
"维护人"
,
field
:
"whr"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
'ftDateTime'
}
],
queryParams
:
[
[{
label
:
'日期'
,
startProp
:
"start"
,
endProp
:
"end"
,
span
:
8
,
type
:
'RelDaterangeV2'
,
startValue
:
new
Date
().
getTime
()
-
1000
*
60
*
60
*
24
*
30
,
endValue
:
new
Date
().
getTime
(),
},
{
"label"
:
"仓库"
,
"prop"
:
"ckid"
,
"span"
:
6
,
"type"
:
"RelSelect"
,
"value"
:
""
,
"typeConfig"
:
{
"src"
:
"jcsj/common/ck/queryCkid"
,
"match"
:
{
"value"
:
"id"
,
"label"
:
"name"
}
}
},
{
label
:
'单据编号'
,
prop
:
'djid'
,
span
:
6
,
type
:
'input'
,
value
:
''
}
],[
{
label
:
'状态'
,
prop
:
'zt'
,
span
:
6
,
type
:
'RelSelect'
,
typeConfig
:
{
src
:
'lxyl/ckgl/cktz/init/zt'
}
},
{
label
:
'事务类型'
,
prop
:
'swlxid'
,
span
:
6
,
type
:
'RelSelect'
,
typeConfig
:
{
src
:
'lxyl/ckgl/cktz/init/swlx'
}
}
]
],
/* 默认启停用 */
}
}
},
methods
:
{
getRow
(
val
){
this
.
$emit
(
'getRow'
,
val
)
}
},
components
:
{
// Edit
}
}
</
script
>
<
style
>
</
style
>
src/views/ccgl/ckgl/jhd/top/ackdk/rkqd.vue
0 → 100644
View file @
921f3472
<
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"
>
<template
#
dialog=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</
template
>
</BasePage>
<!-- 静态编辑表格-->
<div
lass=
"min_full"
style=
"height: 50%;"
>
<EditTable
ref=
"editTable"
:app=
'editTableConfig'
>
</EditTable>
</div>
</div>
</template>
<
script
>
/*
初始化加载 物料
加载库存,根据物料应发数量 按顺序扣减库存,不够第二条继续,直到达到物料应发数量(不够则不够)
然后手动调整拣货数量
*/
import
wlsx
from
'common/src/mixin/wlphsx.js'
import
wlphsx
from
'common/src/mixin/wlphsx.js'
import
{
toFixed
,
}
from
'common/src/utils/blur.js'
export
default
{
mounted
()
{
},
mixins
:[
wlsx
,
wlphsx
],
data
()
{
return
{
detailList
:{
},
power
:
{
add
:
false
,
copy
:
false
,
/* 手动控制删除 */
delButton
:
false
,
/* 手动控制编辑按钮权限 */
editButton
:
false
,
/* 是否渲染右侧操作按钮 */
operateButtons
:
false
,
/* 是否开启工作流按钮 */
workFlow
:
false
,
/* 表格开启选择,以及记住选择 */
showSelection
:
false
,
saveSelected
:
false
},
config
:
{
/* 基本配置*/
url
:
'lxyl/ckgl/cktz'
,
queryUrl
:
'wms/ckgl/jhtz/query/cktzmx'
,
tableTitle
:
[{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
fieldType
:
"upper"
,
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
:
"jhsl"
,
width
:
100
,
},
{
title
:
"制令号"
,
field
:
"zlh"
,
width
:
180
,
},
{
title
:
"备注"
,
field
:
"bz"
,
width
:
200
}
],
queryParams
:
[],
},
editTableConfig
:
{
editTableTitle
:[
{
label
:
'仓库'
,
prop
:
'ckName'
,
width
:
130
,
},
{
label
:
'唯一码'
,
prop
:
'packCode'
,
width
:
130
,
},
{
label
:
'库位'
,
prop
:
'kwCode'
,
width
:
130
,
},
{
label
:
'库存数量'
,
prop
:
'kcsl'
,
width
:
130
,
},
{
label
:
"检出数量"
,
prop
:
"jhsl"
,
width
:
180
,
allowEdit
:
true
,
type
:
'inputNumber'
,
blur
:
toFixed
(
null
),
change
:
(
row
)
=>
{
/*row.oldJhsl
row.kcsl
*/
if
(
row
.
jhsl
<
0
){
this
.
$warning
(
'数量无效'
)
row
.
jhsl
=
row
.
oldJhsl
return
}
if
(
row
.
jhsl
>
row
.
kcsl
){
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
:
[]
}
}
},
methods
:
{
pageQueryFinally
(
list
){
console
.
log
(
'清空明细list'
)
this
.
detailList
=
{}
list
.
forEach
((
item
)
=>
{
/* 剩余拣货数量==yfsl*/
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
]
/* 开始扣除库存 kcsl*/
kcList
.
forEach
(
kcitem
=>
{
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
})
})
},
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
){
console
.
log
(
ctx
.
singleItem
)
}
else
{
this
.
$warning
(
'请选中一条数据'
)
}
}
},
components
:
{
}
}
</
script
>
<
style
>
</
style
>
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