审批流优化
This commit is contained in:
@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<a-spin :spinning="spinning" tip="请稍后...">
|
||||
<a-spin :spinning="spinning" tip="加载中...">
|
||||
<div class="page-bg-wrap">
|
||||
<!-- <div class="top-toolbar" id="formViewPage"> -->
|
||||
<!-- <a-space :size="10" wrap style="gap: 0">
|
||||
<!-- <div class="top-toolbar" id="formViewPage">
|
||||
<a-space :size="10" wrap style="gap: 0">
|
||||
<a-button style="margin-right: 10px" @click="close">
|
||||
<slot name="icon"><close-outlined /></slot>取消
|
||||
</a-button>
|
||||
<a-button v-if="mode != 'view'" style="margin-right: 10px" type="primary" @click="handleSubmit('save')">
|
||||
<a-button style="margin-right: 10px" @click="handleSubmit('save')">
|
||||
<slot name="icon"><save-outlined /></slot>保存
|
||||
</a-button>
|
||||
<a-button v-if="mode != 'view'" style="margin-right: 10px" type="primary" @click="handleSubmit('submit')">
|
||||
<a-button style="margin-right: 10px" type="primary" @click="handleSubmit('submit')">
|
||||
<slot name="icon"><check-circle-outlined /></slot>保存并提交
|
||||
</a-button>
|
||||
<a-button v-if="mode != 'view'" style="margin-right: 10px" type="primary" @click="handleSubmit">
|
||||
<a-button style="margin-right: 10px" >
|
||||
<slot name="icon"><download-outlined /></slot>下载模板
|
||||
</a-button>
|
||||
<a-button v-if="mode != 'view'" type="primary" @click="handleSubmit">
|
||||
<a-button >
|
||||
<slot name="icon"><upload-outlined /></slot>导入
|
||||
</a-button>
|
||||
</a-space>
|
||||
@ -475,17 +475,23 @@
|
||||
() => props.id,
|
||||
(val) => {
|
||||
if (val) {
|
||||
if (val) {
|
||||
getList(val)
|
||||
}
|
||||
}
|
||||
getList(val)
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => props.disabled,
|
||||
(val) => {
|
||||
isDisable.value = val
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
isDisable.value = props.disabled || false
|
||||
getOption()
|
||||
if (pageId.value) {
|
||||
getList(pageId.value)
|
||||
@ -495,13 +501,15 @@
|
||||
|
||||
});
|
||||
async function getList(id) {
|
||||
spinning.value = true
|
||||
let data = await getLngCustomer(id)
|
||||
spinning.value = false
|
||||
Object.assign(formState, {...data})
|
||||
formState.lngCustomerAttrPowerList = formState.lngCustomerAttrPowerList || [{}]
|
||||
Object.assign(dataBank, formState.lngCustomerBankList || [])
|
||||
Object.assign(dataCertificate, formState.lngCustomerDocList || [])
|
||||
Object.assign(dataContact, formState.lngCustomerContactList || [])
|
||||
Object.assign(dataUpload, formState.lngFileUploadList || [])
|
||||
Object.assign(dataFile, formState.lngFileUploadList || [])
|
||||
}
|
||||
async function getOption() {
|
||||
optionSelect.cuMcodeList = await getDictionary('LNG_ENT_PR')
|
||||
@ -662,7 +670,9 @@
|
||||
function close() {
|
||||
tabStore.closeTab(currentRoute.value, router);
|
||||
}
|
||||
|
||||
async function getFormValue() {
|
||||
return formState
|
||||
}
|
||||
async function handleSubmit(type) {
|
||||
try {
|
||||
await formRef.value.validateFields();
|
||||
@ -761,7 +771,7 @@
|
||||
|
||||
defineExpose({
|
||||
handleSubmit,
|
||||
|
||||
getFormValue
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user