sparkles: 查看按钮的功能
All checks were successful
Release / lint (push) Successful in 46s
Release / Release (push) Successful in 1m55s

This commit is contained in:
my_ong 2025-03-12 11:20:47 +08:00
parent 2f798b6b48
commit 0a39446c65

View File

@ -66,13 +66,17 @@
v-if="record.reviewResult === 'WAIT_REVIEW'" v-if="record.reviewResult === 'WAIT_REVIEW'"
type="link" type="link"
style="margin-left: 10px" style="margin-left: 10px"
@click="showResultModal(record.id, record.auditType)" @click="showResultModal(record.id, record.auditType, true)"
> >
<template #icon>
<icon-font type="icon-plus" />
</template>
审核 审核
</a-button> </a-button>
<a-button
type="link"
style="margin-left: 10px"
@click="showResultModal(record.id, record.auditType, false)"
>
查看
</a-button>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -81,7 +85,7 @@
<!-- 审核弹窗 --> <!-- 审核弹窗 -->
<a-modal v-model:open="openResult" title="盘点异常数据:" width="80%" :confirm-loading="confirmLoading" @ok="submit"> <a-modal v-model:open="openResult" title="盘点异常数据:" width="80%" :confirm-loading="confirmLoading" @ok="submit">
<result-form v-if="auditTypeRef === 'SCAN'" :apply-id="applyIdRef"></result-form> <result-form v-if="auditTypeRef === 'SCAN'" :apply-id="applyIdRef" />
<vxe-table <vxe-table
v-if="auditTypeRef === 'MANUAL'" v-if="auditTypeRef === 'MANUAL'"
v-model:data="manualData" v-model:data="manualData"
@ -101,7 +105,7 @@
<vxe-column field="manualStock" title="手动核实数量" /> <vxe-column field="manualStock" title="手动核实数量" />
<vxe-column field="msg" title="异常原因" /> <vxe-column field="msg" title="异常原因" />
</vxe-table> </vxe-table>
<a-form layout="vertical" style="margin-top: 20px"> <a-form v-if="flag" layout="vertical" style="margin-top: 20px">
<a-form-item label="审核意见"> <a-form-item label="审核意见">
<a-textarea v-model:value="remark" placeholder="请输入审核意见" :row="3" :maxlength="1000" /> <a-textarea v-model:value="remark" placeholder="请输入审核意见" :row="3" :maxlength="1000" />
</a-form-item> </a-form-item>
@ -211,9 +215,14 @@
} }
}) })
// flag=trueflag=false
const flag = ref(false)
const openResult = ref<boolean>(false) const openResult = ref<boolean>(false)
const auditTypeRef = ref<'SCAN' | 'MANUAL'>() const auditTypeRef = ref<'SCAN' | 'MANUAL'>()
const showResultModal = (applyId: number, auditType: 'SCAN' | 'MANUAL') => {
//
const showResultModal = (applyId: number, auditType: 'SCAN' | 'MANUAL', select: boolean) => {
flag.value = select
auditTypeRef.value = auditType auditTypeRef.value = auditType
applyIdRef.value = applyId applyIdRef.value = applyId
openResult.value = true openResult.value = true
@ -233,6 +242,11 @@
// //
const submit = () => { const submit = () => {
confirmLoading.value = true confirmLoading.value = true
if (!flag.value) {
confirmLoading.value = false
openResult.value = false
return
}
api.materialApi.apply.submitReview( api.materialApi.apply.submitReview(
{ {
applyId: applyIdRef.value, applyId: applyIdRef.value,