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.
95 lines
3.5 KiB
95 lines
3.5 KiB
4 years ago
|
|
||
|
define(function(require, exports, module) {
|
||
|
let Window = require('system/views/pages/window');
|
||
|
let tpl = require('text!apps/edp/frs/sys010101/SetSysOverItem.tpl');
|
||
|
|
||
|
function SetSysOverItem(dsmaster) {//currow
|
||
|
this.options = {
|
||
|
title: "设置系统日结项目",
|
||
|
content: tpl,
|
||
|
width: 310,
|
||
|
height: 190,
|
||
|
modal: true,
|
||
|
closed: true,
|
||
|
closable: true,
|
||
|
draggable: true,
|
||
|
maximizable: false,
|
||
|
resizable: false,
|
||
|
data: null
|
||
|
}
|
||
|
//this.masterCurRow = currow;
|
||
|
this.dsmaster=dsmaster;
|
||
|
Window.call(this, this.options);
|
||
|
}
|
||
|
inherits(SetSysOverItem, Window);
|
||
|
|
||
|
SetSysOverItem.prototype.init = function() {
|
||
|
|
||
|
}
|
||
|
|
||
|
SetSysOverItem.prototype.open = function() {
|
||
|
Window.prototype.open.call(this);
|
||
|
}
|
||
|
|
||
|
//执行windows窗体上自定义按钮事件
|
||
|
SetSysOverItem.prototype.customerize = function() {
|
||
|
let self = this;
|
||
|
let rows = null;
|
||
|
|
||
|
//let orgCode=this.masterCurRow["OrgCode"];
|
||
|
//let itemCode=this.masterCurRow["ItemCode"];
|
||
|
let orgCode=self.dsmaster.currentRow["OrgCode"];
|
||
|
let itemCode=self.dsmaster.currentRow["ItemCode"];
|
||
|
let $isAutoJobCheckbox = this.getElement('#frs-sys01-AutoJob');
|
||
|
let $isExecuteCheckbox = this.getElement('#frs-sys01-Execute');
|
||
|
let $isPreEnabledCheckbox = this.getElement('#frs-sys01-PreEnabled');
|
||
|
|
||
|
//$isAutoJobCheckbox.prop('checked',self.masterCurRow.IsAutoJob==1?true:false);
|
||
|
//$isExecuteCheckbox.prop('checked',self.masterCurRow.IsExecute==1?true:false);
|
||
|
//$isPreEnabledCheckbox.prop('checked',self.masterCurRow.IsPreEnabled==1?true:false);
|
||
|
$isAutoJobCheckbox.prop('checked',self.dsmaster.currentRow.IsAutoJob==1?true:false);
|
||
|
$isExecuteCheckbox.prop('checked',self.dsmaster.currentRow.IsExecute==1?true:false);
|
||
|
$isPreEnabledCheckbox.prop('checked',self.dsmaster.currentRow.IsPreEnabled==1?true:false);
|
||
|
//确定按钮事件
|
||
|
this.getElement('.btnOK').on('click', function(event) {
|
||
|
|
||
|
let isAutoJobCheckbox = $isAutoJobCheckbox.prop('checked');
|
||
|
let isExecuteCheckbox = $isExecuteCheckbox.prop('checked');
|
||
|
let isPreEnabledCheckbox = $isPreEnabledCheckbox.prop('checked');
|
||
|
|
||
|
|
||
|
let params = {
|
||
|
plugin: 'setSysOverItem',
|
||
|
pluginData: {
|
||
|
ps_OrgCode:orgCode,
|
||
|
ps_ItemCode:itemCode,
|
||
|
ps_IsAutoJob: isAutoJobCheckbox? 1 : 0,
|
||
|
ps_IsExecute: isExecuteCheckbox? 1 : 0,
|
||
|
ps_IsPreEnabled: isPreEnabledCheckbox ? 1 : 0,
|
||
|
}
|
||
|
};
|
||
|
|
||
|
Store.services.executeplugin(params, function(isOk, result) {
|
||
|
if (isOk && result.data_Proc.pi_Result === 1) {
|
||
|
|
||
|
if (self.callback) {
|
||
|
self.callback();
|
||
|
}
|
||
|
self.close();
|
||
|
|
||
|
} else {
|
||
|
Store.messager.tip('设置系统日结项目失败!');
|
||
|
self.close();
|
||
|
}
|
||
|
self.dsmaster.search();
|
||
|
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//取消按钮事件
|
||
|
this.getElement('.btnCancel').on('click', function(event) {
|
||
|
self.close();
|
||
|
});
|
||
|
}
|
||
|
return SetSysOverItem;
|
||
|
})
|