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, 'actExplain', res.data.actExplain)
|
||||||
this.$set(this.ruleForm, 'actCover', res.data.actCover)
|
this.$set(this.ruleForm, 'actCover', res.data.actCover)
|
||||||
this.ruleForm.pkId = res.data.pkId
|
this.ruleForm.pkId = res.data.pkId
|
||||||
this.ruleForm.actStartDate = res.data.actStartDate
|
|
||||||
this.ruleForm.actEndDate = res.data.actEndDate
|
// 处理时间字段,去掉时分秒部分,只保留日期
|
||||||
this.ruleForm.disStartDate = res.data.disStartDate
|
const formatDateOnly = (datetime) => {
|
||||||
this.ruleForm.disEndDate = res.data.disEndDate
|
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.payMoney = res.data.payMoney
|
||||||
this.ruleForm.quantity = res.data.quantity
|
this.ruleForm.quantity = res.data.quantity
|
||||||
this.ruleForm.limitQuantity = res.data.limitQuantity
|
this.ruleForm.limitQuantity = res.data.limitQuantity
|
||||||
this.ruleForm.pkVertex = res.data.pkVertex ? res.data.pkVertex.split(',').map(item => Number(item)) : []
|
this.ruleForm.pkVertex = res.data.pkVertex ? res.data.pkVertex.split(',').map(item => Number(item)) : []
|
||||||
this.$set(this.ruleForm, 'ruleFormTime', [
|
this.$set(this.ruleForm, 'ruleFormTime', [
|
||||||
res.data.actStartDate,
|
this.ruleForm.actStartDate,
|
||||||
res.data.actEndDate
|
this.ruleForm.actEndDate
|
||||||
])
|
])
|
||||||
this.$set(this.ruleForm, 'ruleFormTime1', [
|
this.$set(this.ruleForm, 'ruleFormTime1', [
|
||||||
res.data.disStartDate,
|
this.ruleForm.disStartDate,
|
||||||
res.data.disEndDate
|
this.ruleForm.disEndDate
|
||||||
])
|
])
|
||||||
// let that = this;
|
// let that = this;
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
|
|
Loading…
Reference in New Issue