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; });