Commit 82f47016 by 张恒

fix(scgl): 解决生产计划和生产任务编辑权限控制问题

- 在生产计划模块中添加状态检查,非草稿状态的任务无法编辑并显示提示
- 在生产任务模块中添加状态检查,非草稿状态的任务无法编辑并显示提示
- 集成Modal警告对话框用于用户状态提醒
- 保持原有编辑功能逻辑不变,仅增加前置状态验证
parent e81e3b06
...@@ -532,12 +532,15 @@ export const formProps: FormProps = { ...@@ -532,12 +532,15 @@ export const formProps: FormProps = {
style: { width: '100%' }, style: { width: '100%' },
}, },
}, },
{ {
key: '427fc55accd744d0a6359faf80e45a1b', key: '21610208f2b8428e84de66979709d296',
field: 'sccx', field: 'sccj',
label: '产线', label: '车间',
type: 'associate-select', type: 'select',
component: 'AssociateSelect', component: 'XjrSelect',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { componentProps: {
width: '100%', width: '100%',
...@@ -545,34 +548,29 @@ export const formProps: FormProps = { ...@@ -545,34 +548,29 @@ export const formProps: FormProps = {
placeholder: '请选择', placeholder: '请选择',
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
isMultiple: false,
clearable: false,
disabled: false, disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api', datasourceType: 'api',
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: '/scgl/scrw/getCxByCjbh', path: '/scgl/scrw/getAllChejian',
method: 'GET', method: 'GET',
apiId: 'ecbc0291292c49fca50468561b9770e8', apiId: '59730efb7b4a4439a013cac04926e00e',
apiParams: [ apiParams: [
{ { key: '1', title: 'Query Params', tableInfo: [] },
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'cjid',
value:
'{"bindField":"sccj","fieldKey":"21610208f2b8428e84de66979709d296"}',
required: true,
defaultValue: '0',
bindType: 'data',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql='select cx.*,cx.id as value,cx.cxmc as label from mes_base_chanxian cx join mes_base_cj_cx rela on cx.id=rela.cxid where rela.delete_mark=0 and cx.delete_mark=0 and rela.cjid=#{cjid}'\r\nreturn db.select(sql)", "var sql='select *,id as value,cjmc as label from mes_base_chejian where delete_mark=0'\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
...@@ -693,11 +691,11 @@ export const formProps: FormProps = { ...@@ -693,11 +691,11 @@ export const formProps: FormProps = {
}, },
}, },
{ {
key: '21610208f2b8428e84de66979709d296', key: '427fc55accd744d0a6359faf80e45a1b',
field: 'sccj', field: 'sccx',
label: '车间', label: '产线',
type: 'select', type: 'associate-select',
component: 'XjrSelect', component: 'AssociateSelect',
colProps: { span: 24 }, colProps: { span: 24 },
componentProps: { componentProps: {
width: '100%', width: '100%',
...@@ -705,29 +703,34 @@ export const formProps: FormProps = { ...@@ -705,29 +703,34 @@ export const formProps: FormProps = {
placeholder: '请选择', placeholder: '请选择',
showLabel: true, showLabel: true,
showSearch: false, showSearch: false,
isMultiple: false,
clearable: false,
disabled: false, disabled: false,
staticOptions: [
{ key: 1, label: 'Option 1', value: 'Option 1' },
{ key: 2, label: 'Option 2', value: 'Option 2' },
{ key: 3, label: 'Option 3', value: 'Option 3' },
],
defaultSelect: '',
datasourceType: 'api', datasourceType: 'api',
labelField: 'label', labelField: 'label',
valueField: 'value', valueField: 'value',
apiConfig: { apiConfig: {
path: '/scgl/scrw/getAllChejian', path: '/scgl/scrw/getCxByCjbh',
method: 'GET', method: 'GET',
apiId: '59730efb7b4a4439a013cac04926e00e', apiId: 'ecbc0291292c49fca50468561b9770e8',
apiParams: [ apiParams: [
{ key: '1', title: 'Query Params', tableInfo: [] }, {
key: '1',
title: 'Query Params',
tableInfo: [
{
name: 'cjid',
value:
'{"bindField":"sccj","fieldKey":"21610208f2b8428e84de66979709d296"}',
required: true,
defaultValue: '0',
bindType: 'data',
},
],
},
{ key: '2', title: 'Header', tableInfo: [] }, { key: '2', title: 'Header', tableInfo: [] },
{ key: '3', title: 'Body' }, { key: '3', title: 'Body' },
], ],
script: script:
"var sql='select *,id as value,cjmc as label from mes_base_chejian where delete_mark=0'\r\nreturn db.select(sql)", "var sql='select cx.*,cx.id as value,cx.cxmc as label from mes_base_chanxian cx join mes_base_cj_cx rela on cx.id=rela.cxid where rela.delete_mark=0 and cx.delete_mark=0 and rela.cjid=#{cjid}'\r\nreturn db.select(sql)",
}, },
dicOptions: [], dicOptions: [],
required: false, required: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment