2 次代碼提交 86c5803c40 ... a705ad272b

作者 SHA1 備註 提交日期
  shasha a705ad272b Merge branch 'master' of http://218.2.6.10:3001/fanzherong/hunanzeyunew 2 周之前
  shasha e6815e39ce 供应商运输审核 2 周之前
共有 1 個文件被更改,包括 61 次插入0 次删除
  1. 61 0
      snowy-admin-web/src/views/biz/bizsupplier/transportAudit.vue

+ 61 - 0
snowy-admin-web/src/views/biz/bizsupplier/transportAudit.vue

@@ -0,0 +1,61 @@
+<template>
+    <a-modal v-model:visible="visible" title="审核">
+        <a-form ref="formRef" :label-col="labelCol" :model="formData" layout="horizontal">
+            <a-form-item v-show="false">
+                <a-input v-model:value="formData.id"></a-input>
+            </a-form-item>
+            <a-form-item label="审核说明" name="auditReason" >
+                <a-textarea v-model:value="formData.auditReason" placeholder="请输入审核说明" :auto-size="{ minRows: 3, maxRows: 5 }"/>
+            </a-form-item>
+        </a-form>
+        <template #footer>
+            <a-spin :spinning="submitLoading">
+                <a-button style="margin-right: 8px" @click="onsubmit(false)" type="primary" danger>审核驳回</a-button>
+                <a-button type="primary" @click="onsubmit(true)">审核通过</a-button>
+            </a-spin>
+        </template>
+    </a-modal>
+</template>
+
+<script setup>
+    import {message} from 'ant-design-vue';
+    import bizSupplierTransportApi from '@/api/biz/bizSupplierTransportApi'
+
+    const emit = defineEmits({successful: null})
+    const visible = ref(false);
+    const submitLoading = ref(false)
+    const labelCol = ref({span: 4})
+    // 表单数据
+    const formData = ref({})
+    const showModal = (id) => {
+        formData.value.id = id
+        visible.value = true;
+    };
+    const onClose = () => {
+        formData.value = {}
+        visible.value = false
+    };
+    const onsubmit = (auditStatus) => {
+        if (auditStatus === false) {
+            if (!formData.value.auditReason) {
+                message.error('审核驳回时,审核说明不能为空')
+                return
+            }
+        }
+        submitLoading.value = true
+        formData.value.auditStatus = auditStatus
+        bizSupplierTransportApi.auditRecord(formData.value).then(() => {
+            onClose()
+            emit('successful', null)
+        }).finally(() => {
+            submitLoading.value = false
+        })
+    }
+    // 抛出函数
+    defineExpose({
+        showModal
+    })
+</script>
+<style scoped>
+
+</style>