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
1031dfe4
Commit
1031dfe4
authored
Jan 22, 2026
by
孙祥林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[孙祥林]fix:生产备料编辑-生成领料单走自定义页面
parent
b74e23fb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
203 additions
and
38 deletions
+203
-38
xjrsoft-vue3/src/views/ckgl/scbl/components/Form.vue
+121
-36
xjrsoft-vue3/src/views/ckgl/scbl/components/PickListModal.vue
+80
-0
xjrsoft-vue3/src/views/ckgl/scbl/components/config.ts
+2
-2
No files found.
xjrsoft-vue3/src/views/ckgl/scbl/components/Form.vue
View file @
1031dfe4
This diff is collapsed.
Click to expand it.
xjrsoft-vue3/src/views/ckgl/scbl/components/PickListModal.vue
0 → 100644
View file @
1031dfe4
<
template
>
<BasicModal
v-bind=
"$attrs"
@
register=
"registerModal"
title=
"生成领料单"
width=
"700px"
@
ok=
"handleOk"
@
cancel=
"handleCancel"
>
<!-- 可编辑表格 -->
<BasicTable
:dataSource=
"tableData"
:columns=
"columns"
:pagination=
"false"
:scroll=
"
{ y: 300 }"
rowKey="id"
/>
</BasicModal>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
defineExpose
}
from
'vue'
;
import
{
BasicModal
,
useModal
}
from
'/@/components/Modal'
;
import
{
BasicTable
,
BasicColumn
}
from
'/@/components/Table'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
h
}
from
'vue'
;
import
{
InputNumber
}
from
'ant-design-vue'
;
const
{
Message
}
=
useMessage
();
const
[
registerModal
,
{
openModal
,
closeModal
}]
=
useModal
();
const
{
createMessage
}
=
useMessage
();
const
emit
=
defineEmits
([
'success'
]);
// ✅ 必须写
/* 表格数据 */
const
tableData
=
ref
<
any
[]
>
([]);
/* 表格列定义 */
const
columns
:
BasicColumn
[]
=
[
{
title
:
'物料编码'
,
dataIndex
:
'wlbh'
,
width
:
120
},
{
title
:
'物料名称'
,
dataIndex
:
'wlmc'
,
width
:
200
},
{
title
:
'领料数量'
,
dataIndex
:
'blsl'
,
width
:
130
,
// 常驻输入框
customRender
:
({
record
})
=>
h
(
InputNumber
,
{
value
:
record
.
blsl
,
min
:
0
,
max
:
999999
,
size
:
'small'
,
style
:
{
width
:
'100%'
},
onChange
:
(
val
)
=>
(
record
.
blsl
=
val
),
}),
},
];
/* 打开弹窗 - 父组件调用 */
function
open
(
rows
:
any
[])
{
tableData
.
value
=
rows
.
map
((
r
)
=>
({
...
r
,
blsl
:
r
.
blsl
||
0
}));
openModal
(
true
);
}
/* 确认 - 回传所有行(含改后的数量) */
function
handleOk
()
{
// 简单校验:数量不能全 0
const
allZero
=
tableData
.
value
.
every
((
r
)
=>
r
.
blsl
===
0
);
if
(
allZero
)
{
createMessage
.
warning
(
'请至少输入一行领料数量'
);
// ✅ 用 createMessage
return
;
}
emit
(
'success'
,
tableData
.
value
);
// 回传完整数组
closeModal
();
}
function
handleCancel
()
{
closeModal
();
}
defineExpose
({
open
});
</
script
>
xjrsoft-vue3/src/views/ckgl/scbl/components/config.ts
View file @
1031dfe4
...
...
@@ -723,10 +723,10 @@ export const formProps: FormProps = {
event
:
[
{
operateType
:
2
,
operateConfig
:
{
js
:
'
formActionType.openModal(curRowData
)'
},
operateConfig
:
{
js
:
'
window.scbl_getSelectedRows(
)'
},
},
],
type
:
2
,
type
:
1
,
modal
:
{
bindModal
:
'2013812486102130689'
,
innerParams
:
[
...
...
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