|
|
@ -684,7 +684,6 @@ export default { |
|
|
|
if(this.renewDisabled){/* 处于续费 */ |
|
|
|
if(this.renewDisabled){/* 处于续费 */ |
|
|
|
let end = Date.parse(e.endTime); |
|
|
|
let end = Date.parse(e.endTime); |
|
|
|
let now = +new Date() |
|
|
|
let now = +new Date() |
|
|
|
console.log(end,now,'时间'); |
|
|
|
|
|
|
|
if(now<end){ |
|
|
|
if(now<end){ |
|
|
|
let time = e.endTime.split(" ")[0] |
|
|
|
let time = e.endTime.split(" ")[0] |
|
|
|
let arr = time.split('-') |
|
|
|
let arr = time.split('-') |
|
|
@ -920,7 +919,6 @@ export default { |
|
|
|
productId:idArr |
|
|
|
productId:idArr |
|
|
|
} |
|
|
|
} |
|
|
|
await this.$post(this.api.renew,params).then(res=>{ |
|
|
|
await this.$post(this.api.renew,params).then(res=>{ |
|
|
|
console.log(res,'调用查询接口'); |
|
|
|
|
|
|
|
this.dataPlatform.map(e=>{ |
|
|
|
this.dataPlatform.map(e=>{ |
|
|
|
res.orderOthers.map(el=>{ |
|
|
|
res.orderOthers.map(el=>{ |
|
|
|
if(el.dataOrCourseId === e.dataOrCourseId){ |
|
|
|
if(el.dataOrCourseId === e.dataOrCourseId){ |
|
|
@ -998,7 +996,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 权限switch切换--计算天数 |
|
|
|
// 权限switch切换--计算天数 |
|
|
|
formSwitch (e,row) { |
|
|
|
formSwitch (e,row) { |
|
|
|
console.log(e,row,'switch切换'); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
// 数据平台--发货 |
|
|
|
// 数据平台--发货 |
|
|
|
deliverGoods (e,row) { |
|
|
|
deliverGoods (e,row) { |
|
|
@ -1018,7 +1015,6 @@ export default { |
|
|
|
let day = nowDate.getDate(); |
|
|
|
let day = nowDate.getDate(); |
|
|
|
let month = nowDate.getMonth() + 1; |
|
|
|
let month = nowDate.getMonth() + 1; |
|
|
|
let year = nowDate.getFullYear(); |
|
|
|
let year = nowDate.getFullYear(); |
|
|
|
console.log(nowDate,'nowdata'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.renewDisabled||row.renew){/* 处于续费状态 */ |
|
|
|
if(this.renewDisabled||row.renew){/* 处于续费状态 */ |
|
|
|
if(!e) return row.endTime = '' |
|
|
|
if(!e) return row.endTime = '' |
|
|
@ -1026,10 +1022,7 @@ export default { |
|
|
|
let renewY = arr.shift()/* 年 */ |
|
|
|
let renewY = arr.shift()/* 年 */ |
|
|
|
let renewM = arr.shift()/* 月 */ |
|
|
|
let renewM = arr.shift()/* 月 */ |
|
|
|
let renewD = arr.shift()/* 日 */ |
|
|
|
let renewD = arr.shift()/* 日 */ |
|
|
|
console.log(renewY,renewM,renewD,'拆分时间'); |
|
|
|
|
|
|
|
let endYear = +renewY + (parseInt((+renewM+(+e))/13)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; |
|
|
|
let endYear = +renewY + (parseInt((+renewM+(+e))/13)===0?0:parseInt((+renewM+(+e))/12))+ char + completeDate((+renewM+(+e))%12) + char + renewD; |
|
|
|
// console.log((parseInt((+renewM(+e))/12)===0?0:parseInt((+renewM+(+e))/12)),renewY,'看下时间计算', +renewY + (parseInt((+renewM+(+e))/12)===0?0:parseInt((+renewM+(+e))/12))); |
|
|
|
|
|
|
|
console.log(parseInt((+renewM+(+e))/13),'计算整除的年份',12/13,'+renewM+(+e)'); |
|
|
|
|
|
|
|
row.endTime = endYear |
|
|
|
row.endTime = endYear |
|
|
|
|
|
|
|
|
|
|
|
// 计算剩余天数 |
|
|
|
// 计算剩余天数 |
|
|
@ -1249,7 +1242,6 @@ export default { |
|
|
|
const size = file.size / 1024 / 1024 < 10; |
|
|
|
const size = file.size / 1024 / 1024 < 10; |
|
|
|
let type = file.name.split('.').pop() |
|
|
|
let type = file.name.split('.').pop() |
|
|
|
let str = ["jpg","jepg","gif","png","doc","docx","pdf"].includes(type.toLowerCase()) |
|
|
|
let str = ["jpg","jepg","gif","png","doc","docx","pdf"].includes(type.toLowerCase()) |
|
|
|
console.log(type,str,'类型判断'); |
|
|
|
|
|
|
|
if(!str){ |
|
|
|
if(!str){ |
|
|
|
this.$message.error('只能上传图片,word文件和pdf文件!') |
|
|
|
this.$message.error('只能上传图片,word文件和pdf文件!') |
|
|
|
}else if (!size) { |
|
|
|
}else if (!size) { |
|
|
@ -1260,7 +1252,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 上传成功 |
|
|
|
// 上传成功 |
|
|
|
uploadSuccess(response, file, fileList) { |
|
|
|
uploadSuccess(response, file, fileList) { |
|
|
|
console.log(file,'上传构子',response,); |
|
|
|
|
|
|
|
this.contract.contractFile = response.filesResult.fileUrl |
|
|
|
this.contract.contractFile = response.filesResult.fileUrl |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 上传报错 |
|
|
|
// 上传报错 |
|
|
@ -1273,7 +1264,6 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除上传文件前的确认 |
|
|
|
// 删除上传文件前的确认 |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
beforeRemove(file, fileList) { |
|
|
|
console.log(file,'删除钩子'); |
|
|
|
|
|
|
|
let type = file.name.split('.').pop() |
|
|
|
let type = file.name.split('.').pop() |
|
|
|
let str = ["jpg","jepg","gif","png","doc","pdf"].includes(type.toLowerCase()) |
|
|
|
let str = ["jpg","jepg","gif","png","doc","pdf"].includes(type.toLowerCase()) |
|
|
|
const size = file.size / 1024 / 1024 < 10; |
|
|
|
const size = file.size / 1024 / 1024 < 10; |
|
|
@ -1305,7 +1295,6 @@ export default { |
|
|
|
boolean = false |
|
|
|
boolean = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log(boolean); |
|
|
|
|
|
|
|
return boolean |
|
|
|
return boolean |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|