|
|
@@ -8,10 +8,12 @@ interface Props {
|
|
|
visible: boolean
|
|
|
type?: 'edit' | 'approval' | 'readonly'
|
|
|
loadList: () => void
|
|
|
+ noValidateStatus?: boolean
|
|
|
}
|
|
|
|
|
|
const props = withDefaults(defineProps<Props>(), {
|
|
|
- type: 'edit'
|
|
|
+ type: 'edit',
|
|
|
+ noValidateStatus: false
|
|
|
})
|
|
|
|
|
|
const emits = defineEmits(['update:visible'])
|
|
|
@@ -169,8 +171,10 @@ async function loadDetail(id: number) {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- if (props.type === 'edit' && res.status !== 0) formType.value = 'readonly'
|
|
|
- if (props.type === 'approval' && res.auditStatus !== 10) formType.value = 'readonly'
|
|
|
+ if (props.type === 'edit' && !props.noValidateStatus && res.status !== 0)
|
|
|
+ formType.value = 'readonly'
|
|
|
+ if (props.type === 'approval' && !props.noValidateStatus && res.auditStatus !== 10)
|
|
|
+ formType.value = 'readonly'
|
|
|
} finally {
|
|
|
loading.value = false
|
|
|
}
|
|
|
@@ -669,8 +673,8 @@ const orange = computed(() => {
|
|
|
@click="submitForm"
|
|
|
:loading="formLoading"
|
|
|
:disabled="formType === 'readonly'"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ >确 定
|
|
|
+ </el-button>
|
|
|
<el-button size="default" @click="emits('update:visible', false)">取 消</el-button>
|
|
|
</div>
|
|
|
<div v-if="isApproval">
|
|
|
@@ -680,16 +684,16 @@ const orange = computed(() => {
|
|
|
@click="handleAudit(20)"
|
|
|
:loading="formLoading"
|
|
|
:disabled="formType === 'readonly'"
|
|
|
- >审批通过</el-button
|
|
|
- >
|
|
|
+ >审批通过
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
size="default"
|
|
|
type="danger"
|
|
|
@click="handleAudit(30)"
|
|
|
:loading="formLoading"
|
|
|
:disabled="formType === 'readonly'"
|
|
|
- >审批拒绝</el-button
|
|
|
- >
|
|
|
+ >审批拒绝
|
|
|
+ </el-button>
|
|
|
<el-button size="default" @click="emits('update:visible', false)">取 消</el-button>
|
|
|
</div>
|
|
|
</template>
|