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
1
Merge Requests
1
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
dfcde3c6
Commit
dfcde3c6
authored
Mar 25, 2026
by
sunhaiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产任务页面添加生成备料单功能
parent
71b72590
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
61 additions
and
4 deletions
+61
-4
xjrsoft-vue3/src/api/scgl/scrw/index.ts
+18
-0
xjrsoft-vue3/src/views/scgl/scrw/index.vue
+43
-4
No files found.
xjrsoft-vue3/src/api/scgl/scrw/index.ts
View file @
dfcde3c6
...
...
@@ -8,6 +8,7 @@ enum Api {
List
=
'/scgl/scrw/list'
,
Info
=
'/scgl/scrw/info'
,
MesProductionTask
=
'/scgl/scrw'
,
Scbld
=
'/scgl/scrw/scbld'
,
...
...
@@ -88,6 +89,23 @@ export async function deleteMesProductionTask(ids: string[], mode: ErrorMessageM
);
}
/**
* 生成备料单
* @param mesProductionTask
* @param mode
*/
export
async
function
generateWarehousePrepare
(
mesProductionTask
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
post
<
boolean
>
(
{
url
:
Api
.
Scbld
,
params
:
mesProductionTask
,
},
{
errorMessageMode
:
mode
,
},
);
}
xjrsoft-vue3/src/views/scgl/scrw/index.vue
View file @
dfcde3c6
...
...
@@ -54,7 +54,11 @@
import
{
Modal
}
from
'ant-design-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
,
ActionItem
}
from
'/@/components/Table'
;
import
{
getMesProductionTaskPage
,
deleteMesProductionTask
}
from
'/@/api/scgl/scrw'
;
import
{
getMesProductionTaskPage
,
deleteMesProductionTask
,
addMesProductionTask
,
generateWarehousePrepare
}
from
'/@/api/scgl/scrw'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
...
...
@@ -71,7 +75,7 @@
import
Icon
from
'/@/components/Icon/index'
;
const
listSpliceNum
=
ref
(
4
);
//操作列最先展示几个
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
...
...
@@ -92,7 +96,7 @@
const
tableRef
=
ref
();
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
'view'
,
'edit'
,
'ddzh'
,
'delete'
]);
const
actionButtons
=
ref
<
string
[]
>
([
'view'
,
'edit'
,
'ddzh'
,
'delete'
,
'scbld'
]);
const
buttonConfigs
=
computed
(()
=>
{
const
list
=
[
{
...
...
@@ -121,6 +125,15 @@
isEnableLock
:
true
,
},
{
buttonId
:
'2136613468518433899'
,
name
:
'生成备料单'
,
code
:
'scbld'
,
icon
:
'ant-design:form-outlined'
,
isDefault
:
true
,
isUse
:
true
,
isEnableLock
:
true
,
},
{
buttonId
:
'2008813468518432771'
,
name
:
'打印'
,
code
:
'sclld'
,
...
...
@@ -204,7 +217,7 @@
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
});
const
btnEvent
=
{
view
:
handleView
,
add
:
handleAdd
,
edit
:
handleEdit
,
delete
:
handleDelete
};
const
btnEvent
=
{
view
:
handleView
,
add
:
handleAdd
,
edit
:
handleEdit
,
delete
:
handleDelete
,
scbld
:
handleBld
};
const
{
currentRoute
}
=
useRouter
();
...
...
@@ -266,6 +279,32 @@
openModal
(
true
,
{
isUpdate
:
false
});
}
function
handleBld
(
record
:
Recordable
)
{
Modal
.
confirm
({
title
:
t
(
'提示信息'
),
icon
:
createVNode
(
ExclamationCircleOutlined
),
content
:
t
(
'是否生成备料单?'
),
okText
:
t
(
'确认'
),
cancelText
:
t
(
'取消'
),
async
onOk
()
{
let
result
=
await
generateWarehousePrepare
(
record
);
if
(
result
)
{
handleSuccess
();
notification
.
success
({
message
:
'Tip'
,
description
:
'生成成功!'
,
});
}
else
{
notification
.
warning
({
message
:
'Tip'
,
description
:
'任务编号已存在!'
,
});
}
},
onCancel
()
{},
});
}
async
function
handleEdit
(
record
:
Recordable
)
{
const
hasNonDraft
=
record
.
zt
!==
'草稿'
&&
record
.
zt
!==
'未开始'
;
if
(
hasNonDraft
)
{
...
...
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