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
baef950f
Commit
baef950f
authored
Mar 18, 2026
by
齐伟伦
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/hongshun' into hongshun
parents
da4bd2d3
bb2812dc
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
3846 additions
and
1047 deletions
+3846
-1047
xjrsoft-vue3/.env.development
+1
-1
xjrsoft-vue3/src/api/ckgl/bfccgrk/index.ts
+114
-0
xjrsoft-vue3/src/api/ckgl/bfccgrk/model/BfccgrkModel.ts
+182
-0
xjrsoft-vue3/src/api/zlgl/fgwgyscllcd/model/FgwgyscllcdModel.ts
+0
-12
xjrsoft-vue3/src/views/ckgl/bfccgrk/components/BfccgrkModal.vue
+167
-0
xjrsoft-vue3/src/views/ckgl/bfccgrk/components/Form.vue
+226
-0
xjrsoft-vue3/src/views/ckgl/bfccgrk/components/config.ts
+1336
-0
xjrsoft-vue3/src/views/ckgl/bfccgrk/components/workflowPermission.ts
+440
-0
xjrsoft-vue3/src/views/ckgl/bfccgrk/index.vue
+434
-0
xjrsoft-vue3/src/views/ckgl/cgrk/components/CgrkModal.vue
+19
-22
xjrsoft-vue3/src/views/ckgl/cgrk/components/Form.vue
+106
-34
xjrsoft-vue3/src/views/jcsj/cplx/components/Form.vue
+106
-33
xjrsoft-vue3/src/views/jcsj/cplx/components/config.ts
+1
-1
xjrsoft-vue3/src/views/jcsj/cplx/index.vue
+78
-142
xjrsoft-vue3/src/views/jcsj/gylx/components/Form.vue
+106
-34
xjrsoft-vue3/src/views/jcsj/gylx/components/GylxModal.vue
+19
-22
xjrsoft-vue3/src/views/jcsj/gylx/components/config.ts
+67
-3
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
+78
-142
xjrsoft-vue3/src/views/scgl/scjh/components/config.ts
+3
-2
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
+114
-41
xjrsoft-vue3/src/views/scgl/scrw/components/ScrwModal.vue
+17
-24
xjrsoft-vue3/src/views/scgl/scrw/components/config.ts
+17
-13
xjrsoft-vue3/src/views/scgl/scrw/components/workflowPermission.ts
+0
-1
xjrsoft-vue3/src/views/scgl/scrw/index.vue
+148
-140
xjrsoft-vue3/src/views/zlgl/cccpfxspd/components/config.ts
+67
-67
xjrsoft-vue3/src/views/zlgl/fgwgyscllcd/components/config.ts
+0
-249
xjrsoft-vue3/src/views/zlgl/fgwgyscllcd/components/workflowPermission.ts
+0
-64
No files found.
xjrsoft-vue3/.env.development
View file @
baef950f
...
@@ -9,7 +9,7 @@ VITE_PUBLIC_PATH = /
...
@@ -9,7 +9,7 @@ VITE_PUBLIC_PATH = /
# 可以有多个,注意多个不能换行,否则代理将会失效
# 可以有多个,注意多个不能换行,否则代理将会失效
# VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]]
# VITE_PROXY = [["/basic-api","http://localhost:3000"],["/upload","http://localhost:3300/upload"]]
# VITE_PROXY=[["/api","https://vvbin.cn/test"]]
# VITE_PROXY=[["/api","https://vvbin.cn/test"]]
VITE_PROXY = [["/system","http://1
92.168.8.149:8053"],["/language","http://192.168.8.149:8053"],["/api","http://192.168.8.149
:8053"]]
VITE_PROXY = [["/system","http://1
27.0.0.1:8053"],["/language","http://127.0.0.1:8053"],["/api","http://127.0.0.1
:8053"]]
# 是否删除Console.log
# 是否删除Console.log
VITE_DROP_CONSOLE = false
VITE_DROP_CONSOLE = false
...
...
xjrsoft-vue3/src/api/ckgl/bfccgrk/index.ts
0 → 100644
View file @
baef950f
import
{
MesWarehouseInPageModel
,
MesWarehouseInPageParams
,
MesWarehouseInPageResult
}
from
'./model/BfccgrkModel'
;
import
{
defHttp
}
from
'/@/utils/http/axios'
;
import
{
ErrorMessageMode
}
from
'/#/axios'
;
enum
Api
{
Page
=
'/ckgl/bfccgrk/page'
,
List
=
'/ckgl/bfccgrk/list'
,
Info
=
'/ckgl/bfccgrk/info'
,
MesWarehouseIn
=
'/ckgl/bfccgrk'
,
Export
=
'/ckgl/bfccgrk/export'
,
}
/**
* @description: 查询MesWarehouseIn分页列表
*/
export
async
function
getMesWarehouseInPage
(
params
:
MesWarehouseInPageParams
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesWarehouseInPageResult
>
(
{
url
:
Api
.
Page
,
params
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 获取MesWarehouseIn信息
*/
export
async
function
getMesWarehouseIn
(
id
:
String
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesWarehouseInPageModel
>
(
{
url
:
Api
.
Info
,
params
:
{
id
},
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 新增MesWarehouseIn
*/
export
async
function
addMesWarehouseIn
(
mesWarehouseIn
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
post
<
boolean
>
(
{
url
:
Api
.
MesWarehouseIn
,
params
:
mesWarehouseIn
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 更新MesWarehouseIn
*/
export
async
function
updateMesWarehouseIn
(
mesWarehouseIn
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
put
<
boolean
>
(
{
url
:
Api
.
MesWarehouseIn
,
params
:
mesWarehouseIn
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 删除MesWarehouseIn(批量删除)
*/
export
async
function
deleteMesWarehouseIn
(
ids
:
string
[],
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
delete
<
boolean
>
(
{
url
:
Api
.
MesWarehouseIn
,
data
:
ids
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 导出MesWarehouseIn
*/
export
async
function
exportMesWarehouseIn
(
params
?:
object
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
download
(
{
url
:
Api
.
Export
,
method
:
'GET'
,
params
,
responseType
:
'blob'
,
},
{
errorMessageMode
:
mode
,
},
);
}
xjrsoft-vue3/src/api/ckgl/bfccgrk/model/BfccgrkModel.ts
0 → 100644
View file @
baef950f
import
{
BasicPageParams
,
BasicFetchResult
}
from
'/@/api/model/baseModel'
;
/**
* @description: MesWarehouseIn分页参数 模型
*/
export
interface
MesWarehouseInPageParams
extends
BasicPageParams
{
djh
:
string
;
djrq
:
string
;
crklx
:
string
;
ck
:
string
;
gys
:
string
;
zdr
:
string
;
pch
:
string
;
ywzz
:
string
;
cspc
:
string
;
bz
:
string
;
}
/**
* @description: MesWarehouseIn分页返回值模型
*/
export
interface
MesWarehouseInPageModel
{
id
:
string
;
djh
:
string
;
djrq
:
string
;
crklx
:
string
;
ck
:
string
;
gys
:
string
;
zdr
:
string
;
pch
:
string
;
cspc
:
string
;
ywzz
:
string
;
bz
:
string
;
}
/**
* @description: MesWarehouseIn表类型
*/
export
interface
MesWarehouseInModel
{
id
:
string
;
deleteMark
:
string
;
djh
:
string
;
djrq
:
string
;
crklx
:
string
;
ck
:
string
;
gys
:
string
;
zdr
:
string
;
fj
:
string
;
bz
:
string
;
ywzz
:
string
;
pch
:
string
;
cspc
:
string
;
p5
:
string
;
p6
:
string
;
p7
:
string
;
p8
:
string
;
p9
:
string
;
p10
:
string
;
createDate
:
string
;
createUserId
:
string
;
modifyDate
:
string
;
modifyUserId
:
string
;
mesWarehouseInInfoList
?:
MesWarehouseInInfoModel
;
}
/**
* @description: MesWarehouseInInfo表类型
*/
export
interface
MesWarehouseInInfoModel
{
id
:
string
;
deleteMark
:
string
;
rkdid
:
string
;
lydhid
:
string
;
wlbm
:
string
;
wlmc
:
string
;
gg
:
string
;
xh
:
string
;
dw
:
string
;
cspc
:
string
;
pch
:
string
;
yssl
:
string
;
sssl
:
string
;
xqbm
:
string
;
sfzp
:
string
;
sfzj
:
string
;
hwh
:
string
;
bz
:
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
;
bfcIds
:
string
;
}
/**
* @description: MesWarehouseIn分页返回值结构
*/
export
type
MesWarehouseInPageResult
=
BasicFetchResult
<
MesWarehouseInPageModel
>
;
xjrsoft-vue3/src/api/zlgl/fgwgyscllcd/model/FgwgyscllcdModel.ts
View file @
baef950f
...
@@ -21,12 +21,6 @@ export interface MesQualityInspectionSteelScrapWorkflowPageParams extends BasicP
...
@@ -21,12 +21,6 @@ export interface MesQualityInspectionSteelScrapWorkflowPageParams extends BasicP
cpmc
:
string
;
cpmc
:
string
;
sfpsyj
:
string
;
sfpsyj
:
string
;
scbmyj
:
string
;
mybmyj
:
string
;
pkyfbmyj
:
string
;
}
}
/**
/**
...
@@ -52,12 +46,6 @@ export interface MesQualityInspectionSteelScrapWorkflowPageModel {
...
@@ -52,12 +46,6 @@ export interface MesQualityInspectionSteelScrapWorkflowPageModel {
createDate
:
string
;
createDate
:
string
;
modifyDate
:
string
;
modifyDate
:
string
;
scbmyj
:
string
;
mybmyj
:
string
;
pkyfbmyj
:
string
;
}
}
/**
/**
...
...
xjrsoft-vue3/src/views/ckgl/bfccgrk/components/BfccgrkModal.vue
0 → 100644
View file @
baef950f
<
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
:
1980
,
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/ckgl/bfccgrk/components/Form.vue
0 → 100644
View file @
baef950f
<
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
{
addMesWarehouseIn
,
getMesWarehouseIn
,
updateMesWarehouseIn
}
from
'/@/api/ckgl/bfccgrk'
;
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
getMesWarehouseIn
(
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
updateMesWarehouseIn
(
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
addMesWarehouseIn
(
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/ckgl/bfccgrk/components/config.ts
0 → 100644
View file @
baef950f
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
uploadApi
}
from
'/@/api/sys/upload'
;
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'djh'
,
label
:
'单据号'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'djrq'
,
label
:
'单据日期'
,
defaultValue
:
undefined
,
component
:
'RangePicker'
,
componentProps
:
{
format
:
'YYYY-MM-DD HH:mm:ss'
,
style
:
{
width
:
'100%'
},
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'crklx'
,
label
:
'出入库类型'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2010533622867509249'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'ck'
,
label
:
'仓库'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2010539474382962690'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'gys'
,
label
:
'供应商'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'zdr'
,
label
:
'制单人'
,
defaultValue
:
undefined
,
component
:
'User'
,
componentProps
:
{
suffix
:
'ant-design:setting-outlined'
,
placeholder
:
'请选择'
,
},
},
{
field
:
'pch'
,
label
:
'批次号'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'ywzz'
,
label
:
'业务组织'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2015724355955159041'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'cspc'
,
label
:
'厂商批次'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'bz'
,
label
:
'备注'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
];
export
const
columns
:
BasicColumn
[]
=
[
{
resizable
:
true
,
dataIndex
:
'djh'
,
title
:
'单据号'
,
componentType
:
'auto-code'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'djrq'
,
title
:
'单据日期'
,
componentType
:
'date'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'crklx'
,
title
:
'出入库类型'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'ck'
,
title
:
'仓库'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'gys'
,
title
:
'供应商'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'zdr'
,
title
:
'制单人'
,
componentType
:
'user'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'pch'
,
title
:
'批次号'
,
componentType
:
'auto-code'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'cspc'
,
title
:
'厂商批次'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'ywzz'
,
title
:
'业务组织'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
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
:
3
,
offset
:
0
},
labelAlign
:
'right'
,
layout
:
'horizontal'
,
size
:
'default'
,
schemas
:
[
{
key
:
'e3c09b5cc8444dd492ad9e52ced337cf'
,
field
:
''
,
label
:
''
,
type
:
'grid'
,
colProps
:
{
span
:
24
},
component
:
'Grid'
,
children
:
[
{
span
:
8
,
list
:
[
{
key
:
'6a8a0e94c74245ef8f72a7823aa8c503'
,
field
:
'djh'
,
label
:
'单据号'
,
type
:
'auto-code'
,
component
:
'AutoCodeRule'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'自动生成单据号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
showLabel
:
true
,
autoCodeRule
:
'cgrkbh'
,
required
:
false
,
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'be51c47b3b544e0cadc46dc54362c9ba'
,
field
:
'djrq'
,
label
:
'单据日期'
,
type
:
'date'
,
component
:
'DatePicker'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
span
:
7
,
defaultValue
:
''
,
width
:
'100%'
,
placeholder
:
'请选择单据日期'
,
format
:
'YYYY-MM-DD HH:mm:ss'
,
showLabel
:
true
,
allowClear
:
true
,
disabled
:
false
,
required
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
isGetCurrent
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
searchType
:
'time'
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'1c43d86e91db4adfb5b16407d8641fe2'
,
field
:
'crklx'
,
label
:
'出入库类型'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择出入库类型'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
false
,
disabled
:
true
,
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'
},
],
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2010533622867509249'
},
labelField
:
'name'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
itemId
:
'2010533622867509249'
,
defaultSelect
:
'入库'
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'71e990a6a23f4369b7a9be459a3a82a6'
,
field
:
'ck'
,
label
:
'仓库'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择仓库'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
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'
},
],
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2010539474382962690'
},
labelField
:
'name'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
itemId
:
'2010539474382962690'
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'cc1a975fc12c43a69b75687e1af784e5'
,
field
:
'gys'
,
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
:
'f6cab4a9e2894121b5a05dc6e1addf49'
,
field
:
'zdr'
,
label
:
'制单人'
,
type
:
'user'
,
component
:
'User'
,
colProps
:
{
span
:
24
},
defaultValue
:
''
,
componentProps
:
{
span
:
7
,
width
:
'100%'
,
defaultValue
:
''
,
placeholder
:
'请选择人员'
,
userType
:
0
,
prefix
:
''
,
suffix
:
''
,
showLabel
:
true
,
disabled
:
false
,
required
:
false
,
multiple
:
true
,
isShow
:
true
,
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'8661293203314885bc02bb17bae70147'
,
field
:
'pch'
,
label
:
'批次号'
,
type
:
'auto-code'
,
component
:
'AutoCodeRule'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请输入批次号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
showLabel
:
true
,
autoCodeRule
:
'pcbm'
,
required
:
false
,
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'55bfa8e7f6374af0a0be531657c966d9'
,
field
:
'ywzz'
,
label
:
'业务组织'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择下拉选择业务组织'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
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'
},
],
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2015724355955159041'
},
labelField
:
'name'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
itemId
:
'2015724355955159041'
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'46a4ecc43e5946e5b00bb71e0688eb58'
,
field
:
'fj'
,
label
:
'上传附件'
,
type
:
'upload'
,
component
:
'Upload'
,
colProps
:
{
span
:
24
},
componentProps
:
{
api
:
uploadApi
,
span
:
7
,
defaultValue
:
''
,
accept
:
''
,
maxNumber
:
5
,
maxSize
:
5
,
showLabel
:
true
,
multiple
:
false
,
disabled
:
false
,
required
:
false
,
isShow
:
true
,
events
:
{},
listType
:
'text'
,
sourceType
:
'album,camera'
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'37db1b3e3e8a4dc99591a09f41f50a04'
,
field
:
'cspc'
,
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
:
24
,
list
:
[
{
key
:
'c52a93df5a174b689db9dae3337f0aa3'
,
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
:
16
,
justify
:
'start'
,
align
:
'top'
,
isShow
:
true
,
showBorder
:
false
,
bordercolor
:
'#d9d9d9'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
padding
:
'10px'
,
margin
:
'10px'
,
},
},
{
key
:
'9b7f5c48e6244557996bcf2974c9f8cb'
,
field
:
''
,
label
:
''
,
type
:
'tab'
,
colProps
:
{
span
:
24
},
component
:
'Tab'
,
children
:
[
{
span
:
24
,
name
:
'物料明细'
,
prefix
:
''
,
suffix
:
''
,
activeColor
:
'#1c8dff'
,
folderId
:
''
,
imageUrl
:
''
,
conFolderId
:
''
,
conImageUrl
:
''
,
list
:
[
{
key
:
'686c633161994a3d85f43ec946df0b4f'
,
label
:
''
,
field
:
'mesWarehouseInInfoList'
,
type
:
'form'
,
component
:
'SubForm'
,
required
:
true
,
colProps
:
{
span
:
24
},
componentProps
:
{
mainKey
:
'mesWarehouseInInfoList'
,
columns
:
[
{
key
:
'6f7ef96649df49648dbd9c0bfd7e9669'
,
title
:
'来源单号ID'
,
dataIndex
:
'lydhid'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入来源单号ID'
,
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
:
'7c9b3969869148e796d9fdc09ab4d552'
,
title
:
'物料编码'
,
dataIndex
:
'wlbm'
,
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
:
''
,
},
},
{
key
:
'd7832cc7ea1b48b286c9c2ada1055a17'
,
title
:
'物料名称'
,
dataIndex
:
'wlmc'
,
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
:
''
,
},
},
{
key
:
'8face1e45e07429ea0acfb219e3ff194'
,
title
:
'规格'
,
dataIndex
:
'gg'
,
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
:
'提示文本'
},
},
},
{
key
:
'39bb1d4caa9140abbdf113d6572796f4'
,
title
:
'型号'
,
dataIndex
:
'xh'
,
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
:
'提示文本'
},
},
},
{
key
:
'708ae42274bc48699fcaa16815245f57'
,
title
:
'单位'
,
dataIndex
:
'dw'
,
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
:
'提示文本'
},
},
},
{
key
:
'a3177210f3b44c3db75231dec93b018b'
,
title
:
'厂商批次'
,
dataIndex
:
'cspc'
,
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
:
'提示文本'
},
},
},
{
key
:
'b32a9b93b59a40eab7ba494960fc46b4'
,
title
:
'批次号'
,
dataIndex
:
'pch'
,
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
:
'提示文本'
},
},
},
{
key
:
'cb499ddb7a2f46d0a421a7ee8aa9769f'
,
title
:
'应收数量'
,
dataIndex
:
'yssl'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
0
,
min
:
0
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'a8e1db3402424317941f2b3420376249'
,
title
:
'实收数量'
,
dataIndex
:
'sssl'
,
componentType
:
'InputNumber'
,
defaultValue
:
0
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
0
,
min
:
0
,
step
:
1
,
disabled
:
false
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'934ed23e959a485d913f33f7e4ea672e'
,
title
:
'需求部门'
,
dataIndex
:
'xqbm'
,
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
:
'提示文本'
},
},
},
{
key
:
'395e882b03874b6ba277c5dc07602363'
,
title
:
'是否赠品'
,
dataIndex
:
'sfzp'
,
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
:
'提示文本'
},
},
},
{
key
:
'3e67ee90e0cc4f5f8693ab22f29a2894'
,
title
:
'是否质检'
,
dataIndex
:
'sfzj'
,
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
:
'提示文本'
},
},
},
{
key
:
'fea0ca556a8c494cb3bb3fbe10983ac8'
,
title
:
'货位号'
,
dataIndex
:
'hwh'
,
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
:
'提示文本'
},
},
},
{
key
:
'843817efe5bd4bffa5022f1e95bb8e01'
,
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
:
'提示文本'
},
},
},
{
key
:
'8ea1afc68d394f818b139e6b14622088'
,
title
:
'报废车id'
,
dataIndex
:
'bfcIds'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入报废车id报废车id报废车id'
,
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
:
'提示文本'
},
},
},
{
title
:
'操作'
,
key
:
'action'
,
fixed
:
'right'
,
width
:
'50px'
},
],
span
:
'24'
,
preloadType
:
'api'
,
apiConfig
:
{},
itemId
:
''
,
dicOptions
:
[],
useSelectButton
:
false
,
buttonName
:
'选择报废车'
,
showLabel
:
true
,
showComponentBorder
:
true
,
showBorder
:
false
,
bordercolor
:
'#f0f0f0'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
showIndex
:
false
,
isShow
:
true
,
multipleHeads
:
[],
buttonList
:
[
{
key
:
'button1773712782964'
,
label
:
'选择报废车'
,
icon
:
'ant-design:check-circle-outlined'
,
modal
:
{
bindModal
:
'2033471460401754114'
,
innerParams
:
[],
outParams
:
[
{
name
:
'id'
,
component
:
'{"table":"table_96346","field":"ids2553"}'
,
mainComponent
:
'{"key":"8ea1afc68d394f818b139e6b14622088","table":"mes_warehouse_in_info","field":"bfc_ids"}'
,
},
],
modalWidth
:
900
,
modalWidthUnit
:
'px'
,
modalHeight
:
500
,
modalHeightUnit
:
'px'
,
title
:
''
,
confirm
:
''
,
cancel
:
''
,
open
:
''
,
close
:
''
,
},
event
:
[
{
operateType
:
2
,
operateConfig
:
{
js
:
'formActionType.openModal(curRowData)'
},
},
],
type
:
2
,
},
],
topButtonList
:
[],
isExport
:
false
,
isImport
:
false
,
isDeleteSelected
:
false
,
isListView
:
false
,
viewList
:
[],
isShowAdd
:
false
,
isShowDelete
:
true
,
hasCheckedCol
:
false
,
events
:
{},
showPagenation
:
true
,
},
},
],
},
],
componentProps
:
{
tabPosition
:
'top'
,
size
:
'default'
,
type
:
'card'
,
isShow
:
true
},
},
],
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/ckgl/bfccgrk/components/workflowPermission.ts
0 → 100644
View file @
baef950f
export
const
permissionList
=
[
{
required
:
false
,
view
:
true
,
edit
:
false
,
disabled
:
true
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'单据号'
,
fieldId
:
'djh'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'auto-code'
,
key
:
'6a8a0e94c74245ef8f72a7823aa8c503'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'单据日期'
,
fieldId
:
'djrq'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'date'
,
key
:
'be51c47b3b544e0cadc46dc54362c9ba'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
false
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'出入库类型'
,
fieldId
:
'crklx'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'1c43d86e91db4adfb5b16407d8641fe2'
,
children
:
[],
options
:
{},
defaultValue
:
'入库'
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'仓库'
,
fieldId
:
'ck'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'71e990a6a23f4369b7a9be459a3a82a6'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'供应商'
,
fieldId
:
'gys'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'cc1a975fc12c43a69b75687e1af784e5'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'制单人'
,
fieldId
:
'zdr'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'user'
,
key
:
'f6cab4a9e2894121b5a05dc6e1addf49'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
false
,
disabled
:
true
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'批次号'
,
fieldId
:
'pch'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'auto-code'
,
key
:
'8661293203314885bc02bb17bae70147'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'业务组织'
,
fieldId
:
'ywzz'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'55bfa8e7f6374af0a0be531657c966d9'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'上传附件'
,
fieldId
:
'fj'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'upload'
,
key
:
'46a4ecc43e5946e5b00bb71e0688eb58'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'厂商批次'
,
fieldId
:
'cspc'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'37db1b3e3e8a4dc99591a09f41f50a04'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'备注'
,
fieldId
:
'bz'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'textarea'
,
key
:
'c52a93df5a174b689db9dae3337f0aa3'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
true
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
''
,
fieldId
:
'mesWarehouseInInfoList'
,
type
:
'form'
,
key
:
'686c633161994a3d85f43ec946df0b4f'
,
children
:
[
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'来源单号ID'
,
fieldId
:
'lydhid'
,
type
:
'Input'
,
key
:
'6f7ef96649df49648dbd9c0bfd7e9669'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'物料编码'
,
fieldId
:
'wlbm'
,
type
:
'Input'
,
key
:
'7c9b3969869148e796d9fdc09ab4d552'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'物料名称'
,
fieldId
:
'wlmc'
,
type
:
'Input'
,
key
:
'd7832cc7ea1b48b286c9c2ada1055a17'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'规格'
,
fieldId
:
'gg'
,
type
:
'Input'
,
key
:
'8face1e45e07429ea0acfb219e3ff194'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'型号'
,
fieldId
:
'xh'
,
type
:
'Input'
,
key
:
'39bb1d4caa9140abbdf113d6572796f4'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'单位'
,
fieldId
:
'dw'
,
type
:
'Input'
,
key
:
'708ae42274bc48699fcaa16815245f57'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'厂商批次'
,
fieldId
:
'cspc'
,
type
:
'Input'
,
key
:
'a3177210f3b44c3db75231dec93b018b'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'批次号'
,
fieldId
:
'pch'
,
type
:
'Input'
,
key
:
'b32a9b93b59a40eab7ba494960fc46b4'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'应收数量'
,
fieldId
:
'yssl'
,
type
:
'InputNumber'
,
key
:
'cb499ddb7a2f46d0a421a7ee8aa9769f'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'实收数量'
,
fieldId
:
'sssl'
,
type
:
'InputNumber'
,
key
:
'a8e1db3402424317941f2b3420376249'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'需求部门'
,
fieldId
:
'xqbm'
,
type
:
'Input'
,
key
:
'934ed23e959a485d913f33f7e4ea672e'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'是否赠品'
,
fieldId
:
'sfzp'
,
type
:
'Input'
,
key
:
'395e882b03874b6ba277c5dc07602363'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'是否质检'
,
fieldId
:
'sfzj'
,
type
:
'Input'
,
key
:
'3e67ee90e0cc4f5f8693ab22f29a2894'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'货位号'
,
fieldId
:
'hwh'
,
type
:
'Input'
,
key
:
'fea0ca556a8c494cb3bb3fbe10983ac8'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'备注'
,
fieldId
:
'bz'
,
type
:
'Input'
,
key
:
'843817efe5bd4bffa5022f1e95bb8e01'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseInInfoList'
,
fieldName
:
'报废车id'
,
fieldId
:
'bfcIds'
,
type
:
'Input'
,
key
:
'8ea1afc68d394f818b139e6b14622088'
,
children
:
[],
},
],
},
];
xjrsoft-vue3/src/views/ckgl/bfccgrk/index.vue
0 → 100644
View file @
baef950f
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
:row-selection=
"
{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
<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.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>
<BfccgrkModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
<ExportModal
v-if=
"visibleExport"
@
close=
"visibleExport = false"
:columns=
"columns"
@
success=
"handleExportSuccess"
/>
</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
{
getMesWarehouseInPage
,
deleteMesWarehouseIn
,
exportMesWarehouseIn
}
from
'/@/api/ckgl/bfccgrk'
;
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
printJS
from
'print-js'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
BfccgrkModal
from
'./components/BfccgrkModal.vue'
;
import
{
downloadByData
}
from
'/@/utils/file/download'
;
import
ExportModal
from
'/@/views/form/template/components/ExportModal.vue'
;
import
{
searchFormSchema
,
columns
}
from
'./components/config'
;
import
Icon
from
'/@/components/Icon/index'
;
import
{
generateTableJson
,
}
from
'/@/utils/event/design'
;
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
visibleExport
=
ref
(
false
);
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
"view"
,
"edit"
,
"delete"
]);
const
buttonConfigs
=
computed
(()
=>
{
const
list
=
[{
"buttonId"
:
"2011687510413426688"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2011687510413426690"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2011729952881885184"
,
"name"
:
"打印"
,
"code"
:
"print"
,
"icon"
:
"ant-design:printer-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2011691871017484288"
,
"name"
:
"快速导出"
,
"code"
:
"export"
,
"icon"
:
"ant-design:export-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2011691871017484289"
,
"name"
:
"提交"
,
"code"
:
"commit"
,
"icon"
:
"ant-design:arrow-up-outlined"
,
"isDefault"
:
false
,
"isUse"
:
true
,
"setting"
:[],
"showType"
:
"top"
,
"buttonType"
:
"primary"
},{
"buttonId"
:
"2011687510413426691"
,
"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
,
edit
:
handleEdit
,
print
:
handlePrint
,
export
:
handleExport
,
delete
:
handleDelete
,}
const
{
currentRoute
}
=
useRouter
();
const
formIdComputedRef
=
computed
(()
=>
currentRoute
.
value
.
meta
.
formId
as
string
);
provide
<
Ref
<
string
>>
(
'currentFormId'
,
formIdComputedRef
);
const
selectedKeys
=
ref
<
string
[]
>
([]);
const
selectedRowsData
=
ref
<
any
[]
>
([]);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
getRawDataSource
,
}]
=
useTable
({
title
:
'Bfccgrk列表'
,
api
:
getMesWarehouseInPage
,
rowKey
:
'id'
,
columns
:
filterColumns
,
pagination
:
{
pageSize
:
10
,
},
formConfig
:
{
labelWidth
:
100
,
schemas
:
searchFormSchema
,
fieldMapToTime
:
[[
'djrq'
,
[
'djrqStart'
,
'djrqEnd'
],
'YYYY-MM-DD HH:mm:ss '
,
true
],],
showResetButton
:
false
,
},
bordered
:
false
,
beforeFetch
:
(
params
)
=>
{
pageParamsInfo
.
value
=
{...
params
,
FormId
:
formIdComputedRef
.
value
,
PK
:
'id'
}
return
pageParamsInfo
.
value
;
},
afterFetch
:
(
res
)
=>
{
selectedKeys
.
value
=
[];
selectedRowsData
.
value
=
[];
},
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
]();
}
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
()
{
deleteMesWarehouseIn
(
ids
).
then
((
_
)
=>
{
handleSuccess
();
notification
.
success
({
message
:
'Tip'
,
description
:
t
(
'删除成功!'
),
});
});
},
onCancel
()
{},
});
}
async
function
handlePrint
()
{
const
dataSource
=
Array
.
isArray
(
getRawDataSource
())
?
getRawDataSource
()
:
getRawDataSource
().
list
;
const
json
=
generateTableJson
(
filterColumns
,
dataSource
);
const
properties
=
filterColumns
.
map
((
item
)
=>
item
.
title
);
printJS
({
printable
:
json
,
properties
:
properties
,
type
:
'json'
,
});
}
function
onSelectChange
(
selectedRowKeys
:
[],
selectedRows
)
{
selectedKeys
.
value
=
selectedRowKeys
;
selectedRowsData
.
value
=
selectedRows
;
}
function
customRow
(
record
:
Recordable
)
{
return
{
onClick
:
()
=>
{
let
selectedRowKeys
=
[...
selectedKeys
.
value
];
if
(
selectedRowKeys
.
indexOf
(
record
.
id
)
>=
0
)
{
let
index
=
selectedRowKeys
.
indexOf
(
record
.
id
);
selectedRowKeys
.
splice
(
index
,
1
);
}
else
{
selectedRowKeys
.
push
(
record
.
id
);
}
selectedKeys
.
value
=
selectedRowKeys
;
},
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"bfccgrk:edit"
))
{
handleEdit
(
record
);
}
},
};
}
function
handleSuccess
()
{
selectedKeys
.
value
=
[];
selectedRowsData
.
value
=
[];
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
);
}
async
function
handleExport
()
{
visibleExport
.
value
=
true
;
}
async
function
handleExportSuccess
(
cols
)
{
const
res
=
await
exportMesWarehouseIn
({
isTemplate
:
false
,
columns
:
cols
.
toString
(),
...
pageParamsInfo
.
value
});
visibleExport
.
value
=
false
;
downloadByData
(
res
.
data
,
'Bfccgrk.xlsx'
,
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
,
);
reload
();
}
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
:
`bfccgrk:
${
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
:
`bfccgrk:
${
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
xjrsoft-vue3/src/views/ckgl/cgrk/components/CgrkModal.vue
View file @
baef950f
<
template
>
<
template
>
<BasicModal
<BasicModal
:height=
"1080"
:height=
"1080"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
v-bind=
"$attrs"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<template
#
footer
v-if=
"
!state.isView"
>
<template
#
footer
v-if=
"
!state.isView"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-if=
"item.isShow"
>
<template
v-if=
"item.isShow"
>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
...
@@ -23,7 +24,6 @@
...
@@ -23,7 +24,6 @@
</template>
</template>
</template>
</template>
</BasicModal>
</BasicModal>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
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
{
formProps
,
formButtons
}
from
'./config'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -58,10 +58,11 @@
...
@@ -58,10 +58,11 @@
await
handleInner
(
data
);
await
handleInner
(
data
);
});
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
){
async
function
handleInner
(
data
)
{
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
@@ -73,7 +74,8 @@
...
@@ -73,7 +74,8 @@
showOkBtn
:
false
,
showOkBtn
:
false
,
canFullscreen
:
true
,
canFullscreen
:
true
,
width
:
1980
,
width
:
1980
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
@@ -85,10 +87,9 @@
...
@@ -85,10 +87,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
}
else
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
}
}
async
function
saveModal
()
{
async
function
saveModal
()
{
let
saveSuccess
=
false
;
let
saveSuccess
=
false
;
try
{
try
{
...
@@ -140,15 +141,14 @@
...
@@ -140,15 +141,14 @@
emit
(
'success'
);
emit
(
'success'
);
}
}
}
finally
{
}
finally
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
function
customClick
(
item
)
{
function
customClick
(
item
)
{
if
(
item
.
key
==
'confirm'
)
{
if
(
item
.
key
==
'confirm'
)
{
handleSubmit
();
handleSubmit
();
}
else
if
(
item
.
key
==
'cancel'
&&
props
.
formType
!==
'normal'
)
{
}
else
if
(
item
.
key
==
'cancel'
)
{
handleClose
();
handleClose
();
closeModal
();
closeModal
();
}
else
if
(
item
.
key
==
'reset'
)
{
}
else
if
(
item
.
key
==
'reset'
)
{
...
@@ -157,10 +157,8 @@
...
@@ -157,10 +157,8 @@
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
}
}
}
}
function
handleClose
()
{
function
handleClose
()
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/ckgl/cgrk/components/Form.vue
View file @
baef950f
<
template
>
<
template
>
<div
class=
"pt-4"
>
<div
class=
"pt-4"
>
<SimpleForm
<SimpleForm
ref=
"systemFormRef"
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isCamelCase=
"true"
:isCamelCase=
"true"
@
model-change=
"handleChange"
@
model-change=
"handleChange"
/>
/>
...
@@ -21,7 +20,12 @@
...
@@ -21,7 +20,12 @@
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
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,
}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
...
@@ -29,7 +33,7 @@
...
@@ -29,7 +33,7 @@
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
fromPage
:
{
fromPage
:
{
type
:
Number
,
type
:
Number
,
...
@@ -42,7 +46,7 @@
...
@@ -42,7 +46,7 @@
});
});
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
formInfo
:
{
formId
:
''
,
formName
:
''
}
formInfo
:
{
formId
:
''
,
formName
:
''
},
});
});
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
watch
(
watch
(
...
@@ -59,17 +63,35 @@
...
@@ -59,17 +63,35 @@
try
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
if
(
currentRoute
.
value
.
meta
)
{
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formName
=
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
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
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
nextTick
();
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...
@@ -78,15 +100,28 @@
...
@@ -78,15 +100,28 @@
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
});
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
...
@@ -107,19 +142,25 @@
...
@@ -107,19 +142,25 @@
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
const
record
=
await
getMesWarehouseIn
(
rowId
);
const
record
=
await
getMesWarehouseIn
(
rowId
);
setFieldsValue
(
record
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
}
catch
(
error
)
{
true
,
state
.
formInfo
.
formName
,
}
state
.
formInfo
.
formId
,
);
//表单事件:获取表单数据
}
catch
(
error
)
{}
}
}
// 辅助返回表单数据
// 辅助返回表单数据
async
function
getFieldsValue
()
{
async
function
getFieldsValue
()
{
let
values
=
[];
let
values
=
[];
...
@@ -135,45 +176,64 @@
...
@@ -135,45 +176,64 @@
}
}
return
values
;
return
values
;
}
}
// 辅助设置表单数据
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
}
// 重置表单数据
// 重置表单数据
async
function
resetFields
()
{
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
await
systemFormRef
.
value
.
resetFields
();
}
}
// 设置表单数据全部为Disabled 【查看】
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
async
function
setDisabledForm
()
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
}
// 获取行键值
// 获取行键值
function
getRowKey
()
{
function
getRowKey
()
{
return
RowKey
;
return
RowKey
;
}
}
// 更新api表单数据
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
async
function
update
({
values
,
rowId
})
{
try
{
try
{
values
[
RowKey
]
=
rowId
;
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateMesWarehouseIn
(
values
);
let
saveVal
=
await
updateMesWarehouseIn
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 新增api表单数据
// 新增api表单数据
async
function
add
(
values
)
{
async
function
add
(
values
)
{
try
{
try
{
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
addMesWarehouseIn
(
values
);
let
saveVal
=
await
addMesWarehouseIn
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
try
{
...
@@ -189,16 +249,30 @@
...
@@ -189,16 +249,30 @@
state
.
formModel
=
formModels
;
state
.
formModel
=
formModels
;
setFieldsValue
(
formModels
);
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
function
handleChange
(
val
)
{
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
emits
(
'update:value'
,
val
);
}
}
async
function
sendMessageForAllIframe
()
{
async
function
sendMessageForAllIframe
()
{
try
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
...
@@ -206,6 +280,7 @@
...
@@ -206,6 +280,7 @@
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -218,8 +293,6 @@
...
@@ -218,8 +293,6 @@
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/cplx/components/Form.vue
View file @
baef950f
<
template
>
<
template
>
<div
class=
"pt-4"
>
<div
class=
"pt-4"
>
<SimpleForm
<SimpleForm
ref=
"systemFormRef"
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isCamelCase=
"true"
:isCamelCase=
"true"
@
model-change=
"handleChange"
@
model-change=
"handleChange"
/>
/>
...
@@ -21,15 +20,19 @@
...
@@ -21,15 +20,19 @@
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
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,
}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
fromPage
:
{
fromPage
:
{
type
:
Number
,
type
:
Number
,
...
@@ -42,7 +45,7 @@
...
@@ -42,7 +45,7 @@
});
});
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
formInfo
:
{
formId
:
''
,
formName
:
''
}
formInfo
:
{
formId
:
''
,
formName
:
''
},
});
});
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
watch
(
watch
(
...
@@ -59,17 +62,35 @@
...
@@ -59,17 +62,35 @@
try
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
if
(
currentRoute
.
value
.
meta
)
{
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formName
=
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
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
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
nextTick
();
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...
@@ -78,15 +99,28 @@
...
@@ -78,15 +99,28 @@
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
});
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
...
@@ -107,19 +141,25 @@
...
@@ -107,19 +141,25 @@
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
const
record
=
await
getMesBaseCplx
(
rowId
);
const
record
=
await
getMesBaseCplx
(
rowId
);
setFieldsValue
(
record
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
}
catch
(
error
)
{
true
,
state
.
formInfo
.
formName
,
}
state
.
formInfo
.
formId
,
);
//表单事件:获取表单数据
}
catch
(
error
)
{}
}
}
// 辅助返回表单数据
// 辅助返回表单数据
async
function
getFieldsValue
()
{
async
function
getFieldsValue
()
{
let
values
=
[];
let
values
=
[];
...
@@ -135,45 +175,64 @@
...
@@ -135,45 +175,64 @@
}
}
return
values
;
return
values
;
}
}
// 辅助设置表单数据
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
}
// 重置表单数据
// 重置表单数据
async
function
resetFields
()
{
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
await
systemFormRef
.
value
.
resetFields
();
}
}
// 设置表单数据全部为Disabled 【查看】
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
async
function
setDisabledForm
()
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
}
// 获取行键值
// 获取行键值
function
getRowKey
()
{
function
getRowKey
()
{
return
RowKey
;
return
RowKey
;
}
}
// 更新api表单数据
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
async
function
update
({
values
,
rowId
})
{
try
{
try
{
values
[
RowKey
]
=
rowId
;
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateMesBaseCplx
(
values
);
let
saveVal
=
await
updateMesBaseCplx
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 新增api表单数据
// 新增api表单数据
async
function
add
(
values
)
{
async
function
add
(
values
)
{
try
{
try
{
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
addMesBaseCplx
(
values
);
let
saveVal
=
await
addMesBaseCplx
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
try
{
...
@@ -189,16 +248,30 @@
...
@@ -189,16 +248,30 @@
state
.
formModel
=
formModels
;
state
.
formModel
=
formModels
;
setFieldsValue
(
formModels
);
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
function
handleChange
(
val
)
{
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
emits
(
'update:value'
,
val
);
}
}
async
function
sendMessageForAllIframe
()
{
async
function
sendMessageForAllIframe
()
{
try
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
...
@@ -206,6 +279,7 @@
...
@@ -206,6 +279,7 @@
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -218,7 +292,6 @@
...
@@ -218,7 +292,6 @@
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
xjrsoft-vue3/src/views/jcsj/cplx/components/config.ts
View file @
baef950f
...
@@ -349,7 +349,7 @@ export const formProps: FormProps = {
...
@@ -349,7 +349,7 @@ export const formProps: FormProps = {
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
},
dicOptions
:
[],
dicOptions
:
[],
required
:
tru
e
,
required
:
fals
e
,
rules
:
[],
rules
:
[],
events
:
{},
events
:
{},
isShow
:
true
,
isShow
:
true
,
...
...
xjrsoft-vue3/src/views/jcsj/cplx/index.vue
View file @
baef950f
<
template
>
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
>
>
<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"
/>
<a-button
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<a-button
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<
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)"
...
@@ -41,81 +37,46 @@
...
@@ -41,81 +37,46 @@
}}
</span>
}}
</span>
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
</template>
</template>
<CplxModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
<CplxModal
@
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'
;
import
{
getMesBaseCplxPage
,
deleteMesBaseCplx
}
from
'/@/api/jcsj/cplx'
;
import
{
getMesBaseCplxPage
,
deleteMesBaseCplx
}
from
'/@/api/jcsj/cplx'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
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
CplxModal
from
'./components/CplxModal.vue'
;
import
CplxModal
from
'./components/CplxModal.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'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
}
=
const
{
useConcurrentLock
();
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
,
}
=
useConcurrentLock
();
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
...
@@ -125,17 +86,46 @@
...
@@ -125,17 +86,46 @@
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
(()
=>
{
const
list
=
[{
"buttonId"
:
"2019334653844258816"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2019334653844258817"
,
"name"
:
"新增"
,
"code"
:
"add"
,
"icon"
:
"ant-design:plus-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2019334653844258818"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2019334653844258819"
,
"name"
:
"删除"
,
"code"
:
"delete"
,
"icon"
:
"ant-design:delete-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
}]
const
list
=
[
{
buttonId
:
'2019334653844258816'
,
name
:
'查看'
,
code
:
'view'
,
icon
:
'ant-design:eye-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2019334653844258817'
,
name
:
'新增'
,
code
:
'add'
,
icon
:
'ant-design:plus-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2019334653844258818'
,
name
:
'编辑'
,
code
:
'edit'
,
icon
:
'ant-design:form-outlined'
,
isDefault
:
true
,
isUse
:
true
,
isEnableLock
:
true
,
},
{
buttonId
:
'2019334653844258819'
,
name
:
'删除'
,
code
:
'delete'
,
icon
:
'ant-design:delete-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
];
return
filterButtonAuth
(
list
);
return
filterButtonAuth
(
list
);
})
})
;
const
tableButtonConfig
=
computed
(()
=>
{
const
tableButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
...
@@ -145,27 +135,16 @@
...
@@ -145,27 +135,16 @@
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
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
};
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
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
}]
=
useTable
({
title
:
'Cplx列表'
,
title
:
'Cplx列表'
,
api
:
getMesBaseCplxPage
,
api
:
getMesBaseCplxPage
,
rowKey
:
'id'
,
rowKey
:
'id'
,
...
@@ -179,23 +158,15 @@
...
@@ -179,23 +158,15 @@
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
)
=>
{},
},
useSearchForm
:
true
,
useSearchForm
:
true
,
showTableSetting
:
true
,
showTableSetting
:
true
,
striped
:
false
,
striped
:
false
,
actionColumn
:
{
actionColumn
:
{
width
:
195
,
width
:
195
,
...
@@ -212,32 +183,20 @@
...
@@ -212,32 +183,20 @@
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
)
{
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
(
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
);
record
[
field
],
formIdComputedRef
.
value
,
);
if
(
res
!==
null
)
{
if
(
res
!==
null
)
{
return
;
return
;
}
}
...
@@ -247,16 +206,12 @@
...
@@ -247,16 +206,12 @@
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
]);
}
}
...
@@ -281,16 +236,10 @@
...
@@ -281,16 +236,10 @@
});
});
}
}
function
customRow
(
record
:
Recordable
)
{
function
customRow
(
record
:
Recordable
)
{
return
{
return
{
ondblclick
:
()
=>
{
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"cplx:edit"
))
{
if
(
record
.
isCanEdit
&&
hasPermission
(
'cplx:edit'
))
{
handleEdit
(
record
);
handleEdit
(
record
);
}
}
},
},
...
@@ -298,43 +247,38 @@
...
@@ -298,43 +247,38 @@
}
}
function
handleSuccess
()
{
function
handleSuccess
()
{
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
getLessActions
(
record
:
Recordable
)
{
function
getLessActions
(
record
:
Recordable
)
{
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
[]
=
[];
...
@@ -352,7 +296,6 @@
...
@@ -352,7 +296,6 @@
}
else
{
}
else
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
actionsList
.
push
({
actionsList
.
push
({
auth
:
`cplx:
${
button
.
code
}
`
,
auth
:
`cplx:
${
button
.
code
}
`
,
label
:
button
?.
name
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
...
@@ -362,24 +305,17 @@
...
@@ -362,24 +305,17 @@
});
});
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
>
xjrsoft-vue3/src/views/jcsj/gylx/components/Form.vue
View file @
baef950f
<
template
>
<
template
>
<div
class=
"pt-4"
>
<div
class=
"pt-4"
>
<SimpleForm
<SimpleForm
ref=
"systemFormRef"
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isCamelCase=
"true"
:isCamelCase=
"true"
@
model-change=
"handleChange"
@
model-change=
"handleChange"
/>
/>
...
@@ -21,7 +20,12 @@
...
@@ -21,7 +20,12 @@
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
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,
}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
...
@@ -29,7 +33,7 @@
...
@@ -29,7 +33,7 @@
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
fromPage
:
{
fromPage
:
{
type
:
Number
,
type
:
Number
,
...
@@ -42,7 +46,7 @@
...
@@ -42,7 +46,7 @@
});
});
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
formInfo
:
{
formId
:
''
,
formName
:
''
}
formInfo
:
{
formId
:
''
,
formName
:
''
},
});
});
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
watch
(
watch
(
...
@@ -59,17 +63,35 @@
...
@@ -59,17 +63,35 @@
try
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
if
(
currentRoute
.
value
.
meta
)
{
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formName
=
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
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
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
nextTick
();
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...
@@ -78,15 +100,28 @@
...
@@ -78,15 +100,28 @@
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
});
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
...
@@ -107,19 +142,25 @@
...
@@ -107,19 +142,25 @@
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
const
record
=
await
getRokeRouting
(
rowId
);
const
record
=
await
getRokeRouting
(
rowId
);
setFieldsValue
(
record
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
}
catch
(
error
)
{
true
,
state
.
formInfo
.
formName
,
}
state
.
formInfo
.
formId
,
);
//表单事件:获取表单数据
}
catch
(
error
)
{}
}
}
// 辅助返回表单数据
// 辅助返回表单数据
async
function
getFieldsValue
()
{
async
function
getFieldsValue
()
{
let
values
=
[];
let
values
=
[];
...
@@ -135,45 +176,64 @@
...
@@ -135,45 +176,64 @@
}
}
return
values
;
return
values
;
}
}
// 辅助设置表单数据
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
}
// 重置表单数据
// 重置表单数据
async
function
resetFields
()
{
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
await
systemFormRef
.
value
.
resetFields
();
}
}
// 设置表单数据全部为Disabled 【查看】
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
async
function
setDisabledForm
()
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
}
// 获取行键值
// 获取行键值
function
getRowKey
()
{
function
getRowKey
()
{
return
RowKey
;
return
RowKey
;
}
}
// 更新api表单数据
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
async
function
update
({
values
,
rowId
})
{
try
{
try
{
values
[
RowKey
]
=
rowId
;
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateRokeRouting
(
values
);
let
saveVal
=
await
updateRokeRouting
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 新增api表单数据
// 新增api表单数据
async
function
add
(
values
)
{
async
function
add
(
values
)
{
try
{
try
{
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
addRokeRouting
(
values
);
let
saveVal
=
await
addRokeRouting
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
try
{
...
@@ -189,16 +249,30 @@
...
@@ -189,16 +249,30 @@
state
.
formModel
=
formModels
;
state
.
formModel
=
formModels
;
setFieldsValue
(
formModels
);
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
function
handleChange
(
val
)
{
function
handleChange
(
val
)
{
emits
(
'update:value'
,
val
);
emits
(
'update:value'
,
val
);
}
}
async
function
sendMessageForAllIframe
()
{
async
function
sendMessageForAllIframe
()
{
try
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
...
@@ -206,6 +280,7 @@
...
@@ -206,6 +280,7 @@
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -218,8 +293,6 @@
...
@@ -218,8 +293,6 @@
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/gylx/components/GylxModal.vue
View file @
baef950f
<
template
>
<
template
>
<BasicModal
<BasicModal
:height=
"600"
:height=
"600"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
v-bind=
"$attrs"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<template
#
footer
v-if=
"
!state.isView"
>
<template
#
footer
v-if=
"
!state.isView"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-for=
"(item, index) in sortBy(formButtons, 'index')"
:key=
"item.key"
>
<template
v-if=
"item.isShow"
>
<template
v-if=
"item.isShow"
>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
<CustomButtonModal
v-if=
"item.type == CustomButtonModalType.Modal"
:info=
"item"
/>
...
@@ -23,7 +24,6 @@
...
@@ -23,7 +24,6 @@
</template>
</template>
</template>
</template>
</BasicModal>
</BasicModal>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
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
{
formProps
,
formButtons
}
from
'./config'
;
import
{
formProps
,
formButtons
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -58,10 +58,11 @@
...
@@ -58,10 +58,11 @@
await
handleInner
(
data
);
await
handleInner
(
data
);
});
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
){
async
function
handleInner
(
data
)
{
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
@@ -73,7 +74,8 @@
...
@@ -73,7 +74,8 @@
showOkBtn
:
false
,
showOkBtn
:
false
,
canFullscreen
:
true
,
canFullscreen
:
true
,
width
:
1200
,
width
:
1200
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
@@ -85,10 +87,9 @@
...
@@ -85,10 +87,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
}
else
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
}
}
async
function
saveModal
()
{
async
function
saveModal
()
{
let
saveSuccess
=
false
;
let
saveSuccess
=
false
;
try
{
try
{
...
@@ -140,15 +141,14 @@
...
@@ -140,15 +141,14 @@
emit
(
'success'
);
emit
(
'success'
);
}
}
}
finally
{
}
finally
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
function
customClick
(
item
)
{
function
customClick
(
item
)
{
if
(
item
.
key
==
'confirm'
)
{
if
(
item
.
key
==
'confirm'
)
{
handleSubmit
();
handleSubmit
();
}
else
if
(
item
.
key
==
'cancel'
&&
props
.
formType
!==
'normal'
)
{
}
else
if
(
item
.
key
==
'cancel'
)
{
handleClose
();
handleClose
();
closeModal
();
closeModal
();
}
else
if
(
item
.
key
==
'reset'
)
{
}
else
if
(
item
.
key
==
'reset'
)
{
...
@@ -157,10 +157,8 @@
...
@@ -157,10 +157,8 @@
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
executeCurFormEvent
(
item
.
event
,
state
.
formModel
,
true
);
}
}
}
}
function
handleClose
()
{
function
handleClose
()
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/jcsj/gylx/components/config.ts
View file @
baef950f
...
@@ -55,6 +55,18 @@ export const columns: BasicColumn[] = [
...
@@ -55,6 +55,18 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
listStyle
:
undefined
,
},
},
{
resizable
:
true
,
dataIndex
:
'productType'
,
title
:
'产品类型'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -136,7 +148,7 @@ export const formProps: FormProps = {
...
@@ -136,7 +148,7 @@ export const formProps: FormProps = {
component
:
'Grid'
,
component
:
'Grid'
,
children
:
[
children
:
[
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'536715321b4c49df8b63b2fcb7cc14ab'
,
key
:
'536715321b4c49df8b63b2fcb7cc14ab'
,
...
@@ -164,7 +176,7 @@ export const formProps: FormProps = {
...
@@ -164,7 +176,7 @@ export const formProps: FormProps = {
],
],
},
},
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'8d9ef135306242729fb4673b9e2dd918'
,
key
:
'8d9ef135306242729fb4673b9e2dd918'
,
...
@@ -202,7 +214,7 @@ export const formProps: FormProps = {
...
@@ -202,7 +214,7 @@ export const formProps: FormProps = {
],
],
},
},
{
{
span
:
8
,
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'6636f959cd3a4c239aeb3ab43505a27b'
,
key
:
'6636f959cd3a4c239aeb3ab43505a27b'
,
...
@@ -229,6 +241,58 @@ export const formProps: FormProps = {
...
@@ -229,6 +241,58 @@ export const formProps: FormProps = {
},
},
],
],
},
},
{
span
:
6
,
list
:
[
{
key
:
'2fbc5d1e99af41beb0232f448f39432f'
,
field
:
'productType'
,
label
:
'产品类型'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
7
,
placeholder
:
'请选择下拉选择'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
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'
,
params
:
null
,
labelField
:
'label'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'/jcxx/cplx/getAllCPLX'
,
method
:
'GET'
,
apiId
:
'd0471a2c71d242ebbdc3ce88e00f8008'
,
apiParams
:
[
{
key
:
'1'
,
title
:
'Query Params'
,
tableInfo
:
[]
},
{
key
:
'2'
,
title
:
'Header'
,
tableInfo
:
[]
},
{
key
:
'3'
,
title
:
'Body'
},
],
script
:
"var sql='SELECT id as value, cm as label FROM mes_base_cplx WHERE delete_mark = 0 ORDER BY pid ASC, paixu ASC';
\
r
\
nreturn db.select(sql)"
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
},
],
],
componentProps
:
{
componentProps
:
{
gutter
:
16
,
gutter
:
16
,
...
...
xjrsoft-vue3/src/views/jcsj/gylx/index.vue
View file @
baef950f
<
template
>
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
>
>
<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"
/>
<a-button
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<a-button
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<
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)"
...
@@ -41,81 +37,46 @@
...
@@ -41,81 +37,46 @@
}}
</span>
}}
</span>
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
</template>
</template>
<GylxModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
<GylxModal
@
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'
;
import
{
getRokeRoutingPage
,
deleteRokeRouting
}
from
'/@/api/jcsj/gylx'
;
import
{
getRokeRoutingPage
,
deleteRokeRouting
}
from
'/@/api/jcsj/gylx'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
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
GylxModal
from
'./components/GylxModal.vue'
;
import
GylxModal
from
'./components/GylxModal.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'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
}
=
const
{
useConcurrentLock
();
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
,
}
=
useConcurrentLock
();
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
...
@@ -125,17 +86,46 @@
...
@@ -125,17 +86,46 @@
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
(()
=>
{
const
list
=
[{
"buttonId"
:
"2006195708167311360"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2006195708171505664"
,
"name"
:
"新增"
,
"code"
:
"add"
,
"icon"
:
"ant-design:plus-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2006195708171505665"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2006195708171505666"
,
"name"
:
"删除"
,
"code"
:
"delete"
,
"icon"
:
"ant-design:delete-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
}]
const
list
=
[
{
buttonId
:
'2006195708167311360'
,
name
:
'查看'
,
code
:
'view'
,
icon
:
'ant-design:eye-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2006195708171505664'
,
name
:
'新增'
,
code
:
'add'
,
icon
:
'ant-design:plus-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2006195708171505665'
,
name
:
'编辑'
,
code
:
'edit'
,
icon
:
'ant-design:form-outlined'
,
isDefault
:
true
,
isUse
:
true
,
isEnableLock
:
true
,
},
{
buttonId
:
'2006195708171505666'
,
name
:
'删除'
,
code
:
'delete'
,
icon
:
'ant-design:delete-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
];
return
filterButtonAuth
(
list
);
return
filterButtonAuth
(
list
);
})
})
;
const
tableButtonConfig
=
computed
(()
=>
{
const
tableButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
...
@@ -145,27 +135,16 @@
...
@@ -145,27 +135,16 @@
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
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
};
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
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
const
[
registerTable
,
{
reload
,
}]
=
useTable
({
title
:
'Gylx列表'
,
title
:
'Gylx列表'
,
api
:
getRokeRoutingPage
,
api
:
getRokeRoutingPage
,
rowKey
:
'id'
,
rowKey
:
'id'
,
...
@@ -179,23 +158,15 @@
...
@@ -179,23 +158,15 @@
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
)
=>
{},
},
useSearchForm
:
true
,
useSearchForm
:
true
,
showTableSetting
:
true
,
showTableSetting
:
true
,
striped
:
false
,
striped
:
false
,
actionColumn
:
{
actionColumn
:
{
width
:
195
,
width
:
195
,
...
@@ -212,32 +183,20 @@
...
@@ -212,32 +183,20 @@
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
)
{
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
(
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
);
record
[
field
],
formIdComputedRef
.
value
,
);
if
(
res
!==
null
)
{
if
(
res
!==
null
)
{
return
;
return
;
}
}
...
@@ -247,16 +206,12 @@
...
@@ -247,16 +206,12 @@
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
]);
}
}
...
@@ -281,16 +236,10 @@
...
@@ -281,16 +236,10 @@
});
});
}
}
function
customRow
(
record
:
Recordable
)
{
function
customRow
(
record
:
Recordable
)
{
return
{
return
{
ondblclick
:
()
=>
{
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"gylx:edit"
))
{
if
(
record
.
isCanEdit
&&
hasPermission
(
'gylx:edit'
))
{
handleEdit
(
record
);
handleEdit
(
record
);
}
}
},
},
...
@@ -298,43 +247,38 @@
...
@@ -298,43 +247,38 @@
}
}
function
handleSuccess
()
{
function
handleSuccess
()
{
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
getLessActions
(
record
:
Recordable
)
{
function
getLessActions
(
record
:
Recordable
)
{
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
[]
=
[];
...
@@ -352,7 +296,6 @@
...
@@ -352,7 +296,6 @@
}
else
{
}
else
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
actionsList
.
push
({
actionsList
.
push
({
auth
:
`gylx:
${
button
.
code
}
`
,
auth
:
`gylx:
${
button
.
code
}
`
,
label
:
button
?.
name
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
...
@@ -362,24 +305,17 @@
...
@@ -362,24 +305,17 @@
});
});
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
>
xjrsoft-vue3/src/views/scgl/scjh/components/config.ts
View file @
baef950f
...
@@ -480,12 +480,13 @@ export const formProps: FormProps = {
...
@@ -480,12 +480,13 @@ export const formProps: FormProps = {
showSearch
:
false
,
showSearch
:
false
,
isMultiple
:
false
,
isMultiple
:
false
,
clearable
:
false
,
clearable
:
false
,
disabled
:
fals
e
,
disabled
:
tru
e
,
staticOptions
:
[
staticOptions
:
[
{
key
:
1
,
label
:
'Option 1'
,
value
:
'Option 1'
},
{
key
:
1
,
label
:
'Option 1'
,
value
:
'Option 1'
},
{
key
:
2
,
label
:
'Option 2'
,
value
:
'Option 2'
},
{
key
:
2
,
label
:
'Option 2'
,
value
:
'Option 2'
},
{
key
:
3
,
label
:
'Option 3'
,
value
:
'Option 3'
},
{
key
:
3
,
label
:
'Option 3'
,
value
:
'Option 3'
},
],
],
defaultSelect
:
'3'
,
datasourceType
:
'dic'
,
datasourceType
:
'dic'
,
labelField
:
'name'
,
labelField
:
'name'
,
valueField
:
'value'
,
valueField
:
'value'
,
...
@@ -817,7 +818,7 @@ export const formProps: FormProps = {
...
@@ -817,7 +818,7 @@ export const formProps: FormProps = {
controls
:
true
,
controls
:
true
,
required
:
false
,
required
:
false
,
subTotal
:
false
,
subTotal
:
false
,
isShow
:
tru
e
,
isShow
:
fals
e
,
rules
:
[],
rules
:
[],
events
:
{},
events
:
{},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
...
...
xjrsoft-vue3/src/views/scgl/scrw/components/Form.vue
View file @
baef950f
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
ref=
"systemFormRef"
ref=
"systemFormRef"
:formProps=
"data.formDataProps"
:formProps=
"data.formDataProps"
:formModel=
"state.formModel"
:formModel=
"state.formModel"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isWorkFlow=
"props.fromPage
!=
FromPageType.MENU"
:isCamelCase=
"true"
:isCamelCase=
"true"
@
model-change=
"handleChange"
@
model-change=
"handleChange"
/>
/>
...
@@ -14,26 +14,35 @@
...
@@ -14,26 +14,35 @@
import
{
reactive
,
ref
,
onMounted
,
nextTick
,
watch
}
from
'vue'
;
import
{
reactive
,
ref
,
onMounted
,
nextTick
,
watch
}
from
'vue'
;
import
{
formProps
,
formEventConfigs
}
from
'./config'
;
import
{
formProps
,
formEventConfigs
}
from
'./config'
;
import
SimpleForm
from
'/@/components/SimpleForm/src/SimpleForm.vue'
;
import
SimpleForm
from
'/@/components/SimpleForm/src/SimpleForm.vue'
;
import
{
addMesProductionTask
,
getMesProductionTask
,
updateMesProductionTask
}
from
'/@/api/scgl/scrw'
;
import
{
import
{
getRokeRouting
}
from
'/@/api/jcsj/gylx'
;
addMesProductionTask
,
getMesProductionTask
,
updateMesProductionTask
,
}
from
'/@/api/scgl/scrw'
;
import
{
getRokeRouting
}
from
'/@/api/jcsj/gylx'
;
import
{
cloneDeep
,
isString
}
from
'lodash-es'
;
import
{
cloneDeep
,
isString
}
from
'lodash-es'
;
import
{
FormDataProps
}
from
'/@/components/Designer/src/types'
;
import
{
FormDataProps
}
from
'/@/components/Designer/src/types'
;
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
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,}
from
'/@/hooks/web/useFormEvent'
;
import
{
createFormEvent
,
getFormDataEvent
,
loadFormEvent
,
submitFormEvent
,
}
from
'/@/hooks/web/useFormEvent'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
changeWorkFlowForm
,
changeSchemaDisabled
}
from
'/@/hooks/web/useWorkFlowForm'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
WorkFlowFormParams
}
from
'/@/model/workflow/bpmnConfig'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
notification
}
from
'ant-design-vue'
;
import
{
notification
}
from
'ant-design-vue'
;
import
axios
from
'axios'
;
import
axios
from
'axios'
;
import
{
getEnvConfig
}
from
'/@/build/utils'
;
import
{
getEnvConfig
}
from
'/@/build/utils'
;
import
{
log
}
from
'node:console'
;
import
{
log
}
from
'node:console'
;
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
{
filterFormSchemaAuth
}
=
usePermission
();
const
RowKey
=
'id'
;
const
RowKey
=
'id'
;
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
emits
=
defineEmits
([
'changeUploadComponentIds'
,
'loadingCompleted'
,
'update:value'
]);
const
props
=
defineProps
({
const
props
=
defineProps
({
fromPage
:
{
fromPage
:
{
type
:
Number
,
type
:
Number
,
...
@@ -46,8 +55,8 @@ import { log } from 'node:console';
...
@@ -46,8 +55,8 @@ import { log } from 'node:console';
});
});
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
formInfo
:
{
formId
:
''
,
formName
:
''
},
formInfo
:
{
formId
:
''
,
formName
:
''
},
isInitializing
:
false
isInitializing
:
false
,
});
});
const
{
currentRoute
}
=
useRouter
();
const
{
currentRoute
}
=
useRouter
();
watch
(
watch
(
...
@@ -67,7 +76,9 @@ import { log } from 'node:console';
...
@@ -67,7 +76,9 @@ import { log } from 'node:console';
if
(
newBomId
&&
!
state
.
isInitializing
)
{
if
(
newBomId
&&
!
state
.
isInitializing
)
{
try
{
try
{
const
apiUrl
=
import
.
meta
.
env
.
VITE_GLOB_API_URL
||
''
;
const
apiUrl
=
import
.
meta
.
env
.
VITE_GLOB_API_URL
||
''
;
const
response
=
await
axios
.
get
(
apiUrl
+
'/magic-api/jcxx/wlxList'
,
{
params
:
{
bomId
:
newBomId
}
});
const
response
=
await
axios
.
get
(
apiUrl
+
'/magic-api/jcxx/wlxList'
,
{
params
:
{
bomId
:
newBomId
},
});
state
.
formModel
.
mesWarehouseMaterialList
=
[];
state
.
formModel
.
mesWarehouseMaterialList
=
[];
//铸造量的值
//铸造量的值
let
sl
=
state
.
formModel
.
sl
;
let
sl
=
state
.
formModel
.
sl
;
...
@@ -81,12 +92,12 @@ import { log } from 'node:console';
...
@@ -81,12 +92,12 @@ import { log } from 'node:console';
let
result
=
Number
((
sl
/
bomsl
).
toFixed
(
2
));
let
result
=
Number
((
sl
/
bomsl
).
toFixed
(
2
));
//物料数量等于原数量*倍数
//物料数量等于原数量*倍数
if
(
item
.
wlsl
&&
item
.
wlsl
>
0
)
{
if
(
item
.
wlsl
&&
item
.
wlsl
>
0
)
{
item
.
wlsl
=
Number
((
item
.
wlsl
*
result
).
toFixed
(
2
));
item
.
wlsl
=
Number
((
item
.
wlsl
*
result
).
toFixed
(
2
));
}
}
}
}
})
})
;
}
}
state
.
formModel
.
mesWarehouseMaterialList
=
response
.
data
.
data
.
map
(
item
=>
({
state
.
formModel
.
mesWarehouseMaterialList
=
response
.
data
.
data
.
map
(
(
item
)
=>
({
wlbh
:
item
.
wlbh
,
wlbh
:
item
.
wlbh
,
wlmc
:
item
.
wlmc
,
wlmc
:
item
.
wlmc
,
blsl
:
item
.
wlsl
,
blsl
:
item
.
wlsl
,
...
@@ -95,13 +106,13 @@ import { log } from 'node:console';
...
@@ -95,13 +106,13 @@ import { log } from 'node:console';
nkbz
:
item
.
nkbz
,
nkbz
:
item
.
nkbz
,
sftl
:
item
.
sftl
,
sftl
:
item
.
sftl
,
bomsl
:
item
.
bomsl
,
bomsl
:
item
.
bomsl
,
wlId
:
item
.
id
wlId
:
item
.
id
,
}));
}));
}
catch
(
error
)
{
}
catch
(
error
)
{
notification
.
error
({
message
:
'获取物料清单失败'
});
notification
.
error
({
message
:
'获取物料清单失败'
});
}
}
}
}
}
}
,
);
);
// Watch for changes to process route field and call API
// Watch for changes to process route field and call API
...
@@ -112,43 +123,63 @@ import { log } from 'node:console';
...
@@ -112,43 +123,63 @@ import { log } from 'node:console';
try
{
try
{
const
response
=
await
getRokeRouting
(
newGylxId
);
const
response
=
await
getRokeRouting
(
newGylxId
);
//计划数量
//计划数量
const
jhsl
=
state
.
formModel
[
"sl"
];
const
jhsl
=
state
.
formModel
[
'sl'
];
//计划开始时间
//计划开始时间
const
jhksrq
=
state
.
formModel
[
"jhksrq"
];
const
jhksrq
=
state
.
formModel
[
'jhksrq'
];
//计划结束时间
//计划结束时间
const
jhjsrq
=
state
.
formModel
[
"jhjsrq"
];
const
jhjsrq
=
state
.
formModel
[
'jhjsrq'
];
// Assign the process list from API response to production order list with field mapping
// Assign the process list from API response to production order list with field mapping
state
.
formModel
.
mesProductionGongdanList
=
response
.
rokeRoutingProcessList
.
map
(
item
=>
({
state
.
formModel
.
mesProductionGongdanList
=
response
.
rokeRoutingProcessList
.
map
(
(
item
)
=>
({
gxbh
:
item
.
code
,
// 工序编号 → 工序编号
gxbh
:
item
.
code
,
// 工序编号 → 工序编号
gxmc
:
item
.
name
,
// 工序名称 → 工序名称
gxmc
:
item
.
name
,
// 工序名称 → 工序名称
jhsl
:
jhsl
,
jhsl
:
jhsl
,
jhksrq
:
jhksrq
,
jhksrq
:
jhksrq
,
jhjsrq
:
jhjsrq
,
jhjsrq
:
jhjsrq
,
gxId
:
item
.
processId
// 工序ID → 工序ID
gxId
:
item
.
processId
,
// 工序ID → 工序ID
}));
}),
);
}
catch
(
error
)
{
}
catch
(
error
)
{
notification
.
error
({
message
:
'获取工艺路线详情失败'
});
notification
.
error
({
message
:
'获取工艺路线详情失败'
});
}
}
}
}
}
}
,
);
);
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
try
{
try
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
if
(
props
.
fromPage
==
FromPageType
.
MENU
)
{
setMenuPermission
();
setMenuPermission
();
if
(
currentRoute
.
value
.
meta
){
if
(
currentRoute
.
value
.
meta
)
{
state
.
formInfo
.
formName
=
currentRoute
.
value
.
meta
.
title
&&
isString
(
currentRoute
.
value
.
meta
.
title
)?
currentRoute
.
value
.
meta
.
title
:
''
;
state
.
formInfo
.
formName
=
state
.
formInfo
.
formId
=
currentRoute
.
value
.
meta
.
formId
&&
isString
(
currentRoute
.
value
.
meta
.
formId
)?
currentRoute
.
value
.
meta
.
formId
:
''
;
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
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
nextTick
();
await
nextTick
();
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
FLOW
)
{
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
// loadingCompleted后 工作流页面直接利用Ref调用setWorkFlowForm方法
...
@@ -157,15 +188,28 @@ import { log } from 'node:console';
...
@@ -157,15 +188,28 @@ import { log } from 'node:console';
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
}
else
if
(
props
.
fromPage
==
FromPageType
.
DESKTOP
)
{
// 桌面设计 表单事件需要执行
// 桌面设计 表单事件需要执行
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
emits
(
'loadingCompleted'
);
//告诉系统表单已经加载完毕
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
createFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:初始化表单
formProps
.
schemas
,
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:初始化表单
await
loadFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:加载表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:加载表单
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
});
});
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
// 根据菜单页面权限,设置表单属性(必填,禁用,显示)
function
setMenuPermission
()
{
function
setMenuPermission
()
{
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
data
.
formDataProps
.
schemas
=
filterFormSchemaAuth
(
data
.
formDataProps
.
schemas
!
);
...
@@ -186,6 +230,7 @@ import { log } from 'node:console';
...
@@ -186,6 +230,7 @@ import { log } from 'node:console';
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
...
@@ -193,15 +238,21 @@ import { log } from 'node:console';
...
@@ -193,15 +238,21 @@ import { log } from 'node:console';
const
record
=
await
getMesProductionTask
(
rowId
);
const
record
=
await
getMesProductionTask
(
rowId
);
setFieldsValue
(
record
);
setFieldsValue
(
record
);
state
.
formModel
=
record
;
state
.
formModel
=
record
;
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
await
getFormDataEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:获取表单数据
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:获取表单数据
}
catch
(
error
)
{
}
catch
(
error
)
{
}
finally
{
}
finally
{
state
.
isInitializing
=
false
;
state
.
isInitializing
=
false
;
}
}
}
}
// 辅助返回表单数据
// 辅助返回表单数据
async
function
getFieldsValue
()
{
async
function
getFieldsValue
()
{
let
values
=
[];
let
values
=
[];
...
@@ -217,45 +268,64 @@ import { log } from 'node:console';
...
@@ -217,45 +268,64 @@ import { log } from 'node:console';
}
}
return
values
;
return
values
;
}
}
// 辅助设置表单数据
// 辅助设置表单数据
function
setFieldsValue
(
record
)
{
function
setFieldsValue
(
record
)
{
systemFormRef
.
value
.
setFieldsValue
(
record
);
systemFormRef
.
value
.
setFieldsValue
(
record
);
}
}
// 重置表单数据
// 重置表单数据
async
function
resetFields
()
{
async
function
resetFields
()
{
await
systemFormRef
.
value
.
resetFields
();
await
systemFormRef
.
value
.
resetFields
();
}
}
// 设置表单数据全部为Disabled 【查看】
// 设置表单数据全部为Disabled 【查看】
async
function
setDisabledForm
(
)
{
async
function
setDisabledForm
()
{
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
data
.
formDataProps
.
schemas
=
changeSchemaDisabled
(
cloneDeep
(
data
.
formDataProps
.
schemas
));
}
}
// 获取行键值
// 获取行键值
function
getRowKey
()
{
function
getRowKey
()
{
return
RowKey
;
return
RowKey
;
}
}
// 更新api表单数据
// 更新api表单数据
async
function
update
({
values
,
rowId
})
{
async
function
update
({
values
,
rowId
})
{
try
{
try
{
values
[
RowKey
]
=
rowId
;
values
[
RowKey
]
=
rowId
;
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
updateMesProductionTask
(
values
);
let
saveVal
=
await
updateMesProductionTask
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 新增api表单数据
// 新增api表单数据
async
function
add
(
values
)
{
async
function
add
(
values
)
{
try
{
try
{
state
.
formModel
=
values
;
state
.
formModel
=
values
;
let
saveVal
=
await
addMesProductionTask
(
values
);
let
saveVal
=
await
addMesProductionTask
(
values
);
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
await
submitFormEvent
(
formEventConfigs
,
state
.
formModel
,
systemFormRef
.
value
,
systemFormRef
.
value
,
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
);
//表单事件:提交表单
formProps
.
schemas
,
true
,
state
.
formInfo
.
formName
,
state
.
formInfo
.
formId
,
);
//表单事件:提交表单
return
saveVal
;
return
saveVal
;
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
// 根据工作流页面权限,设置表单属性(必填,禁用,显示)
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
async
function
setWorkFlowForm
(
obj
:
WorkFlowFormParams
)
{
try
{
try
{
...
@@ -272,10 +342,12 @@ import { log } from 'node:console';
...
@@ -272,10 +342,12 @@ import { log } from 'node:console';
setFieldsValue
(
formModels
);
setFieldsValue
(
formModels
);
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
function
handleChange
(
val
)
{
function
handleChange
(
val
)
{
state
.
formModel
=
val
;
state
.
formModel
=
val
;
emits
(
'update:value'
,
val
);
emits
(
'update:value'
,
val
);
}
}
async
function
sendMessageForAllIframe
()
{
async
function
sendMessageForAllIframe
()
{
try
{
try
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
if
(
systemFormRef
.
value
&&
systemFormRef
.
value
.
sendMessageForAllIframe
)
{
...
@@ -283,6 +355,7 @@ import { log } from 'node:console';
...
@@ -283,6 +355,7 @@ import { log } from 'node:console';
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -295,6 +368,6 @@ import { log } from 'node:console';
...
@@ -295,6 +368,6 @@ import { log } from 'node:console';
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
xjrsoft-vue3/src/views/scgl/scrw/components/ScrwModal.vue
View file @
baef950f
<
template
>
<
template
>
<BasicModal
<BasicModal
:height=
"1080"
:height=
"1080"
v-bind=
"$attrs"
@
register=
"registerModal"
:title=
"getTitle"
v-bind=
"$attrs"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
@
register=
"registerModal"
:title=
"getTitle"
@
ok=
"handleSubmit"
@
cancel=
"handleClose"
>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
<ModalForm
ref=
"formRef"
v-model:value=
"state.formModel"
:fromPage=
"FromPageType.MENU"
/>
</BasicModal>
</BasicModal>
</
template
>
</
template
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
import
{
ref
,
computed
,
reactive
,
provide
,
Ref
}
from
'vue'
;
...
@@ -20,14 +19,11 @@
...
@@ -20,14 +19,11 @@
import
{
formProps
}
from
'./config'
;
import
{
formProps
}
from
'./config'
;
import
ModalForm
from
'./Form.vue'
;
import
ModalForm
from
'./Form.vue'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
import
{
FromPageType
}
from
'/@/enums/workflowEnum'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
formRef
=
ref
();
const
formRef
=
ref
();
const
isCopy
=
ref
<
boolean
>
(
false
)
const
isCopy
=
ref
<
boolean
>
(
false
)
;
const
state
=
reactive
({
const
state
=
reactive
({
formModel
:
{},
formModel
:
{},
isUpdate
:
true
,
isUpdate
:
true
,
...
@@ -41,10 +37,11 @@
...
@@ -41,10 +37,11 @@
await
handleInner
(
data
);
await
handleInner
(
data
);
});
});
const
getTitle
=
computed
(()
=>
(
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
));
const
getTitle
=
computed
(()
=>
state
.
isView
?
'查看'
:
state
.
isUpdate
?
'编辑'
:
isCopy
.
value
?
'复制数据'
:
'新增'
,
);
async
function
handleInner
(
data
)
{
async
function
handleInner
(
data
){
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isUpdate
=
!!
data
?.
isUpdate
;
state
.
isView
=
!!
data
?.
isView
;
state
.
isView
=
!!
data
?.
isView
;
isCopy
.
value
=
!!
data
?.
isCopy
;
isCopy
.
value
=
!!
data
?.
isCopy
;
...
@@ -56,7 +53,8 @@
...
@@ -56,7 +53,8 @@
showOkBtn
:
!
state
.
isView
,
showOkBtn
:
!
state
.
isView
,
canFullscreen
:
true
,
canFullscreen
:
true
,
width
:
1920
,
width
:
1920
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
footer
:
state
.
isView
?
null
:
undefined
,
defaultFullscreen
:
true
,
});
});
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
if
(
state
.
isUpdate
||
state
.
isView
||
isCopy
.
value
)
{
...
@@ -68,10 +66,9 @@
...
@@ -68,10 +66,9 @@
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
await
formRef
.
value
.
setFormDataFromId
(
state
.
rowId
);
}
else
{
}
else
{
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
}
}
}
}
async
function
saveModal
()
{
async
function
saveModal
()
{
let
saveSuccess
=
false
;
let
saveSuccess
=
false
;
try
{
try
{
...
@@ -94,14 +91,14 @@
...
@@ -94,14 +91,14 @@
}
}
}
catch
(
error
)
{
}
catch
(
error
)
{
if
(
error
)
{
if
(
error
)
{
let
errorFields
=
error
[
"errorFields"
];
let
errorFields
=
error
[
'errorFields'
];
if
(
Array
.
isArray
(
errorFields
)
&&
errorFields
.
length
>
0
)
{
if
(
Array
.
isArray
(
errorFields
)
&&
errorFields
.
length
>
0
)
{
let
errorInfos
=
errorFields
[
0
][
"errors"
];
let
errorInfos
=
errorFields
[
0
][
'errors'
];
if
(
Array
.
isArray
(
errorInfos
)
&&
errorInfos
.
length
>
0
)
{
if
(
Array
.
isArray
(
errorInfos
)
&&
errorInfos
.
length
>
0
)
{
let
description
=
errorInfos
[
0
];
let
description
=
errorInfos
[
0
];
notification
.
error
({
notification
.
error
({
message
:
t
(
'提示'
),
message
:
t
(
'提示'
),
description
:
"物料清单列表"
+
description
,
description
:
'物料清单列表'
+
description
,
});
});
}
}
}
}
...
@@ -136,9 +133,7 @@
...
@@ -136,9 +133,7 @@
emit
(
'success'
);
emit
(
'success'
);
}
}
}
finally
{
}
finally
{
setModalProps
({
confirmLoading
:
false
});
setModalProps
({
confirmLoading
:
false
});
}
}
}
}
...
@@ -146,6 +141,4 @@
...
@@ -146,6 +141,4 @@
formRef
.
value
.
resetFields
();
formRef
.
value
.
resetFields
();
closeModal
();
closeModal
();
}
}
</
script
>
</
script
>
xjrsoft-vue3/src/views/scgl/scrw/components/config.ts
View file @
baef950f
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
import
{
uploadApi
}
from
"/@/api/sys/upload"
;
import
{
uploadApi
}
from
'/@/api/sys/upload'
;
export
const
searchFormSchema
:
FormSchema
[]
=
[
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
{
...
@@ -170,7 +170,7 @@ export const columns: BasicColumn[] = [
...
@@ -170,7 +170,7 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
listStyle
:
undefined
,
}
}
,
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -298,13 +298,13 @@ export const formProps: FormProps = {
...
@@ -298,13 +298,13 @@ export const formProps: FormProps = {
showSearch
:
false
,
showSearch
:
false
,
isMultiple
:
false
,
isMultiple
:
false
,
clearable
:
false
,
clearable
:
false
,
disabled
:
fals
e
,
disabled
:
tru
e
,
staticOptions
:
[
staticOptions
:
[
{
key
:
1
,
label
:
'Option 1'
,
value
:
'Option 1'
},
{
key
:
1
,
label
:
'Option 1'
,
value
:
'Option 1'
},
{
key
:
2
,
label
:
'Option 2'
,
value
:
'Option 2'
},
{
key
:
2
,
label
:
'Option 2'
,
value
:
'Option 2'
},
{
key
:
3
,
label
:
'Option 3'
,
value
:
'Option 3'
},
{
key
:
3
,
label
:
'Option 3'
,
value
:
'Option 3'
},
],
],
defaultSelect
:
null
,
defaultSelect
:
'3'
,
datasourceType
:
'dic'
,
datasourceType
:
'dic'
,
labelField
:
'name'
,
labelField
:
'name'
,
valueField
:
'value'
,
valueField
:
'value'
,
...
@@ -610,7 +610,7 @@ export const formProps: FormProps = {
...
@@ -610,7 +610,7 @@ export const formProps: FormProps = {
{
{
span
:
6
,
span
:
6
,
list
:
[
list
:
[
/* {
/* {
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
key: 'eb29665fc1e3453d9ef8aa88f8dfac0c',
field: 'zzl',
field: 'zzl',
label: '铸造量',
label: '铸造量',
...
@@ -791,7 +791,6 @@ export const formProps: FormProps = {
...
@@ -791,7 +791,6 @@ export const formProps: FormProps = {
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
},
},
],
],
},
},
{
{
...
@@ -891,14 +890,11 @@ export const formProps: FormProps = {
...
@@ -891,14 +890,11 @@ export const formProps: FormProps = {
style
:
{
width
:
'100%'
},
style
:
{
width
:
'100%'
},
},
},
},
},
],
],
},
},
{
{
span
:
6
,
span
:
6
,
list
:
[
list
:
[],
],
},
},
],
],
componentProps
:
{
componentProps
:
{
...
@@ -988,6 +984,14 @@ export const formProps: FormProps = {
...
@@ -988,6 +984,14 @@ export const formProps: FormProps = {
width
:
150
,
width
:
150
,
component
:
'6baebd752fae4267aa0ce0a684aa3a1c'
,
component
:
'6baebd752fae4267aa0ce0a684aa3a1c'
,
},
},
{
name
:
'routing_id'
,
tableTitle
:
'工艺路线'
,
bindField
:
'gylx'
,
show
:
true
,
width
:
150
,
component
:
'90df3bd996a3469789d4557edf80aca7'
,
},
],
],
},
},
dicOptions
:
[],
dicOptions
:
[],
...
@@ -1084,7 +1088,6 @@ export const formProps: FormProps = {
...
@@ -1084,7 +1088,6 @@ export const formProps: FormProps = {
},
},
],
],
},
},
],
],
componentProps
:
{
componentProps
:
{
gutter
:
16
,
gutter
:
16
,
...
@@ -1224,7 +1227,8 @@ export const formProps: FormProps = {
...
@@ -1224,7 +1227,8 @@ export const formProps: FormProps = {
},
},
],
],
},
},
{
span
:
6
,
{
span
:
6
,
list
:
[
list
:
[
{
{
key
:
'v2n5h0j9v1k1b5n6n7i2a1d8t8y4x8s7'
,
key
:
'v2n5h0j9v1k1b5n6n7i2a1d8t8y4x8s7'
,
...
@@ -1274,7 +1278,7 @@ export const formProps: FormProps = {
...
@@ -1274,7 +1278,7 @@ export const formProps: FormProps = {
style
:
{
width
:
'100%'
},
style
:
{
width
:
'100%'
},
},
},
},
},
]
]
,
},
},
{
span
:
6
,
list
:
[]
},
{
span
:
6
,
list
:
[]
},
],
],
...
...
xjrsoft-vue3/src/views/scgl/scrw/components/workflowPermission.ts
View file @
baef950f
export
const
permissionList
=
[
export
const
permissionList
=
[
{
{
required
:
false
,
required
:
false
,
view
:
true
,
view
:
true
,
...
...
xjrsoft-vue3/src/views/scgl/scrw/index.vue
View file @
baef950f
<
template
>
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
:row-selection=
"
{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
:row-selection=
"
{ selectedRowKeys: selectedKeys, onChange: onSelectChange }"
>
>
<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"
/>
<a-button
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<a-button
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<
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)"
...
@@ -41,81 +42,46 @@
...
@@ -41,81 +42,46 @@
}}
</span>
}}
</span>
</
template
>
</
template
>
</template>
</template>
</BasicTable>
</BasicTable>
</template>
</template>
<ScrwModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
<ScrwModal
@
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'
;
import
{
getMesProductionTaskPage
,
deleteMesProductionTask
}
from
'/@/api/scgl/scrw'
;
import
{
getMesProductionTaskPage
,
deleteMesProductionTask
}
from
'/@/api/scgl/scrw'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
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
ScrwModal
from
'./components/ScrwModal.vue'
;
import
ScrwModal
from
'./components/ScrwModal.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
(
4
);
//操作列最先展示几个
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
}
=
const
{
useConcurrentLock
();
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
,
}
=
useConcurrentLock
();
const
{
notification
}
=
useMessage
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
...
@@ -125,17 +91,110 @@
...
@@ -125,17 +91,110 @@
const
filterColumns
=
filterColumnAuth
(
columns
);
const
filterColumns
=
filterColumnAuth
(
columns
);
const
tableRef
=
ref
();
const
tableRef
=
ref
();
//展示在列表内的按钮
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
"view"
,
"edit"
,
"ddzh"
,
"delete"
]);
const
actionButtons
=
ref
<
string
[]
>
([
'view'
,
'edit'
,
'ddzh'
,
'delete'
]);
const
buttonConfigs
=
computed
(()
=>
{
const
buttonConfigs
=
computed
(()
=>
{
const
list
=
[{
"buttonId"
:
"2008813468518432768"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2008813468518432769"
,
"name"
:
"新增"
,
"code"
:
"add"
,
"icon"
:
"ant-design:plus-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2008813468518432770"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2008813468518432771"
,
"name"
:
"打印"
,
"code"
:
"sclld"
,
"icon"
:
"ant-design:file-text-outlined"
,
"isDefault"
:
false
,
"isUse"
:
true
,
"setting"
:[],
"showType"
:
"top"
,
"buttonType"
:
"primary"
},{
"isUse"
:
true
,
"name"
:
"订单转换"
,
"code"
:
"ddzh"
,
"icon"
:
""
,
"isDefault"
:
false
,
"setting"
:[],
"showType"
:
"inline"
,
"buttonType"
:
"modal"
,
"modal"
:{
"bindModal"
:
"2010615112372113410"
,
"innerParams"
:[{
"name"
:
"任务ID"
,
"type"
:
"value"
,
"value"
:
"1"
,
"apiConfig"
:{
"path"
:
"CodeGeneration/selection"
,
"method"
:
"GET"
,
"apiId"
:
"93d735dcb7364a0f8102188ec4d77ac7"
},
"component"
:
"{
\"
table
\"
:
\"
table_19041
\"
,
\"
field
\"
:
\"
ren_wuid1465
\"
}"
},{
"name"
:
"任务编号"
,
"type"
:
"value"
,
"value"
:
"CCRW001"
,
"apiConfig"
:{
"path"
:
"CodeGeneration/selection"
,
"method"
:
"GET"
,
"apiId"
:
"93d735dcb7364a0f8102188ec4d77ac7"
},
"component"
:
"{
\"
table
\"
:
\"
table_19041
\"
,
\"
field
\"
:
\"
zhuan_huan_qian_ding_dan5032
\"
}"
}],
"outParams"
:[{
"name"
:
"转换后"
,
"component"
:
"{
\"
table
\"
:
\"
table_19041
\"
,
\"
field
\"
:
\"
zhuan_huan_hou_ding_dan6513
\"
}"
,
"mainComponent"
:
""
}],
"modalWidth"
:
900
,
"modalWidthUnit"
:
"px"
,
"modalHeight"
:
300
,
"modalHeightUnit"
:
"px"
,
"title"
:
"订单转换"
,
"confirm"
:
""
,
"cancel"
:
""
,
"open"
:
""
,
"close"
:
""
}},{
"buttonId"
:
"2008813468518432772"
,
"name"
:
"删除"
,
"code"
:
"delete"
,
"icon"
:
"ant-design:delete-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
}]
const
list
=
[
{
buttonId
:
'2008813468518432768'
,
name
:
'查看'
,
code
:
'view'
,
icon
:
'ant-design:eye-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2008813468518432769'
,
name
:
'新增'
,
code
:
'add'
,
icon
:
'ant-design:plus-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
{
buttonId
:
'2008813468518432770'
,
name
:
'编辑'
,
code
:
'edit'
,
icon
:
'ant-design:form-outlined'
,
isDefault
:
true
,
isUse
:
true
,
isEnableLock
:
true
,
},
{
buttonId
:
'2008813468518432771'
,
name
:
'打印'
,
code
:
'sclld'
,
icon
:
'ant-design:file-text-outlined'
,
isDefault
:
false
,
isUse
:
true
,
setting
:
[],
showType
:
'top'
,
buttonType
:
'primary'
,
},
{
isUse
:
true
,
name
:
'订单转换'
,
code
:
'ddzh'
,
icon
:
''
,
isDefault
:
false
,
setting
:
[],
showType
:
'inline'
,
buttonType
:
'modal'
,
modal
:
{
bindModal
:
'2010615112372113410'
,
innerParams
:
[
{
name
:
'任务ID'
,
type
:
'value'
,
value
:
'1'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
component
:
'{"table":"table_19041","field":"ren_wuid1465"}'
,
},
{
name
:
'任务编号'
,
type
:
'value'
,
value
:
'CCRW001'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
component
:
'{"table":"table_19041","field":"zhuan_huan_qian_ding_dan5032"}'
,
},
],
outParams
:
[
{
name
:
'转换后'
,
component
:
'{"table":"table_19041","field":"zhuan_huan_hou_ding_dan6513"}'
,
mainComponent
:
''
,
},
],
modalWidth
:
900
,
modalWidthUnit
:
'px'
,
modalHeight
:
300
,
modalHeightUnit
:
'px'
,
title
:
'订单转换'
,
confirm
:
''
,
cancel
:
''
,
open
:
''
,
close
:
''
,
},
},
{
buttonId
:
'2008813468518432772'
,
name
:
'删除'
,
code
:
'delete'
,
icon
:
'ant-design:delete-outlined'
,
isDefault
:
true
,
isUse
:
true
,
},
];
return
filterButtonAuth
(
list
);
return
filterButtonAuth
(
list
);
})
})
;
const
tableButtonConfig
=
computed
(()
=>
{
const
tableButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
...
@@ -145,29 +204,19 @@
...
@@ -145,29 +204,19 @@
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
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
};
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
({
title
:
'Scrw列表'
,
title
:
'Scrw列表'
,
api
:
getMesProductionTaskPage
,
api
:
getMesProductionTaskPage
,
rowKey
:
'id'
,
rowKey
:
'id'
,
...
@@ -181,28 +230,21 @@
...
@@ -181,28 +230,21 @@
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
:
2
25
,
width
:
2
60
,
title
:
'操作'
,
title
:
'操作'
,
dataIndex
:
'action'
,
dataIndex
:
'action'
,
slots
:
{
customRender
:
'action'
},
slots
:
{
customRender
:
'action'
},
...
@@ -216,25 +258,16 @@
...
@@ -216,25 +258,16 @@
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
!==
'草稿'
&&
record
.
zt
!==
'未开始'
)
;
const
hasNonDraft
=
record
.
zt
!==
'草稿'
&&
record
.
zt
!==
'未开始'
;
if
(
hasNonDraft
)
{
if
(
hasNonDraft
)
{
Modal
.
warning
({
Modal
.
warning
({
title
:
'提示'
,
title
:
'提示'
,
...
@@ -246,10 +279,7 @@
...
@@ -246,10 +279,7 @@
try
{
try
{
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
if
(
hasIn
)
{
if
(
hasIn
)
{
let
res
=
await
handleOpenFormEnableLockeData
(
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
);
record
[
field
],
formIdComputedRef
.
value
,
);
if
(
res
!==
null
)
{
if
(
res
!==
null
)
{
return
;
return
;
}
}
...
@@ -259,16 +289,12 @@
...
@@ -259,16 +289,12 @@
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
]);
}
}
...
@@ -293,10 +319,6 @@
...
@@ -293,10 +319,6 @@
});
});
}
}
function
onSelectChange
(
selectedRowKeys
:
[],
selectedRows
)
{
function
onSelectChange
(
selectedRowKeys
:
[],
selectedRows
)
{
selectedKeys
.
value
=
selectedRowKeys
;
selectedKeys
.
value
=
selectedRowKeys
;
selectedRowsData
.
value
=
selectedRows
;
selectedRowsData
.
value
=
selectedRows
;
...
@@ -304,7 +326,6 @@
...
@@ -304,7 +326,6 @@
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
)
{
...
@@ -316,7 +337,7 @@
...
@@ -316,7 +337,7 @@
selectedKeys
.
value
=
selectedRowKeys
;
selectedKeys
.
value
=
selectedRowKeys
;
},
},
ondblclick
:
()
=>
{
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"scrw:edit"
))
{
if
(
record
.
isCanEdit
&&
hasPermission
(
'scrw:edit'
))
{
handleEdit
(
record
);
handleEdit
(
record
);
}
}
},
},
...
@@ -324,45 +345,40 @@
...
@@ -324,45 +345,40 @@
}
}
function
handleSuccess
()
{
function
handleSuccess
()
{
selectedKeys
.
value
=
[];
selectedKeys
.
value
=
[];
selectedRowsData
.
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
getLessActions
(
record
:
Recordable
)
{
function
getLessActions
(
record
:
Recordable
)
{
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
[]
=
[];
...
@@ -380,7 +396,6 @@
...
@@ -380,7 +396,6 @@
}
else
{
}
else
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
if
(
!
[
'edit'
,
'delete'
].
includes
(
button
.
code
))
{
actionsList
.
push
({
actionsList
.
push
({
auth
:
`scrw:
${
button
.
code
}
`
,
auth
:
`scrw:
${
button
.
code
}
`
,
label
:
button
?.
name
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
...
@@ -390,24 +405,17 @@
...
@@ -390,24 +405,17 @@
});
});
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
>
xjrsoft-vue3/src/views/zlgl/cccpfxspd/components/config.ts
View file @
baef950f
...
@@ -50,12 +50,12 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -50,12 +50,12 @@ export const searchFormSchema: FormSchema[] = [
defaultValue
:
undefined
,
defaultValue
:
undefined
,
component
:
'Input'
,
component
:
'Input'
,
},
},
{
//
{
field
:
'gkyj'
,
//
field: 'gkyj',
label
:
'顾客意见'
,
//
label: '顾客意见',
defaultValue
:
undefined
,
//
defaultValue: undefined,
component
:
'Input'
,
//
component: 'Input',
},
//
},
];
];
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
...
@@ -137,18 +137,18 @@ export const columns: BasicColumn[] = [
...
@@ -137,18 +137,18 @@ export const columns: BasicColumn[] = [
listStyle
:
''
,
listStyle
:
''
,
},
},
{
//
{
resizable
:
true
,
//
resizable: true,
dataIndex
:
'gkyj'
,
//
dataIndex: 'gkyj',
title
:
'顾客意见'
,
//
title: '顾客意见',
componentType
:
'input'
,
//
componentType: 'input',
//
fixed
:
false
,
//
fixed: false,
sorter
:
true
,
//
sorter: true,
//
styleConfig
:
undefined
,
//
styleConfig: undefined,
listStyle
:
''
,
//
listStyle: '',
},
//
},
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -435,55 +435,55 @@ export const formProps: FormProps = {
...
@@ -435,55 +435,55 @@ export const formProps: FormProps = {
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
},
},
{
//
{
key
:
'2908e95b40994ef4aa819972bd840713'
,
//
key: '2908e95b40994ef4aa819972bd840713',
field
:
''
,
//
field: '',
label
:
'分割线'
,
//
label: '分割线',
colProps
:
{
span
:
24
},
//
colProps: { span: 24 },
type
:
'divider'
,
//
type: 'divider',
component
:
'Divider'
,
//
component: 'Divider',
componentProps
:
{
//
componentProps: {
dashed
:
false
,
//
dashed: false,
orientation
:
'left'
,
//
orientation: 'left',
text
:
'审批意见'
,
//
text: '审批意见',
isShow
:
true
,
//
isShow: true,
style
:
{
marginTop
:
'0px'
,
marginBottom
:
'0px'
},
//
style: { marginTop: '0px', marginBottom: '0px' },
},
//
},
},
//
},
{
//
{
key
:
'879e17939485432c8c0dfb17101a4942'
,
//
key: '879e17939485432c8c0dfb17101a4942',
field
:
'gkyj'
,
//
field: 'gkyj',
label
:
'顾客意见'
,
//
label: '顾客意见',
type
:
'input'
,
//
type: 'input',
component
:
'Input'
,
//
component: 'Input',
colProps
:
{
span
:
24
},
//
colProps: { span: 24 },
defaultValue
:
''
,
//
defaultValue: '',
componentProps
:
{
//
componentProps: {
width
:
'100%'
,
//
width: '100%',
span
:
''
,
//
span: '',
defaultValue
:
''
,
//
defaultValue: '',
placeholder
:
'请输入顾客意见'
,
//
placeholder: '请输入顾客意见',
maxlength
:
null
,
//
maxlength: null,
prefix
:
''
,
//
prefix: '',
suffix
:
''
,
//
suffix: '',
addonBefore
:
''
,
//
addonBefore: '',
addonAfter
:
''
,
//
addonAfter: '',
disabled
:
false
,
//
disabled: false,
allowClear
:
false
,
//
allowClear: false,
showLabel
:
true
,
//
showLabel: true,
required
:
false
,
//
required: false,
rules
:
[],
//
rules: [],
events
:
{},
//
events: {},
listStyle
:
''
,
//
listStyle: '',
isSave
:
false
,
//
isSave: false,
isShow
:
true
,
//
isShow: true,
scan
:
false
,
//
scan: false,
bordered
:
true
,
//
bordered: true,
isShowAi
:
false
,
//
isShowAi: false,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
//
tooltipConfig: { visible: false, title: '提示文本' },
style
:
{
width
:
'100%'
},
//
style: { width: '100%' },
},
//
},
},
//
},
],
],
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
buttonLocation
:
'center'
,
buttonLocation
:
'center'
,
...
...
xjrsoft-vue3/src/views/zlgl/fgwgyscllcd/components/config.ts
View file @
baef950f
...
@@ -80,60 +80,6 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -80,60 +80,6 @@ export const searchFormSchema: FormSchema[] = [
defaultValue
:
undefined
,
defaultValue
:
undefined
,
component
:
'Input'
,
component
:
'Input'
,
},
},
{
field
:
'scbmyj'
,
label
:
'生产部门意见'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'staticData'
,
staticOptions
:
[
{
key
:
2
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
labelField
:
'label'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'mybmyj'
,
label
:
'贸易部门意见'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'staticData'
,
staticOptions
:
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
labelField
:
'label'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'pkyfbmyj'
,
label
:
'品控研发部门意见'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'staticData'
,
staticOptions
:
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
labelField
:
'label'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
];
];
export
const
columns
:
BasicColumn
[]
=
[
export
const
columns
:
BasicColumn
[]
=
[
...
@@ -253,72 +199,6 @@ export const columns: BasicColumn[] = [
...
@@ -253,72 +199,6 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
listStyle
:
undefined
,
},
},
{
resizable
:
true
,
dataIndex
:
'scbmyj'
,
title
:
'生产部门意见'
,
componentType
:
'select'
,
customRender
:
({
record
})
=>
{
const
staticOptions
=
[
{
key
:
2
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
];
return
staticOptions
.
filter
((
x
)
=>
x
.
value
==
record
.
scbmyj
)[
0
]?.
label
;
},
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'mybmyj'
,
title
:
'贸易部门意见'
,
componentType
:
'select'
,
customRender
:
({
record
})
=>
{
const
staticOptions
=
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
];
return
staticOptions
.
filter
((
x
)
=>
x
.
value
==
record
.
mybmyj
)[
0
]?.
label
;
},
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'pkyfbmyj'
,
title
:
'品控研发部门意见'
,
componentType
:
'select'
,
customRender
:
({
record
})
=>
{
const
staticOptions
=
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
];
return
staticOptions
.
filter
((
x
)
=>
x
.
value
==
record
.
pkyfbmyj
)[
0
]?.
label
;
},
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
@@ -703,135 +583,6 @@ export const formProps: FormProps = {
...
@@ -703,135 +583,6 @@ export const formProps: FormProps = {
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
},
},
{
key
:
'94ff603208e949a8992d2ce6251bfe94'
,
field
:
''
,
label
:
'分割线'
,
colProps
:
{
span
:
24
},
type
:
'divider'
,
component
:
'Divider'
,
componentProps
:
{
dashed
:
false
,
orientation
:
'left'
,
text
:
'审批意见'
,
isShow
:
true
,
style
:
{
marginTop
:
'0px'
,
marginBottom
:
'0px'
},
},
},
{
key
:
'70230001853c40149d6dc73cb37a1c03'
,
field
:
'scbmyj'
,
label
:
'生产部门意见'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
''
,
placeholder
:
'请选择下拉选择'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
false
,
disabled
:
false
,
staticOptions
:
[
{
key
:
2
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
defaultSelect
:
''
,
datasourceType
:
'staticData'
,
labelField
:
'label'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
{
key
:
'3d255e7e46574b888d81e83ae1b5fa3f'
,
field
:
'mybmyj'
,
label
:
'贸易部门意见'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
''
,
placeholder
:
'请选择下拉选择'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
false
,
disabled
:
false
,
staticOptions
:
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
defaultSelect
:
''
,
datasourceType
:
'staticData'
,
labelField
:
'label'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
{
key
:
'7ff2a8c3be574905879884c618cfa7db'
,
field
:
'pkyfbmyj'
,
label
:
'品控研发部门意见'
,
type
:
'select'
,
component
:
'XjrSelect'
,
colProps
:
{
span
:
24
},
componentProps
:
{
width
:
'100%'
,
span
:
''
,
placeholder
:
'请选择下拉选择'
,
showLabel
:
true
,
showSearch
:
false
,
isMultiple
:
false
,
clearable
:
false
,
disabled
:
false
,
staticOptions
:
[
{
key
:
1
,
label
:
'同意'
,
value
:
'1'
},
{
key
:
3
,
label
:
'不同意'
,
value
:
'2'
},
],
defaultSelect
:
''
,
datasourceType
:
'staticData'
,
labelField
:
'label'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
],
],
showActionButtonGroup
:
false
,
showActionButtonGroup
:
false
,
buttonLocation
:
'center'
,
buttonLocation
:
'center'
,
...
...
xjrsoft-vue3/src/views/zlgl/fgwgyscllcd/components/workflowPermission.ts
View file @
baef950f
...
@@ -185,68 +185,4 @@ export const permissionList = [
...
@@ -185,68 +185,4 @@ export const permissionList = [
options
:
{},
options
:
{},
defaultValue
:
''
,
defaultValue
:
''
,
},
},
{
required
:
false
,
view
:
true
,
edit
:
false
,
disabled
:
true
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'分割线'
,
fieldId
:
''
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'divider'
,
key
:
'94ff603208e949a8992d2ce6251bfe94'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'生产部门意见'
,
fieldId
:
'scbmyj'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'70230001853c40149d6dc73cb37a1c03'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'贸易部门意见'
,
fieldId
:
'mybmyj'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'3d255e7e46574b888d81e83ae1b5fa3f'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'品控研发部门意见'
,
fieldId
:
'pkyfbmyj'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'7ff2a8c3be574905879884c618cfa7db'
,
children
:
[],
options
:
{},
},
];
];
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