define(function (require, exports, module) { let BaseBiz = require('apps/rht/base/rhtBiz'); let Service = require('./dst200103service'); let rhtComm = require('apps/rht/comm/rhtComm'); let MdYhInf = require('./mdyhinf'); let queryTpl = require('text!./custom-built-query.tpl') let showTypeChg = require('./dsttypechg'); let queryWindow = require("system/views/pages/querywindow/querywindow"); function Biz(vm) { //继承第一步,构造继承 BaseBiz.call(this, vm); } //继承第二步,方法继承 inherits(Biz, BaseBiz); let sGuid = ''; let DST_ZSIsChangEtp = rhtComm.getRhtOptionValue('*','DST','DST_ZSIsChangEtp','0'); let DST_YKIsChangEtp = rhtComm.getRhtOptionValue('*','DST','DST_YKIsChangEtp','0'); let Dst_QrCountEditType = rhtComm.getRhtOptionValue('*','DST','Dst_QrCountEditType','0'); let IsMngPsCyc = rhtComm.getRhtOptionValue('*','DST','IsMngPsCyc','0'); Biz.prototype.getCustomBuiltQuery = function() { let t =$(queryTpl); //let $psCyc = self.getElement('.ps-cyc'); if (IsMngPsCyc == '1'){ t.append('') } return t[0].outerHTML }; Biz.prototype.initCompleted = function () { this.super('initCompleted'); this.dsMaster.onlySaveCurrent = false; initDataListCheck(this); }; function initDataListCheck(self) { let DST_CLYH_DefCkSet = rhtComm.getRhtOptionValue('*','DST','DST_CLYH_DefCkSet','系统默认'); let IsAllCk = rhtComm.getRhtOptionValue('*','DST','IsAllCk','0'); let LsCkIsMngPsArea = rhtComm.getRhtOptionValue('*','SUPP','LsCkIsMngPsArea','0'); let DST_Set_PsJobCkCode = rhtComm.getRhtOptionValue('*','DST','DST_Set_PsJobCkCode','*'); let ret= Service.getSlideMenuData("actExecute","GetCkInf", "","","","",""); if (ret.result !== 1) { Store.messager.err(ret.message); return false; } self.getElement('.qh-cl').combobox(); self.getElement('.ps-type').combobox(); self.getElement('.ps-cyc').combobox(); if (ret.data !== null){ let $ckcode = self.getElement('.ck-code'); if ((IsAllCk == '1') && (LsCkIsMngPsArea == '0') && (DST_Set_PsJobCkCode == '*') && (ret.message == '1')){ ret.data.unshift({'ckname': '<全部>', 'ckcode': '<全部>'}); $ckcode.combobox({ valueField:'ckcode', textField:'ckname', data: ret.data, onChange: function(){ if (LsCkIsMngPsArea == '1'){ self.opRouter('refresh') } } }); $ckcode.combobox('setValue', '<全部>'); } else{ $ckcode.combobox({ valueField:'ckcode', textField:'ckname', data: ret.data }); if (ret.data !== null){ $ckcode.combobox('setValue', ret.data[0].ckcode); } if (DST_CLYH_DefCkSet != '系统默认'){ if (DST_CLYH_DefCkSet == '空'){ $ckcode.combobox('setValue', ''); } else{ //$ckcode.combobox('setValue', ''); for(let i=0;i