提交 8ccd21fb 编写于 作者: W weizhiqiang

【ajax】修改ajax请求工具,删除冗余代码完成

上级 7803ee9b
......@@ -28,70 +28,66 @@ layui.config({
voucherTemplate = $("#voucherTemplate").html();//凭证展示
AjaxPostUtil.request({url:flowableBasePath + "activitimode025", params: {processInstanceId: processInstanceId}, type: 'json', callback: function(j){
if(j.returnCode == 0){
var jsonStr = "";//实体json对象
var str = "";
$.each(j.rows, function(i, item){
//如果展示文本不为空,则展示展示文本
if(!isNull(item.text))
item.value = item.text;
jsonStr = {
bean: item
};
if(item.showType == 1){//文本展示
str = getDataUseHandlebars(textTemplate, jsonStr);
}else if(item.showType == 2){//附件展示
str = getDataUseHandlebars(enclosureTemplate, jsonStr);
}else if(item.showType == 3){//富文本展示
str = getDataUseHandlebars(eichTextTemplate, jsonStr);
}else if(item.showType == 4){//图片展示
var photoValue = [];
if(!isNull(jsonStr.bean.value)){
photoValue = item.value.split(",");
}
var rows = [];
$.each(photoValue, function(j, row){
rows.push({photoValue: row});
});
jsonStr.bean.photo = rows;
str = getDataUseHandlebars(picTemplate, jsonStr);
}else if(item.showType == 5){//表格展示
str = getDataUseHandlebars(tableTemplate, jsonStr);
var tableId = "messageTable" + item.orderBy;//表格id
var tableBoxId = "showTable" + item.orderBy;//表格外部div盒子id
$("#showForm").append(str);
$("#" + tableBoxId).html('<table id="' + tableId + '" lay-filter="' + tableId + '"></table>');
if(typeof item.headerTitle == 'object'){
item.headerTitle = JSON.stringify(item.headerTitle);
}
table.render({
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], getValJson(item.value, '', '')),
page: false,
cols: getValJson(item.headerTitle, '[', ']')
});
str = "";
}else if(item.showType == 6){//凭证展示
str = getDataUseHandlebars(voucherTemplate, jsonStr);
$("#showForm").append(str);
var boxId = "showVoucher" + item.orderBy;
// 初始化凭证
voucherUtil.initDataDetails(boxId, item.value);
str = "";
}else {
str = "";
var jsonStr = "";//实体json对象
var str = "";
$.each(j.rows, function(i, item){
//如果展示文本不为空,则展示展示文本
if(!isNull(item.text))
item.value = item.text;
jsonStr = {
bean: item
};
if(item.showType == 1){//文本展示
str = getDataUseHandlebars(textTemplate, jsonStr);
}else if(item.showType == 2){//附件展示
str = getDataUseHandlebars(enclosureTemplate, jsonStr);
}else if(item.showType == 3){//富文本展示
str = getDataUseHandlebars(eichTextTemplate, jsonStr);
}else if(item.showType == 4){//图片展示
var photoValue = [];
if(!isNull(jsonStr.bean.value)){
photoValue = item.value.split(",");
}
var rows = [];
$.each(photoValue, function(j, row){
rows.push({photoValue: row});
});
jsonStr.bean.photo = rows;
str = getDataUseHandlebars(picTemplate, jsonStr);
}else if(item.showType == 5){//表格展示
str = getDataUseHandlebars(tableTemplate, jsonStr);
var tableId = "messageTable" + item.orderBy;//表格id
var tableBoxId = "showTable" + item.orderBy;//表格外部div盒子id
$("#showForm").append(str);
});
//加载流程图片
$("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000));
//加载审批历史
inboxTimeTreeApprovalHistory();
matchingLanguage();
} else {
winui.window.msg(j.returnMessage, {icon: 2, time: 2000});
}
$("#" + tableBoxId).html('<table id="' + tableId + '" lay-filter="' + tableId + '"></table>');
if(typeof item.headerTitle == 'object'){
item.headerTitle = JSON.stringify(item.headerTitle);
}
table.render({
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], getValJson(item.value, '', '')),
page: false,
cols: getValJson(item.headerTitle, '[', ']')
});
str = "";
}else if(item.showType == 6){//凭证展示
str = getDataUseHandlebars(voucherTemplate, jsonStr);
$("#showForm").append(str);
var boxId = "showVoucher" + item.orderBy;
// 初始化凭证
voucherUtil.initDataDetails(boxId, item.value);
str = "";
}else {
str = "";
}
$("#showForm").append(str);
});
//加载流程图片
$("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000));
//加载审批历史
inboxTimeTreeApprovalHistory();
matchingLanguage();
}});
function getValJson(val, startPrefix, endPrefix){
......
......@@ -390,24 +390,16 @@ layui.config({
//上移申请类型实体
function upMove(data){
AjaxPostUtil.request({url:flowableBasePath + "actmodletype013", params:{rowId: data.id, typeId: data.typeId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.moveUpOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
//下移申请类型实体
function downMove(data){
AjaxPostUtil.request({url:flowableBasePath + "actmodletype014", params:{rowId: data.id, typeId: data.typeId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.moveDownOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
......
......@@ -54,12 +54,8 @@ layui.config({
chooseUserMation: JSON.stringify(table.cache.messageTable)
};
AjaxPostUtil.request({url:flowableBasePath + "activitiTask004", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -54,12 +54,8 @@ layui.config({
chooseUserMation: JSON.stringify(table.cache.messageTable)
};
AjaxPostUtil.request({url:flowableBasePath + "activitiTask003", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -19,17 +19,13 @@ layui.config({
// 获取会签节点信息
AjaxPostUtil.request({url: flowableBasePath + "activitiTask006", params: {taskId: taskId}, method: "GET", type: 'json', callback: function(json) {
if(json.returnCode == 0) {
taskBean = json.bean;
if(json.bean.isSequential){
$("#jointlySignType").html("串行多实例会签");
} else {
$("#jointlySignType").html("并行多实例会签");
}
chooseUserList = [].concat(json.bean.assigneeList);
taskBean = json.bean;
if(json.bean.isSequential){
$("#jointlySignType").html("串行多实例会签");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$("#jointlySignType").html("并行多实例会签");
}
chooseUserList = [].concat(json.bean.assigneeList);
}, async: false});
table.render({
......@@ -113,12 +109,8 @@ layui.config({
chooseUserMation: JSON.stringify(table.cache.messageTable)
};
AjaxPostUtil.request({url: flowableBasePath + "activitiTask005", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -62,12 +62,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '挂起' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode020", params:{processInstanceId: data.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("该流程已挂起", {icon: 1, time: 2000});
reloadAllConductTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("该流程已挂起", {icon: 1, time: 2000});
reloadAllConductTable();
}});
});
}
......@@ -78,12 +74,8 @@ layui.config({
layer.confirm(msg, { icon: 3, title: '激活' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url:flowableBasePath + "activitimode021", params:{processInstanceId: data.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("该流程已激活", {icon: 1, time: 2000});
reloadAllConductTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("该流程已激活", {icon: 1, time: 2000});
reloadAllConductTable();
}});
});
}
......
......@@ -37,129 +37,83 @@ layui.config({
voucherTemplate = $("#voucherTemplate").html();//凭证展示
AjaxPostUtil.request({url:flowableBasePath + "activitimode016", params: {taskId: taskId, processInstanceId: processInstanceId}, type: 'json', callback: function(j){
if(j.returnCode == 0){
pageTypes = isNull(j.bean.pageTypes) ? '1' : j.bean.pageTypes;
var jsonStr = "";//实体json对象
var str = "";
//获取该节点的id和名称
var editableNodeId = j.bean.taskKey;
var editableNodeName = j.bean.taskKeyName;
$.each(j.rows, function(i, item){
jsonStr = {
bean: item
};
jsonArray.push(item);
//判断表单项在该流程节点是否可以编辑
if((!isNull(editableNodeId) && ("," + item.editableNodeId + ",").indexOf("," + editableNodeId + ",") > -1)
|| (!isNull(editableNodeName) && ("," + item.editableNodeName + ",").indexOf("," + editableNodeName + ",") > -1)){
var formItem = item.formItem;
if(!isNull(formItem)){
if(formItem.associatedDataTypes == 1){//json串
var obj = formItem.aData;
pageTypes = isNull(j.bean.pageTypes) ? '1' : j.bean.pageTypes;
var jsonStr = "";//实体json对象
var str = "";
//获取该节点的id和名称
var editableNodeId = j.bean.taskKey;
var editableNodeName = j.bean.taskKeyName;
$.each(j.rows, function(i, item){
jsonStr = {
bean: item
};
jsonArray.push(item);
//判断表单项在该流程节点是否可以编辑
if((!isNull(editableNodeId) && ("," + item.editableNodeId + ",").indexOf("," + editableNodeId + ",") > -1)
|| (!isNull(editableNodeName) && ("," + item.editableNodeName + ",").indexOf("," + editableNodeName + ",") > -1)){
var formItem = item.formItem;
if(!isNull(formItem)){
if(formItem.associatedDataTypes == 1){//json串
var obj = formItem.aData;
tplContent = getDataUseHandlebars(formItem.templateContent, obj);
formItem.context = tplContent;
}else if(formItem.associatedDataTypes == 2){//接口
AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params:{interfa: formItem.aData}, type: 'json', callback: function(j){
var obj = JSON.parse(j.bean.aData);
tplContent = getDataUseHandlebars(formItem.templateContent, obj);
formItem.context = tplContent;
}else if(formItem.associatedDataTypes == 2){//接口
AjaxPostUtil.request({url: flowableBasePath + "dsformpage011", params:{interfa: formItem.aData}, type: 'json', callback: function(j){
if(j.returnCode == 0){
var obj = JSON.parse(j.bean.aData);
tplContent = getDataUseHandlebars(formItem.templateContent, obj);
formItem.context = tplContent;
} else {
winui.window.msg(j.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
}
//重置左侧编辑框添加冒号
formItem.labelContent += '';
jsonStr = {
bean: formItem
};
var htmlContent = formItem.htmlContent;//模板
var tpl = '{{#bean}}' + htmlContent + '{{/bean}}';
var html = getDataUseHandlebars(tpl, jsonStr);
var jsContent = formItem.jsContent;
var js = '{{#bean}}' + jsContent + '{{/bean}}';
var html_js = getDataUseHandlebars(js, jsonStr);
var jsCon = '<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + html_js + '})(jQuery);});</script>';
$("#showForm").append(html + jsCon);
$("#" + formItem.id).val(item.text); //给能通过id赋值的控件赋值
var _this = $("#showForm .layui-form-item").eq(i);//当前控件
var vid = _this.attr("controlType");//控件类型
if(vid === 'range'){//类型为滑块
var thisId = _this.find('div[id="' + formItem.id + '"]');
thisId.find(".layui-slider-tips").html(item.text);
thisId.find("div .layui-slider-bar").css("width", item.text + "%");
thisId.find("div .layui-slider-wrap").css("left", item.text + "%");
thisId.find("div .layui-slider-wrap").data("value", item.text);
}else if(vid === 'color'){//类型为颜色选择器
_this.find("input").val(item.text);
_this.find('div[id="' + formItem.id + '"]').find("span .layui-colorpicker-trigger-span").attr("style", "background:" + item.text);
}else if(vid === 'switchedradio'){//类型为开关式单选框
_this.find("input").val(item.text);
if(item.text === 'true' || item.text == true){
_this.find("input").prop("checked", true);
}
_this.find("input").attr('id', formItem.id);
_this.find("input").attr('name', formItem.id);
_this.find("input").attr('lay-filter', formItem.id);
}else if(vid === 'radio'){//类型为单选框
_this.find("input:radio").attr("name", formItem.id);
_this.find("input:radio[value=" + item.text + "]").attr("checked", true);
}else if(vid === 'richtextarea'){//类型为富文本框
_this.find('iframe[textarea="' + formItem.id + '"]').contents().find("body").html(item.text);
}else if(vid === 'checkbox'){//类型为多选框
var checkArray = item.text.split(",");
var checkBoxAll = _this.find("input:checkbox");
checkBoxAll.attr("name", formItem.id);
for(var k = 0; k < checkArray.length; k++){
$.each(checkBoxAll, function(j, formItem){
if(checkArray[k] == $(this).val()){
$(this).prop("checked", true);
}
});
}
}
} else {
if(item.showType == 1){//文本展示
str = getDataUseHandlebars(textTemplate, jsonStr);
}else if(item.showType == 2){//附件展示
str = getDataUseHandlebars(enclosureTemplate, jsonStr);
}else if(item.showType == 3){//富文本展示
str = getDataUseHandlebars(eichTextTemplate, jsonStr);
}else if(item.showType == 4){//图片展示
var photoValue = [];
if(!isNull(jsonStr.bean.text)){
photoValue = item.value.split(",");
}
var rows = [];
$.each(photoValue, function(j, row){
rows.push({photoValue: row});
});
jsonStr.bean.photo = rows;
str = getDataUseHandlebars(picTemplate, jsonStr);
}else if(item.showType == 5){//表格展示
str = getDataUseHandlebars(tableTemplate, jsonStr);
var tableId = "messageTable" + item.orderBy;//表格id
var tableBoxId = "showTable" + item.orderBy;//表格外部div盒子id
$("#showForm").append(str);
$("#" + tableBoxId).html('<table id="' + tableId + '" lay-filter="' + tableId + '"></table>');
table.render({
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], item.value),
page: false,
cols: [getHeaderTitle(item.headerTitle)]
});
str = "";
}else if(item.showType == 6){//凭证展示
str = getDataUseHandlebars(voucherTemplate, jsonStr);
$("#showForm").append(str);
var boxId = "showVoucher" + item.orderBy;
// 初始化凭证
voucherUtil.initDataDetails(boxId, item.value);
str = "";
}, async: false});
}
//重置左侧编辑框添加冒号
formItem.labelContent += '';
jsonStr = {
bean: formItem
};
var htmlContent = formItem.htmlContent;//模板
var tpl = '{{#bean}}' + htmlContent + '{{/bean}}';
var html = getDataUseHandlebars(tpl, jsonStr);
var jsContent = formItem.jsContent;
var js = '{{#bean}}' + jsContent + '{{/bean}}';
var html_js = getDataUseHandlebars(js, jsonStr);
var jsCon = '<script>layui.define(["jquery"], function(exports) {var jQuery = layui.jquery;(function($) {' + html_js + '})(jQuery);});</script>';
$("#showForm").append(html + jsCon);
$("#" + formItem.id).val(item.text); //给能通过id赋值的控件赋值
var _this = $("#showForm .layui-form-item").eq(i);//当前控件
var vid = _this.attr("controlType");//控件类型
if(vid === 'range'){//类型为滑块
var thisId = _this.find('div[id="' + formItem.id + '"]');
thisId.find(".layui-slider-tips").html(item.text);
thisId.find("div .layui-slider-bar").css("width", item.text + "%");
thisId.find("div .layui-slider-wrap").css("left", item.text + "%");
thisId.find("div .layui-slider-wrap").data("value", item.text);
}else if(vid === 'color'){//类型为颜色选择器
_this.find("input").val(item.text);
_this.find('div[id="' + formItem.id + '"]').find("span .layui-colorpicker-trigger-span").attr("style", "background:" + item.text);
}else if(vid === 'switchedradio'){//类型为开关式单选框
_this.find("input").val(item.text);
if(item.text === 'true' || item.text == true){
_this.find("input").prop("checked", true);
}
_this.find("input").attr('id', formItem.id);
_this.find("input").attr('name', formItem.id);
_this.find("input").attr('lay-filter', formItem.id);
}else if(vid === 'radio'){//类型为单选框
_this.find("input:radio").attr("name", formItem.id);
_this.find("input:radio[value=" + item.text + "]").attr("checked", true);
}else if(vid === 'richtextarea'){//类型为富文本框
_this.find('iframe[textarea="' + formItem.id + '"]').contents().find("body").html(item.text);
}else if(vid === 'checkbox'){//类型为多选框
var checkArray = item.text.split(",");
var checkBoxAll = _this.find("input:checkbox");
checkBoxAll.attr("name", formItem.id);
for(var k = 0; k < checkArray.length; k++){
$.each(checkBoxAll, function(j, formItem){
if(checkArray[k] == $(this).val()){
$(this).prop("checked", true);
}
});
}
}
} else {
if(item.showType == 1){//文本展示
......@@ -186,11 +140,11 @@ layui.config({
$("#showForm").append(str);
$("#" + tableBoxId).html('<table id="' + tableId + '" lay-filter="' + tableId + '"></table>');
table.render({
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], item.value),
page: false,
cols: [getHeaderTitle(item.headerTitle)]
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], item.value),
page: false,
cols: [getHeaderTitle(item.headerTitle)]
});
str = "";
}else if(item.showType == 6){//凭证展示
......@@ -202,65 +156,103 @@ layui.config({
str = "";
}
}
$("#showForm").append(str);
});
// 加载流程图片
$("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000));
// 是否委派,如果是委派||并行会签的子实例,则不需要选择下一个节点的审批人
if(!j.bean.delegation && !isNull(String(j.bean.multilnStanceExecttionChild)) && !j.bean.multilnStanceExecttionChild){
// 加载下个节点审批人选择信息
activitiUtil.initApprovalPerson("approvalOpinionDom", processInstanceId, taskId, $("input[name='flag']:checked").val());
}
// 并行会签的子实例,不支持工作流的其他操作
if(!j.bean.multilnStanceExecttionChild){
activitiUtil.activitiMenuOperator("otherMenuOperator", j.bean, function (){
parent.layer.close(index);
parent.refreshCode = '0';
});
} else {
$("#otherMenuOperator").parent().hide();
if(item.showType == 1){//文本展示
str = getDataUseHandlebars(textTemplate, jsonStr);
}else if(item.showType == 2){//附件展示
str = getDataUseHandlebars(enclosureTemplate, jsonStr);
}else if(item.showType == 3){//富文本展示
str = getDataUseHandlebars(eichTextTemplate, jsonStr);
}else if(item.showType == 4){//图片展示
var photoValue = [];
if(!isNull(jsonStr.bean.text)){
photoValue = item.value.split(",");
}
var rows = [];
$.each(photoValue, function(j, row){
rows.push({photoValue: row});
});
jsonStr.bean.photo = rows;
str = getDataUseHandlebars(picTemplate, jsonStr);
}else if(item.showType == 5){//表格展示
str = getDataUseHandlebars(tableTemplate, jsonStr);
var tableId = "messageTable" + item.orderBy;//表格id
var tableBoxId = "showTable" + item.orderBy;//表格外部div盒子id
$("#showForm").append(str);
$("#" + tableBoxId).html('<table id="' + tableId + '" lay-filter="' + tableId + '"></table>');
table.render({
id: tableId,
elem: "#" + tableId,
data: $.extend(true, [], item.value),
page: false,
cols: [getHeaderTitle(item.headerTitle)]
});
str = "";
}else if(item.showType == 6){//凭证展示
str = getDataUseHandlebars(voucherTemplate, jsonStr);
$("#showForm").append(str);
var boxId = "showVoucher" + item.orderBy;
// 初始化凭证
voucherUtil.initDataDetails(boxId, item.value);
str = "";
}
}
$("#showForm").append(str);
});
// 加载会签信息
if(j.bean.isMultiInstance){
$("#multiInstanceBox").html(getDataUseHandlebars($("#multiInstance").html(), j));
$("#multiInstanceState").html('已开启');
if(j.bean.nrOfInstances != 0){
// 会签任务总数为0说明没有设置会签人,可以自行审批通过,如果不为0,说明设置了会签人,需要通过会签投票获取结果
$("#resultTitle").html('会签结果');
$("#multiInstanceState").html('已完成');
if(j.bean.nrOfActiveInstances != 0){
// 正在执行的会签总数不为0并且不是子实例,说明会签还未结束,不能提交到下一个审批节点
if(!j.bean.multilnStanceExecttionChild){
$("#approvalOpinionDom").hide();
$("#subBtnBox").hide();
}
$("#multiInstanceState").html('进行中');
// 加载流程图片
$("#processInstanceIdImg").attr("src", fileBasePath + 'images/upload/activiti/' + processInstanceId + ".png?cdnversion=" + Math.ceil(new Date()/3600000));
// 是否委派,如果是委派||并行会签的子实例,则不需要选择下一个节点的审批人
if(!j.bean.delegation && !isNull(String(j.bean.multilnStanceExecttionChild)) && !j.bean.multilnStanceExecttionChild){
// 加载下个节点审批人选择信息
activitiUtil.initApprovalPerson("approvalOpinionDom", processInstanceId, taskId, $("input[name='flag']:checked").val());
}
// 并行会签的子实例,不支持工作流的其他操作
if(!j.bean.multilnStanceExecttionChild){
activitiUtil.activitiMenuOperator("otherMenuOperator", j.bean, function (){
parent.layer.close(index);
parent.refreshCode = '0';
});
} else {
$("#otherMenuOperator").parent().hide();
}
// 加载会签信息
if(j.bean.isMultiInstance){
$("#multiInstanceBox").html(getDataUseHandlebars($("#multiInstance").html(), j));
$("#multiInstanceState").html('已开启');
if(j.bean.nrOfInstances != 0){
// 会签任务总数为0说明没有设置会签人,可以自行审批通过,如果不为0,说明设置了会签人,需要通过会签投票获取结果
$("#resultTitle").html('会签结果');
$("#multiInstanceState").html('已完成');
if(j.bean.nrOfActiveInstances != 0){
// 正在执行的会签总数不为0并且不是子实例,说明会签还未结束,不能提交到下一个审批节点
if(!j.bean.multilnStanceExecttionChild){
$("#approvalOpinionDom").hide();
$("#subBtnBox").hide();
}
if(!isNull(j.bean.approvalResult + "")){
// 如果已经获得会签结果,则可以进行提交到下一步
if(j.bean.approvalResult){
$("input:radio[name=flag][value='1']").attr("checked", true);
} else {
$("input:radio[name=flag][value='2']").attr("checked", true);
}
$("input[name='flag']").attr('disabled', true);
$("#approvalOpinionDom").show();
$("#subBtnBox").show();
$("#multiInstanceState").html('进行中');
}
if(!isNull(j.bean.approvalResult + "")){
// 如果已经获得会签结果,则可以进行提交到下一步
if(j.bean.approvalResult){
$("input:radio[name=flag][value='1']").attr("checked", true);
} else {
$("input:radio[name=flag][value='2']").attr("checked", true);
}
$("input[name='flag']").attr('disabled', true);
$("#approvalOpinionDom").show();
$("#subBtnBox").show();
}
}
// 加载审批历史
inboxTimeTreeApprovalHistory();
matchingLanguage();
form.render();
} else {
winui.window.msg(j.returnMessage, {icon: 2, time: 2000});
}
// 加载审批历史
inboxTimeTreeApprovalHistory();
matchingLanguage();
form.render();
}});
function getHeaderTitle(headerTitle){
......@@ -368,21 +360,17 @@ layui.config({
var lis = [];
//以jQuery的Ajax请求为例,请求下一页数据(注意:page是从2开始返回)
AjaxPostUtil.request({url:flowableBasePath + "activitimode017", params:{processInstanceId: parent.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
var jsonStr = "";//实体json对象
$.each(json.rows, function(index, bean) {
bean.showClass = 'date02';
jsonStr = {
bean: bean
};
lis.push(getDataUseHandlebars(timeTreeApprovalHistory, jsonStr));
});
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
next(lis.join(''), (page * 1000) < json.total);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var jsonStr = "";//实体json对象
$.each(json.rows, function(index, bean) {
bean.showClass = 'date02';
jsonStr = {
bean: bean
};
lis.push(getDataUseHandlebars(timeTreeApprovalHistory, jsonStr));
});
//执行下一页渲染,第二参数为:满足“加载更多”的条件,即后面仍有分页
//pages为Ajax返回的总页数,只有当前页小于总页数的情况下,才会继续出现加载更多
next(lis.join(''), (page * 1000) < json.total);
}});
}
});
......
......@@ -16,17 +16,13 @@ layui.config({
// 加载动态表单页
AjaxPostUtil.request({url: flowableBasePath + "dsformpage004", params:{rowId: parent.dsFormId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">提交审批</button>' +
'</div></div>');
matchingLanguage();
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">提交审批</button>' +
'</div></div>');
matchingLanguage();
form.render();
}});
form.on('submit(formAddBean)', function (data) {
......@@ -43,14 +39,10 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url:flowableBasePath + "activitimode022", params: jStr, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000}, function() {
parent.layer.close(index);
parent.refreshCode = '0';
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000}, function() {
parent.layer.close(index);
parent.refreshCode = '0';
});
}});
});
}
......
......@@ -14,12 +14,8 @@ layui.config({
// 动态表单草稿状态下的详情
var rowId = parent.rowId;
AjaxPostUtil.request({url: flowableBasePath + "pagesequence006", params: {rowId: rowId}, type: 'json', callback: function(j){
if(j.returnCode == 0){
dsFormUtil.initSequenceDataDetails("showForm", j.rows);
matchingLanguage();
} else {
winui.window.msg(j.returnMessage, {icon: 2, time: 2000});
}
dsFormUtil.initSequenceDataDetails("showForm", j.rows);
matchingLanguage();
}});
exports('dsFormPageSequenceDraftProcessDetail', {});
......
......@@ -14,28 +14,20 @@ layui.config({
// 编辑动态表单时进行回显
AjaxPostUtil.request({url: flowableBasePath + "pagesequence003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
matchingLanguage();
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
matchingLanguage();
form.render();
}});
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = dsFormUtil.getPageData($("#showForm"));
AjaxPostUtil.request({url: flowableBasePath + "pagesequence004", params: {jsonStr: JSON.stringify(params)}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -14,17 +14,13 @@ layui.config({
// 获取动态表单内容用于编辑申请类型实体
AjaxPostUtil.request({url:flowableBasePath + "activitimode023", params:{rowId: parent.sequenceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
form.render();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
dsFormUtil.loadDsFormItemToEdit("showForm", json.rows);
$("#showForm").append('<div class="layui-form-item layui-col-xs12"><div class="layui-input-block">' +
'<button class="winui-btn" id="cancle">' + systemLanguage["com.skyeye.cancel"][languageType] + '</button>' +
'<button class="winui-btn" lay-submit="" lay-filter="formAddBean">' + systemLanguage["com.skyeye.save"][languageType] + '</button>' +
'</div></div>');
form.render();
matchingLanguage();
}});
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
......@@ -34,12 +30,8 @@ layui.config({
processInstanceId: parent.processInstanceId
};
AjaxPostUtil.request({url:flowableBasePath + "activitimode024", params: jStr, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -13,11 +13,8 @@ layui.config({
laydate = layui.laydate,
form = layui.form;
//'申请时间'页面的选取时间段表格
laydate.render({
elem: '#createTime', //指定元素
range: '~'
});
// '申请时间'页面的选取时间段表格
laydate.render({elem: '#createTime', range: '~'});
// 我启动的流程
table.render({
......@@ -101,12 +98,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "pagesequence005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000});
reloadMyStartTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("申请提交成功,等待审核...", {icon: 1, time: 2000});
reloadMyStartTable();
}});
});
});
......@@ -117,12 +110,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "pagesequence002", params: {rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
reloadMyStartTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
reloadMyStartTable();
}});
});
}
......
......@@ -107,12 +107,8 @@ layui.config({
layer.confirm('确定撤销该流程吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + data.revokeMapping, params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("撤销成功", {icon: 1, time: 2000});
reloadMyStartTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("撤销成功", {icon: 1, time: 2000});
reloadMyStartTable();
}});
});
}
......@@ -122,11 +118,7 @@ layui.config({
layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) {
layer.close(i);
AjaxPostUtil.request({url:flowableBasePath + "activitimode027", params: {processInstanceId: data.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
}});
});
}
......
......@@ -93,11 +93,7 @@ layui.config({
layer.confirm('确认重新生成流程图吗?', { icon: 3, title: '刷新流程图操作' }, function (i) {
layer.close(i);
AjaxPostUtil.request({url:flowableBasePath + "activitimode027", params: {processInstanceId: data.processInstanceId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
}});
});
}
......
......@@ -42,15 +42,11 @@ layui.config({
} else {
//类型对应的用品不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "assetarticles018", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
assetArticles.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的用品列表
}});
}
}
......@@ -144,12 +140,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "assetarticles024", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -11,24 +11,20 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "assetarticles026", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
// 状态
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
// 状态
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -20,25 +20,21 @@ layui.config({
var sTableData = "";
AjaxPostUtil.request({url: flowableBasePath + "assetarticles028", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
}});
//初始化用品类别
......
......@@ -158,12 +158,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "asset020", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadCaigouTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadCaigouTable();
}});
});
});
......
......@@ -28,61 +28,53 @@ layui.config({
// 初始化资产类别
function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
// 渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
// 渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
});
//初始化一行数据
addRow();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
}
});
//初始化一行数据
addRow();
matchingLanguage();
}});
}
......@@ -141,12 +133,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "asset027", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,36 +13,32 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "asset029", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -21,84 +21,72 @@ layui.config({
var sTableData = "";
AjaxPostUtil.request({url: flowableBasePath + "asset031", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
}});
//初始化资产类别
function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
});
//加载表格数据
initTableAssetList();
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
}
});
//加载表格数据
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
......@@ -172,12 +160,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "asset032", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......@@ -238,19 +222,15 @@ layui.config({
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset026", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, json);
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
assetList.push({
id: thisRowValue,
list: json.rows
});
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, json);
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
}, async: false});
}
}
......
......@@ -28,12 +28,8 @@ layui.config({
typeName: $("#typeName").val()
};
AjaxPostUtil.request({url: flowableBasePath + "assettype005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -27,61 +27,53 @@ layui.config({
//初始化资产类别
function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset011", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset011", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
});
//初始化一行数据
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置编号为空
}
});
//初始化一行数据
addRow();
}});
}
......@@ -141,12 +133,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "asset012", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,36 +13,32 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "asset013", params:{rowId: parent.rowId}, type: 'json', method: "GET", callback: function (json) {
if(json.returnCode == 0) {
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -20,84 +20,72 @@ layui.config({
var sTableData = "";
AjaxPostUtil.request({url: flowableBasePath + "asset014", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initTypeHtml();
matchingLanguage();
}});
// 初始化资产类别
function initTypeHtml() {
AjaxPostUtil.request({url: flowableBasePath + "assettype006", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset011", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
typeHtml = getDataUseHandlebars(selOption, json); //加载类别数据
//渲染
form.render();
//类型加载变化事件
form.on('select(selectTypeProperty)', function(data) {
var thisRowNum = data.elem.id.replace("typeId", "");
var thisRowValue = data.value;
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
if(inPointArray(thisRowValue, assetList)) {
//类型对应的资产存在js对象中
var list = getListPointArray(thisRowValue, assetList);
resetAssetList(thisRowNum, list); //重置选择行的资产列表
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset011", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
assetList.push({
id: thisRowValue,
list: json.rows
});
resetAssetList(thisRowNum, json.rows); //重置选择行的资产列表
}});
}
});
//加载表格数据
initTableAssetList();
}
});
//商品加载变化事件
form.on('select(selectAssetarProperty)', function(data) {
var thisRowNum = data.elem.id.replace("assetId", "");
var thisRowValue = data.value;
var thisRowTypeChooseId = $("#typeId" + thisRowNum).val();
if(!isNull(thisRowValue) && thisRowValue != '请选择') {
var list = getListPointArray(thisRowTypeChooseId, assetList);
$.each(list, function(i, item) {
if(item.id === thisRowValue) {
$("#specificationsName" + thisRowNum).html(item.specificationsName);
$("#assetNum" + thisRowNum).html(item.assetNum);
return false;
}
});
} else {
$("#specificationsName" + thisRowNum).html(""); //重置规格为空
$("#assetNum" + thisRowNum).html(""); //重置库存为空
}
});
//加载表格数据
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
......@@ -170,12 +158,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "asset015", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......@@ -236,19 +220,15 @@ layui.config({
} else {
//类型对应的资产不存在js对象中
AjaxPostUtil.request({url: flowableBasePath + "asset011", params: {typeId: thisRowValue}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
assetList.push({
id: thisRowValue,
list: json.rows
});
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, json);
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
assetList.push({
id: thisRowValue,
list: json.rows
});
//重置选择行的资产列表
var sHtml = getDataUseHandlebars(selOption, json);
$("#assetId" + thisRowNum).html(sHtml); //重置商品列表下拉框
$("#assetId" + thisRowNum).val(item.assetId);
form.render('select');
}, async: false});
}
}
......
......@@ -73,12 +73,8 @@ layui.config({
return false;
}
AjaxPostUtil.request({url: flowableBasePath + "conferenceroom009", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -26,16 +26,11 @@ layui.config({
}
});
//预定时间
laydate.render({
elem : '#reserveTime',
type : 'datetime',
trigger : 'click',
range : true
});
// 预定时间
laydate.render({elem : '#reserveTime', type : 'datetime', trigger : 'click', range : true});
// 获取当前登录员工信息
systemCommonUtil.getSysCurrentLoginUserMation(function (data){
systemCommonUtil.getSysCurrentLoginUserMation(function (data) {
$("#title").html("会议室预定申请单-" + getYMDFormatDate() + '-' + data.bean.userName);
$("#name").html(data.bean.userName);
});
......@@ -73,12 +68,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,34 +13,30 @@ layui.config({
var reserveTemplate = $("#reserveTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve003", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#showForm").append(getDataUseHandlebars(reserveTemplate, json));
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#showForm").append(getDataUseHandlebars(reserveTemplate, json));
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -14,43 +14,34 @@ layui.config({
var reserveTemplate = $("#reserveTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#showForm").append(getDataUseHandlebars(reserveTemplate, json));
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$("#showForm").append(getDataUseHandlebars(reserveTemplate, json));
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
// 预定时间
laydate.render({
elem : '#reserveTime',
type : 'datetime',
trigger : 'click',
range : true
});
// 会议室
showGrid({
id: "conferenceRoom",
url: flowableBasePath + "conferenceroomreserve008",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
$("#conferenceRoom").val(json.bean.conferenceRoom);
form.render('select');
}
});
// 预定时间
laydate.render({elem : '#reserveTime', type : 'datetime', trigger : 'click', range : true});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
// 会议室
showGrid({
id: "conferenceRoom",
url: flowableBasePath + "conferenceroomreserve008",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
$("#conferenceRoom").val(json.bean.conferenceRoom);
form.render('select');
}
matchingLanguage();
});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
matchingLanguage();
}});
// 保存为草稿
......@@ -92,12 +83,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "conferenceroomreserve005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -28,15 +28,11 @@ layui.config({
// 初始化印章名称
function initSealNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "seal007", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
form.render();
// 初始化一行数据
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
form.render();
// 初始化一行数据
addRow();
}});
}
......@@ -90,12 +86,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "sealborrow002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,35 +13,31 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "sealborrow003", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
// 状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
// 附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -21,38 +21,30 @@ layui.config({
var sTableData = ""
AjaxPostUtil.request({url: flowableBasePath + "sealborrow004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initSealNameHtml();
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initSealNameHtml();
}});
//初始化印章名称
function initSealNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "seal007", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
matchingLanguage();
form.render();
// 加载表格数据
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
matchingLanguage();
form.render();
// 加载表格数据
initTableAssetList();
}});
}
......@@ -119,12 +111,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "sealborrow005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -123,12 +123,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "sealborrow006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadBorrowTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadBorrowTable();
}});
});
});
......
......@@ -28,20 +28,16 @@ layui.config({
//初始化印章名称
function initSealNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "sealrevert008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
form.render();
//初始化一行数据
addRow();
//名称选择事件
form.on('select(selectSealIdProperty)', function(data) {
var thisRowNum = data.elem.id.replace("sealId", "");
var thisRowValue = data.value;
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
nameHtml = getDataUseHandlebars(selOption, json); //加载类别数据
matchingLanguage();
form.render();
//初始化一行数据
addRow();
//名称选择事件
form.on('select(selectSealIdProperty)', function(data) {
var thisRowNum = data.elem.id.replace("sealId", "");
var thisRowValue = data.value;
});
}});
}
skyeyeEnclosure.init('enclosureUpload');
......@@ -94,12 +90,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "sealrevert002", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,35 +13,31 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "sealrevert003", params: {rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
//附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
//附件回显
var str = "";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
matchingLanguage();
}});
$("body").on("click", ".enclosureItem", function() {
......
......@@ -20,43 +20,35 @@ layui.config({
var sTableData = ""
AjaxPostUtil.request({url: flowableBasePath + "sealrevert004", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#revertTitle").html(json.bean.title);
$("#revertName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initSealNameHtml();
$("#revertTitle").html(json.bean.title);
$("#revertName").html(json.bean.userName);
$("#remark").val(json.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
sTableData = json.bean.goods;
initSealNameHtml();
}});
//初始化印章名称
function initSealNameHtml() {
AjaxPostUtil.request({url: flowableBasePath + "sealrevert008", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
matchingLanguage();
form.render();
//名称选择事件
form.on('select(selectSealIdProperty)', function(data) {
var thisRowNum = data.elem.id.replace("sealId", "");
var thisRowValue = data.value;
});
//加载表格数据
initTableAssetList();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
nameHtml = getDataUseHandlebars(selOption, json); //加载名称数据
matchingLanguage();
form.render();
//名称选择事件
form.on('select(selectSealIdProperty)', function(data) {
var thisRowNum = data.elem.id.replace("sealId", "");
var thisRowValue = data.value;
});
//加载表格数据
initTableAssetList();
}});
}
......@@ -123,12 +115,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "sealrevert005", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -16,10 +16,7 @@ layui.config({
// 印章归还
authBtn('1596962824460');
laydate.render({
elem: '#revertTime',
range: '~'
});
laydate.render({elem: '#revertTime', range: '~'});
// 印章归还列表
table.render({
......@@ -124,12 +121,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "sealrevert006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadRevertTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadRevertTable();
}});
});
});
......
......@@ -90,12 +90,8 @@ layui.config({
return false;
}
AjaxPostUtil.request({url: flowableBasePath + "vehicle009", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -22,20 +22,10 @@ layui.config({
},
ajaxSendAfter:function (json) {
// 事故时间
laydate.render({
elem: '#accidentTime',
type: 'date',
max: getYMDFormatDate(),// 设置最大可选的日期
trigger: 'click'
});
laydate.render({elem: '#accidentTime', type: 'date', max: getYMDFormatDate(), trigger: 'click'});
// 送修时间段选择
laydate.render({
elem: '#repairTime',
type: 'date',
range: true,
trigger: 'click'
});
laydate.render({elem: '#repairTime', type: 'date', range: true, trigger: 'click'});
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
......@@ -69,12 +59,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "accident005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -28,12 +28,8 @@ layui.config({
coverageName: $("#coverageName").val()
};
AjaxPostUtil.request({url: flowableBasePath + "coverage005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -22,18 +22,10 @@ layui.config({
},
ajaxSendAfter:function (json) {
// 本次年检时间
laydate.render({
elem: '#thisInspectionTime',
type: 'date',
trigger: 'click'
});
laydate.render({elem: '#thisInspectionTime', type: 'date', trigger: 'click'});
// 下次年检时间
laydate.render({
elem: '#nextInspectionTime',
type: 'date',
trigger: 'click'
});
laydate.render({elem: '#nextInspectionTime', type: 'date', trigger: 'click'});
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
......@@ -69,12 +61,8 @@ layui.config({
}
}
AjaxPostUtil.request({url: flowableBasePath + "inspection005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -20,18 +20,14 @@ layui.config({
});
AjaxPostUtil.request({url: flowableBasePath + "coverage006", params:{}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
var row = json.rows;
for(var i = 0;i < json.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
form.render('checkbox');
}
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
var row = json.rows;
for(var i = 0;i < json.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
form.render('checkbox');
}
}});
......@@ -41,13 +37,8 @@ layui.config({
form.render('select');
});
//投保有效期时间
laydate.render({
elem: '#validityTime',
type: 'date',
range: true,
trigger: 'click'
});
// 投保有效期时间
laydate.render({elem: '#validityTime', type: 'date', range: true, trigger: 'click'});
skyeyeEnclosure.init('enclosureUpload');
matchingLanguage();
......@@ -163,12 +154,8 @@ layui.config({
}
}
AjaxPostUtil.request({url: flowableBasePath + "insurance002", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
}
......
......@@ -59,40 +59,36 @@ layui.config({
}
matchingLanguage();
AjaxPostUtil.request({url: flowableBasePath + "coverage006", params:{}, type: 'json', callback: function(thisjson){
if(thisjson.returnCode == 0) {
var row = thisjson.rows;
var coveragearr = coveragestr.split(",");
for(var i = 0;i < thisjson.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
var f = false;
for(var m = 0;m < coveragearr.length; m++){
if(row[i].id == coveragearr[m]){
f = true;
}
}
if(f){
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
}
form.render('checkbox');
}
var arr = json.bean.coverageId.split(",");
for(var i = 0; i < arr.length; i++){
var str = arr[i].split("-");
for(var j = 0; j < str.length; j++){
var fu = $("#addTable").find("span[rowId="+str[0]+"]").parent();
fu.next().find("span").html(str[1]);//对应的保费
fu.next().next().find("span").html(str[2]);//对应的保额
if(str.length > 3){
fu.next().next().next().find("span").html(str[3]);//对应的备注
}
}
}
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var row = thisjson.rows;
var coveragearr = coveragestr.split(",");
for(var i = 0;i < thisjson.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
var f = false;
for(var m = 0;m < coveragearr.length; m++){
if(row[i].id == coveragearr[m]){
f = true;
}
}
if(f){
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
}
form.render('checkbox');
}
var arr = json.bean.coverageId.split(",");
for(var i = 0; i < arr.length; i++){
var str = arr[i].split("-");
for(var j = 0; j < str.length; j++){
var fu = $("#addTable").find("span[rowId="+str[0]+"]").parent();
fu.next().find("span").html(str[1]);//对应的保费
fu.next().next().find("span").html(str[2]);//对应的保额
if(str.length > 3){
fu.next().next().next().find("span").html(str[3]);//对应的备注
}
}
}
}
});
}
......
......@@ -67,126 +67,113 @@ layui.config({
},
ajaxSendAfter:function (json) {
// 投保有效期时间
laydate.render({
elem: '#validityTime',
type: 'date',
range: true,
trigger: 'click'
});
laydate.render({elem: '#validityTime', type: 'date', range: true, trigger: 'click'});
$("#insuranceAllPrice").html(json.bean.insuranceAllPrice);
AjaxPostUtil.request({url: flowableBasePath + "coverage006", params:{}, type: 'json', callback: function(thisjson){
if(thisjson.returnCode == 0) {
var row = thisjson.rows;
for(var i = 0;i < thisjson.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
form.render('checkbox');
}
var arr = json.bean.coverageId.split(",");
for(var i = 0; i < arr.length; i++){
var str = arr[i].split("-");
for(var j = 0; j < str.length; j++){
$('input:checkbox[rowId="' + str[0] + '"]').attr("checked", true);
var fu = $("#addTable").find("input[rowId=" + str[0] + "]").parent();
fu.next().find("input").val(str[1]);//对应的保费
fu.next().next().find("input").val(str[2]);//对应的保额
if(str.length > 3){
fu.next().next().next().find("input").val(str[3]);//对应的备注
}
fu.next().find("input").removeAttr('disabled');
fu.next().next().find("input").removeAttr('disabled');
fu.next().next().next().find("input").removeAttr('disabled');
fu.next().find("input").removeClass('layui-disabled');
fu.next().next().find("input").removeClass('layui-disabled');
fu.next().next().next().find("input").removeClass('layui-disabled');
}
}
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
var row = thisjson.rows;
for(var i = 0;i < thisjson.total; i++){
var params = {
id: row[i].id,
name: row[i].name
};
$("#addTable").append(getDataUseHandlebars(insuranceaddtableTemplate, params));
form.render('checkbox');
}
var arr = json.bean.coverageId.split(",");
for(var i = 0; i < arr.length; i++){
var str = arr[i].split("-");
for(var j = 0; j < str.length; j++){
$('input:checkbox[rowId="' + str[0] + '"]').attr("checked", true);
var fu = $("#addTable").find("input[rowId=" + str[0] + "]").parent();
fu.next().find("input").val(str[1]);//对应的保费
fu.next().next().find("input").val(str[2]);//对应的保额
if(str.length > 3){
fu.next().next().next().find("input").val(str[3]);//对应的备注
}
fu.next().find("input").removeAttr('disabled');
fu.next().next().find("input").removeAttr('disabled');
fu.next().next().next().find("input").removeAttr('disabled');
fu.next().find("input").removeClass('layui-disabled');
fu.next().next().find("input").removeClass('layui-disabled');
fu.next().next().next().find("input").removeClass('layui-disabled');
}
}
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
rowId: parent.rowId,
insuranceCompany: $("#insuranceCompany").val(),
insuredTelephone: $("#insuredTelephone").val(),
validityStartTime: $("#validityTime").val().split(" - ")[0],
validityEndTime: $("#validityTime").val().split(" - ")[1],
insuranceAllPrice: $("#insuranceAllPrice").val(),
roomAddDesc: $("#roomAddDesc").val(),
insuranceAllPrice: $("#insuranceAllPrice").html(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
var coverageIds = "";
var istrue = true;
$.each($('input:checkbox:checked'),function(){
if(istrue){
var rowId = $(this).attr("rowId");//选中的复选框的值
var fu = $("#addTable").find("input[rowId=" + rowId + "]").parent();
var bf = fu.next().find("input").val();//对应的保费
var be = fu.next().next().find("input").val();//对应的保额
if(isNull(bf)){
winui.window.msg('请输入选中的险种对应的保费', {icon: 2, time: 2000});
istrue = false;
} else {
var str = /^0{1}([.]\d{1,2})?$|^[1-9]\d*([.]{1}[0-9]{1,2})?$/;
var flag = str.test(bf);
if(!flag){
winui.window.msg('保费小数点后最多两位!', {icon: 2, time: 2000});
istrue = false;
} else {
if(isNull(be)){
winui.window.msg('请输入选中的险种对应的保额', {icon: 2, time: 2000});
istrue = false;
} else {
var flag = str.test(be);
if(!flag){
winui.window.msg('保额小数点后最多两位!', {icon: 2, time: 2000});
istrue = false;
}
}
}
}
var desc = fu.next().next().next().find("input").val();//对应的备注
str = rowId + "," + bf + "," + be + "," + desc;
coverageIds = coverageIds + str + ";";
}
});
if(istrue){
params.coverageIds = coverageIds;
if(isNull(params.coverageIds)){
winui.window.msg('请选择险种', {icon: 2, time: 2000});
return false;
}
if(params.insuredTelephone != ""){
var mobile = /^0?1[3|4|5|8][0-9]\d{8}$/,phone = /^0[\d]{2,3}-[\d]{7,8}$/;
var flag = mobile.test(params.insuredTelephone) || phone.test(params.insuredTelephone);
if(!flag){
winui.window.msg('请输入正确的投保电话', {icon: 2, time: 2000});
return false;
}
}
AjaxPostUtil.request({url: flowableBasePath + "insurance005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
}
return false;
});
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
rowId: parent.rowId,
insuranceCompany: $("#insuranceCompany").val(),
insuredTelephone: $("#insuredTelephone").val(),
validityStartTime: $("#validityTime").val().split(" - ")[0],
validityEndTime: $("#validityTime").val().split(" - ")[1],
insuranceAllPrice: $("#insuranceAllPrice").val(),
roomAddDesc: $("#roomAddDesc").val(),
insuranceAllPrice: $("#insuranceAllPrice").html(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
var coverageIds = "";
var istrue = true;
$.each($('input:checkbox:checked'),function(){
if(istrue){
var rowId = $(this).attr("rowId");//选中的复选框的值
var fu = $("#addTable").find("input[rowId=" + rowId + "]").parent();
var bf = fu.next().find("input").val();//对应的保费
var be = fu.next().next().find("input").val();//对应的保额
if(isNull(bf)){
winui.window.msg('请输入选中的险种对应的保费', {icon: 2, time: 2000});
istrue = false;
} else {
var str = /^0{1}([.]\d{1,2})?$|^[1-9]\d*([.]{1}[0-9]{1,2})?$/;
var flag = str.test(bf);
if(!flag){
winui.window.msg('保费小数点后最多两位!', {icon: 2, time: 2000});
istrue = false;
} else {
if(isNull(be)){
winui.window.msg('请输入选中的险种对应的保额', {icon: 2, time: 2000});
istrue = false;
} else {
var flag = str.test(be);
if(!flag){
winui.window.msg('保额小数点后最多两位!', {icon: 2, time: 2000});
istrue = false;
}
}
}
}
var desc = fu.next().next().next().find("input").val();//对应的备注
str = rowId + "," + bf + "," + be + "," + desc;
coverageIds = coverageIds + str + ";";
}
});
if(istrue){
params.coverageIds = coverageIds;
if(isNull(params.coverageIds)){
winui.window.msg('请选择险种', {icon: 2, time: 2000});
return false;
}
if(params.insuredTelephone != ""){
var mobile = /^0?1[3|4|5|8][0-9]\d{8}$/,phone = /^0[\d]{2,3}-[\d]{7,8}$/;
var flag = mobile.test(params.insuredTelephone) || phone.test(params.insuredTelephone);
if(!flag){
winui.window.msg('请输入正确的投保电话', {icon: 2, time: 2000});
return false;
}
}
AjaxPostUtil.request({url: flowableBasePath + "insurance005", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
}
return false;
});
}
});
}
......
......@@ -22,12 +22,7 @@ layui.config({
},
ajaxSendAfter:function (json) {
// 维修保养时间段选择
laydate.render({
elem: '#maintenanceTime',
type: 'date',
range: true,
trigger: 'click'
});
laydate.render({elem: '#maintenanceTime', type: 'date', range: true, trigger: 'click'});
$("input:radio[name=maintenanceType][value=" + json.bean.maintenanceType + "]").attr("checked", true);
// 附件回显
......@@ -49,12 +44,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "maintenance005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -22,11 +22,7 @@ layui.config({
},
ajaxSendAfter:function (json) {
// 加油日期
laydate.render({
elem: '#oilTime',
type: 'date',
trigger: 'click'
});
laydate.render({elem: '#oilTime', type: 'date', trigger: 'click'});
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
......@@ -44,12 +40,8 @@ layui.config({
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "oiling005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -57,14 +57,10 @@ layui.config({
//初始化指定用车
function initDesignatedVehicle(num) {
AjaxPostUtil.request({url: flowableBasePath + "vehicle011", params: {passengerNum: num}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
var designatedVehicleHtml = getDataUseHandlebars(selOption, json); //加载类别数据
$("#designatedVehicleId").html(designatedVehicleHtml);
//渲染
form.render("select");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var designatedVehicleHtml = getDataUseHandlebars(selOption, json); //加载类别数据
$("#designatedVehicleId").html(designatedVehicleHtml);
//渲染
form.render("select");
}});
}
......@@ -72,14 +68,10 @@ layui.config({
function initDriver() {
loadDriver = true;
AjaxPostUtil.request({url: flowableBasePath + "vehicle012", params: {}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
var driverHtml = getDataUseHandlebars(selOption, json); //加载类别数据
$("#driverId").html(driverHtml);
//渲染
form.render("select");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var driverHtml = getDataUseHandlebars(selOption, json); //加载类别数据
$("#driverId").html(driverHtml);
//渲染
form.render("select");
}});
}
......@@ -120,12 +112,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "vehicle013", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -13,45 +13,41 @@ layui.config({
var useTemplate = $("#useTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "vehicle016", params:{rowId: parent.rowId}, type: 'json', callback: function (json) {
if(json.returnCode == 0) {
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
if(json.bean.vehicleState == '1'){
json.bean.vehicleStateName = "<span class='state-up'>" + json.bean.vehicleStateName + "</span>";
}else if(json.bean.vehicleState == '2'){
json.bean.vehicleStateName = "<span class='state-down'>" + json.bean.vehicleStateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
if(json.bean.state == '2'){
$(".actual").removeClass("layui-hide");
$("#vehicleImg").attr("src", fileBasePath + json.bean.vehicleImg);
}
matchingLanguage();
}else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
//状态
if(json.bean.state == '0'){
json.bean.stateName = "<span>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '1'){
json.bean.stateName = "<span class='state-new'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '2'){
json.bean.stateName = "<span class='state-up'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '3'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '4'){
json.bean.stateName = "<span class='state-down'>" + json.bean.stateName + "</span>";
}else if(json.bean.state == '5'){
json.bean.stateName = "<span class='state-error'>" + json.bean.stateName + "</span>";
}
if(json.bean.vehicleState == '1'){
json.bean.vehicleStateName = "<span class='state-up'>" + json.bean.vehicleStateName + "</span>";
}else if(json.bean.vehicleState == '2'){
json.bean.vehicleStateName = "<span class='state-down'>" + json.bean.vehicleStateName + "</span>";
}
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
var _html = getDataUseHandlebars(useTemplate, json);//加载数据
$("#showForm").html(_html);
$("#enclosureUploadBtn").html(str);
if(json.bean.state == '2'){
$(".actual").removeClass("layui-hide");
$("#vehicleImg").attr("src", fileBasePath + json.bean.vehicleImg);
}
matchingLanguage();
}});
$("body").on("click", "#vehicleImg", function() {
......
......@@ -17,41 +17,37 @@ layui.config({
var useEditTemplate = $("#useEditTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "vehicle019", params: {rowId: parent.rowId}, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$("#useTitle").html(json.bean.title);
$("#useName").html(json.bean.userName);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
$(".vehicleEdit").html(getDataUseHandlebars(useEditTemplate, json));
$("input:radio[name=isSelfDrive][value=" + json.bean.isSelfDrive + "]").attr("checked", true);
$("#departureTime").val(json.bean.departureTime);
// 时间段
laydate.render({
elem: '#departureTime',
type:'datetime',
range: '~',
format: 'yyyy-MM-dd HH:mm:ss',
done: function(value, date){
$("#departureTime").val(value);
}
});
initDesignatedVehicle(json.bean.passengerNum, json.bean.designatedVehicleId);
if(json.bean.isSelfDrive == '2'){
$("#ishasDriver").removeClass("layui-hide");
initDriver(json.bean.driverId);
}
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
$(".vehicleEdit").html(getDataUseHandlebars(useEditTemplate, json));
$("input:radio[name=isSelfDrive][value=" + json.bean.isSelfDrive + "]").attr("checked", true);
$("#departureTime").val(json.bean.departureTime);
// 时间段
laydate.render({
elem: '#departureTime',
type:'datetime',
range: '~',
format: 'yyyy-MM-dd HH:mm:ss',
done: function(value, date){
$("#departureTime").val(value);
}
matchingLanguage();
form.render();
});
initDesignatedVehicle(json.bean.passengerNum, json.bean.designatedVehicleId);
if(json.bean.isSelfDrive == '2'){
$("#ishasDriver").removeClass("layui-hide");
initDriver(json.bean.driverId);
}
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
matchingLanguage();
form.render();
}});
//是否自驾进行变动
......@@ -148,12 +144,8 @@ layui.config({
params.driverId = "";
}
AjaxPostUtil.request({url: flowableBasePath + "vehicle020", params: params, type: 'json', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -83,22 +83,18 @@ layui.config({
*/
function loadListMation(appId){
AjaxPostUtil.request({url: reqBasePath + "queryAllSysEveReqMapping", params: {appId: appId}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) {
// 1.模块
model = loadModel(json);
$("#modelId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), {rows: model}));
$("#appList").html(getDataUseHandlebars(modelTemplate, {rows: model}));
// 2.分组
groupList = loadBox(json);
jsonList = json.rows;
// 默认加载第一个模块的接口数据
loadPointNumApiList(model[0].id);
matchingLanguage();
form.render();
loadDefaultMain();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
// 1.模块
model = loadModel(json);
$("#modelId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), {rows: model}));
$("#appList").html(getDataUseHandlebars(modelTemplate, {rows: model}));
// 2.分组
groupList = loadBox(json);
jsonList = json.rows;
// 默认加载第一个模块的接口数据
loadPointNumApiList(model[0].id);
matchingLanguage();
form.render();
loadDefaultMain();
}});
}
......@@ -221,13 +217,9 @@ layui.config({
rowId: $(this).attr("rowid")
};
AjaxPostUtil.request({url: reqBasePath + "queryApiDetails", params: params, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) {
var str = getDataUseHandlebars(fileMationTemplate, json);
$("#contentDesc").html(str);
active[type] ? active[type].call(this) : '';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var str = getDataUseHandlebars(fileMationTemplate, json);
$("#contentDesc").html(str);
active[type] ? active[type].call(this) : '';
}});
}
});
......@@ -267,23 +259,19 @@ layui.config({
function loadDefaultMain(){
AjaxPostUtil.request({url: reqBasePath + "queryLimitRestrictions", params: {}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) {
var item = {};
item.reception = getReceptionLimitMation();
item.backstage = json.rows;
$("#contentDesc").html(getDataUseHandlebars(defaultTemplate, {bean: item}));
$('#chart-container').orgchart({
'data' : getXMLAttribute(),
'nodeTitle': 'title',
'nodeContent': 'name',
'pan': true,
'zoom': true,
'interactive': false
});
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var item = {};
item.reception = getReceptionLimitMation();
item.backstage = json.rows;
$("#contentDesc").html(getDataUseHandlebars(defaultTemplate, {bean: item}));
$('#chart-container').orgchart({
'data' : getXMLAttribute(),
'nodeTitle': 'title',
'nodeContent': 'name',
'pan': true,
'zoom': true,
'interactive': false
});
form.render();
}});
}
......@@ -295,12 +283,8 @@ layui.config({
};
var fileName = $("#apiMicroservicesId").find("option:selected").text() + "-" + $(this).attr("fileName");
AjaxPostUtil.request({url: reqBasePath + "queryApiDetails", params: params, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) {
var str = getDataUseHandlebars(getFileContent('tpl/apiPage/mdModelFile.tpl'), json);
sysFileUtil.saveAs(new Blob([str]), fileName);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
var str = getDataUseHandlebars(getFileContent('tpl/apiPage/mdModelFile.tpl'), json);
sysFileUtil.saveAs(new Blob([str]), fileName);
}});
});
......
......@@ -49,12 +49,8 @@ layui.config({
interviewer: interviewer[0].id
};
AjaxPostUtil.request({url: flowableBasePath + "setBossInterviewer", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -11,9 +11,7 @@ layui.config({
laydate = layui.laydate,
form = layui.form;
laydate.render({
elem: '#interviewTime'
});
laydate.render({elem: '#interviewTime'});
matchingLanguage();
// 保存为草稿
......@@ -42,12 +40,8 @@ layui.config({
state: state
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewArrangement", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -22,9 +22,7 @@ layui.config({
json.bean.basicResume = stringManipulation.textAreaShow(json.bean.basicResume);
},
ajaxSendAfter: function (json) {
laydate.render({
elem: '#interviewTime'
});
laydate.render({elem: '#interviewTime'});
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
bossUtil.bossIntervieweeChooseMation = {
......@@ -65,12 +63,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewArrangement", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
}
......
......@@ -16,10 +16,7 @@ layui.config({
// 新增
authBtn('1649929352279');
laydate.render({
elem: '#createTime',
range: '~'
});
laydate.render({elem: '#createTime', range: '~'});
table.render({
id: 'messageTable',
......@@ -116,12 +113,8 @@ layui.config({
id: data.id,
};
AjaxPostUtil.request({url: flowableBasePath + "submitBossInterviewArrangement", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -131,12 +124,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "nullifyBossInterviewArrangement", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -99,12 +99,8 @@ layui.config({
trialTime: $("#trialTime").val()
};
AjaxPostUtil.request({url: flowableBasePath + "setInductionResult", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -82,12 +82,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewJobTransfer", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -117,12 +117,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewJobTransfer", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -16,10 +16,7 @@ layui.config({
// 新增
authBtn('1651308552871');
laydate.render({
elem: '#createTime',
range: '~'
});
laydate.render({elem: '#createTime', range: '~'});
table.render({
id: 'messageTable',
......@@ -103,12 +100,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewJobTransfer", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -138,12 +131,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewJobTransferToSubApproval", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -154,12 +143,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewJobTransferToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -63,12 +63,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewQuit", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -80,12 +80,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewQuit", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -91,12 +91,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewQuit", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -126,12 +122,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewQuitToSubApproval", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -142,12 +134,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewQuitToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -63,12 +63,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewRegularWorker", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -76,12 +76,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewRegularWorker", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -90,12 +90,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewRegularWorker", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -125,12 +121,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewRegularWorkerToSubApproval", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -141,12 +133,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewRegularWorkerToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -31,12 +31,8 @@ layui.config({
enclosureResume: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload')
};
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee002", params: params, type: 'json', method: "POST", callback: function(json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -62,12 +62,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee005", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -59,12 +59,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -74,12 +74,8 @@ layui.config({
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function(index){
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "bossInterviewee003", params:{id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -32,12 +32,8 @@ layui.config({
};
AjaxPostUtil.request({url: flowableBasePath + "bossIntervieweeFrom005", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -35,12 +35,8 @@ layui.config({
evaluation: $("#evaluation").val()
};
AjaxPostUtil.request({url: flowableBasePath + "setBossInterviewResult", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -60,12 +60,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossPersonRequire", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -81,12 +81,8 @@ layui.config({
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossPersonRequire", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -95,12 +95,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossPersonRequire", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -130,12 +126,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossPersonRequireToSubApproval", params: params, type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -146,12 +138,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossPersonRequireToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -54,12 +54,8 @@ layui.config({
personLiable: personLiableId
};
AjaxPostUtil.request({url: flowableBasePath + "setUppersonLiable", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -123,12 +123,8 @@ layui.config({
};
if(!isNull($("#approvalId").val()) && !isNull(ids)){
AjaxPostUtil.request({url: flowableBasePath + "checkwork005", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
} else {
winui.window.msg("请选择审批人!", {icon: 2, time: 2000});
......
......@@ -28,12 +28,8 @@ layui.config({
};
AjaxPostUtil.request({url: flowableBasePath + "checkwork011", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -122,12 +122,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip002", params: params, type: 'json', method: 'POST', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -10,25 +10,21 @@ layui.config({
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip003", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
}});
});
});
\ No newline at end of file
......@@ -21,68 +21,64 @@ layui.config({
var selOption = getFileContent('tpl/template/select-option.tpl');
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip004", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function (mation) {
if (mation.returnCode == 0) {
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
$("#businessTripAddress").val(mation.bean.businessTripAddress);
$("#businessTripReason").val(mation.bean.businessTripReason);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
// 考勤班次变化
form.on('select(timeId)', function (data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#timeStartTime" + thisRowNum).html("");
$("#timeEndTime" + thisRowNum).html("");
$("#businessTravelHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if (timeMation != null) {
businessTravelDayElem[thisRowNum].config.chooseDay = timeMation.days;
$("#timeStartTime" + thisRowNum).html(timeMation.startTime);
$("#timeEndTime" + thisRowNum).html(timeMation.endTime);
calcBusinessTravelHour(thisRowNum);
} else {
businessTravelDayElem[thisRowNum].config.chooseDay = [];
}
});
form.render();
matchingLanguage();
$.each(mation.bean.businessTripDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#timeStartTime" + (rowNum - 1).toString()).html(item.timeStartTime);
$("#timeEndTime" + (rowNum - 1).toString()).html(item.timeEndTime);
$("#businessTravelDay" + (rowNum - 1).toString()).val(item.businessTravelDay);
$("#businessTravelHour" + (rowNum - 1).toString()).html(item.businessTravelHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
});
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
$("#businessTripAddress").val(mation.bean.businessTripAddress);
$("#businessTripReason").val(mation.bean.businessTripReason);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
// 考勤班次变化
form.on('select(timeId)', function (data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#timeStartTime" + thisRowNum).html("");
$("#timeEndTime" + thisRowNum).html("");
$("#businessTravelHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if (timeMation != null) {
businessTravelDayElem[thisRowNum].config.chooseDay = timeMation.days;
$("#timeStartTime" + thisRowNum).html(timeMation.startTime);
$("#timeEndTime" + thisRowNum).html(timeMation.endTime);
calcBusinessTravelHour(thisRowNum);
} else {
businessTravelDayElem[thisRowNum].config.chooseDay = [];
}
});
form.render();
matchingLanguage();
$.each(mation.bean.businessTripDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#timeStartTime" + (rowNum - 1).toString()).html(item.timeStartTime);
$("#timeEndTime" + (rowNum - 1).toString()).html(item.timeEndTime);
$("#businessTravelDay" + (rowNum - 1).toString()).val(item.businessTravelDay);
$("#businessTravelHour" + (rowNum - 1).toString()).html(item.businessTravelHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
});
}});
// 保存为草稿
......@@ -154,12 +150,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip005", params: params, type: 'json', method: 'PUT', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -103,12 +103,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip009", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -138,12 +134,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -154,12 +146,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkbusinesstrip007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -145,12 +145,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave002", params: params, type: 'json', method: 'POST', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -10,25 +10,21 @@ layui.config({
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave003", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
}});
});
});
\ No newline at end of file
......@@ -24,87 +24,83 @@ layui.config({
var selOption = getFileContent('tpl/template/select-option.tpl');
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave004", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(mation) {
if(mation.returnCode == 0) {
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
// 考勤班次变化
form.on('select(timeId)', function (data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#cancelDay" + thisRowNum).val("");
$("#cancelStartTime" + thisRowNum).val("");
$("#cancelEndTime" + thisRowNum).val("");
$("#cancelHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if (timeMation != null) {
cancelDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
cancelStartElem[thisRowNum].config.min = min;
cancelStartElem[thisRowNum].config.max = max;
cancelEndElem[thisRowNum].config.min = min;
cancelEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
cancelDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
});
$.each(mation.bean.cancelLeaveDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#workTime" + (rowNum - 1).toString()).html(item.timeStartTime + " ~ " + item.timeEndTime);
$("#cancelDay" + (rowNum - 1).toString()).val(item.cancelDay);
$("#cancelStartTime" + (rowNum - 1).toString()).val(item.cancelStartTime);
$("#cancelEndTime" + (rowNum - 1).toString()).val(item.cancelEndTime);
$("#cancelHour" + (rowNum - 1).toString()).html(item.cancelHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
form.render();
matchingLanguage();
});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
// 考勤班次变化
form.on('select(timeId)', function (data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#cancelDay" + thisRowNum).val("");
$("#cancelStartTime" + thisRowNum).val("");
$("#cancelEndTime" + thisRowNum).val("");
$("#cancelHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if (timeMation != null) {
cancelDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
cancelStartElem[thisRowNum].config.min = min;
cancelStartElem[thisRowNum].config.max = max;
cancelEndElem[thisRowNum].config.min = min;
cancelEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
cancelDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
});
$.each(mation.bean.cancelLeaveDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#workTime" + (rowNum - 1).toString()).html(item.timeStartTime + " ~ " + item.timeEndTime);
$("#cancelDay" + (rowNum - 1).toString()).val(item.cancelDay);
$("#cancelStartTime" + (rowNum - 1).toString()).val(item.cancelStartTime);
$("#cancelEndTime" + (rowNum - 1).toString()).val(item.cancelEndTime);
$("#cancelHour" + (rowNum - 1).toString()).html(item.cancelHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
form.render();
matchingLanguage();
});
}});
// 保存为草稿
......@@ -174,12 +170,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave005", params: params, type: 'json', method: 'PUT', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -19,10 +19,7 @@ layui.config({
authBtn('1618112042591');
// 申请时间
laydate.render({
elem: '#applyTime',
range: '~'
});
laydate.render({elem: '#applyTime', range: '~'});
// 我的销假申请列表
table.render({
......@@ -103,12 +100,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave009", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -138,12 +131,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -154,12 +143,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkcancelleave007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -37,87 +37,79 @@ layui.config({
});
// 获取当前员工的年假
AjaxPostUtil.request({url: reqBasePath + "staff010", params: {}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
staffYearHoliday = json.bean.annualLeave;
holidayNumber = json.bean.holidayNumber;
$("#messageTips").html("截至当前剩余年假:" + staffYearHoliday + "小时,剩余补休为:" + holidayNumber + "小时");
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
staffYearHoliday = json.bean.annualLeave;
holidayNumber = json.bean.holidayNumber;
$("#messageTips").html("截至当前剩余年假:" + staffYearHoliday + "小时,剩余补休为:" + holidayNumber + "小时");
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item) {
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
initTypeHtml();
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
initTypeHtml();
});
}});
// 初始化请假类型
function initTypeHtml() {
AjaxPostUtil.request({url: reqBasePath + "sysfdsettings001", params: {}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
$.each(JSON.parse(json.bean.holidaysTypeJson), function (i, item){
leaveType.push({
id: item.holidayNo,
name: item.holidayName,
whetherYearHour: item.whetherYearHour,
whetherComLeave: item.whetherComLeave
});
});
// 考勤班次变化
form.on('select(timeId)', function(data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#leaveDay" + thisRowNum).val("");
$("#leaveStartTime" + thisRowNum).val("");
$("#leaveEndTime" + thisRowNum).val("");
$("#leaveHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if(timeMation != null){
leaveDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
leaveStartElem[thisRowNum].config.min = min;
leaveStartElem[thisRowNum].config.max = max;
leaveEndElem[thisRowNum].config.min = min;
leaveEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
leaveDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
$.each(JSON.parse(json.bean.holidaysTypeJson), function (i, item){
leaveType.push({
id: item.holidayNo,
name: item.holidayName,
whetherYearHour: item.whetherYearHour,
whetherComLeave: item.whetherComLeave
});
form.render();
matchingLanguage();
// 初始化一行数据
addRow();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
});
// 考勤班次变化
form.on('select(timeId)', function(data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#leaveDay" + thisRowNum).val("");
$("#leaveStartTime" + thisRowNum).val("");
$("#leaveEndTime" + thisRowNum).val("");
$("#leaveHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if(timeMation != null){
leaveDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
leaveStartElem[thisRowNum].config.min = min;
leaveStartElem[thisRowNum].config.max = max;
leaveEndElem[thisRowNum].config.min = min;
leaveEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
leaveDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
});
form.render();
matchingLanguage();
// 初始化一行数据
addRow();
}});
}
......@@ -202,12 +194,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave002", params: params, type: 'json', method: 'POST', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -10,25 +10,21 @@ layui.config({
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave003", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
}});
});
});
\ No newline at end of file
......@@ -31,116 +31,104 @@ layui.config({
var selOption = getFileContent('tpl/template/select-option.tpl');
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave004", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(mation) {
if(mation.returnCode == 0) {
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
// 获取当前员工的年假
AjaxPostUtil.request({url: reqBasePath + "staff010", params: {}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
staffYearHoliday = json.bean.annualLeave;
holidayNumber = json.bean.holidayNumber;
$("#messageTips").html("截至当前剩余年假:" + staffYearHoliday + "小时,剩余补休为:" + holidayNumber + "小时");
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item){
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
initTypeHtml(mation);
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
// 获取当前员工的年假
AjaxPostUtil.request({url: reqBasePath + "staff010", params: {}, type: 'json', method: 'GET', callback: function(json) {
staffYearHoliday = json.bean.annualLeave;
holidayNumber = json.bean.holidayNumber;
$("#messageTips").html("截至当前剩余年假:" + staffYearHoliday + "小时,剩余补休为:" + holidayNumber + "小时");
// 获取当前登陆人的考勤班次
checkWorkUtil.getCurrentUserCheckWorkTimeList(function (json) {
$.each(json.rows, function (i, item){
checkWorkTime.push({
id: item.timeId,
name: item.title,
days: item.days,
startTime: item.startTime,
endTime: item.endTime,
restStartTime: item.restStartTime,
restEndTime: item.restEndTime,
type: item.type
});
});
initTypeHtml(mation);
});
}});
}});
// 初始化请假类型
function initTypeHtml(mation) {
AjaxPostUtil.request({url: reqBasePath + "sysfdsettings001", params: {}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
$.each(JSON.parse(json.bean.holidaysTypeJson), function (i, item){
leaveType.push({
id: item.holidayNo,
name: item.holidayName,
whetherYearHour: item.whetherYearHour,
whetherComLeave: item.whetherComLeave
});
});
// 考勤班次变化
form.on('select(timeId)', function(data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#leaveDay" + thisRowNum).val("");
$("#leaveStartTime" + thisRowNum).val("");
$("#leaveEndTime" + thisRowNum).val("");
$("#leaveHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if(timeMation != null){
leaveDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
leaveStartElem[thisRowNum].config.min = min;
leaveStartElem[thisRowNum].config.max = max;
leaveEndElem[thisRowNum].config.min = min;
leaveEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
leaveDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
});
form.render();
matchingLanguage();
$.each(mation.bean.leaveDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#workTime" + (rowNum - 1).toString()).html(item.timeStartTime + " ~ " + item.timeEndTime);
$("#leaveType" + (rowNum - 1).toString()).val(item.leaveType);
$("#leaveDay" + (rowNum - 1).toString()).val(item.leaveDay);
$("#leaveStartTime" + (rowNum - 1).toString()).val(item.leaveStartTime);
$("#leaveEndTime" + (rowNum - 1).toString()).val(item.leaveEndTime);
$("#leaveHour" + (rowNum - 1).toString()).html(item.leaveHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
$.each(JSON.parse(json.bean.holidaysTypeJson), function (i, item){
leaveType.push({
id: item.holidayNo,
name: item.holidayName,
whetherYearHour: item.whetherYearHour,
whetherComLeave: item.whetherComLeave
});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
});
// 考勤班次变化
form.on('select(timeId)', function(data) {
var thisRowNum = data.elem.id.replace("timeId", "");
var thisRowValue = data.value;
$("#leaveDay" + thisRowNum).val("");
$("#leaveStartTime" + thisRowNum).val("");
$("#leaveEndTime" + thisRowNum).val("");
$("#leaveHour" + thisRowNum).html("0");
var timeMation = getInPoingArr(checkWorkTime, "id", thisRowValue);
if(timeMation != null){
leaveDayElem[thisRowNum].config.chooseDay = timeMation.days;
var min = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.startTime.split(':')[0],
minutes: timeMation.startTime.split(':')[1] - 1,
seconds: '00'
};
var max = {
year: getYMDFormatDate().split('-')[0],
month: getYMDFormatDate().split('-')[1] - 1,//关键
date: getYMDFormatDate().split('-')[2],
hours: timeMation.endTime.split(':')[0],
minutes: timeMation.endTime.split(':')[1] + 1,
seconds: '00'
};
leaveStartElem[thisRowNum].config.min = min;
leaveStartElem[thisRowNum].config.max = max;
leaveEndElem[thisRowNum].config.min = min;
leaveEndElem[thisRowNum].config.max = max;
$("#workTime" + thisRowNum).html(timeMation.startTime + " ~ " + timeMation.endTime);
} else {
leaveDayElem[thisRowNum].config.chooseDay = [];
$("#workTime" + thisRowNum).html("-");
}
});
form.render();
matchingLanguage();
$.each(mation.bean.leaveDay, function(i, item) {
addRow();
$("#timeId" + (rowNum - 1).toString()).val(item.timeId);
$("#workTime" + (rowNum - 1).toString()).html(item.timeStartTime + " ~ " + item.timeEndTime);
$("#leaveType" + (rowNum - 1).toString()).val(item.leaveType);
$("#leaveDay" + (rowNum - 1).toString()).val(item.leaveDay);
$("#leaveStartTime" + (rowNum - 1).toString()).val(item.leaveStartTime);
$("#leaveEndTime" + (rowNum - 1).toString()).val(item.leaveEndTime);
$("#leaveHour" + (rowNum - 1).toString()).html(item.leaveHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
}});
}
......@@ -232,12 +220,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave005", params: params, type: 'json', method: 'PUT', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -19,10 +19,7 @@ layui.config({
authBtn('1616239712898');
// 申请时间
laydate.render({
elem: '#applyTime',
range: '~'
});
laydate.render({elem: '#applyTime', range: '~'});
// 我的请假申请列表
table.render({
......@@ -103,12 +100,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave009", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -138,12 +131,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -154,12 +143,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkleave007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -103,29 +103,25 @@ layui.config({
function loadThisMonthHis(callback, start){
AjaxPostUtil.request({url: flowableBasePath + "checkwork014", params:{monthMation: start._d.format("yyyy-MM"), timeId: $("#checkTime").val()}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
var event = [];
if(!isNull(json.rows)){
$.each(json.rows, function(i, item) {
event.push({
title: ($.inArray(item.type.toString(), topLeftDayType) > -1) ? item.title : item.title + ":" + item.clockIn,
start: item.start,
end: item.end,
backgroundColor: item.backgroundColor,
allday: item.allday,
showBg: item.showBg,
editable: item.editable,
id: item.id,
className: item.className
});
});
}
callback(event);
if(!checkWorkDescShow)
initIsCheck();
} else {
winui.window.msg(json.returnMessage, { shift: 6, skin: 'msg-skin-message'});
}
var event = [];
if(!isNull(json.rows)){
$.each(json.rows, function(i, item) {
event.push({
title: ($.inArray(item.type.toString(), topLeftDayType) > -1) ? item.title : item.title + ":" + item.clockIn,
start: item.start,
end: item.end,
backgroundColor: item.backgroundColor,
allday: item.allday,
showBg: item.showBg,
editable: item.editable,
id: item.id,
className: item.className
});
});
}
callback(event);
if(!checkWorkDescShow)
initIsCheck();
}});
}
......@@ -135,25 +131,21 @@ layui.config({
function initIsCheck(callBack){
checkWorkDescShow = true;
AjaxPostUtil.request({url: flowableBasePath + "checkwork013", params: {timeId: $("#checkTime").val()}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
clockOut = json.bean.clockOut;
dayType = json.bean.type;
var s = "";
if(json.bean.type == 1){
s = getTipStrByTimeId(json);
}else if(json.bean.type == 2){
s = getTipStrByOverTime(json);
}
clockOut = json.bean.clockOut;
dayType = json.bean.type;
var s = "";
if(json.bean.type == 1){
s = getTipStrByTimeId(json);
}else if(json.bean.type == 2){
s = getTipStrByOverTime(json);
}
$("#checkWorkDescShow").html(s);
// 控制打卡按钮的显示和隐藏
showOrHideBtn(json);
if(typeof(callBack) == "function") {
callBack();
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
$("#checkWorkDescShow").html(s);
// 控制打卡按钮的显示和隐藏
showOrHideBtn(json);
if(typeof(callBack) == "function") {
callBack();
}
}});
}
......@@ -245,13 +237,9 @@ layui.config({
timeId = "-";
}
AjaxPostUtil.request({url: flowableBasePath + "checkwork001", params:{timeId: timeId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
$("#clockInBtn").hide();
calendar.fullCalendar('refetchEvents');
winui.window.msg("上班打卡成功", {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
$("#clockInBtn").hide();
calendar.fullCalendar('refetchEvents');
winui.window.msg("上班打卡成功", {icon: 1, time: 2000});
}});
});
......@@ -274,13 +262,9 @@ layui.config({
timeId = "-";
}
AjaxPostUtil.request({url: flowableBasePath + "checkwork002", params:{timeId: timeId}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
$("#clockOutBtn").hide();
calendar.fullCalendar('refetchEvents');
winui.window.msg("下班打卡成功", {icon: 1, time: 2000});
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
$("#clockOutBtn").hide();
calendar.fullCalendar('refetchEvents');
winui.window.msg("下班打卡成功", {icon: 1, time: 2000});
}});
}
......
......@@ -87,12 +87,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime002", params: params, type: 'json', method: 'POST', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -10,25 +10,21 @@ layui.config({
var $ = layui.$;
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime003", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(json) {
if(json.returnCode == 0) {
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
json.bean.stateName = getStateNameByState(json.bean.state, json.bean.stateName);
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
var _html = getDataUseHandlebars($("#useTemplate").html(), json);
$("#showForm").html(_html);
// 附件回显
var str = "暂无附件";
if(json.bean.enclosureInfo.length != 0 && !isNull(json.bean.enclosureInfo)){
str = "";
$.each([].concat(json.bean.enclosureInfo), function(i, item){
str += '<a rowid="' + item.id + '" class="enclosureItem" rowpath="' + item.fileAddress + '" href="javascript:;" style="color:blue;">' + item.name + '</a><br>';
});
}
$("#enclosureUpload").html(str);
form.render();
matchingLanguage();
}});
});
});
\ No newline at end of file
......@@ -20,35 +20,31 @@ layui.config({
var beanTemplate = $("#beanTemplate").html();
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime004", params: {rowId: parent.rowId}, type: 'json', method: 'GET', callback: function(mation) {
if(mation.returnCode == 0) {
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#content").html(mation.bean.content);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
$(".typeOne").removeClass("layui-hide");
}
form.render();
matchingLanguage();
$.each(mation.bean.overtimeDay, function(i, item) {
addRow();
$("#overtimeDay" + (rowNum - 1).toString()).val(item.overtimeDay);
$("#overtimeStartTime" + (rowNum - 1).toString()).val(item.overtimeStartTime);
$("#overtimeEndTime" + (rowNum - 1).toString()).val(item.overtimeEndTime);
$("#overtimeHour" + (rowNum - 1).toString()).html(item.overtimeHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
$("#useTitle").html(mation.bean.title);
$("#useName").html(mation.bean.userName);
$("#content").html(mation.bean.content);
$("#remark").val(mation.bean.remark);
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': mation.bean.enclosureInfo});
if(mation.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
$(".typeOne").removeClass("layui-hide");
}
form.render();
matchingLanguage();
$.each(mation.bean.overtimeDay, function(i, item) {
addRow();
$("#overtimeDay" + (rowNum - 1).toString()).val(item.overtimeDay);
$("#overtimeStartTime" + (rowNum - 1).toString()).val(item.overtimeStartTime);
$("#overtimeEndTime" + (rowNum - 1).toString()).val(item.overtimeEndTime);
$("#overtimeHour" + (rowNum - 1).toString()).html(item.overtimeHour);
$("#remark" + (rowNum - 1).toString()).val(item.remark);
form.render('select');
form.render('checkbox');
});
}});
// 保存为草稿
......@@ -116,12 +112,8 @@ layui.config({
approvalId: approvalId,
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime005", params: params, type: 'json', method: 'PUT', callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
......
......@@ -103,12 +103,8 @@ layui.config({
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime009", params:{processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
}
......@@ -138,12 +134,8 @@ layui.config({
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime006", params: params, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}});
});
});
......@@ -154,12 +146,8 @@ layui.config({
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "checkworkovertime007", params:{rowId: data.id}, type: 'json', callback: function (json) {
if (json.returnCode == 0) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
......
......@@ -26,12 +26,8 @@ layui.config({
appealName: $("#appealName").val(),
};
AjaxPostUtil.request({url: flowableBasePath + "checkworkreason007", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -149,12 +149,8 @@ layui.config({
weekDay: JSON.stringify(weekDay)
};
AjaxPostUtil.request({url: flowableBasePath + "checkworktime004", params: params, type: 'json', method: "PUT", callback: function (json) {
if (json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
......
......@@ -396,18 +396,14 @@ layui.config({
function initEcharts(){
AjaxPostUtil.request({url: flowableBasePath + "checkwork016", params: getEchartsParams(), type: 'json', method: "POST", callback: function (json) {
if (json.returnCode == 0) {
ydata = json.rows;
var pieInitialized;
setTimeout(function () {
pieInitialized = true;
myChart.setOption({
series: getPieSeries(scatterData, myChart, ydata)
});
}, 10);
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
ydata = json.rows;
var pieInitialized;
setTimeout(function () {
pieInitialized = true;
myChart.setOption({
series: getPieSeries(scatterData, myChart, ydata)
});
}, 10);
}});
}
......
......@@ -10,17 +10,13 @@ layui.config({
form = layui.form;
AjaxPostUtil.request({url: reqBasePath + "sysfdsettings001", params:{}, type: 'json', method: "GET", callback: function (json) {
if (json.returnCode == 0) {
json.bean.holidaysTypeJson = JSON.parse(json.bean.holidaysTypeJson);
$("#showBox").append(getDataUseHandlebars($("#showTemplate").html(), json));
$.each(json.bean.holidaysTypeJson, function (i, item) {
$("#yearHour" + item.holidayNo).val(item.whetherYearHour);
$("#comLeave" + item.holidayNo).val(item.whetherComLeave);
});
form.render();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
json.bean.holidaysTypeJson = JSON.parse(json.bean.holidaysTypeJson);
$("#showBox").append(getDataUseHandlebars($("#showTemplate").html(), json));
$.each(json.bean.holidaysTypeJson, function (i, item) {
$("#yearHour" + item.holidayNo).val(item.whetherYearHour);
$("#comLeave" + item.holidayNo).val(item.whetherComLeave);
});
form.render();
}});
exports('userCheckWorkSystem', {});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册