fix(addTikcet): 时间格式处理问题修复
This commit is contained in:
parent
c8726e8279
commit
87d7ba9e0d
|
@ -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(() => {
|
||||
|
|
Loading…
Reference in New Issue