订单修复

dev_2022-03-03
yujialong 3 years ago
parent ac8d3bba5c
commit 47f94669e1
  1. 19
      src/views/order/AddOrder.vue

@ -137,7 +137,7 @@
<template slot-scope="scope">
<p v-if="!scope.row.startTime">
<el-date-picker
:class="orderRepeat.includes(scope.row.id) ? 'red' : ''"
:class="orderRepeat.includes(scope.row.dataOrCourseId) ? 'red' : ''"
style="width:130px"
v-model="scope.row.startTime"
type="date" :disabled="viewDisabled||editDisabled"
@ -147,7 +147,7 @@
</p>
<p v-else>
<el-date-picker
:class="orderRepeat.includes(scope.row.id) ? 'red' : ''"
:class="orderRepeat.includes(scope.row.dataOrCourseId) ? 'red' : ''"
style="width:130px"
v-model="scope.row.startTime"
type="date" :disabled="viewDisabled||editDisabled"
@ -276,7 +276,7 @@
<template slot-scope="scope">
<p v-if="!scope.row.startTime">
<el-date-picker
:class="orderRepeat.includes(scope.row.id) ? 'red' : ''"
:class="orderRepeat.includes(scope.row.dataOrCourseId) ? 'red' : ''"
style="width:130px"
v-model="scope.row.startTime"
type="date" :disabled="viewDisabled||editDisabled"
@ -286,7 +286,7 @@
</p>
<p v-else>
<el-date-picker
:class="orderRepeat.includes(scope.row.id) ? 'red' : ''"
:class="orderRepeat.includes(scope.row.dataOrCourseId) ? 'red' : ''"
style="width:130px"
v-model="scope.row.startTime"
type="date" :disabled="viewDisabled||editDisabled"
@ -958,10 +958,14 @@ export default {
this.form.orderNature = 2;
if (renew) {
tempArr.forEach(e => {
if (e.renew) delete e.renew;
if (e.renew) delete e.renew
});
}
}
tempArr.forEach(e => {
const time = new Date(e.startTime)
e.startTime = `${time.getFullYear()}-${time.getMonth() + 1}-${time.getDate()}`
})
let param = {
contractInformation: this.contract,//
order: this.form,//
@ -1335,6 +1339,7 @@ export default {
deadLine(e,row,options, isDate) {
// +1
if (isDate) {
const cId = row.dataOrCourseId
const date = row.startTime
const orderRepeat = this.orderRepeat
this.$post(this.api.getOrderOtherTime, {
@ -1342,15 +1347,15 @@ export default {
id: row.dataOrCourseId,
startTime: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
}).then(res => {
orderRepeat.includes(cId) && orderRepeat.splice(orderRepeat.findIndex(e => e === cId), 1)
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)
orderRepeat.includes(cId) || orderRepeat.push(cId)
})
}
let optionsData = ''

Loading…
Cancel
Save