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
7bea6f60
Commit
7bea6f60
authored
Feb 10, 2026
by
sunhaiwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
开发拆车入库页面
parent
17941ffa
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2161 additions
and
0 deletions
+2161
-0
xjrsoft-vue3/src/api/ckgl/ccrk/index.ts
+93
-0
xjrsoft-vue3/src/api/ckgl/ccrk/model/CcrkModel.ts
+96
-0
xjrsoft-vue3/src/views/ckgl/ccrk/components/CcrkModal.vue
+167
-0
xjrsoft-vue3/src/views/ckgl/ccrk/components/Form.vue
+226
-0
xjrsoft-vue3/src/views/ckgl/ccrk/components/config.ts
+939
-0
xjrsoft-vue3/src/views/ckgl/ccrk/components/workflowPermission.ts
+254
-0
xjrsoft-vue3/src/views/ckgl/ccrk/index.vue
+386
-0
No files found.
xjrsoft-vue3/src/api/ckgl/ccrk/index.ts
0 → 100644
View file @
7bea6f60
import
{
MesWarehouseDisassemblePageModel
,
MesWarehouseDisassemblePageParams
,
MesWarehouseDisassemblePageResult
}
from
'./model/CcrkModel'
;
import
{
defHttp
}
from
'/@/utils/http/axios'
;
import
{
ErrorMessageMode
}
from
'/#/axios'
;
enum
Api
{
Page
=
'/ckgl/ccrk/page'
,
List
=
'/ckgl/ccrk/list'
,
Info
=
'/ckgl/ccrk/info'
,
MesWarehouseDisassemble
=
'/ckgl/ccrk'
,
}
/**
* @description: 查询MesWarehouseDisassemble分页列表
*/
export
async
function
getMesWarehouseDisassemblePage
(
params
:
MesWarehouseDisassemblePageParams
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesWarehouseDisassemblePageResult
>
(
{
url
:
Api
.
Page
,
params
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 获取MesWarehouseDisassemble信息
*/
export
async
function
getMesWarehouseDisassemble
(
id
:
String
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
get
<
MesWarehouseDisassemblePageModel
>
(
{
url
:
Api
.
Info
,
params
:
{
id
},
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 新增MesWarehouseDisassemble
*/
export
async
function
addMesWarehouseDisassemble
(
mesWarehouseDisassemble
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
post
<
boolean
>
(
{
url
:
Api
.
MesWarehouseDisassemble
,
params
:
mesWarehouseDisassemble
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 更新MesWarehouseDisassemble
*/
export
async
function
updateMesWarehouseDisassemble
(
mesWarehouseDisassemble
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
put
<
boolean
>
(
{
url
:
Api
.
MesWarehouseDisassemble
,
params
:
mesWarehouseDisassemble
,
},
{
errorMessageMode
:
mode
,
},
);
}
/**
* @description: 删除MesWarehouseDisassemble(批量删除)
*/
export
async
function
deleteMesWarehouseDisassemble
(
ids
:
string
[],
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
delete
<
boolean
>
(
{
url
:
Api
.
MesWarehouseDisassemble
,
data
:
ids
,
},
{
errorMessageMode
:
mode
,
},
);
}
xjrsoft-vue3/src/api/ckgl/ccrk/model/CcrkModel.ts
0 → 100644
View file @
7bea6f60
import
{
BasicPageParams
,
BasicFetchResult
}
from
'/@/api/model/baseModel'
;
/**
* @description: MesWarehouseDisassemble分页参数 模型
*/
export
interface
MesWarehouseDisassemblePageParams
extends
BasicPageParams
{
warehouseName
:
string
;
storekeeper
:
string
;
productionDepartment
:
string
;
businessOrganization
:
string
;
documentStatus
:
string
;
batchNumber
:
string
;
remark
:
string
;
}
/**
* @description: MesWarehouseDisassemble分页返回值模型
*/
export
interface
MesWarehouseDisassemblePageModel
{
id
:
string
;
warehouseName
:
string
;
storekeeper
:
string
;
productionDepartment
:
string
;
businessOrganization
:
string
;
documentStatus
:
string
;
batchNumber
:
string
;
remark
:
string
;
}
/**
* @description: MesWarehouseDisassemble表类型
*/
export
interface
MesWarehouseDisassembleModel
{
id
:
string
;
businessOrganization
:
string
;
warehouseName
:
string
;
storekeeper
:
string
;
productionDepartment
:
string
;
batchNumber
:
string
;
documentStatus
:
string
;
remark
:
string
;
mesWarehouseDisassembleInfoList
?:
MesWarehouseDisassembleInfoModel
;
}
/**
* @description: MesWarehouseDisassembleInfo表类型
*/
export
interface
MesWarehouseDisassembleInfoModel
{
id
:
string
;
disassembleId
:
string
;
materialId
:
string
;
materialCode
:
string
;
materialName
:
string
;
specifications
:
string
;
model
:
string
;
batchNumber
:
string
;
warehousingNumber
:
string
;
remark
:
string
;
storageLocation
:
string
;
}
/**
* @description: MesWarehouseDisassemble分页返回值结构
*/
export
type
MesWarehouseDisassemblePageResult
=
BasicFetchResult
<
MesWarehouseDisassemblePageModel
>
;
xjrsoft-vue3/src/views/ckgl/ccrk/components/CcrkModal.vue
0 → 100644
View file @
7bea6f60
<
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/ccrk/components/Form.vue
0 → 100644
View file @
7bea6f60
<
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
{
addMesWarehouseDisassemble
,
getMesWarehouseDisassemble
,
updateMesWarehouseDisassemble
}
from
'/@/api/ckgl/ccrk'
;
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
getMesWarehouseDisassemble
(
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
updateMesWarehouseDisassemble
(
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
addMesWarehouseDisassemble
(
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/ccrk/components/config.ts
0 → 100644
View file @
7bea6f60
import
{
FormProps
,
FormSchema
}
from
'/@/components/Form'
;
import
{
BasicColumn
}
from
'/@/components/Table'
;
export
const
searchFormSchema
:
FormSchema
[]
=
[
{
field
:
'warehouseName'
,
label
:
'仓库'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2010539474382962690'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'storekeeper'
,
label
:
'库管员'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'productionDepartment'
,
label
:
'生产部门'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'businessOrganization'
,
label
:
'业务组织'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2015724355955159041'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'documentStatus'
,
label
:
'单据状态'
,
defaultValue
:
undefined
,
component
:
'XjrSelect'
,
componentProps
:
{
datasourceType
:
'dic'
,
params
:
{
itemId
:
'2016321281785163777'
},
labelField
:
'name'
,
valueField
:
'value'
,
mode
:
'multiple'
,
showSearch
:
true
,
getPopupContainer
:
()
=>
document
.
body
,
},
},
{
field
:
'batchNumber'
,
label
:
'批次号'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
{
field
:
'remark'
,
label
:
'备注'
,
defaultValue
:
undefined
,
component
:
'Input'
,
},
];
export
const
columns
:
BasicColumn
[]
=
[
{
resizable
:
true
,
dataIndex
:
'warehouseName'
,
title
:
'仓库'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'storekeeper'
,
title
:
'库管员'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'productionDepartment'
,
title
:
'生产部门'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'businessOrganization'
,
title
:
'业务组织'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'documentStatus'
,
title
:
'单据状态'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
undefined
,
},
{
resizable
:
true
,
dataIndex
:
'batchNumber'
,
title
:
'批次号'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
{
resizable
:
true
,
dataIndex
:
'remark'
,
title
:
'备注'
,
componentType
:
'input'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
},
];
//表头合并配置
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
:
'1881aeec44e74355b6463ccf07519b54'
,
field
:
''
,
label
:
''
,
type
:
'grid'
,
colProps
:
{
span
:
24
},
component
:
'Grid'
,
children
:
[
{
span
:
8
,
list
:
[
{
key
:
'14da926a5ddd4edfa71ae862c91c8043'
,
field
:
'warehouseName'
,
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
:
'61ffd6109fce4da3be6240e3d4494892'
,
field
:
'storekeeper'
,
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
:
'e169ce3d75b24e2f812a9d6f393756b2'
,
field
:
'productionDepartment'
,
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%'
},
},
},
],
},
],
componentProps
:
{
gutter
:
16
,
justify
:
'center'
,
align
:
'top'
,
isShow
:
true
,
showBorder
:
false
,
bordercolor
:
'#d9d9d9'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
padding
:
'10px'
,
margin
:
'10px'
,
},
},
{
key
:
'c80a445a231442c0b526dd1d8e59756f'
,
field
:
''
,
label
:
''
,
type
:
'grid'
,
colProps
:
{
span
:
24
},
component
:
'Grid'
,
children
:
[
{
span
:
8
,
list
:
[
{
key
:
'11dc570e7ef94ac3b17ce6430dc8752f'
,
field
:
'businessOrganization'
,
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
:
'447e4f47136b44c0b258df868d063061'
,
field
:
'documentStatus'
,
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
:
'2016321281785163777'
},
labelField
:
'name'
,
valueField
:
'value'
,
apiConfig
:
{
path
:
'CodeGeneration/selection'
,
method
:
'GET'
,
apiId
:
'93d735dcb7364a0f8102188ec4d77ac7'
,
},
dicOptions
:
[],
required
:
false
,
rules
:
[],
events
:
{},
isShow
:
true
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
itemId
:
'2016321281785163777'
,
defaultSelect
:
'已下发'
,
style
:
{
width
:
'100%'
},
},
},
],
},
{
span
:
8
,
list
:
[
{
key
:
'fe6e567ea9ba4301986e1eed9524f4b2'
,
field
:
'batchNumber'
,
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%'
},
},
},
],
},
],
componentProps
:
{
gutter
:
16
,
justify
:
'center'
,
align
:
'middle'
,
isShow
:
true
,
showBorder
:
false
,
bordercolor
:
'#d9d9d9'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
padding
:
'10px'
,
margin
:
'10px'
,
},
},
{
key
:
'f0e17ef92fd94ad08233b2f2d9b4575c'
,
field
:
'remark'
,
label
:
'备注'
,
type
:
'input'
,
component
:
'Input'
,
colProps
:
{
span
:
24
},
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
:
'提示文本'
},
style
:
{
width
:
'100%'
},
},
},
{
key
:
'6b1120a4dcc043e8bd84f4539e4c99ed'
,
field
:
''
,
label
:
''
,
type
:
'tab'
,
colProps
:
{
span
:
24
},
component
:
'Tab'
,
children
:
[
{
span
:
24
,
name
:
'入库明细'
,
prefix
:
''
,
suffix
:
''
,
activeColor
:
'#1c8dff'
,
folderId
:
''
,
imageUrl
:
''
,
conFolderId
:
''
,
conImageUrl
:
''
,
list
:
[
{
key
:
'b0162cec89fa4106b4597485ac6f3d23'
,
label
:
''
,
field
:
'mesWarehouseDisassembleInfoList'
,
type
:
'form'
,
component
:
'SubForm'
,
required
:
true
,
colProps
:
{
span
:
24
},
componentProps
:
{
mainKey
:
'mesWarehouseDisassembleInfoList'
,
columns
:
[
{
key
:
'28c7e2a926e0443c97a4bba2671481c3'
,
title
:
'物料编码'
,
dataIndex
:
'materialCode'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入物料编码物料编码'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'dfbf05d7671440f092fc2eb55941a06a'
,
title
:
'物料名称'
,
dataIndex
:
'materialName'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入物料名称'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'439ac7087f5f416a86c1f38c6b1fa1f6'
,
title
:
'规格'
,
dataIndex
:
'specifications'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入规格'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'b455e5b2fe674455952358f99f6ee476'
,
title
:
'型号'
,
dataIndex
:
'model'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入型号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'5b2e8a20e4ee4e23a34f99e0514d5798'
,
title
:
'批次号'
,
dataIndex
:
'batchNumber'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入批次号'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'bdee56968ca7409d8c59e7f5a28cb6c1'
,
title
:
'货位'
,
dataIndex
:
'storageLocation'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入货位'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
{
key
:
'cf8a1ae3fd8c40b191fd66223f6a5b17'
,
title
:
'入库数量'
,
dataIndex
:
'warehousingNumber'
,
componentType
:
'InputNumber'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
min
:
0
,
max
:
100
,
step
:
1
,
disabled
:
true
,
showLabel
:
true
,
controls
:
true
,
required
:
false
,
subTotal
:
false
,
isShow
:
true
,
rules
:
[],
events
:
{},
placeholder
:
'请输入入库数量'
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
listStyle
:
"return 'width:100%'"
,
},
},
{
key
:
'c9865b2979024cd1b7736c020563ca4b'
,
title
:
'备注'
,
dataIndex
:
'remark'
,
componentType
:
'Input'
,
defaultValue
:
''
,
componentProps
:
{
width
:
'100%'
,
span
:
''
,
defaultValue
:
''
,
placeholder
:
'请输入备注'
,
prefix
:
''
,
suffix
:
''
,
addonBefore
:
''
,
addonAfter
:
''
,
disabled
:
true
,
allowClear
:
false
,
showLabel
:
true
,
required
:
false
,
rules
:
[],
events
:
{},
listStyle
:
''
,
isSave
:
false
,
isShow
:
true
,
scan
:
false
,
bordered
:
true
,
isShowAi
:
false
,
tooltipConfig
:
{
visible
:
false
,
title
:
'提示文本'
},
},
},
],
span
:
'24'
,
preloadType
:
'api'
,
apiConfig
:
{},
itemId
:
''
,
dicOptions
:
[],
useSelectButton
:
false
,
buttonName
:
'选择数据'
,
showLabel
:
true
,
showComponentBorder
:
true
,
showBorder
:
false
,
backgroundStyle
:
{
isShow
:
false
,
bgColor
:
'#ffffff'
,
bgImgUrl
:
''
,
fontColor
:
''
,
borderColor
:
''
,
},
theadStyle
:
{
isShow
:
false
,
fontSize
:
14
,
fontColor
:
'#000000'
,
bgType
:
'color'
,
gradientDegree
:
''
,
gradientColors
:
''
,
bgImageUrl
:
''
,
bgColor
:
''
,
bgRepeat
:
'no-repeat'
,
},
tbodyStyle
:
{
isShow
:
false
,
fontSize
:
14
,
fontColor
:
'#000000'
,
bgType
:
'color'
,
gradientDegree
:
''
,
gradientColors
:
''
,
bgImageUrl
:
''
,
bgColor
:
''
,
bgRepeat
:
'no-repeat'
,
},
bordercolor
:
'#f0f0f0'
,
bordershowtype
:
[
true
,
true
,
true
,
true
],
borderwidth
:
1
,
showIndex
:
false
,
isShow
:
true
,
multipleHeads
:
[],
buttonList
:
[],
topButtonList
:
[],
isExport
:
false
,
isImport
:
false
,
isDeleteSelected
:
false
,
isListView
:
false
,
viewList
:
[],
isShowAdd
:
false
,
isShowDelete
:
false
,
hasCheckedCol
:
false
,
checkedColType
:
'checkbox'
,
pageSize
:
10
,
events
:
{},
showPagenation
:
true
,
},
},
],
},
],
componentProps
:
{
tabPosition
:
'top'
,
size
:
'default'
,
type
:
'line'
,
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/ccrk/components/workflowPermission.ts
0 → 100644
View file @
7bea6f60
export
const
permissionList
=
[
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'仓库'
,
fieldId
:
'warehouseName'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'14da926a5ddd4edfa71ae862c91c8043'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'库管员'
,
fieldId
:
'storekeeper'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'61ffd6109fce4da3be6240e3d4494892'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'生产部门'
,
fieldId
:
'productionDepartment'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'e169ce3d75b24e2f812a9d6f393756b2'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'业务组织'
,
fieldId
:
'businessOrganization'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'11dc570e7ef94ac3b17ce6430dc8752f'
,
children
:
[],
options
:
{},
},
{
required
:
false
,
view
:
true
,
edit
:
false
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'单据状态'
,
fieldId
:
'documentStatus'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'select'
,
key
:
'447e4f47136b44c0b258df868d063061'
,
children
:
[],
options
:
{},
defaultValue
:
'已下发'
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'批次号'
,
fieldId
:
'batchNumber'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'fe6e567ea9ba4301986e1eed9524f4b2'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
false
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSaveTable
:
false
,
tableName
:
''
,
fieldName
:
'备注'
,
fieldId
:
'remark'
,
isSubTable
:
false
,
showChildren
:
true
,
type
:
'input'
,
key
:
'f0e17ef92fd94ad08233b2f2d9b4575c'
,
children
:
[],
options
:
{},
defaultValue
:
''
,
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
true
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
''
,
fieldId
:
'mesWarehouseDisassembleInfoList'
,
type
:
'form'
,
key
:
'b0162cec89fa4106b4597485ac6f3d23'
,
children
:
[
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'物料编码'
,
fieldId
:
'materialCode'
,
type
:
'Input'
,
key
:
'28c7e2a926e0443c97a4bba2671481c3'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'物料名称'
,
fieldId
:
'materialName'
,
type
:
'Input'
,
key
:
'dfbf05d7671440f092fc2eb55941a06a'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'规格'
,
fieldId
:
'specifications'
,
type
:
'Input'
,
key
:
'439ac7087f5f416a86c1f38c6b1fa1f6'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'型号'
,
fieldId
:
'model'
,
type
:
'Input'
,
key
:
'b455e5b2fe674455952358f99f6ee476'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'批次号'
,
fieldId
:
'batchNumber'
,
type
:
'Input'
,
key
:
'5b2e8a20e4ee4e23a34f99e0514d5798'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'货位'
,
fieldId
:
'storageLocation'
,
type
:
'Input'
,
key
:
'bdee56968ca7409d8c59e7f5a28cb6c1'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'入库数量'
,
fieldId
:
'warehousingNumber'
,
type
:
'InputNumber'
,
key
:
'cf8a1ae3fd8c40b191fd66223f6a5b17'
,
children
:
[],
},
{
required
:
true
,
view
:
true
,
edit
:
true
,
disabled
:
false
,
isSubTable
:
false
,
isSaveTable
:
false
,
showChildren
:
false
,
tableName
:
'mesWarehouseDisassembleInfoList'
,
fieldName
:
'备注'
,
fieldId
:
'remark'
,
type
:
'Input'
,
key
:
'c9865b2979024cd1b7736c020563ca4b'
,
children
:
[],
},
],
},
];
xjrsoft-vue3/src/views/ckgl/ccrk/index.vue
0 → 100644
View file @
7bea6f60
<
template
>
<ResizePageWrapper
:hasLeft=
"false"
>
<template
#
resizeRight
>
<BasicTable
@
register=
"registerTable"
isMenuTable
ref=
"tableRef"
>
<template
#
toolbar
>
<template
v-for=
"button in tableButtonConfig"
:key=
"button.code"
>
<a-button
v-if=
"button.isDefault"
type=
"primary"
@
click=
"buttonClick(button.code)"
>
<template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
{{ button.name }}
</a-button>
<CustomButtonModal
v-else-if=
"button.buttonType == 'modal'"
:info=
"button"
/>
<a-button
v-else
:type=
"button.buttonType === 'danger' ? 'default' : button.buttonType || 'primary'"
:danger=
"button.buttonType === 'danger'"
>
<
template
#
icon
><Icon
:icon=
"button.icon"
/></
template
>
{{ button.name }}
</a-button>
</template>
</template>
<
template
#
bodyCell=
"{ column, record }"
>
<template
v-if=
"column.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>
<CcrkModal
@
register=
"registerModal"
@
success=
"handleFormSuccess"
@
cancel=
"handleFormCancel"
/>
</ResizePageWrapper>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
computed
,
provide
,
Ref
,
createVNode
,
}
from
'vue'
;
import
{
Modal
}
from
'ant-design-vue'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons-vue'
;
import
{
BasicTable
,
useTable
,
TableAction
,
ActionItem
}
from
'/@/components/Table'
;
import
{
getMesWarehouseDisassemblePage
,
deleteMesWarehouseDisassemble
}
from
'/@/api/ckgl/ccrk'
;
import
{
ResizePageWrapper
}
from
'/@/components/Page'
;
import
{
useMessage
}
from
'/@/hooks/web/useMessage'
;
import
{
useI18n
}
from
'/@/hooks/web/useI18n'
;
import
{
usePermission
}
from
'/@/hooks/web/usePermission'
;
import
CustomButtonModal
from
'/@/components/Form/src/components/CustomButtonModal.vue'
;
import
{
executeListStyle
,
getValue
}
from
'/@/hooks/web/useListStyle'
;
//列表样式配置
import
{
useRouter
}
from
'vue-router'
;
import
{
useModal
}
from
'/@/components/Modal'
;
import
CcrkModal
from
'./components/CcrkModal.vue'
;
import
{
searchFormSchema
,
columns
}
from
'./components/config'
;
import
Icon
from
'/@/components/Icon/index'
;
const
listSpliceNum
=
ref
(
3
);
//操作列最先展示几个
import
{
useConcurrentLock
}
from
'/@/hooks/web/useConcurrentLock'
;
const
pageParamsInfo
=
ref
<
any
>
({});
const
{
enableLockeData
,
handleOpenFormEnableLockeData
,
handleCloseFormEnableLocke
,
handleHasEnableLocke
}
=
useConcurrentLock
();
const
{
notification
}
=
useMessage
();
const
{
t
}
=
useI18n
();
defineEmits
([
'register'
]);
const
{
filterColumnAuth
,
filterButtonAuth
,
hasPermission
}
=
usePermission
();
const
filterColumns
=
filterColumnAuth
(
columns
);
const
tableRef
=
ref
();
//展示在列表内的按钮
const
actionButtons
=
ref
<
string
[]
>
([
"view"
,
"edit"
,
"delete"
]);
const
buttonConfigs
=
computed
(()
=>
{
const
list
=
[{
"buttonId"
:
"2020749575161274368"
,
"name"
:
"查看"
,
"code"
:
"view"
,
"icon"
:
"ant-design:eye-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2020749575161274369"
,
"name"
:
"新增"
,
"code"
:
"add"
,
"icon"
:
"ant-design:plus-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
},{
"buttonId"
:
"2020749575161274370"
,
"name"
:
"编辑"
,
"code"
:
"edit"
,
"icon"
:
"ant-design:form-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
,
"isEnableLock"
:
true
},{
"buttonId"
:
"2020749575161274371"
,
"name"
:
"删除"
,
"code"
:
"delete"
,
"icon"
:
"ant-design:delete-outlined"
,
"isDefault"
:
true
,
"isUse"
:
true
}]
return
filterButtonAuth
(
list
);
})
const
tableButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
!
actionButtons
.
value
.
includes
(
x
.
code
));
});
const
actionButtonConfig
=
computed
(()
=>
{
return
buttonConfigs
.
value
?.
filter
((
x
)
=>
actionButtons
.
value
.
includes
(
x
.
code
));
});
const
btnEvent
=
{
view
:
handleView
,
add
:
handleAdd
,
edit
:
handleEdit
,
delete
:
handleDelete
,}
const
{
currentRoute
}
=
useRouter
();
const
formIdComputedRef
=
computed
(()
=>
currentRoute
.
value
.
meta
.
formId
as
string
);
provide
<
Ref
<
string
>>
(
'currentFormId'
,
formIdComputedRef
);
const
[
registerModal
,
{
openModal
}]
=
useModal
();
const
[
registerTable
,
{
reload
,
}]
=
useTable
({
title
:
'Ccrk列表'
,
api
:
getMesWarehouseDisassemblePage
,
rowKey
:
'id'
,
columns
:
filterColumns
,
pagination
:
{
pageSize
:
10
,
},
formConfig
:
{
labelWidth
:
100
,
schemas
:
searchFormSchema
,
fieldMapToTime
:
[],
showResetButton
:
false
,
},
bordered
:
false
,
beforeFetch
:
(
params
)
=>
{
pageParamsInfo
.
value
=
{...
params
,
FormId
:
formIdComputedRef
.
value
,
PK
:
'id'
}
return
pageParamsInfo
.
value
;
},
afterFetch
:
(
res
)
=>
{
},
useSearchForm
:
true
,
showTableSetting
:
true
,
striped
:
false
,
actionColumn
:
{
width
:
195
,
title
:
'操作'
,
dataIndex
:
'action'
,
slots
:
{
customRender
:
'action'
},
},
tableSetting
:
{
size
:
false
,
},
customRow
,
isAdvancedQuery
:
false
,
querySelectOption
:
JSON
.
stringify
(
searchFormSchema
),
objectId
:
formIdComputedRef
.
value
,
////系统表单formId,自定义表单releaseId的id值
});
function
buttonClick
(
code
)
{
btnEvent
[
code
]();
}
function
handleAdd
()
{
openModal
(
true
,
{
isUpdate
:
false
,
});
}
async
function
handleEdit
(
record
:
Recordable
)
{
let
field
=
'id'
;
try
{
let
hasIn
=
handleHasEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
if
(
hasIn
)
{
let
res
=
await
handleOpenFormEnableLockeData
(
record
[
field
],
formIdComputedRef
.
value
,
);
if
(
res
!==
null
)
{
return
;
}
}
let
info
=
{
id
:
record
[
field
],
isUpdate
:
true
,
};
openModal
(
true
,
info
);
}
catch
(
error
)
{}
}
function
handleDelete
(
record
:
Recordable
)
{
deleteList
([
record
.
id
]);
}
function
deleteList
(
ids
)
{
Modal
.
confirm
({
title
:
'提示信息'
,
icon
:
createVNode
(
ExclamationCircleOutlined
),
content
:
'是否确认删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
onOk
()
{
deleteMesWarehouseDisassemble
(
ids
).
then
((
_
)
=>
{
handleSuccess
();
notification
.
success
({
message
:
'Tip'
,
description
:
t
(
'删除成功!'
),
});
});
},
onCancel
()
{},
});
}
function
customRow
(
record
:
Recordable
)
{
return
{
ondblclick
:
()
=>
{
if
(
record
.
isCanEdit
&&
hasPermission
(
"ccrk:edit"
))
{
handleEdit
(
record
);
}
},
};
}
function
handleSuccess
()
{
reload
();
}
function
handleFormSuccess
()
{
handleSuccess
();
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
function
handleFormCancel
()
{
handleCloseFormEnableLocke
(
buttonConfigs
.
value
,
'edit'
);
}
function
handleView
(
record
:
Recordable
)
{
let
info
=
{
isView
:
true
,
id
:
record
.
id
,
}
openModal
(
true
,
info
);
}
function
getLessActions
(
record
:
Recordable
)
{
let
list
=
getActions
(
record
);
return
list
.
slice
(
0
,
listSpliceNum
.
value
);
}
function
getMoreActions
(
record
:
Recordable
)
{
let
list
=
getActions
(
record
);
return
list
.
slice
(
listSpliceNum
.
value
);
}
function
getActions
(
record
:
Recordable
):
ActionItem
[]
{
record
.
isCanEdit
=
false
;
let
actionsList
:
ActionItem
[]
=
[];
actionButtonConfig
.
value
?.
map
((
button
)
=>
{
if
(
!
record
?.
workflowData
?.
processId
)
{
record
.
isCanEdit
=
true
;
actionsList
.
push
({
...
button
,
auth
:
`ccrk:
${
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
:
`ccrk:
${
button
.
code
}
`
,
label
:
button
?.
name
,
onClick
:
btnEvent
[
button
.
code
]?.
bind
(
null
,
record
),
});
}
}
});
return
actionsList
;
}
</
script
>
<
style
lang=
"less"
scoped
>
:deep
(
.ant-table-selection-col
)
{
width
:
50px
;
}
.show
{
display
:
flex
;
}
.hide
{
display
:
none
!important
;
}
</
style
>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment