|
|
|
@ -1337,25 +1337,25 @@ export default { |
|
|
|
|
// 使用期限转换以及计算剩余天数 |
|
|
|
|
deadLine(e,row,options, isDate) { |
|
|
|
|
// 只有改变了起止日期才需要调接口查询订单,该接口作用是把开始时间传过去,会返回一个提示或者时间,如果是时间,则把时间+1天,如果是提示,则无法保存 |
|
|
|
|
if (isDate) { |
|
|
|
|
const date = row.startTime |
|
|
|
|
const orderRepeat = this.orderRepeat |
|
|
|
|
this.$post(this.api.getOrderOtherTime, { |
|
|
|
|
customerId: this.form.customerId, |
|
|
|
|
id: row.dataOrCourseId, |
|
|
|
|
startTime: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.endTime) { |
|
|
|
|
orderRepeat.includes(row.id) && orderRepeat.splice(orderRepeat.findIndex(e => e === row.id), 1) |
|
|
|
|
let time = new Date(res.endTime) |
|
|
|
|
time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
|
row.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}` |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.repeatMsg = res.message |
|
|
|
|
orderRepeat.includes(row.id) || orderRepeat.push(row.id) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// if (isDate) { |
|
|
|
|
// const date = row.startTime |
|
|
|
|
// const orderRepeat = this.orderRepeat |
|
|
|
|
// this.$post(this.api.getOrderOtherTime, { |
|
|
|
|
// customerId: this.form.customerId, |
|
|
|
|
// id: row.dataOrCourseId, |
|
|
|
|
// startTime: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() |
|
|
|
|
// }).then(res => { |
|
|
|
|
// if (res.endTime) { |
|
|
|
|
// orderRepeat.includes(row.id) && orderRepeat.splice(orderRepeat.findIndex(e => e === row.id), 1) |
|
|
|
|
// let time = new Date(res.endTime) |
|
|
|
|
// time = new Date(time.setDate(time.getDate() + 1)) |
|
|
|
|
// row.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}` |
|
|
|
|
// } |
|
|
|
|
// }).catch(res => { |
|
|
|
|
// this.repeatMsg = res.message |
|
|
|
|
// orderRepeat.includes(row.id) || orderRepeat.push(row.id) |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
let optionsData = '' |
|
|
|
|
if(e > 0){ |
|
|
|
|
if (options == 1){ |
|
|
|
|