续费日期修改

dev
e 3 years ago
parent 2ad38e7311
commit de645bddad
  1. 11
      src/views/order/AddOrder.vue

@ -680,10 +680,11 @@ export default {
}) })
let dataArr = list.filter(e=>{// let dataArr = list.filter(e=>{//
if(this.renewDisabled){/* 处于续费 */ if(this.renewDisabled){/* 处于续费 */
e.startTime = e.endTime.split(" ")[0] let time = e.endTime.split(" ")[0]
let arr = time.split('-')
e.startTime = arr[0]+'-'+arr[1]+'-'+'0'+(+arr[2]+1)
e.endTime = "" e.endTime = ""
e.periodOfUse = '' e.periodOfUse = ''
e.residueRecord = e.remainingPeriod
}else{ }else{
e.startTime = e.startTime.split(" ")[0] e.startTime = e.startTime.split(" ")[0]
e.endTime = e.endTime.split(" ")[0] e.endTime = e.endTime.split(" ")[0]
@ -752,9 +753,7 @@ export default {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
if(this.renewDisabled){/* 续费状态下 */ if(this.renewDisabled){/* 续费状态下 */
this.dataPlatform.map(e=>{
delete e.residueRecord
})
this.form.orderNature = 2 this.form.orderNature = 2
} }
let param = { let param = {
@ -1000,7 +999,7 @@ export default {
let date1 = Date.parse(endYear); let date1 = Date.parse(endYear);
let date2 = Date.parse(row.startTime); let date2 = Date.parse(row.startTime);
let ms = Math.abs(date1 - date2) let ms = Math.abs(date1 - date2)
row.remainingPeriod = Math.floor(ms / (24 * 3600 * 1000)) + row.residueRecord; row.remainingPeriod = Math.floor(ms / (24 * 3600 * 1000)) ;

Loading…
Cancel
Save