@salen
2017-11-06T03:05:32.000000Z
字数 377
阅读 328
未分类
// 在进入组件时根据是否编辑来判断填入开票人还是修改
// $getStore获取locaStore数据(参考src -> config -> localStore)
mounted() {
this.edit ?
this.detailInfo.update_person = this.$getStore('real_name') : this.detailInfo.issuer = this.$getStore('real_name')
}
// 保存时根据是否编辑来判断填入开票时间还是修改时间
// getTime() 参考src -> utils -> time
save() {
this.edit ?
this.detailInfo.update_time = getTime() :
this.detailInfo.billing_time = getTime()
}