From 814f056dfb7f749ac7f9a1dcd189d3dc9931fd22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <14166000+zhangtonghai@user.noreply.gitee.com> Date: Thu, 29 Aug 2024 09:41:39 +0800 Subject: [PATCH] =?UTF-8?q?DEdit=20=E6=B7=BB=E5=8A=A0=20=E6=97=A5=E6=9C=9F?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Form/src/Ds/components/DEdit.vue | 8 +- .../operation/invoiceApply/detail/index.vue | 2078 +++++++++-------- 2 files changed, 1074 insertions(+), 1012 deletions(-) diff --git a/src/components/Form/src/Ds/components/DEdit.vue b/src/components/Form/src/Ds/components/DEdit.vue index d268a3e4..fdf5cdd3 100644 --- a/src/components/Form/src/Ds/components/DEdit.vue +++ b/src/components/Form/src/Ds/components/DEdit.vue @@ -11,6 +11,7 @@ import { useAttrs } from '/@/hooks/core/useAttrs' import { useI18n } from '/@/hooks/web/useI18n' import { useAppStore } from '/@/store/modules/app' + import dayjs from 'dayjs' const appStore = useAppStore() type OptionsItem = { label: string; value: string; disabled?: boolean } export default defineComponent({ @@ -50,7 +51,9 @@ const attrs = useAttrs() const { t } = useI18n() const [state] = useRuleFormItem(props, 'value', 'change') - + function isDate(value) { + return value instanceof Date || Object.prototype.toString.call(value) === '[object Date]' + } function GetState() { let RData: any = null if (state.value) { @@ -78,6 +81,8 @@ RData = item[props.labelField] } }) + } else if (state.value.$d && state.value.$isDayjsObject) { + RData = dayjs(state.value.$d).format('YYYY-MM-DD') } else { if (props.label == '来源明细') { appStore.getSourceData.forEach((item) => { @@ -105,6 +110,7 @@ function CilckEdit() { emit('edit') } + return { attrs, t, showTooltip, props, state, CilckEdit, GetState } }, }) diff --git a/src/views/operation/invoiceApply/detail/index.vue b/src/views/operation/invoiceApply/detail/index.vue index d8c0e80e..0dd060f5 100644 --- a/src/views/operation/invoiceApply/detail/index.vue +++ b/src/views/operation/invoiceApply/detail/index.vue @@ -1,1191 +1,1247 @@ \ No newline at end of file + } +