fix(addTikcet): 时间格式处理问题修复

This commit is contained in:
woody 2025-05-28 16:00:33 +08:00
parent c8726e8279
commit 87d7ba9e0d
1 changed files with 16 additions and 8 deletions

View File

@ -256,21 +256,29 @@ export default {
this.$set(this.ruleForm, 'actExplain', res.data.actExplain)
this.$set(this.ruleForm, 'actCover', res.data.actCover)
this.ruleForm.pkId = res.data.pkId
this.ruleForm.actStartDate = res.data.actStartDate
this.ruleForm.actEndDate = res.data.actEndDate
this.ruleForm.disStartDate = res.data.disStartDate
this.ruleForm.disEndDate = res.data.disEndDate
//
const formatDateOnly = (datetime) => {
if (!datetime) return ''
return datetime.split(' ')[0] //
}
this.ruleForm.actStartDate = formatDateOnly(res.data.actStartDate)
this.ruleForm.actEndDate = formatDateOnly(res.data.actEndDate)
this.ruleForm.disStartDate = formatDateOnly(res.data.disStartDate)
this.ruleForm.disEndDate = formatDateOnly(res.data.disEndDate)
this.ruleForm.payMoney = res.data.payMoney
this.ruleForm.quantity = res.data.quantity
this.ruleForm.limitQuantity = res.data.limitQuantity
this.ruleForm.pkVertex = res.data.pkVertex ? res.data.pkVertex.split(',').map(item => Number(item)) : []
this.$set(this.ruleForm, 'ruleFormTime', [
res.data.actStartDate,
res.data.actEndDate
this.ruleForm.actStartDate,
this.ruleForm.actEndDate
])
this.$set(this.ruleForm, 'ruleFormTime1', [
res.data.disStartDate,
res.data.disEndDate
this.ruleForm.disStartDate,
this.ruleForm.disEndDate
])
// let that = this;
// setTimeout(() => {