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
aa32be0a
Commit
aa32be0a
authored
Dec 31, 2025
by
宋春膨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加物料清单页面
parent
eae3c96a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2568 additions
and
0 deletions
+2568
-0
xjrsoft-vue3/src/api/jcsj/wlqd/index.ts
+93
-0
xjrsoft-vue3/src/api/jcsj/wlqd/model/WlqdModel.ts
+172
-0
xjrsoft-vue3/src/views/jcsj/wlqd/components/Form.vue
+226
-0
xjrsoft-vue3/src/views/jcsj/wlqd/components/WlqdModal.vue
+167
-0
xjrsoft-vue3/src/views/jcsj/wlqd/components/config.ts
+1196
-0
xjrsoft-vue3/src/views/jcsj/wlqd/components/workflowPermission.ts
+321
-0
xjrsoft-vue3/src/views/jcsj/wlqd/index.vue
+393
-0
No files found.
xjrsoft-vue3/src/api/jcsj/wlqd/index.ts
0 → 100644
View file @
aa32be0a
import
{
MesBaseBomPageModel
,
MesBaseBomPageParams
,
MesBaseBomPageResult
}
from
'./model/WlqdModel'
;
import
{
defHttp
}
from
'/@/utils/http/axios'
;
import
{
ErrorMessageMode
}
from
'/#/axios'
;
enum
Api
{
Page
=
'/jcsj/wlqd/page'
,
List
=
'/jcsj/wlqd/list'
,
Info
=
'/jcsj/wlqd/info'
,
MesBaseBom
=
'/jcsj/wlqd'
,
}
/**
* @description: 查询MesBaseBom分页列表
*/
export
async
function
getMesBaseBomPage
(
params
:
MesBaseBomPageParams
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesBaseBomPageResult
>
(
{
url
:
Api
.
Page
,
params
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 获取MesBaseBom信息
*/
export
async
function
getMesBaseBom
(
id
:
String
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesBaseBomPageModel
>
(
{
url
:
Api
.
Info
,
params
:
{
id
},
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 新增MesBaseBom
*/
export
async
function
addMesBaseBom
(
mesBaseBom
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
post
<
boolean
>
(
{
url
:
Api
.
MesBaseBom
,
params
:
mesBaseBom
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 更新MesBaseBom
*/
export
async
function
updateMesBaseBom
(
mesBaseBom
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
put
<
boolean
>
(
{
url
:
Api
.
MesBaseBom
,
params
:
mesBaseBom
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 删除MesBaseBom(批量删除)
*/
export
async
function
deleteMesBaseBom
(
ids
:
string
[],
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
delete
<
boolean
>
(
{
url
:
Api
.
MesBaseBom
,
data
:
ids
,
},
{
errorMessageMode
:
mode
,
},
);
}
xjrsoft-vue3/src/api/jcsj/wlqd/model/WlqdModel.ts
0 → 100644
View file @
aa32be0a
import
{
BasicPageParams
,
BasicFetchResult
}
from
'/@/api/model/baseModel'
;
/**
* @description: MesBaseBom分页参数 模型
*/
export
interface
MesBaseBomPageParams
extends
BasicPageParams
{
bommc
:
string
;
bomsl
:
string
;
bombb
:
string
;
cpid
:
string
;
cpbh
:
string
;
cpmc
:
string
;
cpgg
:
string
;
cpxh
:
string
;
sfyy
:
string
;
bz
:
string
;
}
/**
* @description: MesBaseBom分页返回值模型
*/
export
interface
MesBaseBomPageModel
{
id
:
string
;
bommc
:
string
;
bomsl
:
string
;
bombb
:
string
;
cpid
:
string
;
sfyy
:
string
;
cpbh
:
string
;
cpmc
:
string
;
cpgg
:
string
;
cpxh
:
string
;
bz
:
string
;
}
/**
* @description: MesBaseBom表类型
*/
export
interface
MesBaseBomModel
{
id
:
string
;
deleteMark
:
string
;
cpid
:
string
;
bommc
:
string
;
bomsl
:
string
;
sfyy
:
string
;
cpbh
:
string
;
cpmc
:
string
;
bombb
:
string
;
bz
:
string
;
cpgg
:
string
;
cpxh
:
string
;
p1
:
string
;
p2
:
string
;
p3
:
string
;
p4
:
string
;
p5
:
string
;
p6
:
string
;
p7
:
string
;
p8
:
string
;
p9
:
string
;
p10
:
string
;
createDate
:
string
;
createUserId
:
string
;
modifyDate
:
string
;
modifyUserId
:
string
;
mesBaseBomItemList
?:
MesBaseBomItemModel
;
}
/**
* @description: MesBaseBomItem表类型
*/
export
interface
MesBaseBomItemModel
{
id
:
string
;
deleteMark
:
string
;
bomid
:
string
;
wlbh
:
string
;
wlmc
:
string
;
wlsl
:
string
;
wlkcl
:
string
;
khbz
:
string
;
nkbz
:
string
;
sftl
:
string
;
p1
:
string
;
p2
:
string
;
p3
:
string
;
p4
:
string
;
p5
:
string
;
p6
:
string
;
p7
:
string
;
p8
:
string
;
p9
:
string
;
p10
:
string
;
createDate
:
string
;
createUserId
:
string
;
modifyDate
:
string
;
modifyUserId
:
string
;
bz
:
string
;
}
/**
* @description: MesBaseBom分页返回值结构
*/
export
type
MesBaseBomPageResult
=
BasicFetchResult
<
MesBaseBomPageModel
>
;
xjrsoft-vue3/src/views/jcsj/wlqd/components/Form.vue
0 → 100644
View file @
aa32be0a
<
template
>
<div
class=
"pt-4"
>
<SimpleForm
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage!=FromPageType.MENU"
:isCamelCase=
"true"
@
model-change=
"handleChange"
/>
</div>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
reactive
,
ref
,
onMounted
,
nextTick
,
watch
}
from
'vue'
;
import
{
formProps
,
formEventConfigs
}
from
'./config'
;
import
SimpleForm
from
'/@/components/SimpleForm/src/SimpleForm.vue'
;
import
{
addMesBaseBom
,
getMesBaseBom
,
updateMesBaseBom
}
from
'/@/api/jcsj/wlqd'
;
import
{
cloneDeep
,
isString
}
from
'lodash-es'
;
import
{
FormDataProps
}
from
'/@/components/Designer/src/types'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
fromPage
:
{
type
:
Number
,
default
:
FromPageType
.
MENU
,
},
});
const
systemFormRef
=
ref
();
const
data
:
{
formDataProps
:
FormDataProps
}
=
reactive
({
formDataProps
:
cloneDeep
(
formProps
),
});
const
state
=
reactive
({
formModel
:
{},
formInfo
:{
formId
:
''
,
formName
:
''
}
});
const
{
currentRoute
}
=
useRouter
();
watch
(
()
=>
state
.
formModel
,
(
val
)
=>
{
emits
(
'update:value'
,
val
);
},
{
deep
:
true
,
},
);
onMounted
(
async
()
=>
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
}
else
if
(
props
.
fromPage
==
FromPageType
.
PREVIEW
)
{
// 预览 无需权限,表单事件也无需执行
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
}
}
catch
(
error
)
{}
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
}
// 校验form 通过返回表单数据
async
function
validate
()
{
let
values
=
[];
try
{
values
=
await
systemFormRef
.
value
?.
validate
();
//添加隐藏组件
if
(
data
.
formDataProps
.
hiddenComponent
?.
length
)
{
data
.
formDataProps
.
hiddenComponent
.
forEach
((
component
)
=>
{
values
[
component
.
bindField
]
=
component
.
value
;
});
}
}
finally
{
}
return
values
;
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
try
{
const
record
=
await
getMesBaseBom
(
rowId
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
}
catch
(
error
)
{
}
}
// 辅助返回表单数据
async
function
getFieldsValue
()
{
let
values
=
[];
try
{
values
=
await
systemFormRef
.
value
?.
getFieldsValue
();
//添加隐藏组件
if
(
data
.
formDataProps
.
hiddenComponent
?.
length
)
{
data
.
formDataProps
.
hiddenComponent
.
forEach
((
component
)
=>
{
values
[
component
.
bindField
]
=
component
.
value
;
});
}
}
finally
{
}
return
values
;
}
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
// 重置表单数据
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
}
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
// 获取行键值
function
getRowKey
()
{
return
RowKey
;
}
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
try
{
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateMesBaseBom
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
return
saveVal
;
}
catch
(
error
)
{}
}
// 新增api表单数据
async
function
add
(
values
)
{
try
{
state
.
formModel
=
values
;
let
saveVal
=
await
addMesBaseBom
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
return
saveVal
;
}
catch
(
error
)
{}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
if
(
obj
.
formId
)
state
.
formInfo
.
formId
=
obj
.
formId
;
if
(
obj
.
formName
)
state
.
formInfo
.
formName
=
obj
.
formName
;
let
flowData
=
await
changeWorkFlowForm
(
cloneDeep
(
formProps
),
obj
);
let
{
buildOptionJson
,
uploadComponentIds
,
formModels
,
isViewProcess
}
=
flowData
;
data
.
formDataProps
=
buildOptionJson
;
emits
(
'changeUploadComponentIds'
,
uploadComponentIds
);
//工作流中必须保存上传组件id【附件汇总需要】
if
(
isViewProcess
)
{
setDisabledForm
();
//查看
}
state
.
formModel
=
formModels
;
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
}
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
}
async
function
sendMessageForAllIframe
()
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
systemFormRef
.
value
.
sendMessageForAllIframe
();
}
}
catch
(
error
)
{}
}
defineExpose
({
setFieldsValue
,
resetFields
,
validate
,
add
,
update
,
setFormDataFromId
,
setDisabledForm
,
setMenuPermission
,
setWorkFlowForm
,
getRowKey
,
getFieldsValue
,
sendMessageForAllIframe
});
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/wlqd/components/WlqdModal.vue
0 → 100644
View file @
aa32be0a
<
template
>
<BasicModal
:height=
"1080"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<template
#
footer
v-if=
" !state.isView"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-if=
"item.isShow"
>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
<a-button
:type=
"item.style"
v-else
:style=
"
{ marginLeft: index > 0 ? '10px' : 0 }"
@click="customClick(item)"
>
{{
t
(
item
.
name
)
}}
</a-button>
</
template
>
</template>
</template>
</BasicModal>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
BasicModal
,
useModalInner
}
from
'/@/components/Modal'
;
import
{
CustomButtonModalType
}
from
'/@/enums/userEnum'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
sortBy
}
from
'lodash-es'
;
import
{
executeCurFormEvent
}
from
'/@/utils/event/data'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
state
=
reactive
({
formModel
:
{},
isUpdate
:
true
,
isView
:
false
,
rowId
:
''
,
});
provide
<
Ref
<
boolean
>>
(
'isCopy'
,
isCopy
);
const
{
t
}
=
useI18n
();
const
[
registerModal
,
{
setModalProps
,
closeModal
}]
=
useModalInner
(
async
(
data
)
=>
{
await
handleInner
(
data
);
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
async
function
handleInner
(
data
){
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
setModalProps
({
destroyOnClose
:
true
,
maskClosable
:
false
,
showCancelBtn
:
false
,
showOkBtn
:
false
,
canFullscreen
:
true
,
width
:
1920
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
state
.
rowId
=
data
.
id
;
if
(
state
.
isView
)
{
await
formRef
.
value
.
setDisabledForm
();
}
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
formRef
.
value
.
resetFields
();
}
}
async
function
saveModal
()
{
let
saveSuccess
=
false
;
try
{
const
values
=
await
formRef
.
value
?.
validate
();
//添加隐藏组件
if
(
formProps
.
hiddenComponent
?.
length
)
{
formProps
.
hiddenComponent
.
forEach
((
component
)
=>
{
values
[
component
.
bindField
]
=
component
.
value
;
});
}
if
(
values
!==
false
)
{
try
{
if
(
!
state
.
isUpdate
||
isCopy
.
value
)
{
saveSuccess
=
await
formRef
.
value
.
add
(
values
);
}
else
{
saveSuccess
=
await
formRef
.
value
.
update
({
values
,
rowId
:
state
.
rowId
});
}
return
saveSuccess
;
}
catch
(
error
)
{}
}
}
catch
(
error
)
{
return
saveSuccess
;
}
}
async
function
handleSubmit
()
{
try
{
const
saveSuccess
=
await
saveModal
();
setModalProps
({
confirmLoading
:
true
});
if
(
saveSuccess
)
{
if
(
!
state
.
isUpdate
||
isCopy
.
value
)
{
//false 新增
notification
.
success
({
message
:
'Tip'
,
description
:
isCopy
.
value
?
'复制成功'
:
t
(
'新增成功!'
),
});
//提示消息
}
else
{
notification
.
success
({
message
:
'Tip'
,
description
:
t
(
'修改成功!'
),
});
//提示消息
}
closeModal
();
formRef
.
value
.
resetFields
();
emit
(
'success'
);
}
}
finally
{
setModalProps
({
confirmLoading
:
false
});
}
}
function
customClick
(
item
)
{
if
(
item
.
key
==
'confirm'
)
{
handleSubmit
();
}
else
if
(
item
.
key
==
'cancel'
&&
props
.
formType
!==
'normal'
)
{
handleClose
();
closeModal
();
}
else
if
(
item
.
key
==
'reset'
)
{
formRef
.
value
.
resetFields
();
}
else
{
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
}
}
function
handleClose
()
{
formRef
.
value
.
resetFields
();
}
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/wlqd/components/config.ts
0 → 100644
View file @
aa32be0a
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'bommc'
,
label
:
'BOM名称'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'bomsl'
,
label
:
'BOM数量'
,
defaultValue
:
undefined
,
component
:
'InputNumber'
,
componentProps
:
{
style
:
{
width
:
'100%'
},
},
},
{
field
:
'bombb'
,
label
:
'BOM版本'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'cpid'
,
label
:
'选择产品'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'api'
,
apiConfig
:
{
path
:
'/scgl/scjh/getAllProduct'
,
method
:
'GET'
,
apiId
:
'f4fbb57f2f18425e97918a031c8aa7d8'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';
\
r
\
nreturn db.select(sql)"
,
outputParams
:
[
{
name
:
'cpbh'
,
tableTitle
:
'产品编号'
,
bindField
:
'cpbh'
,
show
:
true
,
width
:
150
,
component
:
'b2682f1ff2dc48448211cacb4bf48bfd'
,
},
{
name
:
'cpmc'
,
tableTitle
:
'产品名称'
,
bindField
:
'cpmc'
,
show
:
true
,
width
:
150
,
component
:
'db0bea5c2dbf4505833e67179e8618f3'
,
},
{
name
:
'gg'
,
tableTitle
:
'产品规格'
,
bindField
:
'cpgg'
,
show
:
true
,
width
:
150
,
component
:
'3e7491b6d43c4ef7a7b6c2fd49a94a7f'
,
},
{
name
:
'xh'
,
tableTitle
:
'产品型号'
,
bindField
:
'cpxh'
,
show
:
true
,
width
:
150
,
component
:
'cf7d04d1e6374a3fbc4a9dfb9ebdf19e'
,
},
],
},
labelField
:
'label'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'cpbh'
,
label
:
'产品编号'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'cpmc'
,
label
:
'产品名称'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'cpgg'
,
label
:
'产品规格'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'cpxh'
,
label
:
'产品型号'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'sfyy'
,
label
:
'是否有效'
,
defaultValue
:
1
,
component
:
'Select'
,
componentProps
:
{
getPopupContainer
:
()
=>
document
.
body
,
options
:
[
{
label
:
'开'
,
value
:
1
,
},
{
label
:
'关'
,
value
:
0
,
},
],
},
},
{
field
:
'bz'
,
label
:
'备注'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
];
export
const
columns
:
BasicColumn
[]
=
[
{
resizable
:
true
,
dataIndex
:
'bommc'
,
title
:
'BOM名称'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'bomsl'
,
title
:
'BOM数量'
,
componentType
:
'number'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'bombb'
,
title
:
'BOM版本'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'cpid'
,
title
:
'选择产品'
,
componentType
:
'associate-popup'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'sfyy'
,
title
:
'是否有效'
,
componentType
:
'switch'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'cpbh'
,
title
:
'产品编号'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'cpmc'
,
title
:
'产品名称'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'cpgg'
,
title
:
'产品规格'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'cpxh'
,
title
:
'产品型号'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'bz'
,
title
:
'备注'
,
componentType
:
'textarea'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
];
//表头合并配置
export
const
headerMergingData
=
[];
//表单事件
export
const
formEventConfigs
=
{
0
:
[
{
type
:
'circle'
,
color
:
'#2774ff'
,
text
:
'开始节点'
,
icon
:
'#icon-kaishi'
,
bgcColor
:
'#D8E5FF'
,
isUserDefined
:
false
,
},
{
color
:
'#F6AB01'
,
icon
:
'#icon-chushihua'
,
text
:
'初始化表单'
,
bgcColor
:
'#f9f5ea'
,
isUserDefined
:
false
,
nodeInfo
:
{
processEvent
:
[]
},
},
],
1
:
[
{
color
:
'#B36EDB'
,
icon
:
'#icon-shujufenxi'
,
text
:
'获取表单数据'
,
detail
:
'(新增无此操作)'
,
bgcColor
:
'#F8F2FC'
,
isUserDefined
:
false
,
nodeInfo
:
{
processEvent
:
[]
},
},
],
2
:
[
{
color
:
'#F8625C'
,
icon
:
'#icon-jiazai'
,
text
:
'加载表单'
,
bgcColor
:
'#FFF1F1'
,
isUserDefined
:
false
,
nodeInfo
:
{
processEvent
:
[]
},
},
],
3
:
[
{
color
:
'#6C6AE0'
,
icon
:
'#icon-jsontijiao'
,
text
:
'提交表单'
,
bgcColor
:
'#F5F4FF'
,
isUserDefined
:
false
,
nodeInfo
:
{
processEvent
:
[]
},
},
],
4
:
[
{
type
:
'circle'
,
color
:
'#F8625C'
,
text
:
'结束节点'
,
icon
:
'#icon-jieshuzhiliao'
,
bgcColor
:
'#FFD6D6'
,
isLast
:
true
,
isUserDefined
:
false
,
},
],
};
export
const
formProps
:
FormProps
=
{
labelCol
:
{
span
:
2
,
offset
:
0
},
labelAlign
:
'right'
,
layout
:
'horizontal'
,
size
:
'default'
,
schemas
:
[
{
key
:
'4752659a82714a54967a2da899d68d24'
,
field
:
''
,
label
:
''
,
type
:
'grid'
,
colProps
:
{
span
:
24
},
component
:
'Grid'
,
children
:
[
{
span
:
8
,
list
:
[
{
key
:
'0bb6edfef8ac486482e02a6e650306e6'
,
field
:
'bommc'
,
label
:
'BOM名称'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入BOM名称'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
true
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'4bc74304a0144e879b2fc45ae28ab1c5'
,
field
:
'bomsl'
,
label
:
'BOM数量'
,
type
:
'number'
,
component
:
'InputNumber'
,
colProps
:
{
span
:
24
},
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
min
:
0
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
defaultValue
:
0
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'50bff2d4c82d40a98ace5fd2b1d3b41e'
,
field
:
'bombb'
,
label
:
'BOM版本'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入BOM版本'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'c42ef62f38e1445b89e5c3362ffd3af2'
,
field
:
'cpid'
,
label
:
'选择产品'
,
type
:
'associate-popup'
,
component
:
'MultiplePopup'
,
colProps
:
{
span
:
24
},
componentProps
:
{
popupType
:
'associate'
,
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择产品选择'
,
showLabel
:
true
,
disabled
:
false
,
datasourceType
:
'api'
,
labelField
:
'label'
,
valueField
:
'value'
,
pageSize
:
10
,
assoTitle
:
'产品列表'
,
apiConfig
:
{
path
:
'/scgl/scjh/getAllProduct'
,
method
:
'GET'
,
apiId
:
'f4fbb57f2f18425e97918a031c8aa7d8'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';
\
r
\
nreturn db.select(sql)"
,
outputParams
:
[
{
name
:
'cpbh'
,
tableTitle
:
'产品编号'
,
bindField
:
'cpbh'
,
show
:
true
,
width
:
150
,
component
:
'b2682f1ff2dc48448211cacb4bf48bfd'
,
},
{
name
:
'cpmc'
,
tableTitle
:
'产品名称'
,
bindField
:
'cpmc'
,
show
:
true
,
width
:
150
,
component
:
'db0bea5c2dbf4505833e67179e8618f3'
,
},
{
name
:
'gg'
,
tableTitle
:
'产品规格'
,
bindField
:
'cpgg'
,
show
:
true
,
width
:
150
,
component
:
'3e7491b6d43c4ef7a7b6c2fd49a94a7f'
,
},
{
name
:
'xh'
,
tableTitle
:
'产品型号'
,
bindField
:
'cpxh'
,
show
:
true
,
width
:
150
,
component
:
'cf7d04d1e6374a3fbc4a9dfb9ebdf19e'
,
},
],
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'b2682f1ff2dc48448211cacb4bf48bfd'
,
field
:
'cpbh'
,
label
:
'产品编号'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入产品编号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'db0bea5c2dbf4505833e67179e8618f3'
,
field
:
'cpmc'
,
label
:
'产品名称'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入产品名称'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'3e7491b6d43c4ef7a7b6c2fd49a94a7f'
,
field
:
'cpgg'
,
label
:
'产品规格'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入产品规格'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'cf7d04d1e6374a3fbc4a9dfb9ebdf19e'
,
field
:
'cpxh'
,
label
:
'产品型号'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
7
,
defaultValue
:
''
,
placeholder
:
'请输入产品型号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'd8387e383f7342f8b829cb672dad42cb'
,
field
:
'sfyy'
,
label
:
'是否有效'
,
type
:
'switch'
,
component
:
'Switch'
,
colProps
:
{
span
:
24
},
defaultValue
:
1
,
componentProps
:
{
span
:
7
,
defaultValue
:
1
,
checkedChildren
:
''
,
unCheckedChildren
:
''
,
checkedColor
:
'#1C8DFF'
,
unCheckedColor
:
'#bbbdbf'
,
showLabel
:
true
,
disabled
:
false
,
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
type
:
1
,
event
:
[],
style
:
{},
},
},
],
},
{
span
:
24
,
list
:
[
{
key
:
'ccb91eb8f48b4ff3aaa1086f0adcd48e'
,
field
:
'bz'
,
label
:
'备注'
,
type
:
'textarea'
,
component
:
'InputTextArea'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
2
,
defaultValue
:
''
,
placeholder
:
'请输入备注'
,
rows
:
4
,
autoSize
:
false
,
showCount
:
false
,
disabled
:
false
,
showLabel
:
true
,
allowClear
:
false
,
required
:
false
,
isShow
:
true
,
isShowAi
:
false
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
],
componentProps
:
{
gutter
:
0
,
justify
:
'start'
,
align
:
'top'
,
isShow
:
true
,
showBorder
:
false
,
bordercolor
:
'#d9d9d9'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
padding
:
'10px'
,
margin
:
'10px'
,
},
},
{
key
:
'c87fc2d18e24429a819521f35f19137b'
,
label
:
'BOM清单'
,
field
:
'mesBaseBomItemList'
,
type
:
'form'
,
component
:
'SubForm'
,
required
:
true
,
colProps
:
{
span
:
24
},
componentProps
:
{
mainKey
:
'mesBaseBomItemList'
,
columns
:
[
{
key
:
'709b38c05d11468db0db4e6e9168e4f9'
,
title
:
'选择物料'
,
dataIndex
:
'bomid'
,
componentType
:
'MultiplePopup'
,
componentProps
:
{
popupType
:
'associate'
,
width
:
'100%'
,
span
:
3
,
placeholder
:
'请选择物料选择'
,
showLabel
:
true
,
disabled
:
false
,
datasourceType
:
'api'
,
labelField
:
'label'
,
valueField
:
'value'
,
pageSize
:
10
,
assoTitle
:
'物料列表'
,
apiConfig
:
{
path
:
'/scgl/scjh/getAllProduct'
,
method
:
'GET'
,
apiId
:
'f4fbb57f2f18425e97918a031c8aa7d8'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql = 'select *,id as value,cpmc as label from mes_base_product_info where delete_mark=0';
\
r
\
nreturn db.select(sql)"
,
outputParams
:
[
{
name
:
'cpbh'
,
tableTitle
:
'物料编号'
,
bindField
:
'wlbh'
,
show
:
true
,
width
:
150
,
component
:
'3988d1cba45a464abbeabce6ed09970e'
,
bindTable
:
'mes_base_bom_item'
,
},
{
name
:
'cpmc'
,
tableTitle
:
'物料名称'
,
bindField
:
'wlmc'
,
show
:
true
,
width
:
150
,
component
:
'112f6292bd884006ad872f06aeef4e6f'
,
bindTable
:
'mes_base_bom_item'
,
},
],
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
},
},
{
key
:
'3988d1cba45a464abbeabce6ed09970e'
,
title
:
'物料编号'
,
dataIndex
:
'wlbh'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
defaultValue
:
''
,
placeholder
:
'请输入物料编号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
},
},
{
key
:
'112f6292bd884006ad872f06aeef4e6f'
,
title
:
'物料名称'
,
dataIndex
:
'wlmc'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
defaultValue
:
''
,
placeholder
:
'请输入物料名称'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
},
},
{
key
:
'80fe637a2eaa47a49e96f6e86f0efdda'
,
title
:
'物料数量'
,
dataIndex
:
'wlsl'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
min
:
0
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
defaultValue
:
0
,
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'1afa69530c154b6f904f1661e82ff9a3'
,
title
:
'库存数量'
,
dataIndex
:
'wlkcl'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
min
:
0
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
defaultValue
:
0
,
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'd15b4777d2794944995aa2a085442a6e'
,
title
:
'客户标准(%)'
,
dataIndex
:
'khbz'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
min
:
0
,
max
:
100
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
defaultValue
:
0
,
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'1ef860d823ff46c690334dc5eff5a6e4'
,
title
:
'内控标准(%)'
,
dataIndex
:
'nkbz'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
3
,
min
:
0
,
max
:
100
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
defaultValue
:
0
,
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'40a1e893e8ee496a96d7ed6dbe17e271'
,
title
:
'是否投料'
,
dataIndex
:
'sftl'
,
componentType
:
'Switch'
,
defaultValue
:
1
,
componentProps
:
{
span
:
''
,
defaultValue
:
1
,
checkedChildren
:
''
,
unCheckedChildren
:
''
,
checkedColor
:
'#1C8DFF'
,
unCheckedColor
:
'#bbbdbf'
,
showLabel
:
true
,
disabled
:
false
,
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
},
},
{
key
:
'9230b500d1024028af68ed4ac49bdbd3'
,
title
:
'备注'
,
dataIndex
:
'bz'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入备注'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
false
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
prestrainField
:
''
,
},
},
{
title
:
'操作'
,
key
:
'action'
,
fixed
:
'right'
,
width
:
'50px'
},
],
span
:
2
,
preloadType
:
'dic'
,
apiConfig
:
{
path
:
'/scgl/wlqd/getAllBomItemList'
,
method
:
'GET'
,
apiId
:
'1a6a0c6bab2a4aceaf761b0c2c8d17a0'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql = 'select *,id as value,wlmc as label from mes_base_bom_item where delete_mark=0';
\
r
\
nreturn db.select(sql)"
,
},
itemId
:
''
,
dicOptions
:
[],
useSelectButton
:
false
,
buttonName
:
'选择数据'
,
showLabel
:
true
,
showComponentBorder
:
true
,
showBorder
:
true
,
bordercolor
:
'#f0f0f0'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
showIndex
:
false
,
isShow
:
true
,
multipleHeads
:
[],
buttonList
:
[],
topButtonList
:
[],
isExport
:
false
,
isImport
:
false
,
isDeleteSelected
:
false
,
isListView
:
false
,
viewList
:
[
{
key
:
'112f6292bd884006ad872f06aeef4e6f'
,
label
:
'物料名称'
,
field
:
'wlmc'
,
componentType
:
'input'
,
checked
:
true
,
},
{
key
:
'3988d1cba45a464abbeabce6ed09970e'
,
label
:
'物料编号'
,
field
:
'wlbh'
,
componentType
:
'input'
,
checked
:
true
,
},
{
key
:
'80fe637a2eaa47a49e96f6e86f0efdda'
,
label
:
'物料数量'
,
field
:
'wlsl'
,
componentType
:
'number'
,
checked
:
true
,
},
{
key
:
'1afa69530c154b6f904f1661e82ff9a3'
,
label
:
'库存数量'
,
field
:
'wlkcl'
,
componentType
:
'number'
,
checked
:
true
,
},
{
key
:
'd15b4777d2794944995aa2a085442a6e'
,
label
:
'客户标准(%)'
,
field
:
'khbz'
,
componentType
:
'number'
,
checked
:
true
,
},
{
key
:
'1ef860d823ff46c690334dc5eff5a6e4'
,
label
:
'内控标准(%)'
,
field
:
'nkbz'
,
componentType
:
'number'
,
checked
:
true
,
},
{
key
:
'9230b500d1024028af68ed4ac49bdbd3'
,
label
:
'备注'
,
field
:
'bz'
,
componentType
:
'input'
,
checked
:
true
,
},
{
key
:
'40a1e893e8ee496a96d7ed6dbe17e271'
,
label
:
'是否投料'
,
field
:
'sftl'
,
componentType
:
'switch'
,
checked
:
false
,
},
{
key
:
'709b38c05d11468db0db4e6e9168e4f9'
,
label
:
'选择物料'
,
field
:
'bomid'
,
componentType
:
'associate-popup'
,
checked
:
false
,
},
],
isShowAdd
:
true
,
isShowDelete
:
true
,
hasCheckedCol
:
false
,
events
:
{},
showPagenation
:
true
,
rowResize
:
false
,
},
},
],
showActionButtonGroup
:
false
,
buttonLocation
:
'center'
,
actionColOptions
:
{
span
:
24
},
showResetButton
:
false
,
showSubmitButton
:
false
,
hiddenComponent
:
[],
};
export
const
formButtons
=
[
{
key
:
'confirm'
,
code
:
'confirm'
,
name
:
'确定'
,
style
:
'primary'
,
event
:
[],
isShow
:
true
,
index
:
2
,
type
:
1
,
},
{
key
:
'cancel'
,
code
:
'cancel'
,
name
:
'取消'
,
style
:
'default'
,
event
:
[],
isShow
:
true
,
index
:
1
,
type
:
1
,
},
{
key
:
'reset'
,
code
:
'reset'
,
name
:
'重置'
,
style
:
'default'
,
event
:
[],
isShow
:
true
,
index
:
0
,
type
:
1
,
},
];
xjrsoft-vue3/src/views/jcsj/wlqd/components/workflowPermission.ts
0 → 100644
View file @
aa32be0a
export
const
permissionList
=
[
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'BOM名称'
,
fieldId
:
'bommc'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'0bb6edfef8ac486482e02a6e650306e6'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'BOM数量'
,
fieldId
:
'bomsl'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'number'
,
key
:
'4bc74304a0144e879b2fc45ae28ab1c5'
,
children
:
[],
options
:
{},
defaultValue
:
0
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'BOM版本'
,
fieldId
:
'bombb'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'50bff2d4c82d40a98ace5fd2b1d3b41e'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'选择产品'
,
fieldId
:
'cpid'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'associate-popup'
,
key
:
'c42ef62f38e1445b89e5c3362ffd3af2'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'产品编号'
,
fieldId
:
'cpbh'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'b2682f1ff2dc48448211cacb4bf48bfd'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'产品名称'
,
fieldId
:
'cpmc'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'db0bea5c2dbf4505833e67179e8618f3'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'产品规格'
,
fieldId
:
'cpgg'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'3e7491b6d43c4ef7a7b6c2fd49a94a7f'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'产品型号'
,
fieldId
:
'cpxh'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'cf7d04d1e6374a3fbc4a9dfb9ebdf19e'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'是否有效'
,
fieldId
:
'sfyy'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'switch'
,
key
:
'd8387e383f7342f8b829cb672dad42cb'
,
children
:
[],
options
:
{},
defaultValue
:
1
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'备注'
,
fieldId
:
'bz'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'textarea'
,
key
:
'ccb91eb8f48b4ff3aaa1086f0adcd48e'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
true
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'BOM清单'
,
fieldId
:
'mesBaseBomItemList'
,
type
:
'form'
,
key
:
'c87fc2d18e24429a819521f35f19137b'
,
children
:
[
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'选择物料'
,
fieldId
:
'bomid'
,
type
:
'MultiplePopup'
,
key
:
'709b38c05d11468db0db4e6e9168e4f9'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'物料编号'
,
fieldId
:
'wlbh'
,
type
:
'Input'
,
key
:
'3988d1cba45a464abbeabce6ed09970e'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'物料名称'
,
fieldId
:
'wlmc'
,
type
:
'Input'
,
key
:
'112f6292bd884006ad872f06aeef4e6f'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'物料数量'
,
fieldId
:
'wlsl'
,
type
:
'InputNumber'
,
key
:
'80fe637a2eaa47a49e96f6e86f0efdda'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'库存数量'
,
fieldId
:
'wlkcl'
,
type
:
'InputNumber'
,
key
:
'1afa69530c154b6f904f1661e82ff9a3'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'客户标准(%)'
,
fieldId
:
'khbz'
,
type
:
'InputNumber'
,
key
:
'd15b4777d2794944995aa2a085442a6e'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'内控标准(%)'
,
fieldId
:
'nkbz'
,
type
:
'InputNumber'
,
key
:
'1ef860d823ff46c690334dc5eff5a6e4'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'是否投料'
,
fieldId
:
'sftl'
,
type
:
'Switch'
,
key
:
'40a1e893e8ee496a96d7ed6dbe17e271'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesBaseBomItemList'
,
fieldName
:
'备注'
,
fieldId
:
'bz'
,
type
:
'Input'
,
key
:
'9230b500d1024028af68ed4ac49bdbd3'
,
children
:
[],
},
],
},
];
xjrsoft-vue3/src/views/jcsj/wlqd/index.vue
0 → 100644
View file @
aa32be0a
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
>
<template
#
toolbar
>
<template
v-for=
"button in tableButtonConfig"
:key=
"button.code"
>
<a-button
v-if=
"button.isDefault"
type=
"primary"
@
click=
"buttonClick(button.code)"
>
<template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
{{ button.name }}
</a-button>
<CustomButtonModal
v-else-if=
"button.buttonType == 'modal'"
:info=
"button"
/>
<a-button
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
{{ button.name }}
</a-button>
</template>
</template>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.componentType === 'switch'"
>
<a-switch
v-model:checked=
"record[column.dataIndex]"
:unCheckedValue=
"0"
:checkedValue=
"1"
:disabled=
"true"
/>
</
template
>
<
template
v-if=
"column.dataIndex === 'action'"
>
<TableAction
:actions=
"getLessActions(record)"
:dropDownActions=
"getMoreActions(record)"
/>
</
template
>
<
template
v-else-if=
"column.dataIndex && column?.listStyle"
>
<span
:style=
"executeListStyle(getValue(record, column, 'style'), column?.listStyle)"
>
{{
getValue
(
record
,
column
,
'value'
)
}}
</span>
</
template
>
</template>
</BasicTable>
</template>
<WlqdModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
,
}
from
'vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
,
ActionItem
}
from
'/@/components/Table'
;
import
{
getMesBaseBomPage
,
deleteMesBaseBom
}
from
'/@/api/jcsj/wlqd'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
executeListStyle
,
getValue
}
from
'/@/hooks/web/useListStyle'
;
//列表样式配置
import
{
useRouter
}
from
'vue-router'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
WlqdModal
from
'./components/WlqdModal.vue'
;
import
{
searchFormSchema
,
columns
}
from
'./components/config'
;
import
Icon
from
'/@/components/Icon/index'
;
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
}
=
useConcurrentLock
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
defineEmits
([
'register'
]);
const
{
filterColumnAuth
,
filterButtonAuth
,
hasPermission
}
=
usePermission
();
const
filterColumns
=
filterColumnAuth
(
columns
);
const
tableRef
=
ref
();
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
"view"
,
"edit"
,
"delete"
]);
const
buttonConfigs
=
computed
(()
=>
{
const
list
=
[{
"buttonId"
:
"2006204718531538944"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2006204718531538945"
,
"name"
:
"新增"
,
"code"
:
"add"
,
"icon"
:
"ant-design:plus-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2006204718531538946"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2006204718531538947"
,
"name"
:
"删除"
,
"code"
:
"delete"
,
"icon"
:
"ant-design:delete-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
}]
return
filterButtonAuth
(
list
);
})
const
tableButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
});
const
actionButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
});
const
btnEvent
=
{
view
:
handleView
,
add
:
handleAdd
,
edit
:
handleEdit
,
delete
:
handleDelete
,}
const
{
currentRoute
}
=
useRouter
();
const
formIdComputedRef
=
computed
(()
=>
currentRoute
.
value
.
meta
.
formId
as
string
);
provide
<
Ref
<
string
>>
(
'currentFormId'
,
formIdComputedRef
);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
}]
=
useTable
({
title
:
'Wlqd列表'
,
api
:
getMesBaseBomPage
,
rowKey
:
'id'
,
columns
:
filterColumns
,
pagination
:
{
pageSize
:
10
,
},
formConfig
:
{
labelWidth
:
100
,
schemas
:
searchFormSchema
,
fieldMapToTime
:
[],
showResetButton
:
false
,
},
bordered
:
false
,
beforeFetch
:
(
params
)
=>
{
pageParamsInfo
.
value
=
{...
params
,
FormId
:
formIdComputedRef
.
value
,
PK
:
'id'
}
return
pageParamsInfo
.
value
;
},
afterFetch
:
(
res
)
=>
{
},
useSearchForm
:
true
,
showTableSetting
:
true
,
striped
:
false
,
actionColumn
:
{
width
:
195
,
title
:
'操作'
,
dataIndex
:
'action'
,
slots
:
{
customRender
:
'action'
},
},
tableSetting
:
{
size
:
false
,
},
customRow
,
isAdvancedQuery
:
false
,
querySelectOption
:
JSON
.
stringify
(
searchFormSchema
),
objectId
:
formIdComputedRef
.
value
,
////系统表单formId,自定义表单releaseId的id值
});
function
buttonClick
(
code
)
{
btnEvent
[
code
]();
}
function
handleAdd
()
{
openModal
(
true
,
{
isUpdate
:
false
,
});
}
async
function
handleEdit
(
record
:
Recordable
)
{
let
field
=
'id'
;
try
{
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
if
(
hasIn
)
{
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
,
);
if
(
res
!==
null
)
{
return
;
}
}
let
info
=
{
id
:
record
[
field
],
isUpdate
:
true
,
};
openModal
(
true
,
info
);
}
catch
(
error
)
{}
}
function
handleDelete
(
record
:
Recordable
)
{
deleteList
([
record
.
id
]);
}
function
deleteList
(
ids
)
{
Modal
.
confirm
({
title
:
'提示信息'
,
icon
:
createVNode
(
ExclamationCircleOutlined
),
content
:
'是否确认删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
()
{
deleteMesBaseBom
(
ids
).
then
((
_
)
=>
{
handleSuccess
();
notification
.
success
({
message
:
'Tip'
,
description
:
t
(
'删除成功!'
),
});
});
},
onCancel
()
{},
});
}
function
customRow
(
record
:
Recordable
)
{
return
{
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"wlqd:edit"
))
{
handleEdit
(
record
);
}
},
};
}
function
handleSuccess
()
{
reload
();
}
function
handleFormSuccess
()
{
handleSuccess
();
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
function
handleFormCancel
()
{
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
function
handleView
(
record
:
Recordable
)
{
let
info
=
{
isView
:
true
,
id
:
record
.
id
,
}
openModal
(
true
,
info
);
}
function
getLessActions
(
record
:
Recordable
)
{
let
list
=
getActions
(
record
);
return
list
.
slice
(
0
,
listSpliceNum
.
value
);
}
function
getMoreActions
(
record
:
Recordable
)
{
let
list
=
getActions
(
record
);
return
list
.
slice
(
listSpliceNum
.
value
);
}
function
getActions
(
record
:
Recordable
):
ActionItem
[]
{
record
.
isCanEdit
=
false
;
let
actionsList
:
ActionItem
[]
=
[];
actionButtonConfig
.
value
?.
map
((
button
)
=>
{
if
(
!
record
?.
workflowData
?.
processId
)
{
record
.
isCanEdit
=
true
;
actionsList
.
push
({
...
button
,
auth
:
`wlqd:
${
button
.
code
}
`
,
label
:
button
?.
name
,
color
:
button
.
code
===
'delete'
?
'error'
:
undefined
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
});
}
else
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
actionsList
.
push
({
auth
:
`wlqd:
${
button
.
code
}
`
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
});
}
}
});
return
actionsList
;
}
</
script
>
<
style
lang=
"less"
scoped
>
:deep
(
.ant-table-selection-col
)
{
width
:
50px
;
}
.show
{
display
:
flex
;
}
.hide
{
display
:
none
!important
;
}
</
style
>
\ No newline at end of file
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