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.

64 lines
1.7 KiB

4 years ago
/**
* 复制权限按钮弹框文件
* @description [description]
* @version 1.0
* @author yangjinhua
*/
define(function(require, exports, module) {
var Window = require('system/views/pages/window');
var tpl = require('text!apps/rht/bas/sys010104/BgnDate.tpl');
let rhtComm = require('apps/rht/comm/rhtComm');
/**
* 组织调整弹窗
*/
function BgnDate() {
this.options = {
title: '选择开始日期',
content: tpl,
width: 350,
height: 200,
modal: true,
closed: true,
closable: true,
draggable: true,
maximizable: false,
resizable: false,
data: null
}
Window.call(this, this.options);
}
inherits(BgnDate, Window);
BgnDate.prototype.init = function() {
}
BgnDate.prototype.open = function() {
Window.prototype.open.call(this);
var $bgnDate = this.getElement('.bgnDate');
$bgnDate.datebox('textbox').attr("readonly", true);
}
//执行windows窗体上自定义按钮事件
BgnDate.prototype.customerize = function() {
var self = this;
var $bgnDate = this.getElement('.bgnDate');
$bgnDate.textbox('setValue', rhtComm.GetServerDate(0));
//确定按钮事件
this.getElement('.btnOK').on('click', function(event) {
var newBgnDate = $bgnDate.datebox('getValue');
if (self.callback) {
self.callback(newBgnDate);
}
self.close();
});
//取消按钮事件
this.getElement('.btnCancel').on('click', function(event) {
self.close();
});
}
return BgnDate;
})