|
@@ -15,6 +15,23 @@ var pageOprObj = {
|
|
|
me.rationLibName = rationLibName;
|
|
|
me.rationLibId = rationLibId;
|
|
|
zTreeOprObj.getRationTree(rationLibId);
|
|
|
+ //job
|
|
|
+ jobContentOprObj.radiosChange(jobContentOprObj.radios, jobContentOprObj.tableAll, jobContentOprObj.tablePartial);
|
|
|
+ $('#addConBtn').click(jobContentOprObj.bindAddConBtn());
|
|
|
+ $('#updateConBtn').click(jobContentOprObj.bindUpdateConBtn());
|
|
|
+ $('#txtareaAll').bind('change', function () {
|
|
|
+ let met = this;
|
|
|
+ let jobContent = $(met).val();
|
|
|
+ $(met).attr('disabled', true);
|
|
|
+ let updateCodes = [];
|
|
|
+ for(let i = 0, len = jobContentOprObj.currentRationItems.length; i < len; i++){
|
|
|
+ updateCodes.push(jobContentOprObj.currentRationItems[i].code);
|
|
|
+ }
|
|
|
+ jobContentOprObj.updateJobContent(me.rationLibId, jobContentOprObj.getUpdateArr(updateCodes, jobContent), function () {
|
|
|
+ $(met).attr('disabled', false);
|
|
|
+ jobContentOprObj.currentJobContent = jobContent;
|
|
|
+ })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -330,10 +347,14 @@ var zTreeOprObj = {
|
|
|
explanatoryOprObj.setAttribute(explanatoryOprObj.currentTreeNode ? explanatoryOprObj.currentTreeNode : treeNode, treeNode, treeNode.explanation, treeNode.ruleText);
|
|
|
explanatoryOprObj.clickUpdate($('#explanationShow'), $('#ruleTextShow'));
|
|
|
explanatoryOprObj.showText($('#explanationShow'), $('#ruleTextShow'), treeNode.explanation, treeNode.ruleText);
|
|
|
+ jobContentOprObj.currentSituation = typeof treeNode.jobContentSituation !== 'undefined'? treeNode.jobContentSituation : jobContentOprObj.situations.NONE;
|
|
|
var sectionID = treeNode.ID;
|
|
|
if (!(treeNode.items) || treeNode.items.length == 0) {
|
|
|
+ jobContentOprObj.setRadiosDisabled(false, jobContentOprObj.radios);
|
|
|
rationOprObj.getRationItems(sectionID);
|
|
|
} else {
|
|
|
+ jobContentOprObj.setRadiosDisabled(true, jobContentOprObj.radios);
|
|
|
+ jobContentOprObj.hideTable($('#tableAll'), $('#tablePartial'));
|
|
|
sheetCommonObj.cleanSheet(rationOprObj.workBook.getSheet(0), rationOprObj.setting, -1);
|
|
|
sheetCommonObj.shieldAllCells(rationOprObj.workBook.getSheet(0));
|
|
|
}
|
|
@@ -433,3 +454,412 @@ let explanatoryOprObj = {
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+//工作内容
|
|
|
+let jobContentOprObj = {
|
|
|
+ situations: {ALL: 'ALL', PARTIAL: 'PARTIAL', NONE: 'NONE'},//所有ALL(包括未定义本项工作内容)、部分PARTIA,不可用NONE(非章节树最底层节点时)
|
|
|
+ currentSituation: null,//本项适用情况
|
|
|
+ radios: $("input[name = 'optionsRadios']"),
|
|
|
+ tableAll: $('#tableAll'),
|
|
|
+ tablePartial: $('#tablePartial'),
|
|
|
+ currentOprTr: null,
|
|
|
+ currentJobContent: null,
|
|
|
+ currentRationItems: null,
|
|
|
+ addCon: $('#addCon'),//勾选编码模态框
|
|
|
+ updateCon: $('#updateCon'),//编辑编码模态框
|
|
|
+ //获取本项适用情况
|
|
|
+ getSituation: function (rationItems) {
|
|
|
+ let me = this;
|
|
|
+ let rst = me.situations.ALL;
|
|
|
+ if(rationItems.length > 1){
|
|
|
+ for(let i = 0, len = rationItems.length; i < len; i++){
|
|
|
+ for(let j = i + 1, len = rationItems.length; j < len; j++){
|
|
|
+ if(typeof rationItems[i].jobContent !== 'undefined' && rationItems[i].jobContent !== rationItems[j].jobContent){
|
|
|
+ rst = me.situations.PARTIAL;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ getGroup: function (rationItems) {
|
|
|
+ let rst = [];//rst = [{jobContent: String, items: Array}]
|
|
|
+ for(let i = 0, len = rationItems.length; i < len; i++){
|
|
|
+ if(typeof rationItems[i].jobContent !== 'undefined' && rationItems[i].jobContent.toString().trim().length > 0){
|
|
|
+ let isExist = false;
|
|
|
+ for(let j = 0, jLen = rst.length; j < jLen; j++){
|
|
|
+ if(rst[j].jobContent === rationItems[i].jobContent){
|
|
|
+ isExist = true;
|
|
|
+ rst[j].items.push(rationItems[i].code);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!isExist){
|
|
|
+ rst.push({jobContent: rationItems[i].jobContent, items: [rationItems[i].code]});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ hideTable: function (tableAll, tablePartial) {
|
|
|
+ if(tableAll){
|
|
|
+ tableAll.hide();
|
|
|
+ }
|
|
|
+ if(tablePartial){
|
|
|
+ tablePartial.hide();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //建table
|
|
|
+ buildTablePartial: function (table, group) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ table.empty();
|
|
|
+ let $thead = $("<thead><tr><th></th><th>编码</th><th>工作内容</th>/tr></thead>");
|
|
|
+ let $tbody = $("<tbody></tbody>");
|
|
|
+ let count = 1;
|
|
|
+ for(let i = 0, len = group.length; i < len; i++){
|
|
|
+ let $newTr = me.getNewTr($tbody, group[i].items, group[i].jobContent);
|
|
|
+ $tbody.append($newTr);
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ let $trEnd = $("<tr><td>"+ count +"</td><td><a href data-toggle='modal' data-target='#editBianma' class='m-0'>点击勾选编码</a></td><td><textarea class='form-control'></textarea></td></tr>");//勾选行
|
|
|
+ $($trEnd.children().children()[0]).bind('click', function () {
|
|
|
+ me.onclickFuncAdd($(this));
|
|
|
+ me.currentOprTr = $trEnd;
|
|
|
+ me.currentJobContent = $(me.currentOprTr.children()[2]).children().val();
|
|
|
+ });
|
|
|
+ $tbody.append($trEnd);
|
|
|
+ table.append($thead);
|
|
|
+ table.append($tbody);
|
|
|
+ },
|
|
|
+ //新增一行tr
|
|
|
+ getNewTr: function (tbody, codes, jobContent) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ let count = tbody.children().length > 0 ? tbody.children().length : 1;
|
|
|
+ let $textTd = $("<td></td>");
|
|
|
+ let $textarea = $("<textarea class='form-control'></textarea>");
|
|
|
+ $textarea.val(jobContent);
|
|
|
+ $textTd.append($textarea);
|
|
|
+ let $tr = $("<tr><td>" + count + "</td><td><a href data-toggle='modal' data-target='#editBianmaQ' class='m-0'>编辑编码</a></td></tr>");
|
|
|
+ $tr.children().children().bind('click', function () {
|
|
|
+ me.currentOprTr = $tr;
|
|
|
+ me.currentJobContent = $(me.currentOprTr.children()[2]).children().val();
|
|
|
+ me.onclickFuncEdit($(this));
|
|
|
+ });
|
|
|
+ //文本变化;
|
|
|
+ $textarea.bind('change', function () {
|
|
|
+ let codes = me.getUpdateCodes($($(this).parent().parent().children()[1]).children());
|
|
|
+ let jobContent = $(this).val();
|
|
|
+ me.updateJobContent(pageOprObj.rationLibId, me.getUpdateArr(codes, jobContent), function () {
|
|
|
+ if(jobContent.trim().length === 0){
|
|
|
+ me.buildTablePartial(me.tablePartial, me.getGroup(me.currentRationItems));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ $tr.append($textTd);
|
|
|
+ for(let i = 0, len = codes.length; i < len; i ++){
|
|
|
+ let $p = $("<p class='m-0'>" + codes[i] + "</p>");
|
|
|
+ $tr.children()[1].append($p[0]);
|
|
|
+ }
|
|
|
+ me.setTextareaHeight($textarea, codes.length + 1);
|
|
|
+ return $tr[0];
|
|
|
+ },
|
|
|
+ onclickFuncAdd: function (obj) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ let txtarea = $(obj.parent().parent().children().children()[1]);
|
|
|
+ let jobContent = txtarea.val();
|
|
|
+ if(jobContent.trim().length > 0){//工作内容不为空才可添加编码
|
|
|
+ let codesObj = me.getAddCodes(me.currentRationItems);
|
|
|
+ me.buildCheckCodesCon(me.addCon, codesObj.checkedCodes, codesObj.disabledCodes)
|
|
|
+ obj.attr('data-target', '#editBianma');
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ obj.attr('data-target', '');
|
|
|
+ alert("工作内容不能为空!");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onclickFuncEdit: function (obj) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ me.buildEditableCodesCon(me.currentRationItems, me.updateCon, me.getUpdateCodes(obj));
|
|
|
+ },
|
|
|
+ //更新显示的编码table
|
|
|
+ updateCodesTable: function (table, codes) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ table.empty();
|
|
|
+ table.append("<a href data-toggle='modal' data-target='#editBianmaQ' class='m-0'>编辑编码</a>");
|
|
|
+ table.children().bind('click', function (){
|
|
|
+ me.currentOprTr = table.parent();
|
|
|
+ me.currentJobContent = $(me.currentOprTr.children()[2]).children().val();
|
|
|
+ me.onclickFuncEdit($(this));
|
|
|
+ });
|
|
|
+ for(let i = 0, len = codes.length; i < len; i++){
|
|
|
+ let $p = $("<p class='m-0'>" + codes[i] + "</p>");
|
|
|
+ table.append($p[0]);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取编码td中的编码
|
|
|
+ getUpdateCodes: function (jq) {
|
|
|
+ let rst = [];
|
|
|
+ let nodes = jq.parent().children();
|
|
|
+ for(let i = 1, len = nodes.length; i < len; i++){
|
|
|
+ rst.push(nodes[i].textContent);
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ //建一个编码checkbox Div
|
|
|
+ buildCodeOption: function (code, attr) {
|
|
|
+ let $div = $("<div class='col'><label class='form-check-label'><input class='form-check-input' type='checkbox' value= "+ code +"> "+ code +"</label></div>");
|
|
|
+ let $checkBox = $div.children().children();
|
|
|
+ if(attr){
|
|
|
+ $checkBox.attr(attr, true);
|
|
|
+ }
|
|
|
+ return $div;
|
|
|
+ },
|
|
|
+ //建修改编码弹窗
|
|
|
+ buildEditableCodesCon: function (rationItems, container,codes) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ let codeDivs = [];
|
|
|
+ container.empty();
|
|
|
+ for(let i = 0, len = codes.length; i < len; i++){
|
|
|
+ codeDivs.push({code: codes[i], attr: 'checked'});
|
|
|
+ }
|
|
|
+ for(let i = 0, len = rationItems.length; i < len; i++){
|
|
|
+ if(codes.indexOf(rationItems[i].code) === -1){
|
|
|
+ if(typeof rationItems[i].jobContent !== 'undefined' && rationItems[i].jobContent.toString().trim().length > 0){
|
|
|
+ codeDivs.push({code: rationItems[i].code, attr: 'disabled'});
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ codeDivs.push({code: rationItems[i].code, attr: ''});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //排序
|
|
|
+ codeDivs.sort(function (a, b) {
|
|
|
+ let rst = 0;
|
|
|
+ if(a.code > b.code) rst = 1;
|
|
|
+ else if(a.code < b.code) rst = -1;
|
|
|
+ return rst;
|
|
|
+ });
|
|
|
+ for(let i = 0, len = codeDivs.length; i < len; i++){
|
|
|
+ container.append(me.buildCodeOption(codeDivs[i].code, codeDivs[i].attr));
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //建勾选编码弹窗
|
|
|
+ buildCheckCodesCon: function (container, checkedCodes, disabledCodes) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ container.empty();
|
|
|
+ for(let i = 0, len = checkedCodes.length; i < len; i++){
|
|
|
+ let $codeDiv = me.buildCodeOption(checkedCodes[i], 'checked');
|
|
|
+ container.append($codeDiv);
|
|
|
+ }
|
|
|
+ for(let i = 0, len = disabledCodes.length; i < len; i++){
|
|
|
+ let $codeDiv = me.buildCodeOption(disabledCodes[i], 'disabled');
|
|
|
+ container.append($codeDiv);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getAddCodes: function (rationItems) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ let rst = {checkedCodes: [], disabledCodes: []};
|
|
|
+ for(let i = 0, len = rationItems.length; i < len; i++){
|
|
|
+ if(typeof rationItems[i].jobContent !== 'undefined' && rationItems[i].jobContent.toString().trim().length > 0){
|
|
|
+ rst.disabledCodes.push(rationItems[i].code);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ rst.checkedCodes.push(rationItems[i].code);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ //获取选择后的编码窗口的编码及状态
|
|
|
+ getCodesAfterS: function (checkNodes) {
|
|
|
+ let rst = {checked: [], unchecked: []};
|
|
|
+ for(let i = 0, len = checkNodes.length; i < len; i++){
|
|
|
+ if(checkNodes[i].checked){
|
|
|
+ rst.checked.push(checkNodes[i].value);
|
|
|
+ }
|
|
|
+ else if(!checkNodes[i].checked && !checkNodes[i].disabled){
|
|
|
+ rst.unchecked.push(checkNodes[i].value);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ setRadiosChecked: function (situation, radios) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ if(situation === me.situations.ALL){
|
|
|
+ radios[0].checked = true;
|
|
|
+ radios[1].checked = false;
|
|
|
+ $('#txtareaAll').val(me.currentRationItems.length > 0 ? me.currentRationItems[0].jobContent : '');
|
|
|
+ me.currentJobContent = me.currentRationItems[0].jobContent;
|
|
|
+ me.tableAll.show();
|
|
|
+ me.tablePartial.hide();
|
|
|
+ }
|
|
|
+ else if(situation === me.situations.PARTIAL){
|
|
|
+ radios[0].checked = false;
|
|
|
+ radios[1].checked = true;
|
|
|
+ me.tableAll.hide();
|
|
|
+ me.tablePartial.show();
|
|
|
+ }
|
|
|
+ else if(situation === me.situations.NONE){
|
|
|
+ radios[0].checked = false;
|
|
|
+ radios[1].checked = false;
|
|
|
+ me.tableAll.hide();
|
|
|
+ me.tablePartial.hide();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //radios是否可用,只有在定额章节树的底层节点才可用
|
|
|
+ setRadiosDisabled: function (val, radios) {
|
|
|
+ let me =jobContentOprObj;
|
|
|
+ if(val){
|
|
|
+ radios[0].checked = false;
|
|
|
+ radios[1].checked = false;
|
|
|
+ me.currentSituation = me.situations.NONE;
|
|
|
+ }
|
|
|
+ radios.attr('disabled', val);
|
|
|
+ },
|
|
|
+ radiosChange: function (radios, tableAll, tablePartial) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ radios.change(function () {
|
|
|
+ let val = $("input[name = 'optionsRadios']:checked").val();
|
|
|
+ let selectedNode = zTreeOprObj.treeObj.getSelectedNodes()[0];
|
|
|
+ me.updateSituation(pageOprObj.rationLibId, selectedNode.ID, val, function () {
|
|
|
+ selectedNode.jobContentSituation = val;
|
|
|
+ me.currentSituation = val;
|
|
|
+ if(val === me.situations.ALL){
|
|
|
+ let updateCodes = [];
|
|
|
+ for(let i = 0, len = me.currentRationItems.length; i < len; i++){
|
|
|
+ updateCodes.push(me.currentRationItems[i].code);
|
|
|
+ }
|
|
|
+ me.updateJobContent(pageOprObj.rationLibId, me.getUpdateArr(updateCodes, ''), function () {
|
|
|
+ me.currentJobContent = '';
|
|
|
+ $('#txtareaAll').val('');
|
|
|
+ tableAll.show();
|
|
|
+ tablePartial.hide();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ me.buildTablePartial(me.tablePartial, me.getGroup(me.currentRationItems));
|
|
|
+ tableAll.hide();
|
|
|
+ tablePartial.show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ sortRationItems: function (rationItems, field) {
|
|
|
+ rationItems.sort(function (a, b) {
|
|
|
+ let rst = 0;
|
|
|
+ if(a[field] > b[field]){
|
|
|
+ rst = 1;
|
|
|
+ }
|
|
|
+ else if (a[field] < b[field]){
|
|
|
+ rst = -1;
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addCodeNode: function (container, codeNode) {
|
|
|
+ container.append(codeNode);
|
|
|
+ },
|
|
|
+ setTextareaHeight: function (textarea, nodesCount) {
|
|
|
+ const perHeight = 21.6;
|
|
|
+ textarea.height(nodesCount * 21.6);
|
|
|
+ },
|
|
|
+ bindEvents: function (txtarea) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ txtarea.bind('change', function () {
|
|
|
+ let jobContent = txtarea.val();
|
|
|
+ let jqNodes = txtarea.parent().parent().children()[1].children;
|
|
|
+ let updateCodes = me.getUpdateCodes(jqNodes);
|
|
|
+ txtarea.attr('disabled', true);
|
|
|
+ me.updateJobContent(pageOprObj.rationLibId, me.getUpdateArr(updateCodes, jobContent), function () {
|
|
|
+ txtarea.attr('disabled', false);
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ unbindEvetns: function (txtarea) {
|
|
|
+ txtarea.unbind();
|
|
|
+ },
|
|
|
+ //定额工作内容相关操作
|
|
|
+ rationJobContentOpr: function (rationItems) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ me.setRadiosChecked(me.currentSituation, me.radios);
|
|
|
+ me.buildTablePartial(me.tablePartial, me.getGroup(rationItems));
|
|
|
+ },
|
|
|
+ getUpdateArr: function (updateCodes, jobContent) {
|
|
|
+ let rst = [];
|
|
|
+ for(let i = 0, len = updateCodes.length; i < len; i++){
|
|
|
+ rst.push({code: updateCodes[i], jobContent: jobContent});
|
|
|
+ }
|
|
|
+ return rst;
|
|
|
+ },
|
|
|
+ bindAddConBtn: function () {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ return function () {
|
|
|
+ let codesObj = me.getCodesAfterS(me.addCon.children().children().children());
|
|
|
+ let $tbody = $('#tablePartial tbody');
|
|
|
+ let lastEle = $tbody[0].lastElementChild;
|
|
|
+ let txtare = lastEle.lastElementChild.children[0];
|
|
|
+ if(me.currentJobContent.trim().length > 0){//工作内容不为空才可添加编码
|
|
|
+ let updateArr = me.getUpdateArr(codesObj.checked, me.currentJobContent);
|
|
|
+ me.updateJobContent(pageOprObj.rationLibId, updateArr, function () {
|
|
|
+ me.buildTablePartial(me.tablePartial, me.getGroup(me.currentRationItems));
|
|
|
+ $(txtare).val('');
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ alert("工作内容不能为空!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ bindUpdateConBtn: function () {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ return function () {
|
|
|
+ let codesObj = me.getCodesAfterS(me.updateCon.children().children().children());
|
|
|
+ let updateC = me.getUpdateArr(codesObj.checked, me.currentJobContent),
|
|
|
+ updateUnC = me.getUpdateArr(codesObj.unchecked, ''),
|
|
|
+ updateArr = updateC.concat(updateUnC);
|
|
|
+ me.updateJobContent(pageOprObj.rationLibId, updateArr, function () {
|
|
|
+ me.buildTablePartial(me.tablePartial, me.getGroup(me.currentRationItems));
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //更新缓存的定额
|
|
|
+ updateRationItem: function (rationItems, updateArr) {
|
|
|
+ for(let i = 0, len = rationItems.length; i < len; i++){
|
|
|
+ for(let j = 0, jLen = updateArr.length; j < jLen; j++){
|
|
|
+ if(rationItems[i].code === updateArr[j].code){
|
|
|
+ rationItems[i].jobContent = updateArr[j].jobContent;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ updateJobContent: function (repId, updateArr, callback){
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: 'api/updateJobContent',
|
|
|
+ data: {lastOpr: userAccount, repId: repId, updateArr: JSON.stringify(updateArr)},
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (result) {
|
|
|
+ if(!result.error){
|
|
|
+ me.updateRationItem(me.currentRationItems, updateArr);
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ updateSituation: function (repId, nodeId, situation, callback) {
|
|
|
+ let me = jobContentOprObj;
|
|
|
+ $.ajax({
|
|
|
+ type: 'post',
|
|
|
+ url: 'api/updateSituation',
|
|
|
+ data: {lastOpr: userAccount, repId: repId, nodeId: nodeId, situation: situation},
|
|
|
+ dataType: 'json',
|
|
|
+ success: function (result) {
|
|
|
+ if(!result.error){
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+};
|