Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weiqiao-vue
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
金民
weiqiao-vue
Commits
dfc37e17
Commit
dfc37e17
authored
Jan 29, 2026
by
张恒
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/weiqiao-vue3' into weiqiao-vue3
parents
d4c05731
6f360236
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
10 deletions
+21
-10
xjrsoft-vue3/src/views/ckgl/scbl/components/PickListModal.vue
+21
-10
No files found.
xjrsoft-vue3/src/views/ckgl/scbl/components/PickListModal.vue
View file @
dfc37e17
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
v-bind=
"$attrs"
v-bind=
"$attrs"
@
register=
"registerModal"
@
register=
"registerModal"
title=
"生成领料单"
title=
"生成领料单"
width=
"
7
00px"
width=
"
10
00px"
:confirmLoading=
"loading"
:confirmLoading=
"loading"
@
ok=
"handleOk"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
@
cancel=
"handleCancel"
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
/* 表格数据 */
/* 表格数据 */
const
tableData
=
ref
<
any
[]
>
([]);
const
tableData
=
ref
<
any
[]
>
([]);
/* 加载状态 */
/* 加载状态 */
const
loading
=
ref
(
false
);
const
loading
=
ref
(
false
);
...
@@ -42,19 +42,21 @@
...
@@ -42,19 +42,21 @@
const
columns
:
BasicColumn
[]
=
[
const
columns
:
BasicColumn
[]
=
[
{
title
:
'物料编码'
,
dataIndex
:
'wlbh'
,
width
:
120
},
{
title
:
'物料编码'
,
dataIndex
:
'wlbh'
,
width
:
120
},
{
title
:
'物料名称'
,
dataIndex
:
'wlmc'
,
width
:
200
},
{
title
:
'物料名称'
,
dataIndex
:
'wlmc'
,
width
:
200
},
{
title
:
'备料数量'
,
dataIndex
:
'blsl'
,
width
:
200
},
{
title
:
'库存数量'
,
dataIndex
:
'kcl'
,
width
:
200
},
{
{
title
:
'领料数量'
,
title
:
'领料数量'
,
dataIndex
:
'
bl
sl'
,
dataIndex
:
'sl'
,
width
:
130
,
width
:
130
,
// 常驻输入框
// 常驻输入框
customRender
:
({
record
})
=>
customRender
:
({
record
})
=>
h
(
InputNumber
,
{
h
(
InputNumber
,
{
value
:
record
.
blsl
,
value
:
0
,
min
:
0
,
min
:
0
,
max
:
999999
,
max
:
999999
,
size
:
'small'
,
size
:
'small'
,
style
:
{
width
:
'100%'
},
style
:
{
width
:
'100%'
},
onChange
:
(
val
)
=>
(
record
.
bl
sl
=
val
),
// onChange: (val) => (record.
sl = val),
}),
}),
},
},
];
];
...
@@ -69,7 +71,7 @@
...
@@ -69,7 +71,7 @@
async
function
handleOk
()
{
async
function
handleOk
()
{
// 防止重复提交
// 防止重复提交
if
(
loading
.
value
)
return
;
if
(
loading
.
value
)
return
;
// 简单校验:数量不能全 0
// 简单校验:数量不能全 0
const
allZero
=
tableData
.
value
.
every
((
r
)
=>
r
.
blsl
===
0
);
const
allZero
=
tableData
.
value
.
every
((
r
)
=>
r
.
blsl
===
0
);
if
(
allZero
)
{
if
(
allZero
)
{
...
@@ -77,11 +79,20 @@
...
@@ -77,11 +79,20 @@
return
;
return
;
}
}
// 校验库存数量是否足够
const
insufficientItem
=
tableData
.
value
.
find
((
r
)
=>
(
r
.
kcl
||
0
)
<
(
r
.
blsl
||
0
));
if
(
insufficientItem
)
{
createMessage
.
warning
(
`
${
insufficientItem
.
wlmc
}
库存数量不足`
);
return
;
}
// 构建请求参数
// 构建请求参数
const
requestData
=
tableData
.
value
.
map
(
item
=>
({
const
requestData
=
tableData
.
value
.
map
(
(
item
)
=>
({
wlbm
:
item
.
wlbh
,
// 物料编码
wlbm
:
item
.
wlbh
,
// 物料编码
wlmc
:
item
.
wlmc
,
// 物料名称
wlmc
:
item
.
wlmc
,
// 物料名称
sl
:
item
.
blsl
||
0
// 领料数量
blsl
:
item
.
blsl
||
0
,
// 备料数量
kcl
:
item
.
kcl
||
0
,
// 库存数量
sl
:
item
.
sl
||
0
,
// 领料数量
}));
}));
loading
.
value
=
true
;
loading
.
value
=
true
;
...
@@ -94,9 +105,9 @@
...
@@ -94,9 +105,9 @@
},
},
{
{
errorMessageMode
:
'message'
,
errorMessageMode
:
'message'
,
}
}
,
);
);
// 接口调用成功
// 接口调用成功
createMessage
.
success
(
'领料单生成成功'
);
createMessage
.
success
(
'领料单生成成功'
);
emit
(
'success'
,
tableData
.
value
);
// 回传完整数组
emit
(
'success'
,
tableData
.
value
);
// 回传完整数组
...
...
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