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 + } +