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
d9a58476
Commit
d9a58476
authored
Mar 19, 2026
by
董晓奇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(10)发货单生成后自动生成发货质检单,仓库进行检查(给仓库培训,不合格后进行不合格处理,现在后台没报检按钮
parent
6a55618c
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
163 additions
and
73 deletions
+163
-73
xjrsoft-vue3/src/api/ckgl/xsck/index.ts
+18
-16
xjrsoft-vue3/src/views/ckgl/xsck/components/Form.vue
+111
-35
xjrsoft-vue3/src/views/ckgl/xsck/components/XsckModal.vue
+19
-22
xjrsoft-vue3/src/views/ckgl/xsck/components/config.ts
+15
-0
xjrsoft-vue3/src/views/ckgl/xsck/index.vue
+0
-0
No files found.
xjrsoft-vue3/src/api/ckgl/xsck/index.ts
View file @
d9a58476
import
{
import
{
MesWarehouseSaleoutPageModel
,
MesWarehouseSaleoutPageParams
,
MesWarehouseSaleoutPageResult
}
from
'./model/XsckModel'
;
MesWarehouseSaleoutPageModel
,
MesWarehouseSaleoutPageParams
,
MesWarehouseSaleoutPageResult
,
}
from
'./model/XsckModel'
;
import
{
defHttp
}
from
'/@/utils/http/axios'
;
import
{
defHttp
}
from
'/@/utils/http/axios'
;
import
{
ErrorMessageMode
}
from
'/#/axios'
;
import
{
ErrorMessageMode
}
from
'/#/axios'
;
...
@@ -8,16 +11,16 @@ enum Api {
...
@@ -8,16 +11,16 @@ enum Api {
List
=
'/ckgl/xsck/list'
,
List
=
'/ckgl/xsck/list'
,
Info
=
'/ckgl/xsck/info'
,
Info
=
'/ckgl/xsck/info'
,
MesWarehouseSaleout
=
'/ckgl/xsck'
,
MesWarehouseSaleout
=
'/ckgl/xsck'
,
Export
=
'/ckgl/xsck/export'
,
Export
=
'/ckgl/xsck/export'
,
}
}
/**
/**
* @description: 查询MesWarehouseSaleout分页列表
* @description: 查询MesWarehouseSaleout分页列表
*/
*/
export
async
function
getMesWarehouseSaleoutPage
(
params
:
MesWarehouseSaleoutPageParams
,
mode
:
ErrorMessageMode
=
'modal'
)
{
export
async
function
getMesWarehouseSaleoutPage
(
params
:
MesWarehouseSaleoutPageParams
,
mode
:
ErrorMessageMode
=
'modal'
,
)
{
return
defHttp
.
get
<
MesWarehouseSaleoutPageResult
>
(
return
defHttp
.
get
<
MesWarehouseSaleoutPageResult
>
(
{
{
url
:
Api
.
Page
,
url
:
Api
.
Page
,
...
@@ -47,7 +50,10 @@ export async function getMesWarehouseSaleout(id: String, mode: ErrorMessageMode
...
@@ -47,7 +50,10 @@ export async function getMesWarehouseSaleout(id: String, mode: ErrorMessageMode
/**
/**
* @description: 新增MesWarehouseSaleout
* @description: 新增MesWarehouseSaleout
*/
*/
export
async
function
addMesWarehouseSaleout
(
mesWarehouseSaleout
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
export
async
function
addMesWarehouseSaleout
(
mesWarehouseSaleout
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
,
)
{
return
defHttp
.
post
<
boolean
>
(
return
defHttp
.
post
<
boolean
>
(
{
{
url
:
Api
.
MesWarehouseSaleout
,
url
:
Api
.
MesWarehouseSaleout
,
...
@@ -62,7 +68,10 @@ export async function addMesWarehouseSaleout(mesWarehouseSaleout: Recordable, mo
...
@@ -62,7 +68,10 @@ export async function addMesWarehouseSaleout(mesWarehouseSaleout: Recordable, mo
/**
/**
* @description: 更新MesWarehouseSaleout
* @description: 更新MesWarehouseSaleout
*/
*/
export
async
function
updateMesWarehouseSaleout
(
mesWarehouseSaleout
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
)
{
export
async
function
updateMesWarehouseSaleout
(
mesWarehouseSaleout
:
Recordable
,
mode
:
ErrorMessageMode
=
'modal'
,
)
{
return
defHttp
.
put
<
boolean
>
(
return
defHttp
.
put
<
boolean
>
(
{
{
url
:
Api
.
MesWarehouseSaleout
,
url
:
Api
.
MesWarehouseSaleout
,
...
@@ -89,15 +98,10 @@ export async function deleteMesWarehouseSaleout(ids: string[], mode: ErrorMessag
...
@@ -89,15 +98,10 @@ export async function deleteMesWarehouseSaleout(ids: string[], mode: ErrorMessag
);
);
}
}
/**
/**
* @description: 导出MesWarehouseSaleout
* @description: 导出MesWarehouseSaleout
*/
*/
export
async
function
exportMesWarehouseSaleout
(
export
async
function
exportMesWarehouseSaleout
(
params
?:
object
,
mode
:
ErrorMessageMode
=
'modal'
)
{
params
?:
object
,
mode
:
ErrorMessageMode
=
'modal'
)
{
return
defHttp
.
download
(
return
defHttp
.
download
(
{
{
url
:
Api
.
Export
,
url
:
Api
.
Export
,
...
@@ -110,5 +114,3 @@ export async function exportMesWarehouseSaleout(
...
@@ -110,5 +114,3 @@ export async function exportMesWarehouseSaleout(
},
},
);
);
}
}
xjrsoft-vue3/src/views/ckgl/xsck/components/Form.vue
View file @
d9a58476
<
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"
/>
/>
...
@@ -15,13 +14,22 @@
...
@@ -15,13 +14,22 @@
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
{
addMesWarehouseSaleout
,
getMesWarehouseSaleout
,
updateMesWarehouseSaleout
}
from
'/@/api/ckgl/xsck'
;
import
{
addMesWarehouseSaleout
,
getMesWarehouseSaleout
,
updateMesWarehouseSaleout
,
}
from
'/@/api/ckgl/xsck'
;
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'
;
...
@@ -29,7 +37,7 @@
...
@@ -29,7 +37,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 +50,7 @@
...
@@ -42,7 +50,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 +67,35 @@
...
@@ -59,17 +67,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 +104,28 @@
...
@@ -78,15 +104,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 +146,25 @@
...
@@ -107,19 +146,25 @@
}
}
return
values
;
return
values
;
}
}
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
// 根据行唯一ID查询行数据,并设置表单数据 【编辑】
async
function
setFormDataFromId
(
rowId
)
{
async
function
setFormDataFromId
(
rowId
)
{
try
{
try
{
const
record
=
await
getMesWarehouseSaleout
(
rowId
);
const
record
=
await
getMesWarehouseSaleout
(
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 +180,64 @@
...
@@ -135,45 +180,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
updateMesWarehouseSaleout
(
values
);
let
saveVal
=
await
updateMesWarehouseSaleout
(
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
addMesWarehouseSaleout
(
values
);
let
saveVal
=
await
addMesWarehouseSaleout
(
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 +253,30 @@
...
@@ -189,16 +253,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 +284,7 @@
...
@@ -206,6 +284,7 @@
}
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
defineExpose
({
defineExpose
({
setFieldsValue
,
setFieldsValue
,
resetFields
,
resetFields
,
...
@@ -218,8 +297,6 @@
...
@@ -218,8 +297,6 @@
setWorkFlowForm
,
setWorkFlowForm
,
getRowKey
,
getRowKey
,
getFieldsValue
,
getFieldsValue
,
sendMessageForAllIframe
sendMessageForAllIframe
,
});
});
</
script
>
</
script
>
\ No newline at end of file
xjrsoft-vue3/src/views/ckgl/xsck/components/XsckModal.vue
View file @
d9a58476
<
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/xsck/components/config.ts
View file @
d9a58476
...
@@ -329,6 +329,21 @@ export const columns: BasicColumn[] = [
...
@@ -329,6 +329,21 @@ export const columns: BasicColumn[] = [
styleConfig
:
undefined
,
styleConfig
:
undefined
,
listStyle
:
''
,
listStyle
:
''
,
},
},
{
resizable
:
true
,
dataIndex
:
'p30'
,
title
:
'推质检状态'
,
componentType
:
'select'
,
fixed
:
false
,
sorter
:
true
,
styleConfig
:
undefined
,
listStyle
:
''
,
// 保持空字符串,避免进入 listStyle 分支
customRender
:
({
text
})
=>
{
const
map
=
{
0
:
'未推送'
,
1
:
'已推送'
};
return
map
[
text
]
!==
undefined
?
map
[
text
]
:
text
;
},
},
];
];
//表头合并配置
//表头合并配置
export
const
headerMergingData
=
[];
export
const
headerMergingData
=
[];
...
...
xjrsoft-vue3/src/views/ckgl/xsck/index.vue
View file @
d9a58476
This diff is collapsed.
Click to expand it.
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