查询的时间段改成两个字段;会员数据更新记录增加导出;场地预约增加单位预约和审核流程
This commit is contained in:
@@ -39,15 +39,13 @@ layout("/layouts/platform.html"){
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-date-picker
|
||||
end-placeholder="购置日期"
|
||||
format="yyyy 年 MM 月 dd 日"
|
||||
range-separator="-"
|
||||
start-placeholder="购置日期"
|
||||
type="daterange"
|
||||
v-model="time"
|
||||
value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
<el-date-picker clearable type="date" style="width: 180px"
|
||||
placeholder="购置开始" v-model="dateStart"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
<span class="mr5">至</span>
|
||||
<el-date-picker clearable type="date" style="width: 180px"
|
||||
placeholder="购置结束" v-model="dateEnd"
|
||||
value-format="yyyy-MM-dd"></el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button mt5">
|
||||
<el-select placeholder="请选择资产类型" v-model="pageForm.zcghlx">
|
||||
@@ -317,6 +315,8 @@ layout("/layouts/platform.html"){
|
||||
el: '#app',
|
||||
data: function () {
|
||||
return {
|
||||
dateStart: "",
|
||||
dateEnd: "",
|
||||
pageForm: {
|
||||
searchName: "",
|
||||
searchKeyword: "",
|
||||
@@ -345,7 +345,24 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 两个日期框合成为原接口的起止数组;两端清空表示不限定日期,单端或倒置时停止查询。
|
||||
syncDateRange() {
|
||||
const start = this.dateStart
|
||||
const end = this.dateEnd
|
||||
if ((!start && end) || (start && !end)) {
|
||||
this.$message.warning('请选择完整的购置开始和购置结束')
|
||||
return false
|
||||
}
|
||||
if (start && end && start > end) {
|
||||
this.$message.warning('购置开始不能晚于购置结束')
|
||||
return false
|
||||
}
|
||||
this.$set(this, 'time', start && end ? [start, end] : [])
|
||||
return true
|
||||
},
|
||||
|
||||
doAllExport() {
|
||||
if (!this.syncDateRange()) return
|
||||
const {searchKeyword, searchName, zczt, zcghlx, ghid} = this.pageForm
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
@@ -365,16 +382,9 @@ layout("/layouts/platform.html"){
|
||||
doExport(id) {
|
||||
window.location.href = '/platform/zcgl/tzgl/downloadrzd?id=' + id
|
||||
},
|
||||
doSearch: function () {
|
||||
|
||||
if (this.time != "" && this.time != null) {
|
||||
this.pageForm.startTime = this.time[0];
|
||||
this.pageForm.endTime = this.time[1];
|
||||
} else {
|
||||
this.pageForm.startTime = null;
|
||||
this.pageForm.endTime = null;
|
||||
}
|
||||
this.pageForm.pageNumber = 1;
|
||||
doSearch() {
|
||||
if (!this.syncDateRange()) return
|
||||
this.$set(this.pageForm, 'pageNumber', 1)
|
||||
this.pageData();
|
||||
},
|
||||
pageOrder: function (column) {//按字段排序
|
||||
@@ -398,21 +408,27 @@ layout("/layouts/platform.html"){
|
||||
this.pageForm.pageSize = val;
|
||||
this.pageData();
|
||||
},
|
||||
pageData: function () {//加载分页数据
|
||||
var self = this;
|
||||
sublime.showLoadingbar();//显示loading
|
||||
$.post(base + "/platform/zcgl/zhcx/data", self.pageForm, function (data) {
|
||||
sublime.closeLoadingbar();//关闭loading
|
||||
pageData() {
|
||||
if (!this.syncDateRange()) return
|
||||
this.$set(this.pageForm, "startTime", this.dateStart || null)
|
||||
this.$set(this.pageForm, "endTime", this.dateEnd || null)
|
||||
sublime.showLoadingbar();
|
||||
this.$set(this, "tableLoading", true)
|
||||
return $.post(base + "/platform/zcgl/zhcx/data", this.pageForm).then((data) => {
|
||||
if (data.code == 0) {
|
||||
self.tableData = data.data.list;
|
||||
self.pageForm.totalCount = data.data.totalCount;
|
||||
this.$set(this, "tableData", data.data.list);
|
||||
this.$set(this.pageForm, "totalCount", data.data.totalCount);
|
||||
} else {
|
||||
self.$message({
|
||||
this.$message({
|
||||
message: data.msg,
|
||||
type: 'error'
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}).always(() => {
|
||||
// 成功或失败均释放查询状态,避免日期筛选请求异常后界面一直等待。
|
||||
sublime.closeLoadingbar();
|
||||
this.$set(this, "tableLoading", false)
|
||||
});
|
||||
},
|
||||
viewInfo(scope) {
|
||||
this.viewData = JSON.parse(JSON.stringify(scope.row));
|
||||
|
||||
Reference in New Issue
Block a user