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
580e8759
Commit
580e8759
authored
Mar 18, 2026
by
董晓奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划右图内容调整,计划明细名称(tab页)不能为物料,改为计划明细
parent
2d52f1ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
150 deletions
+68
-150
xjrsoft-vue3/src/views/scgl/scjh/index.vue
+68
-150
No files found.
xjrsoft-vue3/src/views/scgl/scjh/index.vue
View file @
580e8759
<
template
>
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<template
#
resizeRight
>
...
@@ -11,7 +10,9 @@
...
@@ -11,7 +10,9 @@
<template
#
toolbar
>
<template
#
toolbar
>
<template
v-for=
"button in tableButtonConfig"
:key=
"button.code"
>
<template
v-for=
"button in tableButtonConfig"
:key=
"button.code"
>
<a-button
v-if=
"button.isDefault"
type=
"primary"
@
click=
"buttonClick(button.code)"
>
<a-button
v-if=
"button.isDefault"
type=
"primary"
@
click=
"buttonClick(button.code)"
>
<template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
<template
#
icon
>
<Icon
:icon=
"button.icon"
/>
</
template
>
{{ button.name }}
{{ button.name }}
</a-button>
</a-button>
<CustomButtonModal
v-else-if=
"button.buttonType == 'modal'"
:info=
"button"
/>
<CustomButtonModal
v-else-if=
"button.buttonType == 'modal'"
:info=
"button"
/>
...
@@ -21,51 +22,36 @@
...
@@ -21,51 +22,36 @@
:danger=
"button.buttonType === 'danger'"
:danger=
"button.buttonType === 'danger'"
@
click=
"buttonClick(button.code)"
@
click=
"buttonClick(button.code)"
>
>
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
<
template
#
icon
>
<Icon
:icon=
"button.icon"
/>
</
template
>
{{ button.name }}
{{ button.name }}
</a-button>
</a-button>
</template>
</template>
</template>
</template>
<
template
#
bodyCell=
"{ column, record }"
>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.dataIndex === 'action'"
>
<template
v-if=
"column.dataIndex === 'action'"
>
<TableAction
<TableAction
:actions=
"getLessActions(record)"
:actions=
"getLessActions(record)"
:dropDownActions=
"getMoreActions(record)"
:dropDownActions=
"getMoreActions(record)"
/>
/>
</
template
>
</
template
>
<
template
v-else-if=
"column.dataIndex && column?.listStyle"
>
<
template
v-else-if=
"column.dataIndex && column?.listStyle"
>
<span
:style=
"executeListStyle(getValue(record, column, 'style'), column?.listStyle)"
>
{{
<span
:style=
"executeListStyle(getValue(record, column, 'style'), column?.listStyle)"
>
{{
getValue
(
record
,
column
,
'value'
)
getValue
(
record
,
column
,
'value'
)
}}
</span>
}}
</span>
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
</template>
</template>
<ScjhModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
<ScjhModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
,
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
}
from
'vue'
;
}
from
'vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
,
ActionItem
}
from
'/@/components/Table'
;
import
{
BasicTable
,
useTable
,
TableAction
,
ActionItem
}
from
'/@/components/Table'
;
...
@@ -78,48 +64,22 @@
...
@@ -78,48 +64,22 @@
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
executeListStyle
,
getValue
}
from
'/@/hooks/web/useListStyle'
;
//列表样式配置
import
{
executeListStyle
,
getValue
}
from
'/@/hooks/web/useListStyle'
;
//列表样式配置
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
ScjhModal
from
'./components/ScjhModal.vue'
;
import
ScjhModal
from
'./components/ScjhModal.vue'
;
import
{
searchFormSchema
,
columns
}
from
'./components/config'
;
import
{
searchFormSchema
,
columns
}
from
'./components/config'
;
import
Icon
from
'/@/components/Icon/index'
;
import
Icon
from
'/@/components/Icon/index'
;
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
import
{
rksqMesProductOutput
}
from
"/@/api/scgl/ccmx"
;
import
{
rksqMesProductOutput
}
from
'/@/api/scgl/ccmx'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
const
{
...
@@ -136,12 +96,7 @@
...
@@ -136,12 +96,7 @@
const
filterColumns
=
filterColumnAuth
(
columns
);
const
filterColumns
=
filterColumnAuth
(
columns
);
const
tableRef
=
ref
();
const
tableRef
=
ref
();
//展示在列表内的按钮
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
'view'
,
'edit'
,
'delete'
]);
const
actionButtons
=
ref
<
string
[]
>
([
'view'
,
'edit'
,
'delete'
]);
const
buttonConfigs
=
computed
(()
=>
{
const
buttonConfigs
=
computed
(()
=>
{
...
@@ -211,19 +166,13 @@
...
@@ -211,19 +166,13 @@
};
};
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
const
formIdComputedRef
=
computed
(()
=>
currentRoute
.
value
.
meta
.
formId
as
string
);
const
formIdComputedRef
=
computed
(()
=>
currentRoute
.
value
.
meta
.
formId
as
string
);
provide
<
Ref
<
string
>>
(
'currentFormId'
,
formIdComputedRef
);
provide
<
Ref
<
string
>>
(
'currentFormId'
,
formIdComputedRef
);
const
selectedKeys
=
ref
<
string
[]
>
([]);
const
selectedKeys
=
ref
<
string
[]
>
([]);
const
selectedRowsData
=
ref
<
any
[]
>
([]);
const
selectedRowsData
=
ref
<
any
[]
>
([]);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
}]
=
useTable
({
...
@@ -240,25 +189,18 @@
...
@@ -240,25 +189,18 @@
fieldMapToTime
:
[],
fieldMapToTime
:
[],
showResetButton
:
false
,
showResetButton
:
false
,
},
},
bordered
:
false
,
bordered
:
false
,
beforeFetch
:
(
params
)
=>
{
beforeFetch
:
(
params
)
=>
{
pageParamsInfo
.
value
=
{
...
params
,
FormId
:
formIdComputedRef
.
value
,
PK
:
'id'
}
pageParamsInfo
.
value
=
{
...
params
,
FormId
:
formIdComputedRef
.
value
,
PK
:
'id'
};
return
pageParamsInfo
.
value
;
return
pageParamsInfo
.
value
;
},
},
afterFetch
:
(
res
)
=>
{
afterFetch
:
(
res
)
=>
{
selectedKeys
.
value
=
[];
selectedKeys
.
value
=
[];
selectedRowsData
.
value
=
[];
selectedRowsData
.
value
=
[];
},
},
useSearchForm
:
true
,
useSearchForm
:
true
,
showTableSetting
:
true
,
showTableSetting
:
true
,
striped
:
false
,
striped
:
false
,
actionColumn
:
{
actionColumn
:
{
width
:
195
,
width
:
195
,
...
@@ -270,26 +212,21 @@
...
@@ -270,26 +212,21 @@
size
:
false
,
size
:
false
,
},
},
customRow
,
customRow
,
isAdvancedQuery
:
false
,
isAdvancedQuery
:
false
,
querySelectOption
:
JSON
.
stringify
(
searchFormSchema
),
querySelectOption
:
JSON
.
stringify
(
searchFormSchema
),
objectId
:
formIdComputedRef
.
value
,
////系统表单formId,自定义表单releaseId的id值
objectId
:
formIdComputedRef
.
value
,
////系统表单formId,自定义表单releaseId的id值
});
});
function
buttonClick
(
code
)
{
function
buttonClick
(
code
)
{
btnEvent
[
code
]();
btnEvent
[
code
]();
}
}
function
handleAdd
()
{
function
handleAdd
()
{
openModal
(
true
,
{
isUpdate
:
false
});
openModal
(
true
,
{
isUpdate
:
false
});
}
}
async
function
handleEdit
(
record
:
Recordable
)
{
async
function
handleEdit
(
record
:
Recordable
)
{
const
hasNonDraft
=
(
record
.
zt
!==
'草稿'
)
;
const
hasNonDraft
=
record
.
zt
!==
'草稿'
;
if
(
hasNonDraft
)
{
if
(
hasNonDraft
)
{
Modal
.
warning
({
Modal
.
warning
({
title
:
'提示'
,
title
:
'提示'
,
...
@@ -298,33 +235,29 @@
...
@@ -298,33 +235,29 @@
return
;
return
;
}
}
let
field
=
'id'
;
let
field
=
'id'
;
try
{
try
{
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
if
(
hasIn
)
{
if
(
hasIn
)
{
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
);
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
);
if
(
res
!==
null
)
{
if
(
res
!==
null
)
{
return
;
return
;
}
}
}
}
let
info
=
{
let
info
=
{
id
:
record
[
field
],
id
:
record
[
field
],
isUpdate
:
true
,
isUpdate
:
true
,
};
};
openModal
(
true
,
info
);
openModal
(
true
,
info
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
function
handleDelete
(
record
:
Recordable
)
{
function
handleDelete
(
record
:
Recordable
)
{
deleteList
([
record
.
id
]);
deleteList
([
record
.
id
]);
}
}
function
deleteList
(
ids
)
{
function
deleteList
(
ids
)
{
Modal
.
confirm
({
Modal
.
confirm
({
title
:
'提示信息'
,
title
:
'提示信息'
,
...
@@ -344,19 +277,14 @@
...
@@ -344,19 +277,14 @@
onCancel
()
{},
onCancel
()
{},
});
});
}
}
function
onSelectChange
(
selectedRowKeys
:
[],
selectedRows
)
{
function
onSelectChange
(
selectedRowKeys
:
[],
selectedRows
)
{
selectedKeys
.
value
=
selectedRowKeys
;
selectedKeys
.
value
=
selectedRowKeys
;
selectedRowsData
.
value
=
selectedRows
;
selectedRowsData
.
value
=
selectedRows
;
}
}
function
customRow
(
record
:
Recordable
)
{
function
customRow
(
record
:
Recordable
)
{
return
{
return
{
onClick
:
()
=>
{
onClick
:
()
=>
{
let
selectedRowKeys
=
[...
selectedKeys
.
value
];
let
selectedRowKeys
=
[...
selectedKeys
.
value
];
if
(
selectedRowKeys
.
indexOf
(
record
.
id
)
>=
0
)
{
if
(
selectedRowKeys
.
indexOf
(
record
.
id
)
>=
0
)
{
...
@@ -374,33 +302,29 @@
...
@@ -374,33 +302,29 @@
},
},
};
};
}
}
function
handleSuccess
()
{
function
handleSuccess
()
{
selectedKeys
.
value
=
[];
selectedRowsData
.
value
=
[];
selectedKeys
.
value
=
[];
selectedRowsData
.
value
=
[];
reload
();
reload
();
}
}
function
handleFormSuccess
()
{
function
handleFormSuccess
()
{
handleSuccess
();
handleSuccess
();
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
}
function
handleFormCancel
()
{
function
handleFormCancel
()
{
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
}
function
handleView
(
record
:
Recordable
)
{
function
handleView
(
record
:
Recordable
)
{
let
info
=
{
let
info
=
{
isView
:
true
,
isView
:
true
,
id
:
record
.
id
,
id
:
record
.
id
,
};
};
openModal
(
true
,
info
);
openModal
(
true
,
info
);
}
}
function
handleXiafa
(
record
:
Recordable
)
{
function
handleXiafa
(
record
:
Recordable
)
{
...
@@ -435,7 +359,6 @@
...
@@ -435,7 +359,6 @@
description
:
'下发成功!'
,
description
:
'下发成功!'
,
});
});
});
});
},
},
onCancel
()
{},
onCancel
()
{},
});
});
...
@@ -445,20 +368,22 @@
...
@@ -445,20 +368,22 @@
let
list
=
getActions
(
record
);
let
list
=
getActions
(
record
);
return
list
.
slice
(
0
,
listSpliceNum
.
value
);
return
list
.
slice
(
0
,
listSpliceNum
.
value
);
}
}
function
getMoreActions
(
record
:
Recordable
)
{
function
getMoreActions
(
record
:
Recordable
)
{
let
list
=
getActions
(
record
);
let
list
=
getActions
(
record
);
return
list
.
slice
(
listSpliceNum
.
value
);
return
list
.
slice
(
listSpliceNum
.
value
);
}
}
function
getActions
(
record
:
Recordable
):
ActionItem
[]
{
function
getActions
(
record
:
Recordable
):
ActionItem
[]
{
record
.
isCanEdit
=
false
;
record
.
isCanEdit
=
false
;
let
actionsList
:
ActionItem
[]
=
[];
let
actionsList
:
ActionItem
[]
=
[];
actionButtonConfig
.
value
?.
map
((
button
)
=>
{
actionButtonConfig
.
value
?.
map
((
button
)
=>
{
if
(
!
record
?.
workflowData
?.
processId
)
{
if
(
!
record
?.
workflowData
?.
processId
)
{
record
.
isCanEdit
=
true
;
record
.
isCanEdit
=
true
;
actionsList
.
push
({
actionsList
.
push
({
...
button
,
...
button
,
auth
:
`scjh:
${
button
.
code
}
`
,
auth
:
`scjh:
${
button
.
code
}
`
,
label
:
button
?.
name
,
label
:
button
?.
name
,
color
:
button
.
code
===
'delete'
?
'error'
:
undefined
,
color
:
button
.
code
===
'delete'
?
'error'
:
undefined
,
...
@@ -471,29 +396,22 @@
...
@@ -471,29 +396,22 @@
label
:
button
?.
name
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
});
});
}
}
}
}
});
});
return
actionsList
;
return
actionsList
;
}
}
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
:deep
(
.ant-table-selection-col
)
{
:deep
(
.ant-table-selection-col
)
{
width
:
50px
;
width
:
50px
;
}
}
.show
{
.show
{
display
:
flex
;
display
:
flex
;
}
}
.hide
{
.hide
{
display
:
none
!important
;
display
:
none
!important
;
}
}
</
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