|
|
@@ -1,52 +1,63 @@
|
|
|
<!-- 驳回弹窗 -->
|
|
|
<template>
|
|
|
- <simple-form-modal title="驳回提示" :items="formItems" ref="editRef" :baseUrl="baseUrl" :formatData="formatData"
|
|
|
- @success="(data) => emit('success', data)"></simple-form-modal>
|
|
|
+ <simple-form-modal
|
|
|
+ title="驳回提示"
|
|
|
+ :items="formItems"
|
|
|
+ ref="editRef"
|
|
|
+ :baseUrl="baseUrl"
|
|
|
+ :formatData="formatData"
|
|
|
+ @success="handleSuccess"
|
|
|
+ ></simple-form-modal>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { reactive, ref, defineEmits, computed } from 'vue';
|
|
|
-import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
|
|
|
+ import { reactive, ref, defineEmits, computed } from 'vue';
|
|
|
+ import SimpleFormModal from '@/components/CommonPage/SimpleFormModal.vue';
|
|
|
|
|
|
-const emit = defineEmits(['success']);
|
|
|
+ const emit = defineEmits(['refresh']);
|
|
|
|
|
|
-const formItems = computed(() => {
|
|
|
+ const formItems = computed(() => {
|
|
|
return [
|
|
|
- {
|
|
|
- type: 'dictSelect',
|
|
|
- label: '驳回原因',
|
|
|
- prop: 'refusalReson',
|
|
|
- props: { code: 'audit_reject_reason', class: 'custom-select' },
|
|
|
- }
|
|
|
+ {
|
|
|
+ type: 'dictSelect',
|
|
|
+ label: '驳回原因',
|
|
|
+ prop: 'refusalReson',
|
|
|
+ props: { code: 'audit_reject_reason', class: 'custom-select' }
|
|
|
+ }
|
|
|
];
|
|
|
-});
|
|
|
+ });
|
|
|
|
|
|
-//默认值
|
|
|
-const baseUrl = reactive({
|
|
|
+ //默认值
|
|
|
+ const baseUrl = reactive({
|
|
|
add: '/order/orderInfo/exceptcheck',
|
|
|
update: '/order/orderInfo/exceptcheck'
|
|
|
-});
|
|
|
+ });
|
|
|
|
|
|
-const formData = ref({
|
|
|
+ const formData = ref({
|
|
|
id: '',
|
|
|
checkStatus: 3
|
|
|
-});
|
|
|
+ });
|
|
|
|
|
|
-const formatData = (data) => {
|
|
|
+ const formatData = (data) => {
|
|
|
return {
|
|
|
- id: formData.value.id,
|
|
|
- checkStatus: formData.value.checkStatus,
|
|
|
- refusalReson: data.refusalReson,
|
|
|
- refusalResonCode: data.refusalReson
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-const editRef = ref(null);
|
|
|
-
|
|
|
-function handleOpen(id) {
|
|
|
+ id: formData.value.id,
|
|
|
+ checkStatus: formData.value.checkStatus,
|
|
|
+ refusalReson: data.refusalReson,
|
|
|
+ refusalResonCode: data.refusalReson
|
|
|
+ };
|
|
|
+ };
|
|
|
+ //成功之后的回调
|
|
|
+ const handleSuccess = (data) => {
|
|
|
+ console.log(data, 'data---------');
|
|
|
+ emit('refresh', data);
|
|
|
+ };
|
|
|
+
|
|
|
+ const editRef = ref(null);
|
|
|
+
|
|
|
+ function handleOpen(id) {
|
|
|
formData.value.id = id;
|
|
|
editRef.value?.handleOpen(formData.value);
|
|
|
-}
|
|
|
+ }
|
|
|
|
|
|
-defineExpose({ handleOpen });
|
|
|
-</script>
|
|
|
+ defineExpose({ handleOpen });
|
|
|
+</script>
|