You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
2.0 KiB
51 lines
2.0 KiB
define(function (require, exports, module) {
|
|
let BaseBiz = require('apps/rht/base/rhtBiz');
|
|
let rhtComm = require('apps/rht/comm/rhtComm');
|
|
let queryTpl = require('text!./custom-built-query.tpl')
|
|
|
|
function Biz(vm) {
|
|
//继承第一步,构造继承
|
|
BaseBiz.call(this, vm);
|
|
}
|
|
|
|
//继承第二步,方法继承
|
|
inherits(Biz, BaseBiz);
|
|
|
|
Biz.prototype.getCustomBuiltQuery = function() {
|
|
return queryTpl
|
|
};
|
|
|
|
Biz.prototype.initCompleted = function () {
|
|
this.super('initCompleted');
|
|
let self = this;
|
|
initDataListCheck(self);
|
|
};
|
|
function initDataListCheck(self) {
|
|
let $begDate = self.getElement('.beg-date');
|
|
let $endDate = self.getElement('.end-date');
|
|
$begDate.datebox('setValue', rhtComm.GetServerDate(0));
|
|
$endDate.datebox('setValue', rhtComm.GetServerDate(0));
|
|
}
|
|
//根据登录组织等拼装查询条件
|
|
Biz.prototype.beforeDataSrcSearch = function (dataSrc, params) {
|
|
let self = this;
|
|
//self.setServerBiz('cn.qdhezheng.rht.app.stk.stk180609.SavePlugin');
|
|
self.dsMaster.setServerBiz('cn.qdhezheng.rht.app.stk.stk180609.SavePlugin');
|
|
self.dsDetail.setServerBiz('cn.qdhezheng.rht.app.stk.stk180609.SavePlugin');
|
|
};
|
|
Biz.prototype.beforeRefresh = function () {
|
|
let isOk = this.super('beforeRefresh');
|
|
this.dsMaster.state = {
|
|
searchType: this.getElement('.search-type').combobox('getValue'),
|
|
begDate: this.getElement('.beg-date').combobox('getValue'),
|
|
endDate: this.getElement('.end-date').combobox('getValue'),
|
|
};
|
|
this.dsDetail.state = {
|
|
searchType: this.getElement('.search-type').combobox('getValue'),
|
|
begDate: this.getElement('.beg-date').combobox('getValue'),
|
|
endDate: this.getElement('.end-date').combobox('getValue'),
|
|
}
|
|
return isOk;
|
|
};
|
|
return Biz;
|
|
}); |