|
@@ -7,7 +7,7 @@
|
|
|
<el-select v-model="getdataListParm.parammaps.departmentName" clearable placeholder="部门" class="filter-item">
|
|
|
<el-option v-for="item in findAllDepart" :key="item.id" :label="item.name" :value="item.name" />
|
|
|
</el-select>
|
|
|
- <el-autocomplete ref="cardNumber" v-model="getdataListParm.parammaps.cardNumber" style="width:300px" value-key="cardNumber" class="inline-input filter-item" :fetch-suggestions="cardNumberSearch" placeholder="请选择油卡编号" @select="handlecardNumberSelect">
|
|
|
+ <el-autocomplete ref="cardNumber" v-model="getdataListParm.parammaps.cardNumber" style="width:300px" value-key="cardNumber" class="inline-input filter-item" :fetch-suggestions="cardNumberSearch" placeholder="请选择油卡编号" @select="handlecardNumberSelect">
|
|
|
<template slot-scope="{ item }">
|
|
|
<div class="name" style="display: inline;">{{ item.cardNumber }}</div>
|
|
|
</template>
|
|
@@ -54,7 +54,7 @@
|
|
|
<span v-else>停用</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="350" class-name="small-padding fixed-width" fixed="right">
|
|
|
+ <el-table-column label="操作" align="center" width="420" class-name="small-padding fixed-width" fixed="right">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-button v-if="row.enable == 0" type="success" size="mini" @click="form_edit(row)">编辑</el-button>
|
|
|
<el-button type="success" size="mini" @click="handleChange(row)">变更记录</el-button>
|
|
@@ -62,6 +62,7 @@
|
|
|
<el-button v-if="row.enable == 0" type="danger" size="mini" @click="handleDisable(row)">停用</el-button>
|
|
|
<el-button v-else type="danger" size="mini" @click="handleDisable(row)">启用</el-button>
|
|
|
<el-button v-if="row.enable == 1" type="danger" size="mini" @click="form_delete(row)">删除</el-button>
|
|
|
+ <el-button type="warning" size="mini" @click="handleHistory(row)">历史数据</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -239,6 +240,118 @@
|
|
|
<el-button @click="rechargeFFormVisible = false">取消并关闭</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 历史数据 -->
|
|
|
+ <el-dialog title="历史数据" :visible.sync="historyVisible" :close-on-click-modal="false" width="80%">
|
|
|
+ <div>
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <el-form ref="temp" :inline="true" :model="getdataHistory.parammaps" >
|
|
|
+ <el-row >
|
|
|
+ <el-col :span="10">
|
|
|
+ <el-form-item label="日期:" prop="dateFormat" >
|
|
|
+ <el-date-picker ref="inputDatetime" style="width: 280px;" v-model="getdataHistory.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="8">
|
|
|
+ <el-form-item label="设备编号:" prop="assetNumber" >
|
|
|
+ <el-input ref="rechargeNum" placeholder="设备编号" v-model="getdataHistory.parammaps.assetNumber" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="searchHistory">搜索</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <!-- 数据查看 -->
|
|
|
+ <el-table
|
|
|
+ :key="tableKey"
|
|
|
+ v-loading="listLoading"
|
|
|
+ element-loading-text="给我一点时间"
|
|
|
+ :data="historyList"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ style="width: 100%;"
|
|
|
+ :row-style="rowStyle"
|
|
|
+ :cell-style="cellStyle"
|
|
|
+ ref="histoyTable"
|
|
|
+ >
|
|
|
+ <el-table-column label="序号" align="center" type="index" width="50px">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="牧场" width="90px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.pastureName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="部门" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.departName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="交易时间" sortable prop="selTime" width="90px" align="center" />
|
|
|
+ <el-table-column label="车号" min-width="110px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.assetNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="加油工" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.empId }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="卡号" width="90px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.cardNumber }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="卡类型" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.cardType }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="本次加油量(升)" sortable prop="oilAmount" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.oilAmount }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="本次消费金额(元)" sortable prop="nowPrice" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.nowPrice }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="录用人" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.employName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="柴油类型" width="80px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.oilName }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" min-width="110px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.note }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="操作" align="center" width="200px" class-name="small-padding fixed-width" fixed="right">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button v-if="isDieselModify" type="success" size="mini" @click="handleDieselUpdate(row)">编辑</el-button>
|
|
|
+ <el-button v-if="isDieselDel" type="danger" size="mini" @click="handleDieselDel(row)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column> -->
|
|
|
+ </el-table>
|
|
|
+ <pagination v-show="total>0" :total="total" :page.sync="getdataHistory.offset" :limit.sync="getdataHistory.pagecount" @pagination="getHistory" />
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <!-- <el-button type="primary" @click="createRechargeData()">确认</el-button> -->
|
|
|
+ <el-button @click="historyVisible = false">关闭</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -258,6 +371,20 @@ export default {
|
|
|
directives: { waves },
|
|
|
data() {
|
|
|
return {
|
|
|
+ historyList:[],
|
|
|
+ getdataHistory: {
|
|
|
+ name: 'getDieselListByOilcard',
|
|
|
+ page: 1,
|
|
|
+ offset: 1,
|
|
|
+ pagecount: 100,
|
|
|
+ returntype: 'Map',
|
|
|
+ parammaps: {
|
|
|
+ selTime: '',
|
|
|
+ pastureName: Cookies.get('pasturename'),
|
|
|
+ departName: '',
|
|
|
+ inputDatetime:['','']
|
|
|
+ }
|
|
|
+ },
|
|
|
myHeight:document.documentElement.clientHeight - 85- 200,
|
|
|
isOtherinfoExport:[],
|
|
|
buttons:[],
|
|
@@ -331,6 +458,7 @@ export default {
|
|
|
changeFormVisible: false,
|
|
|
rechargeFormVisible: false,
|
|
|
rechargeFFormVisible: false,
|
|
|
+ historyVisible: false,
|
|
|
tabledialogStatus: '',
|
|
|
dialogStatus: '',
|
|
|
textMap: { update: '编辑', create: '新增', change: '变更记录', recharge: '充值记录', changeF: '换卡', rechargeF: '充值' },
|
|
@@ -390,6 +518,52 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ searchHistory() {
|
|
|
+ this.listLoading = true
|
|
|
+ this.getdataHistory.offset = 1
|
|
|
+ if (this.getdataHistory.parammaps.inputDatetime.length < 1) {
|
|
|
+ this.c.parammaps.inputDatetime = ''
|
|
|
+ this.getdataHistory.parammaps.startTime = ''
|
|
|
+ this.getdataHistory.parammaps.stopTime = ''
|
|
|
+ } else {
|
|
|
+ this.getdataHistory.parammaps.startTime = parseTime(this.getdataHistory.parammaps.inputDatetime[0], '{y}-{m}-{d}')
|
|
|
+ this.getdataHistory.parammaps.stopTime = parseTime(this.getdataHistory.parammaps.inputDatetime[1], '{y}-{m}-{d}')
|
|
|
+ }
|
|
|
+ this.getHistory();
|
|
|
+ },
|
|
|
+ // 查查看历史数据
|
|
|
+ handleHistory(row) {
|
|
|
+ this.historyVisible = true;
|
|
|
+ const start = new Date()
|
|
|
+ const end = new Date()
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30)
|
|
|
+ this.getdataHistory.parammaps.inputDatetime[0] = parseTime(start, '{y}-{m}-{d}')
|
|
|
+ this.getdataHistory.parammaps.inputDatetime[1] = parseTime(end, '{y}-{m}-{d}')
|
|
|
+ this.getdataHistory.parammaps.startTime = parseTime(start, '{y}-{m}-{d}')
|
|
|
+ this.getdataHistory.parammaps.stopTime = parseTime(end, '{y}-{m}-{d}')
|
|
|
+ this.getdataHistory.parammaps.cardNumber = row.cardNumber;
|
|
|
+ this.getdataHistory.parammaps.id = row.id;
|
|
|
+ this.getHistory();
|
|
|
+ },
|
|
|
+ // 获取历史数据
|
|
|
+ getHistory() {
|
|
|
+ this.listLoading = true
|
|
|
+ GetDataByName(this.getdataHistory).then(response => {
|
|
|
+ if (response.data.list == null) {
|
|
|
+ this.historyList = []
|
|
|
+ } else {
|
|
|
+ this.historyList = response.data.list
|
|
|
+ this.pageNum = response.data.pageNum
|
|
|
+ this.pageSize = response.data.pageSize
|
|
|
+ if (response.data.total) {
|
|
|
+ this.total = response.data.total
|
|
|
+ }
|
|
|
+ }
|
|
|
+ setTimeout(() => {
|
|
|
+ this.listLoading = false
|
|
|
+ }, 100)
|
|
|
+ })
|
|
|
+ },
|
|
|
get_auto_buttons() {
|
|
|
// 导出
|
|
|
const OtherinfoExport = 'basic:otherinfo:otherinfoExport'
|
|
@@ -677,6 +851,7 @@ export default {
|
|
|
this.getchangedataListParmList2(row)
|
|
|
},
|
|
|
|
|
|
+
|
|
|
getchangedataListParmList2(row) {
|
|
|
this.changelistLoading = true
|
|
|
this.getchangedataListParm2 = {}
|