|
@@ -604,10 +604,14 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="混料统计" name="second">
|
|
|
<div class="search">
|
|
|
- <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 230px;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
|
|
|
+ <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="float: left;" type="date" placeholder="选择日期"> </el-date-picker>
|
|
|
+ <!-- <el-date-picker v-model="tab2.table.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 230px;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" /> -->
|
|
|
<el-button class="el-icon-arrow-left elIconArrowLeft" style="float: left;" :disabled="Beforedisabled2" @click="handleBefore2" />
|
|
|
<el-button class="el-icon-arrow-right elIconArrowRight" style="float: left;" :disabled="Nextdisabled2" @click="handleNext2" />
|
|
|
- <el-input v-model="tab2.table.getdataListParm.parammaps.tmrtname" style="width: 110px;" placeholder="TMR名称" class="filter-item" clearable />
|
|
|
+ <el-select v-model="tab2.table.getdataListParm.parammaps.tmrtname" placeholder="TMR设备" class="filter-item" style="width: 120px;">
|
|
|
+ <el-option v-for="(item,index) in tab2.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="tab2.table.getdataListParm.parammaps.tmrtname" style="width: 110px;" placeholder="TMR名称" class="filter-item" clearable /> -->
|
|
|
<el-input v-model="tab2.table.getdataListParm.parammaps.projname" style="width: 110px;" placeholder="车次" class="filter-item" clearable />
|
|
|
<el-select v-model="tab2.table.getdataListParm.parammaps.times" style="width: 110px;" filterable placeholder="班次" class="filter-item" clearable>
|
|
|
<el-option v-for="item in tab2.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
|
|
@@ -663,10 +667,14 @@
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="撒料统计" name="third">
|
|
|
<div class="search">
|
|
|
- <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 230px;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
|
|
|
+ <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime2" :clearable="false" style="float: left;" type="date" placeholder="选择日期"> </el-date-picker>
|
|
|
+ <!-- <el-date-picker v-model="tab3.table.getdataListParm.parammaps.inputDatetime" :clearable="false" style="width: 230px;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" /> -->
|
|
|
<el-button class="el-icon-arrow-left elIconArrowLeft" style="float: left;" :disabled="Beforedisabled3" @click="handleBefore3" />
|
|
|
<el-button class="el-icon-arrow-right elIconArrowRight" style="float: left;" :disabled="Nextdisabled3" @click="handleNext3" />
|
|
|
- <el-input v-model="tab3.table.getdataListParm.parammaps.tmrtname" style="width: 110px;" placeholder="TMR名称" class="filter-item" clearable />
|
|
|
+ <el-select v-model="tab3.table.getdataListParm.parammaps.tmrtname" placeholder="TMR设备" class="filter-item" style="width: 120px;">
|
|
|
+ <el-option v-for="(item,index) in tab3.TMRNameList" :key="index" :label="item.tmrloadname" :value="item.tmrloadname" />
|
|
|
+ </el-select>
|
|
|
+ <!-- <el-input v-model="tab3.table.getdataListParm.parammaps.tmrtname" style="width: 110px;" placeholder="TMR名称" class="filter-item" clearable /> -->
|
|
|
<el-input v-model="tab3.table.getdataListParm.parammaps.projname" style="width: 110px;" placeholder="车次" class="filter-item" clearable />
|
|
|
<el-select v-model="tab3.table.getdataListParm.parammaps.times" style="width: 100px;" filterable placeholder="班次" class="filter-item" clearable>
|
|
|
<el-option v-for="item in tab3.frequencyList" :key="item.id" :label="item.name" :value="item.id" />
|
|
@@ -720,6 +728,18 @@
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
+ <!-- 导出 -->
|
|
|
+ <el-dialog :title="textMap[exportList.dialogStatus]" :visible.sync="exportList.dialogFormVisible" :close-on-click-modal="false" width="20%">
|
|
|
+ <div>
|
|
|
+ <span>导出时间范围:</span>
|
|
|
+ <el-date-picker v-model="exportList.inputDatetime" :clearable="false" style="width: 230px;float: left;" class="inputDatetime filter-item" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-bottom: 10px;">
|
|
|
+ <el-button class="cancelClose" @click="exportList.dialogFormVisible = false">关闭</el-button>
|
|
|
+ <el-button class="save" v-if="activeName=='first'" :disabled="isokDisable" @click="exportList2()">确认2</el-button>
|
|
|
+ <el-button class="save" v-else :disabled="isokDisable" @click="exportList3()">确认3</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 查看 -->
|
|
|
<See :show.sync="isShowDialog" :row-pid="rowPid" :title-fname="titlefname" />
|
|
|
</div>
|
|
@@ -1165,6 +1185,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
tab2: {
|
|
|
+ TMRNameList:[],
|
|
|
table: {
|
|
|
getdataListParm: {
|
|
|
name: 'getStatisticsHL',
|
|
@@ -1177,6 +1198,7 @@ export default {
|
|
|
startTime: parseTime(new Date(), '{y}-{m}-{d}'),
|
|
|
stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
|
|
|
inputDatetime: [new Date(), new Date()],
|
|
|
+ inputDatetime2:new Date(),
|
|
|
tmrtname: '',
|
|
|
projname: '',
|
|
|
times: '',
|
|
@@ -1196,6 +1218,7 @@ export default {
|
|
|
isuseList: [{ id: '0', name: '未完成' }, { id: '2', name: '部分完成' }, { id: '1', name: '全部完成' }]
|
|
|
},
|
|
|
tab3: {
|
|
|
+ TMRNameList:[],
|
|
|
table: {
|
|
|
getdataListParm: {
|
|
|
name: 'getStatisticsSL',
|
|
@@ -1208,6 +1231,7 @@ export default {
|
|
|
startTime: parseTime(new Date(), '{y}-{m}-{d}'),
|
|
|
stopTime: parseTime(new Date(), '{y}-{m}-{d}'),
|
|
|
inputDatetime: [new Date(), new Date()],
|
|
|
+ inputDatetime2: new Date(),
|
|
|
tmrtname: '',
|
|
|
projname: '',
|
|
|
times: '',
|
|
@@ -1233,6 +1257,14 @@ export default {
|
|
|
statisticalTypeList: [{ id: '0', name: '驾驶员' }, { id: '1', name: '配方名称' }, { id: '2', name: '栏舍名称' }, { id: '3', name: '牲畜类别' }, { id: '4', name: '车次' }, { id: '5', name: 'TMR名称' }],
|
|
|
rowStyle: { maxHeight: 30 + 'px', height: 30 + 'px' },
|
|
|
cellStyle: { padding: 0 + 'px' },
|
|
|
+ exportList:{
|
|
|
+ dialogFormVisible:false,
|
|
|
+ inputDatetime: [new Date(), new Date()]
|
|
|
+ },
|
|
|
+ textMap: {
|
|
|
+ exportList: '导出',
|
|
|
+ },
|
|
|
+ isokDisable:false,
|
|
|
myHeight2: document.documentElement.clientHeight - 85 - 210
|
|
|
}
|
|
|
},
|
|
@@ -2076,19 +2108,22 @@ export default {
|
|
|
this.getChart6()
|
|
|
this.getChart7()
|
|
|
} else if (this.activeName == 'second') {
|
|
|
- const start2 = new Date()
|
|
|
- const end2 = new Date()
|
|
|
- start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
|
|
|
- end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
|
|
|
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // const start2 = new Date()
|
|
|
+ // const end2 = new Date()
|
|
|
+ // start2.setTime(start2.getTime() - 3600 * 1000 * 24 * 1)
|
|
|
+ // end2.setTime(end2.getTime() - 3600 * 1000 * 24 * 1)
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime = [start2, end2]
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
this.tab2.table.getdataListParm.parammaps.tmrtname = ''
|
|
|
this.tab2.table.getdataListParm.parammaps.projname = ''
|
|
|
this.tab2.table.getdataListParm.parammaps.times = ''
|
|
|
this.tab2.table.getdataListParm.parammaps.buttontype = ''
|
|
|
this.tab2.table.getdataListParm.parammaps.templetname = ''
|
|
|
this.getTab2List()
|
|
|
+ this.getTMRNameList2()
|
|
|
} else if (this.activeName == 'third') {
|
|
|
const start3 = new Date()
|
|
|
const end3 = new Date()
|
|
@@ -2104,6 +2139,7 @@ export default {
|
|
|
this.tab3.table.getdataListParm.parammaps.templetname = ''
|
|
|
this.tab3.table.getdataListParm.parammaps.buttontype = ''
|
|
|
this.getTab3List()
|
|
|
+ this.getTMRNameList3()
|
|
|
}
|
|
|
},
|
|
|
// 切换统计类型
|
|
@@ -2382,85 +2418,164 @@ export default {
|
|
|
this.getTabList2()
|
|
|
this.getTMRNameList()
|
|
|
},
|
|
|
+ // handleBefore2() {
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
|
|
|
+ // var stop3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
|
|
|
+ // if (stop3 > Date.now() - 8.64e7) {
|
|
|
+ // this.Nextdisabled2 = true
|
|
|
+ // this.Beforedisabled2 = false
|
|
|
+ // } else {
|
|
|
+ // this.Nextdisabled2 = false
|
|
|
+ // this.Beforedisabled2 = false
|
|
|
+ // }
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start3, stop3)
|
|
|
+
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // }
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // this.getTab2List()
|
|
|
+ // this.getTMRNameList2()
|
|
|
+ // },
|
|
|
+ // handleNext2() {
|
|
|
+ // console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime, 'inputDatetime前')
|
|
|
+ // if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
|
|
|
+ // var stop4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
|
|
|
+ // if (stop4 > Date.now() - 8.64e7) {
|
|
|
+ // this.Nextdisabled2 = true
|
|
|
+ // this.Beforedisabled2 = false
|
|
|
+ // } else {
|
|
|
+ // this.Nextdisabled2 = false
|
|
|
+ // this.Beforedisabled2 = false
|
|
|
+ // }
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start4, stop4)
|
|
|
+ // console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime, 'inputDatetime后')
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // }
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // this.getTab2List()
|
|
|
+ // this.getTMRNameList2()
|
|
|
+ // },
|
|
|
handleBefore2() {
|
|
|
this.$forceUpdate()
|
|
|
- if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
|
|
|
- var stop3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
|
|
|
- if (stop3 > Date.now() - 8.64e7) {
|
|
|
+ if (this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== null) {
|
|
|
+ var start3 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime2.getDate() - 1))
|
|
|
+ if (start3 > Date.now() - 8.64e7) {
|
|
|
this.Nextdisabled2 = true
|
|
|
this.Beforedisabled2 = false
|
|
|
} else {
|
|
|
this.Nextdisabled2 = false
|
|
|
this.Beforedisabled2 = false
|
|
|
}
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start3, stop3)
|
|
|
+ this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start3
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start3, '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start3, '{y}-{m}-{d}')
|
|
|
this.getTab2List()
|
|
|
+ this.getTMRNameList2()
|
|
|
},
|
|
|
handleNext2() {
|
|
|
- console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime, 'inputDatetime前')
|
|
|
- if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
|
|
|
- var stop4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
|
|
|
- if (stop4 > Date.now() - 8.64e7) {
|
|
|
+ if (this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime2 !== null) {
|
|
|
+ var start4 = new Date(this.tab2.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab2.table.getdataListParm.parammaps.inputDatetime2.getDate() + 1))
|
|
|
+ if (start4 > Date.now() - 8.64e7) {
|
|
|
this.Nextdisabled2 = true
|
|
|
this.Beforedisabled2 = false
|
|
|
} else {
|
|
|
this.Nextdisabled2 = false
|
|
|
this.Beforedisabled2 = false
|
|
|
}
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime.push(start4, stop4)
|
|
|
- console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime, 'inputDatetime后')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.inputDatetime2 = start4
|
|
|
this.$forceUpdate()
|
|
|
}
|
|
|
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.startTime = parseTime(start4, '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(start4, '{y}-{m}-{d}')
|
|
|
this.getTab2List()
|
|
|
+ this.getTMRNameList2()
|
|
|
},
|
|
|
+ // handleBefore3() {
|
|
|
+ // if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // var start5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
|
|
|
+ // var stop5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start5, stop5)
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // if (stop5 > Date.now() - 8.64e7) {
|
|
|
+ // this.Nextdisabled3 = true
|
|
|
+ // this.Beforedisabled3 = false
|
|
|
+ // } else {
|
|
|
+ // this.Nextdisabled3 = false
|
|
|
+ // this.Beforedisabled3 = false
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // this.getTab3List()
|
|
|
+ // this.getTMRNameList3()
|
|
|
+ // },
|
|
|
+ // handleNext3() {
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // var start6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
|
|
|
+ // var stop6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start6, stop6)
|
|
|
+ // this.$forceUpdate()
|
|
|
+ // if (stop6 > Date.now() - 8.64e7) {
|
|
|
+ // this.Nextdisabled3 = true
|
|
|
+ // this.Beforedisabled3 = false
|
|
|
+ // } else {
|
|
|
+ // this.Nextdisabled3 = false
|
|
|
+ // this.Beforedisabled3 = false
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // this.getTab3List()
|
|
|
+ // this.getTMRNameList3()
|
|
|
+ // },
|
|
|
handleBefore3() {
|
|
|
- if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- var start5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() - 1))
|
|
|
- var stop5 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() - 1))
|
|
|
- this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
- this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start5, stop5)
|
|
|
- this.$forceUpdate()
|
|
|
- if (stop5 > Date.now() - 8.64e7) {
|
|
|
+ this.$forceUpdate()
|
|
|
+ if (this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== null) {
|
|
|
+ var start3 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime2.getDate() - 1))
|
|
|
+ if (start3 > Date.now() - 8.64e7) {
|
|
|
this.Nextdisabled3 = true
|
|
|
this.Beforedisabled3 = false
|
|
|
} else {
|
|
|
this.Nextdisabled3 = false
|
|
|
this.Beforedisabled3 = false
|
|
|
}
|
|
|
+ this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start3
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
|
- this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start3, '{y}-{m}-{d}')
|
|
|
+ this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(start3, '{y}-{m}-{d}')
|
|
|
this.getTab3List()
|
|
|
+ this.getTMRNameList3()
|
|
|
},
|
|
|
handleNext3() {
|
|
|
- this.$forceUpdate()
|
|
|
- if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- var start6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[0].getDate() + 1))
|
|
|
- var stop6 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime[1].getDate() + 1))
|
|
|
- this.tab3.table.getdataListParm.parammaps.inputDatetime.length = 0
|
|
|
- this.tab3.table.getdataListParm.parammaps.inputDatetime.push(start6, stop6)
|
|
|
- this.$forceUpdate()
|
|
|
- if (stop6 > Date.now() - 8.64e7) {
|
|
|
+ if (this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime2 !== null) {
|
|
|
+ var start4 = new Date(this.tab3.table.getdataListParm.parammaps.inputDatetime2.setDate(this.tab3.table.getdataListParm.parammaps.inputDatetime2.getDate() + 1))
|
|
|
+ if (start4 > Date.now() - 8.64e7) {
|
|
|
this.Nextdisabled3 = true
|
|
|
this.Beforedisabled3 = false
|
|
|
} else {
|
|
|
this.Nextdisabled3 = false
|
|
|
this.Beforedisabled3 = false
|
|
|
}
|
|
|
+ this.tab3.table.getdataListParm.parammaps.inputDatetime2 = start4
|
|
|
+ this.$forceUpdate()
|
|
|
}
|
|
|
- this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ this.tab3.table.getdataListParm.parammaps.startTime = parseTime(start4, '{y}-{m}-{d}')
|
|
|
+ this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(start4, '{y}-{m}-{d}')
|
|
|
this.getTab3List()
|
|
|
+ this.getTMRNameList3()
|
|
|
},
|
|
|
// 快速跳转到图表
|
|
|
handleQuickJumpChart() {
|
|
@@ -3583,17 +3698,20 @@ export default {
|
|
|
},
|
|
|
handleSearch2() {
|
|
|
this.tab2.table.getdataListParm.name = 'getStatisticsHL'
|
|
|
- if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
|
|
|
- this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
- } else {
|
|
|
- this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
|
|
|
- this.tab2.table.getdataListParm.parammaps.startTime = ''
|
|
|
- this.tab2.table.getdataListParm.parammaps.stopTime = ''
|
|
|
- }
|
|
|
+ // if (this.tab2.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab2.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // console.log(this.tab2.table.getdataListParm.parammaps.inputDatetime)
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // } else {
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.inputDatetime = ''
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.startTime = ''
|
|
|
+ // this.tab2.table.getdataListParm.parammaps.stopTime = ''
|
|
|
+ // }
|
|
|
+ this.tab2.table.getdataListParm.parammaps.startTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
+ this.tab2.table.getdataListParm.parammaps.stopTime = parseTime(this.tab2.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
this.tab2.table.getdataListParm.offset = 1
|
|
|
this.getTab2List()
|
|
|
+ this.getTMRNameList2()
|
|
|
},
|
|
|
handleRefresh2() {
|
|
|
this.tab2.table.getdataListParm.parammaps.tmrtname = ''
|
|
@@ -3604,15 +3722,55 @@ export default {
|
|
|
this.getTab2List()
|
|
|
},
|
|
|
handleExport2() {
|
|
|
- var excelDatasTab2 = [
|
|
|
- {
|
|
|
- tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
- filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
- tableDatas: this.tab2.table.list,
|
|
|
- sheetName: '混料统计'
|
|
|
+ console.log('导出')
|
|
|
+ this.exportList.dialogFormVisible = true
|
|
|
+ this.exportList.dialogStatus = 'exportList'
|
|
|
+ // var excelDatasTab2 = [
|
|
|
+ // {
|
|
|
+ // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ // tableDatas: this.tab2.table.list,
|
|
|
+ // sheetName: '混料统计'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
|
|
|
+ },
|
|
|
+ exportList2(){
|
|
|
+ this.isokDisable = true
|
|
|
+ var url = 'authdata/GetDataByName'
|
|
|
+ var data = {
|
|
|
+ 'name':"getStatisticsHL",
|
|
|
+ "page":1,"offset":1,"pagecount":"","returntype":"Map",
|
|
|
+ "parammaps":{"pastureid":"1647917519","startTime":"","stopTime":"","templetname":"","isuse":""}
|
|
|
+ }
|
|
|
+ data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
|
|
|
+ data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
|
|
|
+ data.parammaps.tmrtname = this.tab2.table.getdataListParm.parammaps.tmrtname
|
|
|
+ data.parammaps.projname = this.tab2.table.getdataListParm.parammaps.projname
|
|
|
+ data.parammaps.times = this.tab2.table.getdataListParm.parammaps.times
|
|
|
+ data.parammaps.buttontype = this.tab2.table.getdataListParm.parammaps.buttontype
|
|
|
+ data.parammaps.templetname = this.tab2.table.getdataListParm.parammaps.templetname
|
|
|
+ data.parammaps.isuse = this.tab2.table.getdataListParm.parammaps.isuse
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ console.log('混料统计table数据', response.data.list)
|
|
|
+ var exportList = []
|
|
|
+ if (response.data.list !== null) {
|
|
|
+ exportList = response.data.list
|
|
|
+ } else {
|
|
|
+ exportList = []
|
|
|
}
|
|
|
- ]
|
|
|
- json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
|
|
|
+ var excelDatasTab2 = [
|
|
|
+ {
|
|
|
+ tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', ' 跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '饲料', '理论重量', '实际重量', '误差值', '准确率', '计划时间', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ tableDatas: exportList,
|
|
|
+ sheetName: '混料统计'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ json2excel(excelDatasTab2, '混料统计', true, 'xlsx')
|
|
|
+ this.isokDisable = false
|
|
|
+ this.exportList.dialogFormVisible = false
|
|
|
+ })
|
|
|
},
|
|
|
// 撒料统计
|
|
|
getTab3List() {
|
|
@@ -3634,16 +3792,19 @@ export default {
|
|
|
},
|
|
|
handleSearch3() {
|
|
|
this.tab3.table.getdataListParm.name = 'getStatisticsSL'
|
|
|
- if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
- this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
- this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
- } else {
|
|
|
- this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
|
|
|
- this.tab3.table.getdataListParm.parammaps.startTime = ''
|
|
|
- this.tab3.table.getdataListParm.parammaps.stopTime = ''
|
|
|
- }
|
|
|
+ // if (this.tab3.table.getdataListParm.parammaps.inputDatetime !== '' && this.tab3.table.getdataListParm.parammaps.inputDatetime !== null) {
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ // } else {
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.inputDatetime = ''
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.startTime = ''
|
|
|
+ // this.tab3.table.getdataListParm.parammaps.stopTime = ''
|
|
|
+ // }
|
|
|
+ this.tab3.table.getdataListParm.parammaps.startTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
+ this.tab3.table.getdataListParm.parammaps.stopTime = parseTime(this.tab3.table.getdataListParm.parammaps.inputDatetime2, '{y}-{m}-{d}')
|
|
|
this.tab3.table.getdataListParm.offset = 1
|
|
|
this.getTab3List()
|
|
|
+ this.getTMRNameList3()
|
|
|
},
|
|
|
handleRefresh3() {
|
|
|
this.tab3.table.getdataListParm.parammaps.tmrtname = ''
|
|
@@ -3655,15 +3816,54 @@ export default {
|
|
|
this.getTab3List()
|
|
|
},
|
|
|
handleExport3() {
|
|
|
- var excelDatasTab3 = [
|
|
|
- {
|
|
|
- tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
- filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
- tableDatas: this.tab3.table.list,
|
|
|
- sheetName: '撒料统计'
|
|
|
+ this.exportList.dialogFormVisible = true
|
|
|
+ this.exportList.dialogStatus = 'exportList'
|
|
|
+ // var excelDatasTab3 = [
|
|
|
+ // {
|
|
|
+ // tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ // filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ // tableDatas: this.tab3.table.list,
|
|
|
+ // sheetName: '撒料统计'
|
|
|
+ // }
|
|
|
+ // ]
|
|
|
+ // json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
|
|
|
+ },
|
|
|
+ exportList3(){
|
|
|
+ this.isokDisable = true
|
|
|
+ var url = 'authdata/GetDataByName'
|
|
|
+ var data = {
|
|
|
+ 'name':"getStatisticsSL",
|
|
|
+ "page":1,"offset":1,"pagecount":"","returntype":"Map",
|
|
|
+ "parammaps":{"pastureid":"1647917519","startTime":"","stopTime":"","templetname":"","isuse":""}
|
|
|
+ }
|
|
|
+ data.parammaps.startTime = parseTime(this.exportList.inputDatetime[0],'{y}-{m}-{d}')
|
|
|
+ data.parammaps.stopTime = parseTime(this.exportList.inputDatetime[1],'{y}-{m}-{d}')
|
|
|
+ data.parammaps.tmrtname = this.tab3.table.getdataListParm.parammaps.tmrtname
|
|
|
+ data.parammaps.projname = this.tab3.table.getdataListParm.parammaps.projname
|
|
|
+ data.parammaps.times = this.tab3.table.getdataListParm.parammaps.times
|
|
|
+ data.parammaps.buttontype = this.tab3.table.getdataListParm.parammaps.buttontype
|
|
|
+ data.parammaps.templetname = this.tab3.table.getdataListParm.parammaps.templetname
|
|
|
+ data.parammaps.isuse = this.tab3.table.getdataListParm.parammaps.isuse
|
|
|
+ postJson(url,data).then(response => {
|
|
|
+ console.log('混料统计table数据', response.data.list)
|
|
|
+ var exportList = []
|
|
|
+ if (response.data.list !== null) {
|
|
|
+ exportList = response.data.list
|
|
|
+ } else {
|
|
|
+ exportList = []
|
|
|
}
|
|
|
- ]
|
|
|
- json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
|
|
|
+ var excelDatasTab3 = [
|
|
|
+ {
|
|
|
+ tHeader: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ filterVal: ['日期', 'TMR名称', '车次', '班次', '配方名称', '栏舍', '理论重量', '实际重量', '误差值', '准确率', '开始时间', '结束时间', '跳转方式', '开始重量', '结束重量', '搅拌时间'],
|
|
|
+ tableDatas: exportList,
|
|
|
+ sheetName: '撒料统计'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ json2excel(excelDatasTab3, '撒料统计', true, 'xlsx')
|
|
|
+ this.isokDisable = false
|
|
|
+ this.exportList.dialogFormVisible = false
|
|
|
+ })
|
|
|
},
|
|
|
handleSee(row) {
|
|
|
if (this.tab.radio == 1) {
|
|
@@ -3695,6 +3895,36 @@ export default {
|
|
|
this.tab.TMRNameList = []
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ getTMRNameList2(){
|
|
|
+ var data = {}
|
|
|
+ data.name = 'getAccuracyMCTmrName'
|
|
|
+ data.parammaps = {}
|
|
|
+ data.parammaps.pastureid = Cookies.get('pastureid')
|
|
|
+ data.parammaps.startTime = this.tab2.table.getdataListParm.parammaps.startTime
|
|
|
+ data.parammaps.stopTime = this.tab2.table.getdataListParm.parammaps.stopTime
|
|
|
+ GetDataByName(data).then(response => {
|
|
|
+ if(response.data.list !== null){
|
|
|
+ this.tab2.TMRNameList = response.data.list
|
|
|
+ }else{
|
|
|
+ this.tab2.TMRNameList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getTMRNameList3(){
|
|
|
+ var data = {}
|
|
|
+ data.name = 'getAccuracyMCTmrName'
|
|
|
+ data.parammaps = {}
|
|
|
+ data.parammaps.pastureid = Cookies.get('pastureid')
|
|
|
+ data.parammaps.startTime = this.tab3.table.getdataListParm.parammaps.startTime
|
|
|
+ data.parammaps.stopTime = this.tab3.table.getdataListParm.parammaps.stopTime
|
|
|
+ GetDataByName(data).then(response => {
|
|
|
+ if(response.data.list !== null){
|
|
|
+ this.tab3.TMRNameList = response.data.list
|
|
|
+ }else{
|
|
|
+ this.tab3.TMRNameList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|