diff --git a/src/views/finance_payment_apply/edit.vue b/src/views/finance_payment_apply/edit.vue index 07d83a9..f4e8f0b 100644 --- a/src/views/finance_payment_apply/edit.vue +++ b/src/views/finance_payment_apply/edit.vue @@ -200,7 +200,7 @@ - +
@@ -240,13 +240,9 @@ import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' // import procurementDialog from '@/components/procurement/index.vue' import suppliertable from '@/components/supplier/index.vue' - - +import { useDictData } from '@/hooks/useDictOptions' import subcontractingDialog from '@/components/procurementsubcontracting_selector/index.vue' import subcontracting from '@/components/procurementsubcontracting_selector/subcontracting.vue' - - - import paylistDialog from '@/components/paylist/index.vue' const active = ref(0) import bankaccountDialog from '@/components/bankaccount/index.vue' @@ -309,11 +305,9 @@ const delFileFn = (index: number) => { formDataannex.splice(index, 1) } defineProps({ - dictData: { - type: Object as PropType>, - default: () => ({}) - } + project: Object }) +const { dictData } = useDictData('pay_period,pay_type,payment_natrue,invoice_status') const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() diff --git a/src/views/finance_refund_record/edit.vue b/src/views/finance_refund_record/edit.vue index 7ee2263..1f1f5c8 100644 --- a/src/views/finance_refund_record/edit.vue +++ b/src/views/finance_refund_record/edit.vue @@ -143,7 +143,7 @@ - +
@@ -185,6 +185,7 @@ import { isEmail, isIdCard, isPhone } from '@/utils/validate' import type { PropType } from 'vue' import configs from "@/config" import useUserStore from "@/stores/modules/user"; +import { useDictData } from '@/hooks/useDictOptions' const protype = reactive([]) const base_url = configs.baseUrl + configs.urlPrefix const userStore = useUserStore(); @@ -234,12 +235,10 @@ const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) } }; +const { dictData } = useDictData('refund_type,isaccrued,contract_type') defineProps({ - dictData: { - type: Object as PropType>, - default: () => ({}) - } + project: Object }) const emit = defineEmits(['success', 'close']) const formRef = shallowRef() diff --git a/src/views/project_document/edit.vue b/src/views/project_document/edit.vue index 2f0efe9..ccb51b5 100644 --- a/src/views/project_document/edit.vue +++ b/src/views/project_document/edit.vue @@ -2,16 +2,13 @@
- - - - + @@ -56,11 +53,7 @@ - - - - - - - - @@ -149,40 +138,8 @@ const handleAvatarSuccess_four = ( const delFileFn = (index: number) => { formDataannex.splice(index, 1) } -defineProps({ - dictData: { - type: Object as PropType>, - default: () => ({}) - } -}) -const emit = defineEmits(['success', 'close']) -const formRef = shallowRef() -const popupRef = shallowRef>() -const mode = ref('add') -const showDialog = ref(false) -const showDialog2 = ref(false) - -const customEvent2 = (e: any) => { - formData.project_id = e.id; - project_name.value = e.name; - project_code.value = e.project_code; - showDialog2.value = false; -}; -const customEvent = (e: any) => { - formData.classify_id = e.id; - large_document.value = e.large_category; - middle_document.value = e.middle_category; - // formData.name = e.name; - showDialog.value = false; -}; - - - - - -// 弹窗标题 -const popupTitle = computed(() => { - return mode.value == 'edit' ? '编辑项目文档表' : '新增项目文档表' +let props = defineProps({ + project: Object }) // 表单数据 @@ -200,6 +157,43 @@ const formData = reactive({ }) +const emit = defineEmits(['success', 'close']) +const formRef = shallowRef() +const popupRef = shallowRef>() +const mode = ref('add') +const showDialog = ref(false) +const showDialog2 = ref(false) + +const customEvent2 = (e: any) => { + formData.project_id = e.id; + project_name.value = e.name; + project_code.value = e.project_code; + showDialog2.value = false; +}; +if (props.project) customEvent2(props.project); + + + + +const customEvent = (e: any) => { + formData.classify_id = e.id; + large_document.value = e.large_category; + middle_document.value = e.middle_category; + showDialog.value = false; +}; + + + + + +// 弹窗标题 +const popupTitle = computed(() => { + return mode.value == 'edit' ? '编辑项目文档表' : '新增项目文档表' +}) + + + + // 表单验证 const formRules = reactive({ diff --git a/src/views/project_list/components/documentation.vue b/src/views/project_list/components/documentation.vue index dfca4be..4fb0c78 100644 --- a/src/views/project_list/components/documentation.vue +++ b/src/views/project_list/components/documentation.vue @@ -1,15 +1,15 @@