tbar: [
'<fontstyle="line-height:25px;color:blue;">任务类型:</font>',
OrderType,
'-',
'<fontstyle="line-height:25px;color:blue;">当前批次号:</font>',
new Ext.form.TextField({
id: 'txtBatchNumber',
width: 150,
readOnly: true,
style: 'top:1px;'
}),
new Ext.Button({
id: 'btnGetBatchNumber',
//text: '生成批次号',
tooltip: '<fontstyle="color:Red;line-height:25px;">重新生成一个新的批次号</font>',
//minWidth: 100,
iconCls: 'SalaryStructure_BatchNum',
handler: function () {
GetTheBatchNumber();
}
}),
'-', '<fontstyle="line-height:25px;color:blue;">雇员操作:</font>',
{
id: 'btnAddEmployee',
text: '手工添加雇员',
tooltip: '<fontstyle="color:green;line-height:25px;">从每间公司的雇员列表中,<br />选中至少一名雇员,<br />添加到薪酬计算名单中!</font>',
iconCls: 'SalaryStructure_Add',
disabled: true,
handler: function () {
var AddWin = new Ext.Window({
title: '添加工资/计税任务雇员',
id: 'AddWindow',
width: 750,
height: 300,
closable: true,
modal: true,
closeAction: 'close',
layout: 'fit',
html: "<iframe id='EmployeeAddiFrame'src='EmployeeAddTemplate' style='width:100%; height:100%;'frameborder='0'></iframe>",
buttons: [
{
text: '确定',
iconCls: 'SalaryStructure_Success',
handler: function () {
//取数
var emStore = window.document.getElementById("EmployeeAddiFrame").contentWindow.GetData();
if (emStore.length > 0) {
AddDataToGridStore(emStore);
AddBatchNumberToGridStore();
Ext.getCmp("btnBlongMonth").enable();
Ext.getCmp("btnCalcuteDate").enable();
Ext.getCmp("btnUploadFile").enable();
Ext.getCmp("txtTemplateName").enable();
Ext.getCmp("txtCount").setValue(emStore.length);
}
else {
Ext.getCmp("btnBlongMonth").disable();
Ext.getCmp("btnCalcuteDate").disable();
Ext.getCmp("btnUploadFile").disable();
Ext.getCmp("txtTemplateName").disable();
Ext.getCmp("txtCount").setValue("0");
}
AddWin.close();
}
}
]
});
AddWin.show();
AddWin.setSize(750, 300);
}
}, {
id: 'btnImportExcel',
text: '通过Excel导入雇员',
tooltip: '<fontstyle="color:green;line-height:25px;">通过Excel导入大批量的雇员名单,<br />导入模版可以从右侧菜单的<br /><b>[薪酬服务部]->[工资模版管理]</b>中下载</font>',
iconCls: 'SalaryStructure_Leading-in',
handler: function () {
var BatchAddWin = new Ext.Window({
closeAction: 'close',
modal: true,
id: 'BatchAddWindow',
width: 650,
height: 300,
closable: true,
layout: 'fit',
html: '<iframeid=\'BatchEmployeeAddiFrame\' src=\'BatchEmployeeAddTemplate\'style=\'width:100%; height:100%;\' frameborder=\'0\'></iframe>'
});
BatchAddWin.show();
}
},
'-',
DeleteOneEmployee,
'-',
ClearAllData
]
bbar: [
'<fontstyle="line-height:25px;color:red;">总共</font>',
newExt.form.TextField({ cls: 'textwidth', id: 'txtCount',style: 'margin-left:5px;margin-right:5px; top:0px;',readOnly: true }),
new Ext.form.Label({ text: '条', cls: 'labelcolor' }),
'-',
'<fontstyle="line-height:25px;color:blue;">参数指定:</font>',
'<fontstyle="line-height:25px;">所属月份:</font>',
new Ext.form.CustomDateField({ id:'btnBlongMonth', width: 90, format: 'Y-m', emptyText: '请指定月份', disabled: true, selectOnFocus: true,
setValueFn: function (value) {
AddBelongMonthToGridStore(value);
}
}),
'<fontstyle="line-height:25px;margin-left:10px;">计算日期:</font>',
new Ext.form.CustomDateField({ id:'btnCalcuteDate', width: 100, format: 'Y-m-d', emptyText: '请指定日期', disabled: true, selectOnFocus: true,
setValueFn: function (value) {
AddCalcuteDateToGridStore(value);
}
}),
{
text: '上传统一附件',
id: 'btnUploadFile',
tooltip: '<fontstyle="color:blue;line-height:25px;">上传当前批次下所有雇员计算薪酬与税费需要的附件,<br />请先在薪酬计算名单中钩选使用相同附件的雇员,<br />如雇员没有附件,可不指定!</font>',
iconCls: 'SalaryStructure_Upload',
style: 'margin-left:10px;margin-right:10px;',
disabled: true,
handler: function () {
var winUpload = new Ext.Window({
title: '上传统一附件',
id: 'winUpload', width: 500, height: 300, closable: true,
resizable: true, minimizable: true, maximizable: true,
closeAction: 'close',
layout: 'fit',
html: '<iframe src=\'UploadUniteFile\'style=\'width:100%; height:100%;\' frameborder=\'0\'></iframe>',
listeners: {
'beforeclose': function(p) {
GetTheSelectedData();
}
}
});
winUpload.show();
}
},
'指定模版:',
TemplateSearchBox,
'-',
'<fontstyle="line-height:25px;color:blue;">任务操作:</font>',
newExt.Button({
text: '校验数据',
iconCls: 'SalaryStructure_Check',
handler: function () {
var Flag = 1;
var ErrText = "";
//1:有无数据
if(store.getCount() == 0) { Flag *= 0; ErrText += "◆还没有添加雇员到薪酬计算名单中;<br />"; }
//2:是否指定所属月份
if (Ext.getCmp("btnBlongMonth").getRawValue()== "") { Flag *= 0; ErrText += "◆还没有指定“所属月份”;<br />"; }
//3:是否指定计算日期
if (Ext.getCmp("btnCalcuteDate").getRawValue()== "") { Flag *= 0; ErrText += "◆还没有指定“计算日期”;<br />"; }
//4:是否指定了工资模板
if (Ext.get("txtTemplateID").dom.value == "") { Flag *= 0;ErrText += "◆还没有选择工资模板;<br />"; }
if (Flag == 1) {
//第一步校验OK
Ext.MessageBox.show({
title: '提示',
msg: '<fontstyle="color:red;line-height:25px;">你指定当前批次的用于计算薪酬的模板为:<b>[' + Ext.getCmp("txtTemplateName").getRawValue() + ']</b><br />如果正确,请点击[是];<br />不正确,请点击[否]!</font>',
buttons:Ext.MessageBox.YESNO,
fn: function (result) {
if (result == 'yes') {
CheckDataForReady();
}
}
});
}
else {
Ext.MessageBox.alert("注意", "<fontstyle='color:red;line-height:25px;'>" + ErrText + "</font>");
}
}
}),
newExt.Button({
id: 'btnStarMission',
text: '发起任务',
iconCls: 'SalaryStructure_Next',
disabled: true,
style: 'text:-align:right; float:right;',
handler:function(){
StarMission();
}
})
]