|
@@ -1,29 +1,69 @@
|
|
|
shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.IncomeTaxDeclareList, {
|
|
|
- initalizeDOM : function(){
|
|
|
- shr.compensation.IncomeTaxDeclareListEx.superClass.initalizeDOM.call(this);
|
|
|
- var _self = this;
|
|
|
- },
|
|
|
- taxDeclaresAction(){
|
|
|
- var _self = this;
|
|
|
- _self.remoteCall({
|
|
|
- method: 'taxDeclares',
|
|
|
- param: {
|
|
|
- },
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- console.log(data);
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- , hideAfter: 2
|
|
|
- });
|
|
|
+ initalizeDOM: function () {
|
|
|
+ shr.compensation.IncomeTaxDeclareListEx.superClass.initalizeDOM.call(this);
|
|
|
+ var _self = this;
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 个税申报按钮事件
|
|
|
+ */
|
|
|
+ taxDeclareAction: function () {
|
|
|
+ var _self = this;
|
|
|
+ // if (!_self.hasTaxImp) {
|
|
|
+ // shr.showError({
|
|
|
+ // message: '操作失败,需开通云服务后才能使用,请系统管理员前往【系统设置-云服务设置-云服务注册及连接】进行注册。'
|
|
|
+ // , hideAfter: 5
|
|
|
+ // });
|
|
|
+ // } else {
|
|
|
+ var selectedId = _self.getSelectedIds();
|
|
|
+ if (!selectedId) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var param = {};
|
|
|
+ param.selectedId = selectedId;
|
|
|
+ _self.remoteCall({
|
|
|
+ type: "post",
|
|
|
+ method: "taxDeclare",
|
|
|
+ param: param,
|
|
|
+ showBlock: true,
|
|
|
+ success: function (res) {
|
|
|
+ if (res.success) {
|
|
|
+ shr.showInfo({ message: res.info, hideAfter: 10 });
|
|
|
+ } else {
|
|
|
+ if (res.hasErrData) {
|
|
|
+ if (res.hasCheckDataErr) {
|
|
|
+ shr.showWarning({ message: '以下员工数据异常,无法进行个税申报,请点击异常人员名单查看失败原因及操作指引。', hideAfter: 10 });
|
|
|
+ document.location.href = shr.getContextPath() + res.excel;
|
|
|
+ } else {
|
|
|
+ shr.showError({ message: res.errorMsg, hideAfter: 10 })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res.dataError) {
|
|
|
+ shr.showWarning({ message: res.errMsg, hideAfter: 10 });
|
|
|
+ }
|
|
|
+ if (res.issueError) {
|
|
|
+ _self.showConfirm(res.errMsg, function () {
|
|
|
+ _self.reloadPage({
|
|
|
+ uipk: "com.kingdee.shr.compensation.app.tax.IncomeTaxIssue.person.list"
|
|
|
+ });
|
|
|
+ }, function () {
|
|
|
+ _self.reloadPage({
|
|
|
+ uipk: "com.kingdee.shr.compensation.app.incomeTax.TaxPersonRecordEntry.list"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (res.reductionError) {
|
|
|
+ shr.showWarning({ message: res.errMsg, hideAfter: 10 });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _self.queryGrid();
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
- /**
|
|
|
- * 生成申报数据
|
|
|
- */
|
|
|
- generateTaxDataAction: function () {
|
|
|
+ // }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 生成申报数据
|
|
|
+ */
|
|
|
+ generateTaxDataAction: function () {
|
|
|
var _self = this;
|
|
|
var html = [], buttons = [], $dialog = $("#generateDataDialog"), $body = $(document.body);
|
|
|
if ($dialog.size() == 0) {
|
|
@@ -89,14 +129,14 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
* 默认当前员工所有的纳税单位数据权限
|
|
|
*/
|
|
|
$("#taxUnitF7").shrPromptBox(grid_f7_json);
|
|
|
-// $("#taxUnitF7").shrPromptBox("option",{
|
|
|
-// onchange:function(e,value) {
|
|
|
-// var info = value.current;
|
|
|
-// $.each(info, function(index, item){
|
|
|
-//
|
|
|
-// })
|
|
|
-// }
|
|
|
-// });
|
|
|
+ // $("#taxUnitF7").shrPromptBox("option",{
|
|
|
+ // onchange:function(e,value) {
|
|
|
+ // var info = value.current;
|
|
|
+ // $.each(info, function(index, item){
|
|
|
+ //
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // });
|
|
|
shr.callHandler({
|
|
|
handler: "com.kingdee.shr.compensation.web.handler.tax.TaxDeclareTaxUnitF7Handler",
|
|
|
action: "getPersonAllPermTaxUnit",
|
|
@@ -116,16 +156,16 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- // 更正申报
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 更正申报
|
|
|
updateDeclareAction: function () {
|
|
|
var _self = this;
|
|
|
//if (!_self.hasTaxImp) {
|
|
@@ -146,7 +186,7 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
|
- var canUpdate = true ;// 是否能更正申报
|
|
|
+ var canUpdate = true;// 是否能更正申报
|
|
|
var param = {};
|
|
|
param.selectedId = selectedId;
|
|
|
// _self.remoteCall({
|
|
@@ -167,29 +207,30 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
// });
|
|
|
if (canUpdate) {
|
|
|
var isEnableExcelPwd = $('#updateDeclare').attr('data-isenableexcelpwd');
|
|
|
- var callback = function(psw) {
|
|
|
+ var callback = function (psw) {
|
|
|
$.extend(param, {
|
|
|
//handler: "com.kingdee.shr.compensation.web.handler.tax.IncomeTaxDeclareListHandler",
|
|
|
- handler: "com.kingdee.eas.custom.compensation.handler.IncomeTaxDeclareListHandlerEx",
|
|
|
+ handler: "com.kingdee.eas.custom.compensation.handler.IncomeTaxDeclareListHandlerEx",
|
|
|
method: "updateDeclare",
|
|
|
psw: psw,
|
|
|
isEnableExcelPwd: JSON.parse(isEnableExcelPwd)
|
|
|
});
|
|
|
shr.urlLocate(shr.getContextPath() + "/dynamic.do", param);
|
|
|
shr.showWarning({
|
|
|
- message: "已提交金税系统更正申报,需要等待几分钟,可在任务执行监控中查看运行进度"
|
|
|
+ message: "已提交金税系统更正申报"
|
|
|
+ _self.reloadGrid();
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- if(_self.isNeedExportFilePassword('#updateDeclare')) {
|
|
|
+ if (_self.isNeedExportFilePassword('#updateDeclare')) {
|
|
|
fieldSensitiveService.setExportPsw(callback);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- // 撤销更正
|
|
|
+
|
|
|
+ // 撤销更正
|
|
|
cancelUpdateAction: function () {
|
|
|
var _self = this;
|
|
|
//if (!_self.hasTaxImp) {
|
|
@@ -237,7 +278,8 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
showBlock: true,
|
|
|
success: function (res) {
|
|
|
shr.showWarning({
|
|
|
- message: "已提交金税系统撤销更正,需要等待几分钟,可在任务执行监控中查看运行进度"
|
|
|
+ message: "已提交金税系统撤销更正"
|
|
|
+ _self.reloadGrid();
|
|
|
});
|
|
|
}
|
|
|
});
|
|
@@ -285,10 +327,10 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
// });
|
|
|
if (canCancel) {
|
|
|
var isEnableExcelPwd = $('#cancelDeclare').attr('data-isenableexcelpwd');
|
|
|
- var callback = function(psw) {
|
|
|
+ var callback = function (psw) {
|
|
|
$.extend(param, {
|
|
|
//handler: "com.kingdee.shr.compensation.web.handler.tax.IncomeTaxDeclareListHandler",
|
|
|
- handler: "com.kingdee.eas.custom.compensation.handler.IncomeTaxDeclareListHandlerEx",
|
|
|
+ handler: "com.kingdee.eas.custom.compensation.handler.IncomeTaxDeclareListHandlerEx",
|
|
|
method: "cancelDeclare",
|
|
|
psw: psw,
|
|
|
isEnableExcelPwd: JSON.parse(isEnableExcelPwd)
|
|
@@ -299,31 +341,31 @@ shr.defineClass("shr.compensation.IncomeTaxDeclareListEx", shr.compensation.Inco
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- if(_self.isNeedExportFilePassword('#cancelDeclare')) {
|
|
|
+ if (_self.isNeedExportFilePassword('#cancelDeclare')) {
|
|
|
fieldSensitiveService.setExportPsw(callback);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
callback();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- //任务监控
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //任务监控
|
|
|
taskMonitorAction: function () {
|
|
|
var self = this;
|
|
|
var urlParam = {
|
|
|
- uipk: "com.kingdee.eas.custom.shuiyou.task.app.Task.list",
|
|
|
+ uipk: "com.kingdee.eas.custom.shuiyou.task.app.Task.list",
|
|
|
//uipk: "com.kingdee.shr.compensation.app.taxCal.TaxCalTask.list",
|
|
|
catalog: "TAX"
|
|
|
};
|
|
|
self.reloadPage(urlParam);
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
});
|