设备-保养前端优化

yangwl
wws 10 months ago
parent 7e033eba23
commit 0d4e6d7082

@ -18,12 +18,14 @@
/>
</el-form-item>
<el-form-item label="车间" prop="planWorkshop">
<el-input
v-model="queryParams.planWorkshop"
placeholder="请输入车间编码"
clearable
@keyup.enter.native="handleQuery"
/>
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
<el-option
v-for="work in workCenterList"
:key="work.factoryCode"
:label="work.factoryName"
:value="work.factoryCode"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input
@ -145,7 +147,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
@ -153,7 +155,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
@ -166,7 +168,7 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新人"
@ -174,7 +176,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
type="daterange"
@ -187,6 +189,32 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label-width="100px" label="循环范围结束" prop="planLoopEnd">
<el-date-picker
v-model="queryParams.loopEndArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -250,7 +278,7 @@
<el-table-column width="150" label="计划编码" align="center" prop="planCode"/>
<el-table-column width="120" label="计划名称" align="center" prop="planName"/>
<el-table-column width="100" label="车间编码" align="center" prop="planWorkshop"/>
<el-table-column width="150" label="工作中心" align="center" prop="workCenterName"/>
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/>
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName"/>
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode"/>
@ -260,12 +288,12 @@
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<el-table-column label="循环范围开始" align="center" prop="planLoopStart" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180">
<el-table-column label="循环范围结束" align="center" prop="planLoopEnd" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
@ -713,6 +741,7 @@ export default {
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
loopEndArray: [],
},
//
form: {
@ -760,79 +789,79 @@ export default {
this.form.planTimeArray = [];
return
}
//
if (this.form.planLoopType == 'day'){
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+days+'天,循环周期为'+days+'天,超过循环周期'+(days-this.form.planLoop)+'天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'week') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
if (weeks > (this.form.planLoop/7)) {
this.$message({
message: '可执行时间范围为'+weeks+'周,循环周期为'+weeks+'周,超过循环周期'+(weeks*7-this.form.planLoop)+'天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'month'){
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+monthsDiff+'月,循环周期为'+monthsDiff+'月,超过循环周期'+(monthsDiff-this.form.planLoop)+'月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'season'){
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff*3 > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+monthsDiff*3+'季度,循环周期为'+monthsDiff*3+'季度,超过循环周期'+(monthsDiff-this.form.planLoop)+'月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'year'){
//
let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
if (yearsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+yearsDiff+'年,循环周期为'+yearsDiff+'年,超过循环周期'+(yearsDiff-this.form.planLoop)+'年,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
//
// //
// if (this.form.planLoopType == 'day'){
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let days = Math.floor(diff / (1000 * 60 * 60 * 24));
//
// if (days > this.form.planLoop) {
// this.$message({
// message: ''+days+','+days+','+(days-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'week') {
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
//
// if (weeks > (this.form.planLoop/7)) {
// this.$message({
// message: ''+weeks+','+weeks+','+(weeks*7-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'month'){
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff > this.form.planLoop) {
// this.$message({
// message: ''+monthsDiff+','+monthsDiff+','+(monthsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'season'){
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff*3 > this.form.planLoop) {
// this.$message({
// message: ''+monthsDiff*3+','+monthsDiff*3+','+(monthsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'year'){
// //
// let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
//
// if (yearsDiff > this.form.planLoop) {
// this.$message({
// message: ''+yearsDiff+','+yearsDiff+','+(yearsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
},
// List-穿
@ -1045,6 +1074,7 @@ export default {
planTimeArray: [],
equipmentItem: [],
personList: [],
loopEndArray: [],
};
this.resetForm("form");
},
@ -1059,6 +1089,7 @@ export default {
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.
this.handleQuery();
},
//

@ -299,7 +299,7 @@
<el-table-column width="120" label="计划编码" align="center" prop="planCode" />
<el-table-column width="120" label="计划名称" align="center" prop="planName" />
<el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="工作中心" align="center" prop="workCenterName"/>
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName" />
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode" />
@ -849,79 +849,79 @@ export default {
this.form.planTimeArray = [];
return
}
//
if (this.form.planLoopType == 'day'){
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+days+'天,循环周期为'+days+'天,超过循环周期'+(days-this.form.planLoop)+'天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'week') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
if (weeks > (this.form.planLoop/7)) {
this.$message({
message: '可执行时间范围为'+weeks+'周,循环周期为'+weeks+'周,超过循环周期'+(weeks*7-this.form.planLoop)+'天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'month'){
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+monthsDiff+'月,循环周期为'+monthsDiff+'月,超过循环周期'+(monthsDiff-this.form.planLoop)+'月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'season'){
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff*3 > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+monthsDiff*3+'季度,循环周期为'+monthsDiff*3+'季度,超过循环周期'+(monthsDiff-this.form.planLoop)+'月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'year'){
//
let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
if (yearsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为'+yearsDiff+'年,循环周期为'+yearsDiff+'年,超过循环周期'+(yearsDiff-this.form.planLoop)+'年,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
//
// //
// if (this.form.planLoopType == 'day'){
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let days = Math.floor(diff / (1000 * 60 * 60 * 24));
//
// if (days > this.form.planLoop) {
// this.$message({
// message: ''+days+','+days+','+(days-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'week') {
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
//
// if (weeks > (this.form.planLoop/7)) {
// this.$message({
// message: ''+weeks+','+weeks+','+(weeks*7-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'month'){
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff > this.form.planLoop) {
// this.$message({
// message: ''+monthsDiff+','+monthsDiff+','+(monthsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'season'){
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff*3 > this.form.planLoop) {
// this.$message({
// message: ''+monthsDiff*3+','+monthsDiff*3+','+(monthsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'year'){
// //
// let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
//
// if (yearsDiff > this.form.planLoop) {
// this.$message({
// message: ''+yearsDiff+','+yearsDiff+','+(yearsDiff-this.form.planLoop)+',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
},
// List-穿

@ -279,12 +279,12 @@
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<el-table-column label="循环范围开始" align="center" prop="planLoopStart" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180">
<el-table-column label="循环范围结束" align="center" prop="planLoopEnd" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
@ -367,15 +367,7 @@
<el-input v-model="form.planName" placeholder="请输入保养名称"/>
</el-form-item>
</el-col>
<el-col :span=12 :offset="1">
<el-form-item label="保养类型:">
<el-radio v-model="form.upkeep" label="0"></el-radio>
<el-radio v-model="form.upkeep" label="1"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="8" :offset="1">
<el-form-item label="车间:">
<el-select v-model="form.planWorkshop" placeholder="请选择车间" clearable>
<el-option
@ -387,43 +379,57 @@
</el-select>
</el-form-item>
</el-col>
<el-col :offset="1" :span="6" v-if="form.upkeep == 1">
<el-form-item label="循环周期:">
<el-input v-model="form.planLoop" placeholder="请输入循环周期"/>
</el-form-item>
</el-col>
<el-col :span="2" v-if="form.upkeep == 1">
<el-select v-model="form.planLoopType" placeholder="周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-col>
</el-row>
<el-row>
<el-col :span="20">
<el-form-item label-width="160px" label="计划保养时间计算规则:">
<el-form-item label-width="110px" label="保养生成规则:">
<el-radio v-model="form.calculationRule" label="0"></el-radio>
<el-radio v-model="form.calculationRule" label="1"></el-radio>
<el-radio v-model="form.calculationRule" label="2"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row v-if="form.calculationRule == 0">
<el-col :span="20">
<el-form-item label-width="100px" label="保养执行时间">
<el-date-picker
@change="changeArray"
v-model="form.planTimeArray"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-row>
<div v-if="form.calculationRule != '2' ">
<el-col :span="6">
<el-form-item label="循环周期:">
<el-input v-model="form.planLoop" placeholder="请输入循环周期"/>
</el-form-item>
</el-col>
<el-col :span="2">
<el-select v-model="form.planLoopType" placeholder="周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-col>
<el-col :span="15" :offset="1">
<el-form-item label-width="100px" label="保养时间范围">
<el-date-picker
@change="changeArray"
v-model="form.planTimeArray"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
</el-col>
</div>
<div v-else>
<el-col :span="8">
<el-form-item label-width="100px" label="保养开始时间">
<el-date-picker
v-model="form.planLoopStart"
type="date"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</div>
</el-row>
<el-row>
<el-col :span="20">
@ -1050,7 +1056,7 @@ export default {
type: 'success'
})
},
//
// -
changeArray(e) {
console.log(e)
console.log(this.form.planTimeArray)
@ -1070,79 +1076,79 @@ export default {
this.form.planTimeArray = [];
return
}
//
if (this.form.planLoopType == 'day') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let days = Math.floor(diff / (1000 * 60 * 60 * 24));
if (days > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + days + '天,循环周期为' + days + '天,超过循环周期' + (days - this.form.planLoop) + '天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'week') {
//
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
//
let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
if (weeks > (this.form.planLoop / 7)) {
this.$message({
message: '可执行时间范围为' + weeks + '周,循环周期为' + weeks + '周,超过循环周期' + (weeks * 7 - this.form.planLoop) + '天,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'month') {
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + monthsDiff + '月,循环周期为' + monthsDiff + '月,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'season') {
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
if (monthsDiff * 3 > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + monthsDiff * 3 + '季度,循环周期为' + monthsDiff * 3 + '季度,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
if (this.form.planLoopType == 'year') {
//
let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
if (yearsDiff > this.form.planLoop) {
this.$message({
message: '可执行时间范围为' + yearsDiff + '年,循环周期为' + yearsDiff + '年,超过循环周期' + (yearsDiff - this.form.planLoop) + '年,请重新选择执行时间!',
type: 'warning'
})
this.form.planTimeArray = [];
return
}
}
//
// //
// if (this.form.planLoopType == 'day') {
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let days = Math.floor(diff / (1000 * 60 * 60 * 24));
//
// if (days > this.form.planLoop) {
// this.$message({
// message: '' + days + ',' + days + ',' + (days - this.form.planLoop) + ',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'week') {
// //
// let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
// //
// let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
//
// if (weeks > (this.form.planLoop / 7)) {
// this.$message({
// message: '' + weeks + ',' + weeks + ',' + (weeks * 7 - this.form.planLoop) + ',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'month') {
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff > this.form.planLoop) {
// this.$message({
// message: '' + monthsDiff + ',' + monthsDiff + ',' + (monthsDiff - this.form.planLoop) + ',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'season') {
// let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
//
// if (monthsDiff * 3 > this.form.planLoop) {
// this.$message({
// message: '' + monthsDiff * 3 + ',' + monthsDiff * 3 + ',' + (monthsDiff - this.form.planLoop) + ',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
//
// if (this.form.planLoopType == 'year') {
// //
// let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
//
// if (yearsDiff > this.form.planLoop) {
// this.$message({
// message: '' + yearsDiff + ',' + yearsDiff + ',' + (yearsDiff - this.form.planLoop) + ',',
// type: 'warning'
// })
// this.form.planTimeArray = [];
// return
// }
// }
},
//

Loading…
Cancel
Save