|
|
@@ -16,6 +16,16 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="起止时间:" class="shijian">
|
|
|
+ <el-date-picker v-model="select_datetime" type="daterange" align="center" unlink-panels
|
|
|
+ range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="dateChange"
|
|
|
+ value-format="yyyy-MM-dd" :picker-options="pickerOptions" class="shijian_plus">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="日均消费低于:">
|
|
|
+ <el-input-number v-model="num" @change="change_num" :precision="2" :step="0.01" :max="1000"
|
|
|
+ class="rijunxiaofei_input"></el-input-number>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -24,65 +34,21 @@
|
|
|
<el-col :span="24" class="third-row">
|
|
|
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
|
|
|
highlight-current-row>
|
|
|
- <el-table-column align="center" label="楼栋号" width="300">
|
|
|
- <template slot-scope="scope">{{ scope.row.stu_number }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="user_name" label="宿舍号" align="center" width="400"></el-table-column>
|
|
|
- <el-table-column prop="balance" label="消费金额(元)" align="center" show-overflow-tooltip>
|
|
|
+ <el-table-column align="center" label="楼栋号" width="200">
|
|
|
+ <template slot-scope="scope">{{ scope.row.build }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" align="center" width="380">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-button type="text" v-if="handle" @click="handleShowDialog(scope.$index, scope.row)">未处理
|
|
|
- </el-button>
|
|
|
- <el-button type="text" class="exception" v-else>已处理</el-button>
|
|
|
- </template>
|
|
|
+ <el-table-column prop="dom" label="宿舍号" align="center" width="200"></el-table-column>
|
|
|
+ <el-table-column prop="use_amount" label="消费金额(元)" align="center"></el-table-column>
|
|
|
+ <el-table-column prop="begin_time" label="时间" align="center">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <div style="margin-top: 20px" class="table-footer">
|
|
|
- <div class="pages">
|
|
|
- <el-pagination layout="prev, pager, next" :current-page.sync="currentPage"
|
|
|
- :hide-on-single-page="true" :page-size="pageRows" :total="rows_total"
|
|
|
- @current-change="handleCurrentChange"></el-pagination>
|
|
|
- </div>
|
|
|
+ <div class="pages">
|
|
|
+ <el-pagination layout="prev, pager, next" :current-page.sync="currentPage"
|
|
|
+ :hide-on-single-page="true" :page-size="pageRows" :total="rows_total"
|
|
|
+ @current-change="handleCurrentChange"></el-pagination>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="forth-row">
|
|
|
- <!-- 操作对话框 -->
|
|
|
- <el-dialog title="用水异常处理" :visible.sync="detail_dialogFormVisible" width="640px" top="0vh"
|
|
|
- class="my-dialog" :close-on-click-modal="false" :close-on-press-escape="false">
|
|
|
- <hr
|
|
|
- style="width: 100%; position: absolute; top: 60px; left: 0px;background-color: #CCCCCC;height: 1px;border: 0;">
|
|
|
- <el-form :inline="true" class="demo-form-inline">
|
|
|
- <el-form-item label="姓名:" class="shuibiaoId">
|
|
|
- <el-input v-model="detail_userName" placeholder="请输入姓名" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item>
|
|
|
- <el-button type="primary" @click="onSearch">查找</el-button>
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
- <el-table ref="multipleTable" :data="detail_tableData" tooltip-effect="dark" style="width: 100%"
|
|
|
- highlight-current-row>
|
|
|
- <el-table-column align="center" label="学号">
|
|
|
- <template slot-scope="scope">{{ scope.row.stu_number }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="user_name" label="姓名" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="center" prop="use_amount" label="用水量" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
- <div class="dialog-pages">
|
|
|
- <el-pagination layout="prev, pager, next"
|
|
|
- :current-page.sync="control_table.detail_current_page" :hide-on-single-page="true"
|
|
|
- :page-size="control_table.detail_page_rows" @current-change="handleCurrentChange"
|
|
|
- :total="control_table.detail_total_rows"></el-pagination>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -105,86 +71,130 @@
|
|
|
pageRows: 8, // 每页记录数
|
|
|
tableData: [], // 异常列表
|
|
|
rows_total: 0, // 总行数
|
|
|
- // 详情对话框相关参数
|
|
|
- detail_dialogFormVisible: false, // 控制详情对话框显示、隐藏
|
|
|
- detail_userName: '', // 姓名用于查询
|
|
|
- detail_tableData: [],
|
|
|
- control_table: {
|
|
|
- detail_current_page: 1,
|
|
|
- detail_page_rows: 8,
|
|
|
- detail_total_rows: 0
|
|
|
+ pickerOptions: {
|
|
|
+ shortcuts: [{
|
|
|
+ text: '最近一周',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '最近一个月',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ text: '最近三个月',
|
|
|
+ onClick(picker) {
|
|
|
+ const end = new Date();
|
|
|
+ const start = new Date();
|
|
|
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
|
|
+ picker.$emit('pick', [start, end]);
|
|
|
+ }
|
|
|
+ }]
|
|
|
},
|
|
|
- handle: true
|
|
|
+ select_datetime: '', // 选择的时间范围
|
|
|
+ startTime: '',
|
|
|
+ endTime: '',
|
|
|
+ num: 0.00
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
// 填充楼栋号
|
|
|
this.getBuildsFillSelect()
|
|
|
|
|
|
- // 获取余额列表
|
|
|
+ // 分页参数
|
|
|
let params = {
|
|
|
page: this.currentPage,
|
|
|
rows: this.pageRows
|
|
|
}
|
|
|
- // 异常列表
|
|
|
- this.get_exception_list(params)
|
|
|
+ // 用水异常列表
|
|
|
+ this.get_use_water_exception_list(params)
|
|
|
},
|
|
|
methods: {
|
|
|
/**
|
|
|
- * 列表改变页码
|
|
|
+ * 选择起止日期
|
|
|
* @param {Object} val
|
|
|
*/
|
|
|
- handleCurrentChange(val) {
|
|
|
- // console.log(val);
|
|
|
- this.currentPage = val
|
|
|
- var params = {}
|
|
|
- if (this.searchformUser != '' & typeof(this.searchformUser) != 'undefined') {
|
|
|
- params = {
|
|
|
- page: this.currentPage,
|
|
|
- rows: this.pageRows,
|
|
|
- user_name: this.searchformUser
|
|
|
- }
|
|
|
+ dateChange(val) {
|
|
|
+ this.startTime = val[0]
|
|
|
+ this.endTime = val[1]
|
|
|
+
|
|
|
+ if (this.startTime == this.endTime) {
|
|
|
+ this.$message.error('起止日期不能为同一天!')
|
|
|
} else {
|
|
|
- params = {
|
|
|
- page: this.currentPage,
|
|
|
- rows: this.pageRows
|
|
|
- }
|
|
|
+ this.handleCurrentChange(1)
|
|
|
}
|
|
|
- // 获取余额列表
|
|
|
- // this.get_amount_list(params)
|
|
|
},
|
|
|
/**
|
|
|
- * 处理异常
|
|
|
- * @param {Object} index
|
|
|
- * @param {Object} row
|
|
|
+ * 改变日消费金额
|
|
|
+ * @param {Object} currentValue
|
|
|
+ * @param {Object} oldValue
|
|
|
+ */
|
|
|
+ change_num(currentValue, oldValue) {
|
|
|
+ // console.log(currentValue, oldValue);
|
|
|
+ this.num = currentValue
|
|
|
+
|
|
|
+ this.handleCurrentChange(1)
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 列表改变页码
|
|
|
+ * @param {Object} val
|
|
|
*/
|
|
|
- handleShowDialog(index, row) {
|
|
|
- console.log(index, row)
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ // console.log(val);
|
|
|
+ this.currentPage = val
|
|
|
+ var params = {
|
|
|
+ page: this.currentPage,
|
|
|
+ rows: this.pageRows
|
|
|
+ }
|
|
|
+ if (this.drom != '' & typeof(this.drom) != 'undefined') {
|
|
|
+ params.build = this.drom
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.startTime != '' & typeof(this.startTime) != 'undefined') {
|
|
|
+ params.begin_time = this.startTime
|
|
|
+ }
|
|
|
+
|
|
|
+ if (this.endTime != '' & typeof(this.endTime) != 'undefined') {
|
|
|
+ params.end_time = this.endTime
|
|
|
+ }
|
|
|
+
|
|
|
+ if (parseFloat(this.num) > 0.00) {
|
|
|
+ params.use_amount = this.num
|
|
|
+ }
|
|
|
+
|
|
|
+ // 用水异常列表
|
|
|
+ this.get_use_water_exception_list(params)
|
|
|
},
|
|
|
/**
|
|
|
- * 获取余额列表
|
|
|
+ * 用水异常列表
|
|
|
*/
|
|
|
- get_exception_list(params) {
|
|
|
+ get_use_water_exception_list(params) {
|
|
|
var _this = this
|
|
|
_this.tableData = []
|
|
|
// _this.rows_total = 0
|
|
|
- this.$axios.get('/jxch-smartmp-api/HotWaters/waterMoney.action', {
|
|
|
+ this.$axios.get('/jxch-smartmp-api/HotWaters/waterqueryErrorWater.action', {
|
|
|
params: params
|
|
|
})
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
if (typeof(res.data.rows) != 'undefined' && res.data.rows != '' && JSON.stringify(res.data) !=
|
|
|
'{}') {
|
|
|
- // _this.$message.success('数据加载成功!');
|
|
|
_this.tableData = res.data.rows
|
|
|
_this.rows_total = res.data.total
|
|
|
} else {
|
|
|
- _this.$message.success('【获取余额列表】暂无数据!');
|
|
|
+ _this.$message.success('【用水异常】暂无数据!');
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
// console.log(err);
|
|
|
- _this.$message.error('【获取余额列表】请求异常: ' + err);
|
|
|
+ _this.$message.error('【用水异常】请求异常: ' + err);
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
|
@@ -231,19 +241,15 @@
|
|
|
// console.log(obj);
|
|
|
this.drom_options.value = obj.value
|
|
|
this.drom_options.label = obj.label
|
|
|
- // 获取楼栋号
|
|
|
- this.drom = this.drom_options.label
|
|
|
+ if (this.drom_options.label != '全部') {
|
|
|
+ // 获取楼栋号
|
|
|
+ this.drom = this.drom_options.label
|
|
|
+ } else {
|
|
|
+ this.drom = ''
|
|
|
+ }
|
|
|
|
|
|
// 共用部分
|
|
|
- // this.updateData()
|
|
|
- },
|
|
|
- /**
|
|
|
- * 详情页面查找
|
|
|
- */
|
|
|
- onSearch() {
|
|
|
- this.control_table.detail_current_page = 1
|
|
|
-
|
|
|
- // this.show_detail()
|
|
|
+ this.handleCurrentChange(1)
|
|
|
}
|
|
|
}
|
|
|
}
|