提交 9189494a 编写于 作者: Skyeye云's avatar Skyeye云

获取我参与的项目信息优化

上级 c785cb8f
......@@ -34,19 +34,11 @@ layui.config({
if(data.returnCode == 0) {
costTypeList = getDataUseHandlebars(selOption, data);
addRow();
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(json){
form.render('select');
departmentsSelect();
}
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
form.render('select');
});
departmentsSelect();
} else {
winui.window.msg(data.returnMessage, {icon: 2, time: 2000});
}
......
......@@ -41,32 +41,24 @@ layui.config({
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
//获取项目
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(j){
$("#proId").val(json.bean.proId);
form.render('select');
//支出分类
AjaxPostUtil.request({url: flowableBasePath + "procostexpensetype008", params: {}, type: 'json', callback: function(data) {
if(data.returnCode == 0) {
departmentsSelect(json);
costTypeList = getDataUseHandlebars(selOption, data);
$.each(json.bean.purposes, function(i, item){
showRow(item);
});
} else {
winui.window.msg(data.returnMessage, {icon: 2, time: 2000});
}
}});
}
// 获取我参与的项目列表
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
$("#proId").val(json.bean.proId);
});
form.render('select');
// 支出分类
AjaxPostUtil.request({url: flowableBasePath + "procostexpensetype008", params: {}, type: 'json', method: "POST", callback: function(data) {
if(data.returnCode == 0) {
departmentsSelect(json);
costTypeList = getDataUseHandlebars(selOption, data);
$.each(json.bean.purposes, function(i, item){
showRow(item);
});
} else {
winui.window.msg(data.returnMessage, {icon: 2, time: 2000});
}
}});
matchingLanguage();
form.render();
} else {
......
......@@ -10,6 +10,7 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
var ue = UE.getEditor('content',{
//初始化高度
......@@ -36,7 +37,7 @@ layui.config({
url: flowableBasePath + "profiletype008",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
template: selOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(json){
......@@ -46,19 +47,11 @@ layui.config({
});
}
//所属项目选择
// 获取我参与的项目列表
function proIdSelect(){
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(json){
form.render('select');
}
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
form.render('select');
});
}
......
......@@ -10,6 +10,7 @@ layui.config({
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
var ue;
showGrid({
......@@ -63,20 +64,12 @@ layui.config({
}
});
//所属项目选择
// 获取我参与的项目列表
function proIdSelect(){
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(j){
$("#proId").val(json.bean.proId);
form.render('select');
}
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
$("#proId").val(json.bean.proId);
form.render('select');
});
}
......
......@@ -18,6 +18,7 @@ layui.config({
var $ = layui.$,
form = layui.form,
laydate = layui.laydate;
var selOption = getFileContent('tpl/template/select-option.tpl');
var ue = UE.getEditor('taskInstructions',{
//初始化高度
......@@ -87,21 +88,13 @@ layui.config({
});
}
//所属项目选择
// 获取我参与的项目列表
function proIdSelect(){
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(json){
form.render('select');
departmentsSelect();
}
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
form.render('select');
});
departmentsSelect();
}
//所属部门选择
......
......@@ -17,6 +17,7 @@ layui.config({
var $ = layui.$,
form = layui.form,
laydate = layui.laydate;
var selOption = getFileContent('tpl/template/select-option.tpl');
var pId = "";//是否是主任务
var restWorkload = "";//主任务拆分剩下的工作量
......@@ -104,22 +105,14 @@ layui.config({
}
});
//所属项目选择
// 获取我参与的项目列表
function proIdSelect(){
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(j){
$("#proId").val(json.bean.proId);
form.render('select');
departmentsSelect();
}
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
$("#proId").val(json.bean.proId);
form.render('select');
});
departmentsSelect();
}
//所属部门选择
......
......@@ -23,20 +23,12 @@ layui.config({
if(json.returnCode == 0) {
$("#title").val(getYMDFormatDate());
$("#writePeople").html(json.bean.userName);
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(json){
proList = json.rows;
addRow();
form.render('select');
}
proUtil.queryMyProjectsList(function (data){
proList = data.rows;
$("#proId").html(getDataUseHandlebars(selOption, data));
form.render('select');
});
addRow();
matchingLanguage();
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
......
......@@ -12,18 +12,6 @@ layui.config({
form = layui.form,
table = layui.table;
//项目名称
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendAfter: function(json){
form.render('select');
}
});
table.render({
id: 'messageTable',
elem: '#messageTable',
......
......@@ -51,32 +51,24 @@ layui.config({
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
//获取项目
showGrid({
id: "proId",
url: flowableBasePath + "proproject004",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter: function(j){
proList = j.rows;
$("#proId").val(json.bean.proId);
form.render('select');
//获取我的任务
AjaxPostUtil.request({url: flowableBasePath + "protask015", params: {proId: json.bean.proId}, type: 'json', callback: function(data) {
if(data.returnCode == 0) {
taskListHtml = getDataUseHandlebars(selOption, data);
$.each(json.bean.tasks, function(i, item){
showRow(item);
});
} else {
winui.window.msg(data.returnMessage, {icon: 2, time: 2000});
}
}});
}
// 获取我参与的项目列表
proUtil.queryMyProjectsList(function (data){
$("#proId").html(getDataUseHandlebars(selOption, data));
$("#proId").val(json.bean.proId);
proList = data.rows;
form.render('select');
});
// 获取我的任务
AjaxPostUtil.request({url: flowableBasePath + "protask015", params: {proId: json.bean.proId}, type: 'json', callback: function(data) {
if(data.returnCode == 0) {
taskListHtml = getDataUseHandlebars(selOption, data);
$.each(json.bean.tasks, function(i, item){
showRow(item);
});
} else {
winui.window.msg(data.returnMessage, {icon: 2, time: 2000});
}
}});
matchingLanguage();
form.render();
} else {
......
......@@ -26,6 +26,7 @@ var customerJS = {
"bossUtil": "../../assets/lib/layui/customer/bossUtil.js", // 招聘模块相关工具
"shopUtil": "../../assets/lib/layui/customer/shopUtil.js", // 商城模块相关工具
"indexMenu": "../../assets/lib/layui/customer/indexMenu.js", // 菜单按钮模块相关工具
"proUtil": "../../assets/lib/layui/customer/proUtil.js", // 项目管理模块相关工具
};
//系统基础信息
......
// 项目管理相关工具类
var proUtil = {
/**
* 获取我参与的项目列表
*
* @param callback 回执函数
*/
queryMyProjectsList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "queryMyProjectsList", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) {
if(typeof(callback) == "function") {
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
},
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册