|
@@ -1,244 +0,0 @@
|
|
|
-/**
|
|
|
- * 描述:周期季度 单据头表单校验
|
|
|
- */
|
|
|
-shr.defineClass("shr.custom.ExamineGradePersonScorerEdit", shr.framework.Edit, {
|
|
|
- /**
|
|
|
- * 描述:初始化操作
|
|
|
- *
|
|
|
- * @action
|
|
|
- */
|
|
|
- initalizeDOM: function () {
|
|
|
- var self = this;
|
|
|
- $("#addRow_entrys").hide();
|
|
|
- $("#deleteRow_entrys").hide();
|
|
|
- shr.custom.ExamineGradePersonScorerEdit.superClass.initalizeDOM.call(this);
|
|
|
- self.isValidationPeriodExpired();
|
|
|
- },
|
|
|
- /**
|
|
|
- * 计算得分
|
|
|
- */
|
|
|
- calculateScoreAction() {
|
|
|
- shr.custom.ExamineGradePersonScorerEdit.superClass.saveAction.call(this);
|
|
|
- var _self = this;
|
|
|
- var billId = shr.getUrlRequestParam("billId");
|
|
|
- _self.remoteCall({
|
|
|
- method: 'submitFilterAdmin',
|
|
|
- param: {
|
|
|
- billId: billId,
|
|
|
- },
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- if (data != null) {
|
|
|
- $('#adminOrg').shrPromptBox("setFilter", "id in(" + data + ")");
|
|
|
- $("#adminOrg").shrPromptBox("open");
|
|
|
- }
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $("#adminOrg").shrPromptBox("option", {
|
|
|
- onchange: function (e, value) {
|
|
|
- var dataList = [];
|
|
|
- var currentArray = value.current;
|
|
|
- // 使用each方法循环遍历数组
|
|
|
- $.each(currentArray, function (index, value) {
|
|
|
- // 在控制台打印每个元素的索引和值
|
|
|
- dataList.push(value.id)
|
|
|
- });
|
|
|
- _self.remoteCall({
|
|
|
- method: 'calculateScore',
|
|
|
- param: {
|
|
|
- adminIdArray: dataList + "",
|
|
|
- billId: billId,
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- if (data != null) {
|
|
|
- shr.showInfo({
|
|
|
- message: "已成功计算得分",
|
|
|
- history: 2
|
|
|
- });
|
|
|
- setTimeout(function () {
|
|
|
- location.reload();
|
|
|
- }, 2000); // 2000 毫秒即为两秒钟
|
|
|
- }
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
- /**
|
|
|
- * 查看累计得分
|
|
|
- */
|
|
|
- showAddupScoreAction() {
|
|
|
- //获取周期季度ID
|
|
|
- var billId = shr.getUrlRequestParam("billId");
|
|
|
- this.reloadPage({
|
|
|
- uipk: "com.kingdee.eas.custom.performancenew.app.ExamineGradePersonEntryAddupScore.list",
|
|
|
- billId: billId,
|
|
|
- // method: 'list'id -> {BOSUuid@34323} "RpcAAAALmPOP3MLU"
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * 校验周期是否解除
|
|
|
- */
|
|
|
- isValidationPeriodExpired() {
|
|
|
- var billId = shr.getUrlRequestParam("billId");
|
|
|
- _self.remoteCall({
|
|
|
- method: 'isValidationPeriodExpired',
|
|
|
- param: {
|
|
|
- billId: billId,
|
|
|
- },
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- if (data.value == 1) {
|
|
|
- $("#save").hide();
|
|
|
- $("#calculateScore").hide();
|
|
|
- $("#customSubmit").hide();
|
|
|
- $("#import").hide();
|
|
|
- $("#showAddupScore").hide();
|
|
|
- //顺序列表不可编辑
|
|
|
- var elements = $('[aria-describedby="entrys_index"]');
|
|
|
- $.each(elements, function (i, n) {
|
|
|
- this.setAttribute("class", "disabled")
|
|
|
- this.style.pointerEvents = "none"
|
|
|
- })
|
|
|
- //领导得分列不可编辑
|
|
|
- var elements = $('[aria-describedby="entrys_scoreLeader"]');
|
|
|
- $.each(elements, function (i, n) {
|
|
|
- this.setAttribute("class", "disabled")
|
|
|
- this.style.pointerEvents = "none"
|
|
|
- })
|
|
|
- //备注列不可编辑
|
|
|
- var elements = $('[aria-describedby="entrys_remark"]');
|
|
|
- $.each(elements, function (i, n) {
|
|
|
- this.setAttribute("class", "disabled")
|
|
|
- this.style.pointerEvents = "none"
|
|
|
- })
|
|
|
- shr.showWarning({
|
|
|
- message: "周期已锁定不可用进行操作",
|
|
|
- history: 3,
|
|
|
- });
|
|
|
- }
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- /**
|
|
|
- * 自定义提交按钮
|
|
|
- */
|
|
|
- customSubmitAction() {
|
|
|
-
|
|
|
-
|
|
|
- var _self = this;
|
|
|
- var billId = shr.getUrlRequestParam("billId");
|
|
|
- _self.remoteCall({
|
|
|
- method: 'submitFilterAdmin',
|
|
|
- param: {
|
|
|
- billId: billId,
|
|
|
- },
|
|
|
- async: false,
|
|
|
- success: function (data) {
|
|
|
- if (data != null) {
|
|
|
- $('#adminOrg').shrPromptBox("setFilter", "id in(" + data + ")");
|
|
|
- $("#adminOrg").shrPromptBox("open");
|
|
|
- }
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- $("#adminOrg").shrPromptBox("option", {
|
|
|
- onchange: function (e, value) {
|
|
|
- var dataList = [];
|
|
|
- var currentArray = value.current;
|
|
|
- // 使用each方法循环遍历数组
|
|
|
- $.each(currentArray, function (index, value) {
|
|
|
- // 在控制台打印每个元素的索引和值
|
|
|
- dataList.push(value.id)
|
|
|
- });
|
|
|
- _self.remoteCall({
|
|
|
- method: 'customSubmit',
|
|
|
- param: {
|
|
|
- adminIdArray: dataList + "",
|
|
|
- billId: billId,
|
|
|
- },
|
|
|
- success: function (data) {
|
|
|
- if (data != null) {
|
|
|
- shr.showInfo({
|
|
|
- message: "提交成功",
|
|
|
- history: 2
|
|
|
- });
|
|
|
- setTimeout(function () {
|
|
|
- location.reload();
|
|
|
- }, 2000); // 2000 毫秒即为两秒钟
|
|
|
- }
|
|
|
- }, error: function (response) {
|
|
|
- shr.showError({
|
|
|
- message: response.summary
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
- /**
|
|
|
- * 保存真正执行方法
|
|
|
- */
|
|
|
- doSave: function (event, action) {
|
|
|
- var _self = this;
|
|
|
- var data = _self.assembleSaveData(action);
|
|
|
-
|
|
|
- var target;
|
|
|
- if (event && event.currentTarget) {
|
|
|
- target = event.currentTarget;
|
|
|
- }
|
|
|
- shr.doAction({
|
|
|
- target: target,
|
|
|
- url: _self.dynamicPage_url,
|
|
|
- type: 'post',
|
|
|
- data: data,
|
|
|
- success: function (response) {
|
|
|
- if (_self.isFromF7()) {
|
|
|
- // 来自F7,关闭当前界面,并给F7设置
|
|
|
- var dataF7 = {
|
|
|
- id: response,
|
|
|
- name: $.parseJSON(data.model).name
|
|
|
- };
|
|
|
- dialogClose(dataF7);
|
|
|
- } else {
|
|
|
- // 普通保存,去除最后一个面包屑,防止修改名字造成面包屑重复
|
|
|
- shrDataManager.pageNavigationStore.pop();
|
|
|
- // _self.viewAction(response);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- cancelAction: function () {
|
|
|
- var that = this;
|
|
|
- if (this.getOperateState().toUpperCase() == 'ADDNEW' || this.getOperateState().toUpperCase() == 'EDIT') {
|
|
|
- setTimeout(function () {
|
|
|
- that.reloadPage({
|
|
|
- uipk: "com.kingdee.eas.custom.performancenew.app.ExamineGradePersonScorer.list"
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
-});
|