提交 6a407aac 编写于 作者: X xqz

Merge branch 'company_server' of https://gitee.com/doc_wei01/skyeye into company_server

...@@ -12,6 +12,14 @@ ...@@ -12,6 +12,14 @@
- [Skyeye云系列资料](https://docs.qq.com/doc/DYUxuT3pSdGhVVXFC) - [Skyeye云系列资料](https://docs.qq.com/doc/DYUxuT3pSdGhVVXFC)
- **接前端 / Java后端等课程设计以及毕设制作,有需要的可加下方微信** - **接前端 / Java后端等课程设计以及毕设制作,有需要的可加下方微信**
### 操作文档
> 客官可以点个收藏,后续功能会同步更新发布。
- [CRM](https://www.zhixi.com/tpl/f9f4d2f7d4fb9a8c2d67da36ab8250cf?shared=true)
- [云售后工单](https://www.zhixi.com/tpl/09cc45d926714da461b51df8a435bc6b?shared=true)
### 沟通交流 ### 沟通交流
| 知识星球 | 作者微信 | QQ群 | Java学习 知识星球 | | 知识星球 | 作者微信 | QQ群 | Java学习 知识星球 |
......
...@@ -88,8 +88,8 @@ layui.config({ ...@@ -88,8 +88,8 @@ layui.config({
// 删除 // 删除
function restore(data) { function restore(data) {
layer.confirm('还原操作', {icon: 3, title: '确定还原该数据吗?'}, function (index) { parent.layer.confirm('还原操作', {icon: 3, title: '确定还原该数据吗?'}, function (index) {
layer.close(index); parent.layer.close(index);
var params = { var params = {
className: objectId, className: objectId,
attrKey: data.attrKey attrKey: data.attrKey
...@@ -103,7 +103,7 @@ layui.config({ ...@@ -103,7 +103,7 @@ layui.config({
// 编辑 // 编辑
function edit(data) { function edit(data) {
_openNewWindows({ parent._openNewWindows({
url: "../../tpl/attr/writeAttr.html?className=" + objectId + '&attrKey=' + data.attrKey, url: "../../tpl/attr/writeAttr.html?className=" + objectId + '&attrKey=' + data.attrKey,
title: systemLanguage["com.skyeye.editPageTitle"][languageType], title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "writeAttr", pageId: "writeAttr",
......
...@@ -40,7 +40,7 @@ layui.config({ ...@@ -40,7 +40,7 @@ layui.config({
} }
$("body").on("click", "#editBean", function() { $("body").on("click", "#editBean", function() {
_openNewWindows({ parent._openNewWindows({
url: "../../tpl/classServer/classServerEdit.html?objectId=" + objectId, url: "../../tpl/classServer/classServerEdit.html?objectId=" + objectId,
title: systemLanguage["com.skyeye.editPageTitle"][languageType], title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "classServerEdit", pageId: "classServerEdit",
......
...@@ -26,15 +26,14 @@ layui.config({ ...@@ -26,15 +26,14 @@ layui.config({
method: 'post', method: 'post',
url: reqBasePath + 'queryOperateList', url: reqBasePath + 'queryOperateList',
where: getTableParams(), where: getTableParams(),
even: true, even: false,
page: true, page: false,
overflow: { overflow: {
type: 'tips', type: 'tips',
header: true, header: true,
total: true total: true
}, },
limits: getLimits(), limit: 100,
limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '名称', align: 'left', width: 120 }, { field: 'name', title: '名称', align: 'left', width: 120 },
...@@ -79,8 +78,8 @@ layui.config({ ...@@ -79,8 +78,8 @@ layui.config({
// 删除 // 删除
function delet(data) { function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { parent.layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index); parent.layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "deleteOperateById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "deleteOperateById", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
...@@ -95,8 +94,8 @@ layui.config({ ...@@ -95,8 +94,8 @@ layui.config({
} }
function openWritePage() { function openWritePage() {
_openNewWindows({ parent._openNewWindows({
url: "../../tpl/operate/writeOperate.html", url: "../../tpl/operate/writeOperate.html?className=" + objectId + "&id=" + rowId,
title: systemLanguage["com.skyeye.recordPageTitle"][languageType], title: systemLanguage["com.skyeye.recordPageTitle"][languageType],
pageId: "writeOperate", pageId: "writeOperate",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
......
...@@ -10,7 +10,9 @@ layui.config({ ...@@ -10,7 +10,9 @@ layui.config({
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl'); var selOption = getFileContent('tpl/template/select-option.tpl');
var className = GetUrlParam("className");
var id = GetUrlParam("id");
var _html = { var _html = {
'color': `<div class="layui-form-item layui-col-xs6"> 'color': `<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">按钮颜色<i class="red">*</i></label> <label class="layui-form-label">按钮颜色<i class="red">*</i></label>
...@@ -27,6 +29,11 @@ layui.config({ ...@@ -27,6 +29,11 @@ layui.config({
<input type="text" id="openPageName" name="openPageName" win-verify="required" placeholder="请输入新开页面名称" class="layui-input" maxlength="200"/> <input type="text" id="openPageName" name="openPageName" win-verify="required" placeholder="请输入新开页面名称" class="layui-input" maxlength="200"/>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">打开方式<i class="red">*</i></label>
<div class="layui-input-block winui-radio" id="openType">
</div>
</div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">页面类型<i class="red">*</i></label> <label class="layui-form-label">页面类型<i class="red">*</i></label>
<div class="layui-input-block winui-radio"> <div class="layui-input-block winui-radio">
...@@ -45,12 +52,12 @@ layui.config({ ...@@ -45,12 +52,12 @@ layui.config({
}; };
var attrHtml = ''; var attrHtml = '';
AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: parent.objectId}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "queryAttrDefinitionList", params: {className: className}, type: 'json', method: "POST", callback: function (json) {
attrHtml = getDataUseHandlebars(`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`, json); attrHtml = getDataUseHandlebars(`<option value="">全部</option>{{#each rows}}<option value="{{attrKey}}">{{name}}</option>{{/each}}`, json);
}, async: false}); }, async: false});
if (!isNull(parent.rowId)) { if (!isNull(id)) {
AjaxPostUtil.request({url: reqBasePath + "queryOperateById", params: {id: parent.rowId}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "queryOperateById", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
$("#name").val(json.bean.name); $("#name").val(json.bean.name);
$("#authPointNum").val(json.bean.authPointNum); $("#authPointNum").val(json.bean.authPointNum);
$("#orderBy").val(json.bean.orderBy); $("#orderBy").val(json.bean.orderBy);
...@@ -85,6 +92,7 @@ layui.config({ ...@@ -85,6 +92,7 @@ layui.config({
$("#openPageName").val(operateOpenPage.name); $("#openPageName").val(operateOpenPage.name);
var type = operateOpenPage.type ? "1" : "2"; var type = operateOpenPage.type ? "1" : "2";
$("input:radio[name=type][value=" + type + "]").attr("checked", true); $("input:radio[name=type][value=" + type + "]").attr("checked", true);
skyeyeClassEnumUtil.showEnumDataListByClassName("pageOpenType", 'radio', "openType", json.bean.openType, form);
if (type == 1) { if (type == 1) {
$('#typeChangeBox').html(commonHtml['customPageUrl']); $('#typeChangeBox').html(commonHtml['customPageUrl']);
$("#pageUrl").val(operateOpenPage.pageUrl); $("#pageUrl").val(operateOpenPage.pageUrl);
...@@ -108,14 +116,14 @@ layui.config({ ...@@ -108,14 +116,14 @@ layui.config({
dsFormColumnUtil.init({ dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox', id: 'attrSymbolsDesignBox',
title: '按钮显示条件', title: '按钮显示条件',
className: parent.objectId className: className
}, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList); }, isNull(json.bean.showConditionList) ? [] : json.bean.showConditionList);
}, async: false}); }, async: false});
} else { } else {
dsFormColumnUtil.init({ dsFormColumnUtil.init({
id: 'attrSymbolsDesignBox', id: 'attrSymbolsDesignBox',
title: '按钮显示条件', title: '按钮显示条件',
className: parent.objectId className: className
}); });
skyeyeClassEnumUtil.showEnumDataListByClassName("operatePosition", 'select', "position", '', form); skyeyeClassEnumUtil.showEnumDataListByClassName("operatePosition", 'select', "position", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("eventType", 'select', "eventType", '', form); skyeyeClassEnumUtil.showEnumDataListByClassName("eventType", 'select', "eventType", '', form);
...@@ -146,6 +154,7 @@ layui.config({ ...@@ -146,6 +154,7 @@ layui.config({
// 新开页面 // 新开页面
$('#eventTypeChangeBox').html(_html['operateOpenPage']); $('#eventTypeChangeBox').html(_html['operateOpenPage']);
$('#typeChangeBox').html(commonHtml['customPageUrl']); $('#typeChangeBox').html(commonHtml['customPageUrl']);
skyeyeClassEnumUtil.showEnumDataListByClassName("pageOpenType", 'radio', "openType", '', form);
loadParamsTable('pageParams'); loadParamsTable('pageParams');
} }
form.render(); form.render();
...@@ -179,7 +188,7 @@ layui.config({ ...@@ -179,7 +188,7 @@ layui.config({
form.on('submit(formWriteBean)', function (data) { form.on('submit(formWriteBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
className: parent.objectId, className: className,
name: $("#name").val(), name: $("#name").val(),
position: $("#position").val(), position: $("#position").val(),
color: isNull($("#color").val()) ? '' : $("#color").val(), color: isNull($("#color").val()) ? '' : $("#color").val(),
...@@ -187,7 +196,7 @@ layui.config({ ...@@ -187,7 +196,7 @@ layui.config({
eventType: $("#eventType").val(), eventType: $("#eventType").val(),
orderBy: $("#orderBy").val(), orderBy: $("#orderBy").val(),
showConditionList: JSON.stringify(dsFormColumnUtil.tableDataList), showConditionList: JSON.stringify(dsFormColumnUtil.tableDataList),
id: isNull(parent.rowId) ? '' : parent.rowId id: isNull(id) ? '' : id
}; };
if (params.eventType == 'ajax') { if (params.eventType == 'ajax') {
...@@ -217,6 +226,7 @@ layui.config({ ...@@ -217,6 +226,7 @@ layui.config({
params: pageParams params: pageParams
}; };
params.operateOpenPage = JSON.stringify(operateOpenPage); params.operateOpenPage = JSON.stringify(operateOpenPage);
params.openType = dataShowType.getData('openType');
} }
AjaxPostUtil.request({url: reqBasePath + "writeOperate", params: params, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "writeOperate", params: params, type: 'json', method: 'POST', callback: function (json) {
......
...@@ -179,7 +179,7 @@ layui.config({ ...@@ -179,7 +179,7 @@ layui.config({
// 不显示按钮 // 不显示按钮
$("#clockInBtn").hide(); $("#clockInBtn").hide();
$("#clockOutBtn").hide(); $("#clockOutBtn").hide();
} else if (json.bean.isCheck == 4) { } else if (json.bean.isCheck == 4 || json.bean.isCheck == 5) {
// 不显示按钮 // 不显示按钮
$("#clockInBtn").hide(); $("#clockInBtn").hide();
$("#clockOutBtn").hide(); $("#clockOutBtn").hide();
...@@ -208,6 +208,9 @@ layui.config({ ...@@ -208,6 +208,9 @@ layui.config({
} else if (json.bean.isCheck == '4'){ } else if (json.bean.isCheck == '4'){
// 不显示按钮 // 不显示按钮
s = '您已完成今日的打卡任务</br></br>' + s; s = '您已完成今日的打卡任务</br></br>' + s;
} else if (json.bean.isCheck == '5'){
// 不显示按钮
s = '今天是节假日,无需打卡</br></br>' + s;
} }
return s; return s;
} }
...@@ -233,6 +236,9 @@ layui.config({ ...@@ -233,6 +236,9 @@ layui.config({
} else if (json.bean.isCheck == '4'){ } else if (json.bean.isCheck == '4'){
// 不显示按钮 // 不显示按钮
s = '您已完成今日的打卡任务</br></br>' + s; s = '您已完成今日的打卡任务</br></br>' + s;
} else if (json.bean.isCheck == '5'){
// 不显示按钮
s = '今天是节假日,无需打卡</br></br>' + s;
} }
return s; return s;
} }
......
...@@ -20,9 +20,10 @@ layui.config({ ...@@ -20,9 +20,10 @@ layui.config({
version: skyeyeVersion version: skyeyeVersion
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'dragula', 'tagEditor', 'table'].concat(dsFormUtil.mastHaveImport), function (exports) { }).define(['window', 'jquery', 'winui', 'dragula', 'tagEditor', 'table', 'ClipboardJS'].concat(dsFormUtil.mastHaveImport), function (exports) {
winui.renderColor(); winui.renderColor();
var index = parent.layer.getFrameIndex(window.name); // 复制对象
var clipboard;
var $ = layui.$; var $ = layui.$;
layedit = layui.layedit, layedit = layui.layedit,
form = layui.form; form = layui.form;
...@@ -51,11 +52,14 @@ layui.config({ ...@@ -51,11 +52,14 @@ layui.config({
if (pageType == 'details') { if (pageType == 'details') {
// 详情布局 // 详情布局
item = dsFormUtil.loadComponentValueDetails('showForm', item, null); item = dsFormUtil.loadComponentValueDetails('showForm', item, null);
$("#syncOtherOage").remove()
$("#disabledEdit").remove()
} else { } else {
// 新增和编辑布局 // 新增和编辑布局
item = dsFormUtil.loadComponent('showForm', item); item = dsFormUtil.loadComponent('showForm', item);
} }
$("#showForm div[contentId='" + item.id + "']").append(`<div class="btn-base"> $("#showForm div[contentId='" + item.id + "']").append(`<div class="btn-base">
<button type="button" class="btn btn-primary copyThis" data-clipboard-text="` + encodeURIComponent(JSON.stringify(item)) + `" title="复制"><i class="fa fa-copy"></i></button>
<button type="button" class="btn btn-danger removeThis" title="删除"><i class="fa fa-trash"></i></button> <button type="button" class="btn btn-danger removeThis" title="删除"><i class="fa fa-trash"></i></button>
</div>`); </div>`);
...@@ -87,11 +91,120 @@ layui.config({ ...@@ -87,11 +91,120 @@ layui.config({
$("#editPageContent").attr("src", editContentPageUrl); $("#editPageContent").attr("src", editContentPageUrl);
}); });
// 粘贴
$("body").on("click", "#paste", function (e) {
layer.open({
type: 1,
title: '粘贴脚本',
area: ['50vw', '50vh'],
content: '<div style="padding: 20px;">'+
'<textarea id="shellCode" name="shellCode" placeholder="请输入加密后的脚本" class="layui-textarea" style="height: 300px;"></textarea>'+
'</div>',
btn: ['确定', '取消'],
yes: function(ii, layero){
var shellCode = layero.find('#shellCode').val();
if (isNull(shellCode)) {
winui.window.msg("请输入脚本", {icon: 2, time: 2000});
return false;
}
let itemContent = JSON.parse(decodeURIComponent(shellCode));
itemContent.attrKey = '';
itemContent.id = getRandomValueToString();
itemContent.attrDefinition = null;
loadNewControl(itemContent);
layer.close(ii);
}
});
})
// 同步至其他布局
var selOption = getFileContent('tpl/template/select-option.tpl');
$("body").on("click", "#syncOtherOage", function (e) {
AjaxPostUtil.request({url: reqBasePath + "queryDsFormPageList", params: {className: className}, type: 'json', method: 'POST', callback: function (json) {
let syncPage = []
$.each(json.rows, function (i, item) {
let type = item.type;
if (type == 'edit' || type == 'create' || type == 'processAttr') {
// 只有新增,编辑,流程属性布局之间可以互相同步
if (item.id != pageId) {
// 不能往自身布局同步
syncPage.push({
id: item.id,
name: item.name + '[' + item.numCode + ']'
});
}
}
});
let selHtml = getDataUseHandlebars(selOption, {rows: syncPage});
layer.open({
type: 1,
title: '同步至其他布局',
area: ['50vw', '50vh'],
content: '<div style="padding: 20px;">'+
'<form class="layui-form" action="" id="showOtherPageForm" autocomplete="off" style="height: 100%">' +
'<select class="otherPageId" lay-filter="otherPageId" id="otherPageId" lay-search="" win-verify="required">'+
selHtml +
'</select>' +
'</form>' +
'</div>',
btn: ['确定', '取消'],
success: function(i) {
form.render('select');
},
yes: function(ii, layero) {
var otherPageId = layero.find('#otherPageId').val();
if (isNull(otherPageId)) {
winui.window.msg("请选择布局", {icon: 2, time: 2000});
return false;
}
for (var i = 0; i < contentList.length; i++) {
var item = contentList[i];
if (isNull(item.attrKey) && $.inArray('attrKeyBox', item.dsFormComponent.attrKeys) >= 0) {
winui.window.msg("存在无关联属性的组件,请移除.", {icon: 2, time: 2000});
initFormItemClick($("#showForm div[contentId='" + item.id + "']"));
return false;
}
}
sortDataIn();
var params = {
pageId: otherPageId,
dsFormPageContentList: encodeURIComponent(JSON.stringify(contentList))
}
AjaxPostUtil.request({url: reqBasePath + "writeDsFormPageContent", params: params, type: 'json', method: 'POST', callback: function (json) {
winui.window.msg("同步成功", {icon: 1, time: 2000});
layer.close(ii);
}});
}
});
}});
})
// 一键禁止编辑
$("body").on("click", "#disabledEdit", function (e) {
$.each(contentList, function (i, item) {
if (isNull(item.dsFormComponent)) {
return false;
}
if (item.dsFormComponent.attrKeys.indexOf("isEditBox") > -1) {
item.isEdit = 0
}
});
winui.window.msg("一键禁止编辑成功", {icon: 1, time: 2000});
});
function loadPageMation(json) { function loadPageMation(json) {
$("#attrBox").html(getDataUseHandlebars($("#leftAttrBoxItem").html(), {rows: attrList})); $("#attrBox").html(getDataUseHandlebars($("#leftAttrBoxItem").html(), {rows: attrList}));
$.each(json.rows, function (i, item) { $.each(json.rows, function (i, item) {
loadNewControl(item); loadNewControl(item);
}); });
clipboard = new ClipboardJS('.copyThis');
clipboard.on('success', function (e) {
winui.window.msg("复制成功", {icon: 1, time: 2000});
});
clipboard.on('error', function (e) {
winui.window.msg("浏览器不支持!", {icon: 2, time: 2000});
});
matchingLanguage(); matchingLanguage();
} }
......
...@@ -26,15 +26,14 @@ layui.config({ ...@@ -26,15 +26,14 @@ layui.config({
method: 'post', method: 'post',
url: reqBasePath + 'queryDsFormPageList', url: reqBasePath + 'queryDsFormPageList',
where: getTableParams(), where: getTableParams(),
even: true, even: false,
page: true, page: false,
overflow: { overflow: {
type: 'tips', type: 'tips',
header: true, header: true,
total: true total: true
}, },
limits: getLimits(), limit: 100,
limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '名称', align: 'left', width: 160 }, { field: 'name', title: '名称', align: 'left', width: 160 },
...@@ -92,8 +91,8 @@ layui.config({ ...@@ -92,8 +91,8 @@ layui.config({
// 删除 // 删除
function delet(data) { function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { parent.layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index); parent.layer.close(index);
AjaxPostUtil.request({url: reqBasePath + "deleteDsFormPage", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "deleteDsFormPage", params: {id: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
...@@ -102,8 +101,8 @@ layui.config({ ...@@ -102,8 +101,8 @@ layui.config({
} }
function openWritePage() { function openWritePage() {
_openNewWindows({ parent._openNewWindows({
url: "../../tpl/dsFormPage/writePage.html", url: "../../tpl/dsFormPage/writePage.html?className=" + objectId + "&id=" + rowId,
title: systemLanguage["com.skyeye.recordPageTitle"][languageType], title: systemLanguage["com.skyeye.recordPageTitle"][languageType],
pageId: "writePage", pageId: "writePage",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
......
...@@ -13,6 +13,8 @@ layui.config({ ...@@ -13,6 +13,8 @@ layui.config({
winui.renderColor(); winui.renderColor();
var $ = layui.$; var $ = layui.$;
var pageId = GetUrlParam("pageId"); var pageId = GetUrlParam("pageId");
var callbackFun = GetUrlParam("callbackFun");
serviceClassName = GetUrlParam("serviceClassName"); serviceClassName = GetUrlParam("serviceClassName");
if (isNull(pageId)) { if (isNull(pageId)) {
winui.window.msg("请传入布局id", {icon: 2, time: 2000}); winui.window.msg("请传入布局id", {icon: 2, time: 2000});
...@@ -95,9 +97,11 @@ layui.config({ ...@@ -95,9 +97,11 @@ layui.config({
var serviceClassName = pageMation.className; var serviceClassName = pageMation.className;
if (pageMation.type == 'create') { if (pageMation.type == 'create') {
// 创建布局 // 创建布局
initSavePre();
dsFormUtil.initCreatePage('content', pageMation); dsFormUtil.initCreatePage('content', pageMation);
} else if (pageMation.type == 'edit') { } else if (pageMation.type == 'edit') {
// 编辑布局 // 编辑布局
initSavePre();
dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) { dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) {
dsFormUtil.initEditPage('content', pageMation, data); dsFormUtil.initEditPage('content', pageMation, data);
}); });
...@@ -112,6 +116,15 @@ layui.config({ ...@@ -112,6 +116,15 @@ layui.config({
} }
} }
function initSavePre() {
dsFormUtil.options.savePreParams = function (params) {
if (!isNull(callbackFun)) {
//就相当于parent.updateShowFileName(参数1,参数2。。)
parent[callbackFun](params)
}
}
}
function initSaveForDraftBtn() { function initSaveForDraftBtn() {
var flowable = dsFormUtil.getFlowable(pageMation); var flowable = dsFormUtil.getFlowable(pageMation);
if (flowable) { if (flowable) {
......
...@@ -10,6 +10,9 @@ layui.config({ ...@@ -10,6 +10,9 @@ layui.config({
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl'); var selOption = getFileContent('tpl/template/select-option.tpl');
var className = GetUrlParam("className");
var id = GetUrlParam("id");
var pageHtml = { var pageHtml = {
'simpleTable': `<div class="layui-form-item layui-col-xs6"> 'simpleTable': `<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">是否分页<i class="red">*</i></label> <label class="layui-form-label">是否分页<i class="red">*</i></label>
...@@ -57,8 +60,8 @@ layui.config({ ...@@ -57,8 +60,8 @@ layui.config({
$("#serviceStr").html(getDataUseHandlebars(selOption, {rows: serviceMap})); $("#serviceStr").html(getDataUseHandlebars(selOption, {rows: serviceMap}));
if (!isNull(parent.rowId)) { if (!isNull(id)) {
AjaxPostUtil.request({url: reqBasePath + "dsformpage006", params: {id: parent.rowId}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "dsformpage006", params: {id: id}, type: 'json', method: 'GET', callback: function (json) {
$("#name").val(json.bean.name); $("#name").val(json.bean.name);
$("#remark").val(json.bean.remark); $("#remark").val(json.bean.remark);
skyeyeClassEnumUtil.showEnumDataListByClassName("dsFormPageType", 'select', "type", json.bean.type, form); skyeyeClassEnumUtil.showEnumDataListByClassName("dsFormPageType", 'select', "type", json.bean.type, form);
...@@ -80,7 +83,7 @@ layui.config({ ...@@ -80,7 +83,7 @@ layui.config({
} }
function loadOperate(defaultValue) { function loadOperate(defaultValue) {
AjaxPostUtil.request({url: reqBasePath + "queryOperateList", params: {className: parent.objectId}, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "queryOperateList", params: {className: className}, type: 'json', method: 'POST', callback: function (json) {
var value = isNull(defaultValue) ? '' : defaultValue.toString(); var value = isNull(defaultValue) ? '' : defaultValue.toString();
dataShowType.showData(json, 'verificationSelect', 'operateIdList', value, form); dataShowType.showData(json, 'verificationSelect', 'operateIdList', value, form);
}}); }});
...@@ -108,7 +111,7 @@ layui.config({ ...@@ -108,7 +111,7 @@ layui.config({
$("#searchTips").val(data.searchTips); $("#searchTips").val(data.searchTips);
} else if (type == 'processAttr') { } else if (type == 'processAttr') {
$('#otherDom').html(pageHtml[type]); $('#otherDom').html(pageHtml[type]);
AjaxPostUtil.request({url: flowableBasePath + 'queryActFlowListByClassName', params: {className: parent.objectId}, type: 'json', method: "POST", callback: function (json) { AjaxPostUtil.request({url: flowableBasePath + 'queryActFlowListByClassName', params: {className: className}, type: 'json', method: "POST", callback: function (json) {
$("#actFlowId").html(getDataUseHandlebars(`{{#each rows}}<option value="{{id}}">{{flowName}}</option>{{/each}}`, json)); $("#actFlowId").html(getDataUseHandlebars(`{{#each rows}}<option value="{{id}}">{{flowName}}</option>{{/each}}`, json));
if (!isNull(data.actFlowId)) { if (!isNull(data.actFlowId)) {
$("#actFlowId").val(data.actFlowId); $("#actFlowId").val(data.actFlowId);
...@@ -116,7 +119,7 @@ layui.config({ ...@@ -116,7 +119,7 @@ layui.config({
form.render('select'); form.render('select');
}, async: false}); }, async: false});
} else if (type == 'create' || type == 'edit') { } else if (type == 'create' || type == 'edit') {
AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: {className: parent.objectId}, type: 'json', method: 'GET', callback: function (json) { AjaxPostUtil.request({url: reqBasePath + "queryServiceBeanCustom", params: {className: className}, type: 'json', method: 'GET', callback: function (json) {
// 判断是否开启了工作流,如果开启了工作流,则将【是否开启工作流】这个选项填充 // 判断是否开启了工作流,如果开启了工作流,则将【是否开启工作流】这个选项填充
if (json.bean.serviceBean.flowable) { if (json.bean.serviceBean.flowable) {
$('#otherDom').html(pageHtml['flowabled']); $('#otherDom').html(pageHtml['flowabled']);
...@@ -141,11 +144,11 @@ layui.config({ ...@@ -141,11 +144,11 @@ layui.config({
form.on('submit(formWriteBean)', function (data) { form.on('submit(formWriteBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
var params = { var params = {
id: isNull(parent.rowId) ? '' : parent.rowId, id: isNull(id) ? '' : id,
name: $("#name").val(), name: $("#name").val(),
remark: $("#remark").val(), remark: $("#remark").val(),
type: $("#type").val(), type: $("#type").val(),
className: parent.objectId, className: className,
operateIdList: isNull($('#operateIdList').attr('value')) ? [] : $('#operateIdList').attr('value'), operateIdList: isNull($('#operateIdList').attr('value')) ? [] : $('#operateIdList').attr('value'),
dataAuthPointNum: '' dataAuthPointNum: ''
}; };
......
...@@ -23,6 +23,9 @@ ...@@ -23,6 +23,9 @@
</div> </div>
<div class="winui-toolbar center-box-form-toolbar"> <div class="winui-toolbar center-box-form-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="paste" class="winui-toolbtn"><i class="fa fa-paste" aria-hidden="true"></i>粘贴</button>
<button id="disabledEdit" class="winui-toolbtn"><i class="fa fa-eye-slash" aria-hidden="true"></i>一键禁止编辑</button>
<button id="syncOtherOage" class="winui-toolbtn"><i class="fa fa-sync" aria-hidden="true"></i>同步至其他布局</button>
<button id="save" class="winui-toolbtn"><i class="fa fa-save" aria-hidden="true"></i><language showName="com.skyeye.save"></language></button> <button id="save" class="winui-toolbtn"><i class="fa fa-save" aria-hidden="true"></i><language showName="com.skyeye.save"></language></button>
</div> </div>
</div> </div>
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<title></title> <title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" /> <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link href="../../assets/lib/layui/css/codemirror.css" rel="stylesheet" />
</head> </head>
<body> <body>
......
...@@ -18,7 +18,7 @@ layui.config({ ...@@ -18,7 +18,7 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: sysMainMation.erpBasePath + 'erpproduction001', url: sysMainMation.erpBasePath + 'queryProductionList',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: true, page: true,
...@@ -38,7 +38,7 @@ layui.config({ ...@@ -38,7 +38,7 @@ layui.config({
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>'; return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}}, }},
{ field: 'state', title: '状态', width: 90, templet: function (d) { { field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("productionState", 'id', d.state, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}}, }},
{ field: 'planStartDate', width: 150, align: 'center', title: '计划开始时间'}, { field: 'planStartDate', width: 150, align: 'center', title: '计划开始时间'},
{ field: 'planComplateDate', width: 150, align: 'center', title: '计划结束时间'}, { field: 'planComplateDate', width: 150, align: 'center', title: '计划结束时间'},
......
...@@ -17,7 +17,7 @@ layui.config({ ...@@ -17,7 +17,7 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: sysMainMation.erpBasePath + 'erpproduction009', url: sysMainMation.erpBasePath + 'erpproduction009---已删除',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: false, page: false,
......
...@@ -15,7 +15,7 @@ layui.config({ ...@@ -15,7 +15,7 @@ layui.config({
id: 'messageTable', id: 'messageTable',
elem: '#messageTable', elem: '#messageTable',
method: 'post', method: 'post',
url: sysMainMation.erpBasePath + 'erpproduction009', url: sysMainMation.erpBasePath + 'erpproduction009---已删除',
where: getTableParams(), where: getTableParams(),
even: true, even: true,
page: false, page: false,
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["depotOutOrder"]["key"];
authBtn('1719830958582');//新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryDepotOutOrderList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据单号', align: 'left', width: 220, templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ field: 'idKey', title: '单据类型', width: 120, templet: function (d) {
return idKeyMap[d.idKey];
}},
{ field: 'createName', title: '申请人', width: 120 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 150 },
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'otherState', title: '出库状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotOutState", 'id', d.otherState, 'name');
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subApproval') { //提交
erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() {
loadTable();
});
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100005', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "purchasePutAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100006&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "purchasePutEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100007&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "purchasePutDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('depotOutList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
// 单据类型枚举类
let idKeyMap = {}
let idKeyToIdMap = {};
let enumResult = skyeyeClassEnumUtil.getEnumDataListByClassName("depotOutFromType");
$.each(enumResult.rows, function (i, item) {
idKeyMap[item.idKey] = item.name
idKeyToIdMap[item.idKey] = item.id
});
// 加载列表数据权限
loadAuthBtnGroup('messageTable', '1719830817013');
initTable();
function initTable() {
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryDepotOutList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据单号', align: 'left', width: 220, templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ field: 'idKey', title: '单据类型', width: 120, templet: function (d) {
return idKeyMap[d.idKey];
}},
{ field: 'createName', title: '申请人', width: 120 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 150 },
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'otherState', title: '出库状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotOutState", 'id', d.otherState, 'name');
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 140, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'depotOut') { //出库
depotOut(data);
}
});
}
// 详情
function details(data) {
let pageUrl = '';
let type = idKeyToIdMap[data.idKey];
if (type == 1) {
// 采购退货单
pageUrl = 'FP2023042400003';
} else if (type == 2) {
// 销售出库单
pageUrl = 'FP2023042700003';
} else if (type == 3) {
// 零售出库单
pageUrl = 'FP2023042600003';
} else if (type == 4) {
// 其他出库单
pageUrl = 'FP2023042700011';
} else if (type == 5) {
// 领料出库单
pageUrl = 'FP2024070100001';
} else if (type == 6) {
// 补料出库单
pageUrl = 'FP2024070100002';
}
_openNewWindows({
url: systemCommonUtil.getUrl(pageUrl +'&id=' + data.id, null),
title: idKeyMap[data.idKey] + systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "outOrderDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 出库
function depotOut(data) {
let pageUrl = '';
let type = idKeyToIdMap[data.idKey];
if (type == 1) {
// 采购退货单
pageUrl = '';
} else if (type == 2) {
// 销售出库单
pageUrl = '';
} else if (type == 3) {
// 零售出库单
pageUrl = '';
} else if (type == 4) {
// 其他出库单
pageUrl = '';
} else if (type == 5) {
// 领料出库单
pageUrl = '';
} else if (type == 6) {
// 补料出库单
pageUrl = '';
}
_openNewWindows({
url: pageUrl + '?id=' + data.id,
title: '转仓库出库单',
pageId: "transOutOrder",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('depotOutTransList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["depotPutOrder"]["key"];
authBtn('1719831367679');//新增
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryDepotPutOrderList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据单号', align: 'left', width: 220, templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ field: 'idKey', title: '单据类型', width: 120, templet: function (d) {
return idKeyMap[d.idKey];
}},
{ field: 'createName', title: '申请人', width: 120 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 150 },
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'otherState', title: '入库状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotPutState", 'id', d.otherState, 'name');
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'delete') { //删除
erpOrderUtil.deleteOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'subApproval') { //提交
erpOrderUtil.submitOrderMation(data.id, serviceClassName, function() {
loadTable();
});
} else if (layEvent === 'processDetails') { // 工作流流程详情查看
activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') { //撤销
erpOrderUtil.revokeOrderMation(data.processInstanceId, serviceClassName, function() {
loadTable();
});
}
});
// 添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100008', null),
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "purchasePutAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100009&id=' + data.id, null),
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "purchasePutEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data) {
_openNewWindows({
url: systemCommonUtil.getUrl('FP2024070100010&id=' + data.id, null),
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "purchasePutDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('depotPutList', {});
});
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
// 单据类型枚举类
let idKeyMap = {};
let idKeyToIdMap = {};
let enumResult = skyeyeClassEnumUtil.getEnumDataListByClassName("depotPutFromType");
$.each(enumResult.rows, function (i, item) {
idKeyMap[item.idKey] = item.name
idKeyToIdMap[item.idKey] = item.id
});
// 加载列表数据权限
loadAuthBtnGroup('messageTable', '1719831228984');
initTable();
function initTable() {
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.erpBasePath + 'queryDepotPutList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单据单号', align: 'left', width: 220, templet: function (d) {
var str = '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
if (!isNull(d.fromId)) {
str += '<span class="state-new">[转]</span>';
}
return str;
}},
{ field: 'idKey', title: '单据类型', width: 120, templet: function (d) {
return idKeyMap[d.idKey];
}},
{ field: 'createName', title: '申请人', width: 120 },
{ field: 'createTime', title: '申请时间', align: 'center', width: 150 },
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'otherState', title: '入库状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotPutState", 'id', d.otherState, 'name');
}},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 140, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入单号", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { //详情
details(data);
} else if (layEvent === 'depotPut') { //入库
depotPut(data);
}
});
}
// 详情
function details(data) {
let pageUrl = '';
let type = idKeyToIdMap[data.idKey];
if (type == 1) {
// 采购入库单
pageUrl = 'FP2023042300003';
} else if (type == 2) {
// 销售退货单
pageUrl = 'FP2023042700007';
} else if (type == 3) {
// 零售退货单
pageUrl = 'FP2023042400011';
} else if (type == 4) {
// 其他入库单
pageUrl = 'FP2023042700015';
} else if (type == 5) {
// 退料入库单
pageUrl = 'FP2024070100003';
} else if (type == 6) {
// 物料退货单
pageUrl = 'FP2024070100004';
}
_openNewWindows({
url: systemCommonUtil.getUrl(pageUrl + '&id=' + data.id, null),
title: idKeyMap[data.idKey] + systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "putOrderDetails",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 入库
function depotPut(data) {
let pageUrl = '';
let type = idKeyToIdMap[data.idKey];
if (type == 1) {
// 采购入库单
pageUrl = '';
} else if (type == 2) {
// 销售退货单
pageUrl = '';
} else if (type == 3) {
// 零售退货单
pageUrl = '';
} else if (type == 4) {
// 其他入库单
pageUrl = '';
} else if (type == 5) {
// 退料入库单
pageUrl = '';
} else if (type == 6) {
// 物料退货单
pageUrl = '';
}
_openNewWindows({
url: pageUrl + '?id=' + data.id,
title: '转仓库入库单',
pageId: "transPutOrder",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
form.render();
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function getTableParams() {
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('depotPutTransList', {});
});
...@@ -149,7 +149,7 @@ layui.config({ ...@@ -149,7 +149,7 @@ layui.config({
} }
//转质检单 //转质检单
function purchaseQualityInspection(data){ function purchaseQualityInspection(data){
parent._openNewWindows({ _openNewWindows({
url: "../../tpl/purchaseDeliveryNote/deliveryToQualityInspection.html?id=" + data.id, url: "../../tpl/purchaseDeliveryNote/deliveryToQualityInspection.html?id=" + data.id,
title: '转质检单', title: '转质检单',
pageId: "deliveryToQualityInspection", pageId: "deliveryToQualityInspection",
......
...@@ -43,6 +43,9 @@ layui.config({ ...@@ -43,6 +43,9 @@ layui.config({
{ field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) { { field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name'); return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("flowableStateEnum", 'id', d.state, 'name');
}}, }},
{ field: 'otherState', title: '入库状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("depotPutState", 'id', d.otherState, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 }, { field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 }, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 }, { field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 },
......
...@@ -23,9 +23,9 @@ layui.config({ ...@@ -23,9 +23,9 @@ layui.config({
// 采购订单的【编辑布局】 // 采购订单的【编辑布局】
dsFormUtil.initEditPageForStatic('content', 'FP2023042000002', data, { dsFormUtil.initEditPageForStatic('content', 'FP2023042000002', data, {
savePreParams: function (params) { savePreParams: function (params) {
params.holderId=data.objectId params.holderId = data.objectId
params.holderKey=data.objectKey params.holderKey = data.objectKey
params.id=id params.id = id
}, },
saveData: function (params) { saveData: function (params) {
// 保存数据 // 保存数据
...@@ -49,10 +49,6 @@ layui.config({ ...@@ -49,10 +49,6 @@ layui.config({
$("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true); $("div[controlType='simpleTable']").find(".taxLastMoney").prop('disabled', true);
$("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true); $("div[controlType='simpleTable']").find(".chooseProductBtn").prop('disabled', true);
$("div[controlType='simpleTable']").find(".normsId").prop('disabled', true); $("div[controlType='simpleTable']").find(".normsId").prop('disabled', true);
} }
}); });
}}); }});
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1719830958582"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.editRow == 1) { }}
{{# if(auth('1719831054188')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1719830958582')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1719831035249')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == 2) { }}
{{# if(auth('1719831045084')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/depotOut/'}).use('list');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.otherState == 2 || d.otherState == 3) { }}
<a class="layui-btn layui-btn-xs" lay-event="depotOut">出库</a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/depotOut/'}).use('transList');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1719831367679"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.editRow == 1) { }}
{{# if(auth('1719831396572')) { }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1719831367679')) { }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1719831378193')) { }}
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == 2) { }}
{{# if(auth('1719831386152')) { }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/depotPut/'}).use('list');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.otherState == 2 || d.otherState == 3) { }}
<a class="layui-btn layui-btn-xs" lay-event="depotPut">入库</a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/depotPut/'}).use('transList');
</script>
</body>
</html>
\ No newline at end of file
...@@ -425,21 +425,21 @@ layui.config({ ...@@ -425,21 +425,21 @@ layui.config({
var shareUrl = homePagePath + "tpl/note/shareNote.html?id=" + clickId; var shareUrl = homePagePath + "tpl/note/shareNote.html?id=" + clickId;
var json = {"bean":{"shareUrl":shareUrl}}; var json = {"bean":{"shareUrl":shareUrl}};
var html = getDataUseHandlebars(getFileContent('tpl/note/shareNoteTemplate.tpl'), json); var html = getDataUseHandlebars(getFileContent('tpl/note/shareNoteTemplate.tpl'), json);
layer.open({ layer.open({
title:"笔记链接", title:"笔记链接",
type: 1, type: 1,
area: ['40vw','30vh'], area: ['40vw','30vh'],
content: html //这里content是一个普通的String content: html //这里content是一个普通的String
}); });
$("#copyBtn").attr("data-clipboard-text", shareUrl); $("#copyBtn").attr("data-clipboard-text", shareUrl);
//复制 //复制
clipboard = new ClipboardJS('#copyBtn'); clipboard = new ClipboardJS('#copyBtn');
clipboard.on('success', function(e) { clipboard.on('success', function (e) {
winui.window.msg("复制成功", {icon: 1, time: 2000}); winui.window.msg("复制成功", {icon: 1, time: 2000});
}); });
clipboard.on('error', function(e) { clipboard.on('error', function (e) {
winui.window.msg("浏览器不支持!", {icon: 2, time: 2000}); winui.window.msg("浏览器不支持!", {icon: 2, time: 2000});
}); });
} }
} }
} }
......
var objectKey = ""; var objectKey = "";
var objectId = ""; var objectId = "";
var holderId = "";
var parentId = "";
layui.config({ layui.config({
base: basePath, base: basePath,
version: skyeyeVersion version: skyeyeVersion
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'table'], function (exports) { }).define(['window', 'jquery', 'winui', 'form', 'tableTreeDj', 'fsTree'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; fsTree = layui.fsTree,
tableTree = layui.tableTreeDj;
objectKey = GetUrlParam("objectKey"); objectKey = GetUrlParam("objectKey");
objectId = GetUrlParam("objectId"); objectId = GetUrlParam("objectId");
if (isNull(objectKey) || isNull(objectId)) { if (isNull(objectKey) || isNull(objectId)) {
...@@ -39,107 +43,151 @@ layui.config({ ...@@ -39,107 +43,151 @@ layui.config({
btnStr += `</div>`; btnStr += `</div>`;
$(".winui-toolbar").before(btnStr); $(".winui-toolbar").before(btnStr);
table.render({ /********* tree 处理 start *************/
id: 'messageTable', fsTree.render({
elem: '#messageTable', id: "treeDemo",
method: 'post', url: sysMainMation.projectBasePath + 'queryAllApprovalMilestoneList?objectId=' + objectId,
url: sysMainMation.projectBasePath + 'queryProTaskList', checkEnable: false,
where: getTableParams(), showLine: false,
even: true, showIcon: true,
page: true, addDiyDom: ztreeUtil.addDiyDom,
limits: getLimits(), clickCallback: onClickTree,
limit: getLimit(), onDblClick: onClickTree
cols: [[ }, function(id) {
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' }, fuzzySearch(id, '#name', null, true);
{ field: 'oddNumber', title: '任务单号', width: 200, align: 'center', templet: function (d) { initLoadTable();
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>'; ztreeUtil.initEventListener(id);
}}, });
{ field: 'name', title: '任务名称', width: 200 },
{ field: 'startTime', title: '开始时间', align: 'center', width: 100 }, //异步加载的方法
{ field: 'endTime', title: '结束时间', align: 'center', width: 100 }, function onClickTree(event, treeId, treeNode) {
{ field: 'estimatedWorkload', title: '预计工作量', align: 'center', width: 120 }, if(treeNode == undefined) {
{ field: 'actualWorkload', title: '实际工作量', align: 'center', width: 120 }, holderId = "";
{ field: 'processInstanceId', title: '流程ID', align: 'center', width: 100, templet: function (d) { } else {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>'; holderId = treeNode.id;
}}, }
{ field: 'state', title: '状态', width: 90, templet: function (d) { loadTable();
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("taskStateEnum", 'id', d.state, 'name'); }
}}, function initLoadTable() {
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 }, tableTree.render({
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 }, id: 'messageTable',
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 }, elem: '#messageTable',
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 }, method: 'post',
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 250, templet: function (d) { url: sysMainMation.projectBasePath + 'queryProTaskList',
var str = ''; where: getTableParams(),
if (d.editRow == 1) { even: true,
if (authPermission['submitToApproval']) { page: true,
str += '<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>'; limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'name', title: '任务名称', width: 200 },
{ field: 'oddNumber', title: '任务单号', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'milestoneId', title: '里程碑', width: 100, templet: function (d) {
return getNotUndefinedVal(d.milestoneMation?.name);
}},
{ field: 'startTime', title: '开始时间', align: 'center', width: 100 },
{ field: 'endTime', title: '结束时间', align: 'center', width: 100 },
{ field: 'estimatedWorkload', title: '预计工作量', align: 'center', width: 120 },
{ field: 'actualWorkload', title: '实际工作量', align: 'center', width: 120 },
{ field: 'processInstanceId', title: '流程ID', align: 'center', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("taskStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, templet: function (d) {
var str = '';
if (d.state != 'invalid'){
str += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="addNew">新增子任务</a>';
} }
if (authPermission['edit']) { if (d.editRow == 1) {
str += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>'; if (authPermission['submitToApproval']) {
str += '<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>';
}
if (authPermission['edit']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>';
}
if (authPermission['delete']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>';
}
if (authPermission['invalid']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancellation">作废</a>';
}
} }
if (authPermission['delete']) { if (d.editRow == 2 && d.state == 'inExamine') {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>'; if (authPermission['revoke']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>';
}
} }
if (authPermission['invalid']) { if (d.state == 'pass' && authPermission['executing']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancellation">作废</a>'; str += '<a class="layui-btn layui-btn-xs" lay-event="executionBegin">执行</a>';
} }
} if (d.state == 'executing' && authPermission['completed']) {
if (d.editRow == 2 && d.state == 'inExamine') { str += '<a class="layui-btn layui-btn-xs" lay-event="executionOver">完成</a>';
if (authPermission['revoke']) {
str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>';
} }
} if (d.state == 'completed' && authPermission['close']) {
if (d.state == 'pass' && authPermission['executing']) { str += '<a class="layui-btn layui-btn-xs" lay-event="executionClose">关闭</a>';
str += '<a class="layui-btn layui-btn-xs" lay-event="executionBegin">执行</a>'; }
} if (d.state == 'invalid' && authPermission['delete']) {
if (d.state == 'executing' && authPermission['completed']) { str += '<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>';
str += '<a class="layui-btn layui-btn-xs" lay-event="executionOver">完成</a>'; }
} return str;
if (d.state == 'completed' && authPermission['close']) { }}
str += '<a class="layui-btn layui-btn-xs" lay-event="executionClose">关闭</a>'; ]],
} done: function(json) {
return str; matchingLanguage();
}} initTableSearchUtil.initAdvancedSearch($("#messageTable")[0], json.searchFilter, form, "请输入任务名称", function () {
]], tableTree.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
done: function(json) { });
matchingLanguage(); }
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入任务名称", function () { }, {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}); keyId: 'id',
}); keyPid: 'parentId',
} title: 'name',
}); showCache: "proTaskUnfoldStatus"
});
table.on('tool(messageTable)', function (obj) { tableTree.getTable().on('tool(messageTable)', function (obj) {
var data = obj.data; var data = obj.data;
var layEvent = obj.event; var layEvent = obj.event;
if (layEvent === 'details'){ //详情 if (layEvent === 'addNew'){ //新增子任务
details(data); addNew(data);
} else if (layEvent === 'edit') { //编辑 } else if (layEvent === 'details'){ //详情
edit(data); details(data);
} else if (layEvent === 'del'){ //删除 } else if (layEvent === 'edit') { //编辑
del(data, obj); edit(data);
} else if (layEvent === 'subApproval') { //提交审批 } else if (layEvent === 'del'){ //删除
subApproval(data, obj); del(data, obj);
} else if (layEvent === 'processDetails') {//流程详情 } else if (layEvent === 'subApproval') { //提交审批
activitiUtil.activitiDetails(data); subApproval(data, obj);
} else if (layEvent === 'executionBegin') {//开始执行 } else if (layEvent === 'processDetails') {//流程详情
executionBegin(data, obj); activitiUtil.activitiDetails(data);
} else if (layEvent === 'revoke') {//撤销任务审批申请 } else if (layEvent === 'executionBegin') {//开始执行
revoke(data); executionBegin(data, obj);
} else if (layEvent === 'cancellation') {//作废 } else if (layEvent === 'revoke') {//撤销任务审批申请
cancellation(data, obj); revoke(data);
} else if (layEvent === 'executionOver') {//执行完成 } else if (layEvent === 'cancellation') {//作废
executionOver(data); cancellation(data, obj);
} else if (layEvent === 'executionClose') {//任务关闭 } else if (layEvent === 'executionOver') {//执行完成
executionClose(data, obj); executionOver(data);
} } else if (layEvent === 'executionClose') {//任务关闭
}); executionClose(data, obj);
}
});
}
// 添加 // 添加
$("body").on("click", "#addBean", function() { $("body").on("click", "#addBean", function() {
parentId = "";
_openNewWindows({ _openNewWindows({
url: systemCommonUtil.getUrl('FP2023080500001&objectId=' + objectId + '&objectKey=' + objectKey, null), url: systemCommonUtil.getUrl('FP2023080500001&objectId=' + objectId + '&objectKey=' + objectKey + "&callbackFun=savePreParams", null),
title: "新增任务", title: "新增任务",
pageId: "protaskadd", pageId: "protaskadd",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
...@@ -149,6 +197,31 @@ layui.config({ ...@@ -149,6 +197,31 @@ layui.config({
}}); }});
}); });
// 甘特图
$("body").on("click", "#ganttPage", function() {
_openNewWindows({
url: "../../tpl/proTask/taskGantt.html?objectId=" + objectId + '&objectKey=' + objectKey,
title: "任务甘特图",
pageId: "taskGantt",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
});
// 新增子任务
function addNew(data) {
parentId = data.id;
_openNewWindows({
url: systemCommonUtil.getUrl('FP2023080500001&objectId=' + objectId + '&objectKey=' + objectKey + "&callbackFun=savePreParams", null),
title: '新增子任务',
pageId: "protaskadd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 执行完成 // 执行完成
function executionOver(data) { function executionOver(data) {
_openNewWindows({ _openNewWindows({
...@@ -177,7 +250,7 @@ layui.config({ ...@@ -177,7 +250,7 @@ layui.config({
// 编辑 // 编辑
function edit(data) { function edit(data) {
_openNewWindows({ _openNewWindows({
url: systemCommonUtil.getUrl('FP2023080500002&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id, null), url: systemCommonUtil.getUrl('FP2023080500002&objectId=' + objectId + '&objectKey=' + objectKey + '&id=' + data.id + "&callbackFun=savePreParams", null),
title: "编辑任务", title: "编辑任务",
pageId: "protaskedit", pageId: "protaskedit",
area: ['90vw', '90vh'], area: ['90vw', '90vh'],
...@@ -189,7 +262,7 @@ layui.config({ ...@@ -189,7 +262,7 @@ layui.config({
} }
// 开始执行 // 开始执行
function executionBegin(data, obj){ function executionBegin(data, obj) {
var msg = obj ? '确认开始执行【' + obj.data.name + '】吗?' : '确认开始执行该任务吗?'; var msg = obj ? '确认开始执行【' + obj.data.name + '】吗?' : '确认开始执行该任务吗?';
layer.confirm(msg, { icon: 3, title: '任务开始执行' }, function (index) { layer.confirm(msg, { icon: 3, title: '任务开始执行' }, function (index) {
layer.close(index); layer.close(index);
...@@ -201,7 +274,7 @@ layui.config({ ...@@ -201,7 +274,7 @@ layui.config({
} }
// 任务关闭 // 任务关闭
function executionClose(data, obj){ function executionClose(data, obj) {
var msg = obj ? '确认关闭【' + obj.data.name + '】吗?' : '确认关闭该任务吗?'; var msg = obj ? '确认关闭【' + obj.data.name + '】吗?' : '确认关闭该任务吗?';
layer.confirm(msg, { icon: 3, title: '关闭任务' }, function (index) { layer.confirm(msg, { icon: 3, title: '关闭任务' }, function (index) {
layer.close(index); layer.close(index);
...@@ -225,7 +298,7 @@ layui.config({ ...@@ -225,7 +298,7 @@ layui.config({
} }
// 任务提交审批 // 任务提交审批
function subApproval(data, obj){ function subApproval(data, obj) {
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) { layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index); layer.close(index);
activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) { activitiUtil.startProcess(data.serviceClassName, null, function (approvalId) {
...@@ -242,7 +315,7 @@ layui.config({ ...@@ -242,7 +315,7 @@ layui.config({
} }
// 作废 // 作废
function cancellation(data, obj){ function cancellation(data, obj) {
var msg = obj ? '确认作废【' + obj.data.name + '】吗?' : '确认作废该任务信息吗?'; var msg = obj ? '确认作废【' + obj.data.name + '】吗?' : '确认作废该任务信息吗?';
layer.confirm(msg, { icon: 3, title: '任务作废' }, function (index) { layer.confirm(msg, { icon: 3, title: '任务作废' }, function (index) {
layer.close(index); layer.close(index);
...@@ -258,7 +331,7 @@ layui.config({ ...@@ -258,7 +331,7 @@ layui.config({
var msg = obj ? '确认删除【' + obj.data.name + '】吗?' : '确认删除选中数据吗?'; var msg = obj ? '确认删除【' + obj.data.name + '】吗?' : '确认删除选中数据吗?';
layer.confirm(msg, {icon: 3, title: '删除任务'}, function (index) { layer.confirm(msg, {icon: 3, title: '删除任务'}, function (index) {
layer.close(index); layer.close(index);
AjaxPostUtil.request({url: sysMainMation.projectBasePath + "deleteProTaskById", params: {id: data.id}, type: 'json', method: 'POST', callback: function (json) { AjaxPostUtil.request({url: sysMainMation.projectBasePath + "deleteProTaskById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
}}); }});
...@@ -270,12 +343,22 @@ layui.config({ ...@@ -270,12 +343,22 @@ layui.config({
loadTable(); loadTable();
}); });
function loadTable() { function loadTable() {
table.reloadData("messageTable", {where: getTableParams()}); tableTree.reload("messageTable", {where: getTableParams()});
} }
function getTableParams() { function getTableParams() {
return $.extend(true, {objectKey: objectKey, objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable")); let params = {
objectKey: objectKey,
objectId: objectId,
holderId: holderId == '0' ? '' : holderId
};
return $.extend(true, params, initTableSearchUtil.getSearchValue("messageTable"));
} }
exports('proTaskList', {}); exports('proTaskList', {});
}); });
// 写入页面保存之前的回调函数
function savePreParams(params) {
params.parentId = parentId
}
var objectKey = "";
var objectId = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
layer = layui.layer,
laydate = layui.laydate;
objectKey = GetUrlParam("objectKey");
objectId = GetUrlParam("objectId");
if (isNull(objectKey) || isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
}
// 根据供应商id获取所有审批通过之后的里程碑列表
let milestoneList = [];
AjaxPostUtil.request({url: sysMainMation.projectBasePath + "queryAllApprovalMilestoneList", params: {objectId: objectId}, type: 'json', method: 'GET', callback: function (json) {
$("#milestoneId").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), json));
milestoneList = json.rows;
var authPermission = teamObjectPermissionUtil.checkTeamBusinessAuthPermission(objectId, 'taskAuthEnum');
var btnStr = `<div style="" class="type-group" id="type">`;
var firstBtn = true;
if (authPermission['list']) {
var defaultClassName = firstBtn ? 'plan-select' : '';
firstBtn = false;
btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="list" table-id="messageTable"><i class="layui-icon"></i>所有任务</button>`
}
if (authPermission['myExecute']) {
var defaultClassName = firstBtn ? 'plan-select' : '';
firstBtn = false;
btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="myExecute" table-id="messageTable"><i class="layui-icon"></i>我执行的任务</button>`
}
if (authPermission['myCreate']) {
var defaultClassName = firstBtn ? 'plan-select' : '';
btnStr += `<button type="button" class="layui-btn layui-btn-primary type-btn ${defaultClassName}" data-type="myCreate" table-id="messageTable"><i class="layui-icon"></i>我创建的任务</button>`
}
btnStr += `</div>`;
$(".txtcenter").before(btnStr);
matchingLanguage();
form.render();
renderPanel();
render();
}});
function renderPanel() {
document.getElementById('device_load').style.cssText = 'height:' + ($(window).height() - 140) + 'px';
}
$(window).resize(function () {
renderPanel();
});
// 时间格式
gantt.config.date_format = "%Y-%m-%d";
gantt.config.scales = [
{unit: "year", step: 1, format: "%Y"},
{unit: "day", step: 1, date: "%m-%d"}
];
gantt.config.reorder_grid_columns = true;
gantt.config.columns = [{
name: "text",
label: "任务名",
width: 200,
align: "center",
tree: true,
resize: true
}, {
name: "start_date",
label: "开始日期",
width: 100,
align: "center",
resize: true
}, {
name: "duration",
label: "持续时间",
width: 100,
align: "center",
resize: true
}];
gantt.config.readonly = true;
gantt.config.row_height = 40;
gantt.config.scale_height = 50;
gantt.config.drag_move = false;
gantt.config.drag_resize = false;
gantt.config.sort = true;
gantt.config.show_quick_info = false;
// 关闭点击事件
gantt.attachEvent("onTaskDblClick", function (id, e) {
return false;
});
gantt.config.show_tasks_outside_timescale = true;
gantt.plugins({
auto_scheduling: true, //自动排程
tooltip: true //提示信息
});
// 样式
gantt.config.layout = {
css: "gantt_container",
cols: [{
width: 400,
min_width: 300,
rows: [
{
view: "grid",
scrollX: "gridScroll",
scrollable: true,
scrollY: "scrollVer"
},
{view: "scrollbar", id: "gridScroll", group: "horizontal"}
]
},
{resizer: true, width: 1},
{
rows: [
{
view: "timeline",
scrollX: "scrollHor",
scrollY: "scrollVer"
},
{
view: "scrollbar",
id: "scrollHor",
group: "horizontal"
}
]
},
{view: "scrollbar", id: "scrollVer"}]
};
gantt.init("device_load");
gantt.i18n.setLocale("cn"); //使用中文
function render() {
let milestoneId = $("#milestoneId").val();
if (isNull(milestoneId)) {
winui.window.msg("请选择里程碑", {icon: 2, time: 2000});
return false;
}
let params = {
objectId: objectId,
objectKey: objectKey,
holderId: milestoneId,
type: $("#type .plan-select").attr("data-type")
};
var tem = getInPoingArr(milestoneList, "id", milestoneId, null);
gantt.config.start_date = new Date(tem.startTime);
gantt.config.end_date = new Date(tem.endTime);
AjaxPostUtil.request({url: sysMainMation.projectBasePath + "queryProTaskListForGantt", params: params, type: 'json', method: 'POST', callback: function (json) {
gantt.clearAll(); //清空缓存
let nodeList = json.bean.node;
if (isNull(nodeList) || nodeList.length == 0) {
return;
}
$.each(nodeList, function (i, item) {
item.start_date = new Date(item.start_date);
item.end_date = new Date(item.end_date);
});
let linkList = json.bean.link;
if (isNull(linkList) || linkList.length == 0) {
linkList = [];
}
// 解析
gantt.parse({
data: nodeList,
links: linkList
});
}});
}
$("body").on("click", ".type-btn", function (e) {
$(this).parent().find('.type-btn').removeClass("plan-select");
$(this).addClass("plan-select");
render();
});
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
render();
}
return false;
});
exports('taskGantt', {});
});
\ No newline at end of file
...@@ -118,11 +118,11 @@ layui.config({ ...@@ -118,11 +118,11 @@ layui.config({
// 服务 // 服务
function giveService(data) { function giveService(data) {
_openNewWindows({ parent._openNewWindows({
url: '../../tpl/project/projectManage.html?objectId=' + data.id + '&objectKey=' + data.serviceClassName, url: '../../tpl/project/projectManage.html?objectId=' + data.id + '&objectKey=' + data.serviceClassName,
title: "服务", title: "服务",
pageId: "projectGiveService", pageId: "projectGiveService",
area: ['90vw', '90vh'], area: ['100vw', '100vh'],
callBack: function (refreshCode) { callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable(); loadTable();
......
...@@ -5,20 +5,36 @@ ...@@ -5,20 +5,36 @@
<title></title> <title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" /> <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link href="../../assets/lib/layui/lay/modules/ztree/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/customer/ztree/common-tree.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div class="winui-toolbar"> <div class="winui-toolbar">
<div class="winui-tool"> <div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button> <button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="ganttPage" class="winui-toolbtn search-table-btn-right"><i class="fa fa-sliders" aria-hidden="true"></i>甘特图</button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="add"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button> <button id="addBean" class="winui-toolbtn search-table-btn-right" auth="add"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div> </div>
</div> </div>
<div style="margin:auto 10px;"> <div class="layui-row">
<table id="messageTable" lay-filter="messageTable"></table> <div style="width: 240px; float: left; height: 100%; overflow: auto; padding: 5px;">
<input type="text" id="name" name="name" placeholder="请输入要搜索的节点" class="layui-input" />
<ul id="treeDemo" class="ztree fsTree" method="get" isRoot="1"
treeIdKey="id" inputs="parentId" treePIdKey="pId" clickCallbackInputs="parentId:$id" treeName="name"></ul>
</div>
<div style="width: calc(100% - 250px); float: left;">
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
</div>
</div>
</div> </div>
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript"> <script type="text/javascript" src="../../assets/lib/layui/lay/modules/jquery-min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.all.min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ztree/js/jquery.ztree.exhide.min.js"></script>
<script type="text/javascript" src="../../assets/lib/layui/lay/modules/ztree/js/fuzzysearch.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/proTask/'}).use('proTaskList'); layui.config({base: '../../js/proTask/'}).use('proTaskList');
</script> </script>
</body> </body>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet"/>
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link rel="stylesheet" href="../../assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.css" type="text/css">
<style>
html,
body {
height: 100%;
padding: 0px;
margin: 0px;
overflow: hidden;
}
.weekend {
background: #f4f7f4 !important;
}
.gantt_grid_head_cell {
font-size: 14px;
font-weight: 600;
color: #000 !important;
}
.gantt_scale_cell {
font-size: 14px;
font-weight: 600;
color: #000 !important;
}
</style>
</head>
<body>
<div class="txtcenter" style="margin: 0 auto; padding-top: 10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">里程碑</label>
<div class="layui-input-inline">
<select lay-filter="milestoneId" lay-search="" id="milestoneId">
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div style="margin: auto 10px;">
<div id="device_load" style="width: 100%;"></div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script src="../../assets/lib/layui/lay/modules/dhtmlxgantt/dhtmlxgantt.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/proTask/'}).use('taskGantt');
</script>
</body>
</html>
\ No newline at end of file
...@@ -296,18 +296,7 @@ body { ...@@ -296,18 +296,7 @@ body {
cursor: e-resize; cursor: e-resize;
} }
.echarts-box { .img-box, .dom-box, .word-box, .table-box, .echarts-box {
width: 100%;
height: 100%;
}
.table-box {
width: 100%;
height: 100%;
position: absolute;
}
.word-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
"key": "radio", "key": "radio",
"name": "单选框", "name": "单选框",
"html": "<div class='layui-form-item {{defaultWidth}}' controlType='radio' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block winui-radio'>{{{showValueTemplate}}}</div></div>", "html": "<div class='layui-form-item {{defaultWidth}}' controlType='radio' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block winui-radio'>{{{showValueTemplate}}}</div></div>",
"js": "$('input:radio[name={{boxId}}{{indexNumber}}][value={{context}}]').attr('checked', true);form.on('radio({{boxId}}{{indexNumber}})', function(data) {var value = data.value; dataValueChange(value, $(this));});", "js": "$('input:radio[name=ra{{boxId}}{{indexNumber}}][value={{context}}]').attr('checked', true);form.on('radio(ra{{boxId}}{{indexNumber}})', function(data) {var value = data.value; dataValueChange(value, $(this));});",
"showValueTemplate": "{{#each rows}}<input type='radio' name='{{boxId}}{{indexNumber}}' title='{{name}}' rowId='{{id}}' value='{{id}}' lay-filter='{{boxId}}{{indexNumber}}' />{{/each}}" "showValueTemplate": "{{#each rows}}<input type='radio' name='ra{{boxId}}{{indexNumber}}' title='{{name}}' rowId='{{id}}' value='{{id}}' lay-filter='ra{{boxId}}{{indexNumber}}' />{{/each}}"
}, },
"2": { "2": {
"key": "input", "key": "input",
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
"99": { "99": {
"key": "dataBaseFrom", "key": "dataBaseFrom",
"name": "数据源选择", "name": "数据源选择",
"html": "<div class='layui-form-item {{defaultWidth}}' controlType='dataBaseFrom' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block'><input type='text' id='input{{boxId}}{{indexNumber}}' name='input{{boxId}}{{indexNumber}}' class='layui-input' value='{{context.name}}' readonly='readonly'/><i class='fa fa-plus-circle input-icon' id='choose{{boxId}}{{indexNumber}}'></i></div></div>", "html": "<div class='layui-form-item {{defaultWidth}}' controlType='dataBaseFrom' modelKey='{{modelKey}}' boxId='{{boxId}}'><label class='layui-form-label'><i class='layui-icon layui-icon-tips' lay-tips='{{remark}}'></i>{{labelContent}}:</label><div class='layui-input-block input-add-icon'><input type='text' id='input{{boxId}}{{indexNumber}}' name='input{{boxId}}{{indexNumber}}' class='layui-input' value='{{context.name}}' readonly='readonly'/><i class='fa fa-plus-circle input-icon' id='choose{{boxId}}{{indexNumber}}'></i></div></div>",
"js": "$('body').on('click', '#choose{{boxId}}{{indexNumber}}', function (e) {_openNewWindows({url:'../../tpl/reportDataFrom/reportDataFromChooseList.html', title:'选择数据源',pageId:'dataBaseFrom',area:['90vw','90vh'],callBack:function (refreshCode){if(refreshCode=='0'){$('#input{{boxId}}{{indexNumber}}').val(dataBaseMation.name); dataValueChange(dataBaseMation, $('#input{{boxId}}{{indexNumber}}')); } else if (refreshCode=='-9999'){winui.window.msg(systemLanguage['com.skyeye.operationFailed'][languageType],{icon:2,time:2000});}}});});", "js": "$('body').on('click', '#choose{{boxId}}{{indexNumber}}', function (e) {_openNewWindows({url:'../../tpl/reportDataFrom/reportDataFromChooseList.html', title:'选择数据源',pageId:'dataBaseFrom',area:['90vw','90vh'],callBack:function (refreshCode){if(refreshCode=='0'){$('#input{{boxId}}{{indexNumber}}').val(dataBaseMation.name); dataValueChange(dataBaseMation, $('#input{{boxId}}{{indexNumber}}')); } else if (refreshCode=='-9999'){winui.window.msg(systemLanguage['com.skyeye.operationFailed'][languageType],{icon:2,time:2000});}}});});",
"showValueTemplate": "" "showValueTemplate": ""
}, },
......
...@@ -33,6 +33,18 @@ layui.config({ ...@@ -33,6 +33,18 @@ layui.config({
wordModel = json.rows; wordModel = json.rows;
}, async: false}); }, async: false});
var imgModel = {};
// 获取所有小图片列表信息
AjaxPostUtil.request({url: sysMainMation.reportBasePath + "queryAllEnabledImgModelList", params: {}, type: 'json', method: "GET", callback: function(json) {
imgModel = json.rows;
}, async: false});
var domModel = {};
// 获取所有装饰列表信息
AjaxPostUtil.request({url: sysMainMation.reportBasePath + "queryAllEnabledDomModelList", params: {}, type: 'json', method: "GET", callback: function(json) {
domModel = json.rows;
}, async: false});
var initData = {}; var initData = {};
// 获取初始化数据 // 获取初始化数据
AjaxPostUtil.request({url: sysMainMation.reportBasePath + "queryReportPageById", params: {id: id}, type: 'json', method: "GET", callback: function(json) { AjaxPostUtil.request({url: sysMainMation.reportBasePath + "queryReportPageById", params: {id: id}, type: 'json', method: "GET", callback: function(json) {
...@@ -51,10 +63,20 @@ layui.config({ ...@@ -51,10 +63,20 @@ layui.config({
mouseLineColor: "blue", mouseLineColor: "blue",
initData: initData, initData: initData,
headerMenuJson: [{ headerMenuJson: [{
"icon": " fa fa-area-chart fa-fw", "icon": " fa fa-wordpress fa-fw",
"title": "文字", "title": "文字",
"id": "wordModel", "id": "wordModel",
"children": wordModel "children": wordModel
}, {
"icon": " fa fa-photo-video fa-fw",
"title": "小图片",
"id": "imgModel",
"children": imgModel
}, {
"icon": " fa fa-photo-video fa-fw",
"title": "装饰",
"id": "domModel",
"children": domModel
}, { }, {
"icon": " fa fa-area-chart fa-fw", "icon": " fa fa-area-chart fa-fw",
"title": "图表", "title": "图表",
......
...@@ -12,7 +12,6 @@ layui.config({ ...@@ -12,7 +12,6 @@ layui.config({
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
id = GetUrlParam("id"); id = GetUrlParam("id");
var content = $(document.body); var content = $(document.body);
...@@ -27,6 +26,8 @@ layui.config({ ...@@ -27,6 +26,8 @@ layui.config({
initEchartsData(widthScale, heightScale); initEchartsData(widthScale, heightScale);
initWordMationData(widthScale, heightScale); initWordMationData(widthScale, heightScale);
initTableMationData(widthScale, heightScale); initTableMationData(widthScale, heightScale);
initImgMationData(widthScale, heightScale);
initDomMationData(widthScale, heightScale);
if (!isNull(initData.bgImage)){ if (!isNull(initData.bgImage)){
content.css({ content.css({
...@@ -53,8 +54,8 @@ layui.config({ ...@@ -53,8 +54,8 @@ layui.config({
width: multiplication(item.width, widthScale), width: multiplication(item.width, widthScale),
height: multiplication(item.height, heightScale) height: multiplication(item.height, heightScale)
}); });
setBoxAttrMation("custom.box.background", boxId, item.attrMation.attr["custom.box.background"].defaultValue); // 设置custom.box开头的属性值
setBoxAttrMation("custom.box.border-color", boxId, item.attrMation.attr["custom.box.border-color"].defaultValue); setCustomBoxAttr(echartsCustomOptions, boxId, item);
}); });
} }
} }
...@@ -74,8 +75,8 @@ layui.config({ ...@@ -74,8 +75,8 @@ layui.config({
width: multiplication(item.width, widthScale), width: multiplication(item.width, widthScale),
height: multiplication(item.height, heightScale) height: multiplication(item.height, heightScale)
}); });
setBoxAttrMation("custom.box.background", boxId, item.attrMation.attr["custom.box.background"].defaultValue); // 设置custom.box开头的属性值
setBoxAttrMation("custom.box.border-color", boxId, item.attrMation.attr["custom.box.border-color"].defaultValue); setCustomBoxAttr(wordCustomOptions, boxId, item);
}); });
} }
} }
...@@ -98,8 +99,50 @@ layui.config({ ...@@ -98,8 +99,50 @@ layui.config({
width: multiplication(item.width, widthScale), width: multiplication(item.width, widthScale),
height: multiplication(item.height, heightScale) height: multiplication(item.height, heightScale)
}); });
setBoxAttrMation("custom.box.background", boxId, item.attrMation.attr["custom.box.background"].defaultValue); // 设置custom.box开头的属性值
setBoxAttrMation("custom.box.border-color", boxId, item.attrMation.attr["custom.box.border-color"].defaultValue); setCustomBoxAttr(tableCustomOptions, boxId, item);
});
}
}
function initImgMationData(widthScale, heightScale) {
var imgMationList = initData.imgMationList;
if (!isNull(imgMationList)) {
$.each(imgMationList, function (i, item) {
var leftNum = multiplication(item.attrMation.attr["custom.move.x"].defaultValue, widthScale);
var topNum = multiplication(item.attrMation.attr["custom.move.y"].defaultValue, heightScale);
item.attrMation.attr["custom.move.x"].defaultValue = leftNum;
item.attrMation.attr["custom.move.y"].defaultValue = topNum;
var boxId = addNewImgModel(item.modelId, item.attrMation);
$("#" + boxId).css({
left: leftNum + "px",
top: topNum + "px",
width: multiplication(item.width, widthScale),
height: multiplication(item.height, heightScale)
});
// 设置custom.box开头的属性值
setCustomBoxAttr(wordCustomOptions, boxId, item);
});
}
}
function initDomMationData(widthScale, heightScale) {
var domMationList = initData.domMationList;
if (!isNull(domMationList)) {
$.each(domMationList, function (i, item) {
var leftNum = multiplication(item.attrMation.attr["custom.move.x"].defaultValue, widthScale);
var topNum = multiplication(item.attrMation.attr["custom.move.y"].defaultValue, heightScale);
item.attrMation.attr["custom.move.x"].defaultValue = leftNum;
item.attrMation.attr["custom.move.y"].defaultValue = topNum;
var boxId = addNewDomModel(item.modelId, item.attrMation);
$("#" + boxId).css({
left: leftNum + "px",
top: topNum + "px",
width: multiplication(item.width, widthScale),
height: multiplication(item.height, heightScale)
});
// 设置custom.box开头的属性值
setCustomBoxAttr(wordCustomOptions, boxId, item);
}); });
} }
} }
...@@ -204,7 +247,7 @@ layui.config({ ...@@ -204,7 +247,7 @@ layui.config({
// 加载文字模型 // 加载文字模型
function addNewWordModel(modelId, wordStyleMation) { function addNewWordModel(modelId, wordStyleMation) {
var styleStr = getWordStyleStr(wordStyleMation.wordModelAttrList); var styleStr = getWordStyleStr(wordStyleMation.attr);
// 获取boxId // 获取boxId
var boxId = modelId + getRandomValueToString(); var boxId = modelId + getRandomValueToString();
// 获取文字模型id // 获取文字模型id
...@@ -215,6 +258,29 @@ layui.config({ ...@@ -215,6 +258,29 @@ layui.config({
return boxId; return boxId;
} }
function addNewImgModel(modelId, imgStyleMation) {
// 加入页面属性
imgStyleMation.attr = $.extend(true, {}, imgCustomOptions, imgStyleMation.attr);
// 获取boxId
var boxId = modelId + getRandomValueToString();
// 获取图片模型id
var imgId = getImgBox(boxId, modelId, imgStyleMation);
inPageImgMation[boxId] = $.extend(true, {}, imgStyleMation);
return boxId;
}
// 加载装饰模型
function addNewDomModel(modelId, domStyleMation) {
// 加入页面属性
domStyleMation.attr = $.extend(true, {}, domCustomOptions, domStyleMation.attr);
// 获取boxId
var boxId = modelId + getRandomValueToString();
// 获取图片模型id
var domId = getDomBox(boxId, modelId, domStyleMation);
inPageDomMation[boxId] = $.extend(true, {}, domStyleMation);
return boxId;
}
function getEchartsBox(boxId, modelId) { function getEchartsBox(boxId, modelId) {
var echartsId = "echarts" + boxId; var echartsId = "echarts" + boxId;
var echartsBox = document.createElement("div"); var echartsBox = document.createElement("div");
...@@ -233,10 +299,35 @@ layui.config({ ...@@ -233,10 +299,35 @@ layui.config({
var table = document.createElement("table"); var table = document.createElement("table");
table.id = tableBoxId; table.id = tableBoxId;
box.appendChild(table); box.appendChild(table);
return tableBoxId; return tableBoxId;
} }
function getImgBox(boxId, modelId, imgStyleMation) {
var box = createBox(boxId, modelId, setDesignAttr(imgStyleMation));
var imgId = "img" + boxId;
var img = document.createElement("img");
img.id = imgId;
img.src = fileBasePath + imgStyleMation.imgPath;
img.style.width = "100%";
img.style.height = "100%";
box.appendChild(img);
return imgId;
}
function getDomBox(boxId, modelId, domStyleMation) {
var box = createBox(boxId, modelId, setDesignAttr(domStyleMation));
var domId = "dom" + boxId;
var dom = document.createElement("div");
dom.id = domId;
dom.innerHTML = domStyleMation.content;
dom.style.width = "100%";
dom.style.height = "100%";
box.appendChild(dom);
return domId;
}
function getWordBox(boxId, modelId, styleStr, wordStyleMation) { function getWordBox(boxId, modelId, styleStr, wordStyleMation) {
var wordId = "word" + boxId; var wordId = "word" + boxId;
var wordBox = document.createElement("font"); var wordBox = document.createElement("font");
......
...@@ -10,23 +10,26 @@ layui.config({ ...@@ -10,23 +10,26 @@ layui.config({
version: skyeyeVersion version: skyeyeVersion
}).extend({ }).extend({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'jquery', 'winui', 'form', 'fileUpload'], function (exports) {
winui.renderColor(); winui.renderColor();
var index = parent.layer.getFrameIndex(window.name); var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$, var $ = layui.$,
form = layui.form; form = layui.form;
var usetableTemplate = $("#usetableTemplate").html(); var usetableTemplate = $("#usetableTemplate").html();
var isPic = false; // 是否生成预览图
let id = GetUrlParam("id"); let id = GetUrlParam("id");
if (isNull(id)) { if (isNull(id)) {
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["reportModeType"]["key"], 'radioTree', "typeBox", '', form); sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["reportModeType"]["key"], 'radioTree', "typeBox", '', form);
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form); skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", '', form);
// 初始化上传
$("#logo").upload(systemCommonUtil.uploadCommon003Config('logo', 19, '', 1));
} else { } else {
AjaxPostUtil.request({url: reportBasePath + "queryWordModelById", params: {id: id}, type: 'json', method: 'GET', callback:function(data) { AjaxPostUtil.request({url: reportBasePath + "queryWordModelById", params: {id: id}, type: 'json', method: 'GET', callback:function(data) {
$("#name").val(data.bean.name); $("#name").val(data.bean.name);
$("#defaultWidth").val(data.bean.defaultWidth); $("#defaultWidth").val(data.bean.defaultWidth);
$("#defaultHeight").val(data.bean.defaultHeight); $("#defaultHeight").val(data.bean.defaultHeight);
// 初始化上传
$("#logo").upload(systemCommonUtil.uploadCommon003Config('logo', 20, data.bean.imgPath, 1));
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["reportModeType"]["key"], 'radioTree', "typeBox", data.bean.typeId, form); sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["reportModeType"]["key"], 'radioTree', "typeBox", data.bean.typeId, form);
skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", data.bean.enabled, form); skyeyeClassEnumUtil.showEnumDataListByClassName("commonEnable", 'radio', "enabled", data.bean.enabled, form);
// 加载属性值 // 加载属性值
...@@ -49,53 +52,41 @@ layui.config({ ...@@ -49,53 +52,41 @@ layui.config({
form.render(); form.render();
form.on('submit(formAddBean)', function (data) { form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) { if (winui.verifyForm(data.elem)) {
if (!isPic) { var rowTr = $("#useTable tr");
winui.window.msg("请先生成预览图", {icon: 2, time: 2000}); var tableData = new Array();
$.each(rowTr, function(i, item) {
var rowNum = $(item).attr("trcusid").replace("tr", "");
var trId = $(item).attr("trcusid");
tableData.push({
propertyId: choosePropertyList[trId].id,
editor: dataShowType.getData('editor' + rowNum),
showToEditor: dataShowType.getData('whetherShow' + rowNum),
orderBy: i + 1
});
});
if (tableData.length == 0) {
winui.window.msg('请最少选择一条属性值', {icon: 2, time: 2000});
return false; return false;
} }
var oCanvas = document.getElementById("thecanvas");
var imgData = oCanvas.toDataURL();
AjaxPostUtil.request({url: reqBasePath + "common004", params: {images: imgData, type: 19}, type: 'json', callback:function(json1){
var rowTr = $("#useTable tr");
var tableData = new Array();
$.each(rowTr, function(i, item) {
var rowNum = $(item).attr("trcusid").replace("tr", "");
var trId = $(item).attr("trcusid");
tableData.push({
propertyId: choosePropertyList[trId].id,
editor: dataShowType.getData('editor' + rowNum),
showToEditor: dataShowType.getData('whetherShow' + rowNum)
});
});
if (tableData.length == 0) {
winui.window.msg('请最少选择一条属性值', {icon: 2, time: 2000});
return false;
}
var params = { var params = {
name: $("#name").val(), name: $("#name").val(),
defaultWidth: $("#defaultWidth").val(), defaultWidth: $("#defaultWidth").val(),
defaultHeight: $("#defaultHeight").val(), defaultHeight: $("#defaultHeight").val(),
wordModelAttrList: JSON.stringify(tableData), wordModelAttrList: JSON.stringify(tableData),
typeId: dataShowType.getData('typeBox'), typeId: dataShowType.getData('typeBox'),
imgPath: json1.bean.picUrl, imgPath: $("#logo").find("input[type='hidden'][name='upload']").attr("oldurl"),
enabled: dataShowType.getData('enabled'), enabled: dataShowType.getData('enabled'),
id: isNull(id) ? '' : id id: isNull(id) ? '' : id
}; };
AjaxPostUtil.request({url: reportBasePath + "writeWordModel", params: params, type: 'json', method: "POST", callback: function(json) { AjaxPostUtil.request({url: reportBasePath + "writeWordModel", params: params, type: 'json', method: "POST", callback: function(json) {
parent.layer.close(index); parent.layer.close(index);
parent.refreshCode = '0'; parent.refreshCode = '0';
}});
}}); }});
} }
return false; return false;
}); });
// 生成图片
$("body").on("click", "#createPic", function() {
loadPic();
});
function loadPic() { function loadPic() {
var styleStr = ""; var styleStr = "";
$.each(choosePropertyList, function (key, value){ $.each(choosePropertyList, function (key, value){
...@@ -103,38 +94,12 @@ layui.config({ ...@@ -103,38 +94,12 @@ layui.config({
styleStr += value.attrCode + ":" + value.defaultValue + ";"; styleStr += value.attrCode + ":" + value.defaultValue + ";";
} }
}); });
var showPrit = '<font style="' + styleStr + '">Hello, Skyeye</font>'; var wordBox = document.createElement("font");
$("#printPic").html(showPrit); wordBox.innerHTML = "Hello, Skyeye";
html2canvas($("#printPic"), { wordBox.style = styleStr;
onrendered: function(canvas) { $("#printPic")[0].appendChild(wordBox);
// 添加属性
canvas.setAttribute('id','thecanvas');
// 读取属性值
document.getElementById('images').innerHTML = '';
document.getElementById('images').appendChild(canvas);
$("#download").show();
isPic = true;
}
});
} }
// 下载canvas图片
$("body").on("click", "#download", function() {
var oCanvas = document.getElementById("thecanvas");
var img_data1 = Canvas2Image.saveAsPNG(oCanvas, true).getAttribute('src');
saveFile(img_data1, 'richer.png');
});
// 保存文件函数
var saveFile = function(data, filename){
var save_link = document.createElementNS('http://www.w3.org/1999/xhtml', 'a');
save_link.href = data;
save_link.download = filename;
var event = document.createEvent('MouseEvents');
event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
save_link.dispatchEvent(event);
};
// 新增行 // 新增行
$("body").on("click", "#addRow", function() { $("body").on("click", "#addRow", function() {
addRow(); addRow();
...@@ -171,6 +136,7 @@ layui.config({ ...@@ -171,6 +136,7 @@ layui.config({
// 移除界面上的信息 // 移除界面上的信息
$(item).parent().parent().remove(); $(item).parent().parent().remove();
}); });
loadPic();
} else { } else {
winui.window.msg('请选择要删除的行', {icon: 2, time: 2000}); winui.window.msg('请选择要删除的行', {icon: 2, time: 2000});
} }
...@@ -188,6 +154,7 @@ layui.config({ ...@@ -188,6 +154,7 @@ layui.config({
var thisRowNum = trId.replace("tr", ""); var thisRowNum = trId.replace("tr", "");
choosePropertyList[trId] = chooseItemMation; choosePropertyList[trId] = chooseItemMation;
$("#propertyId" + thisRowNum.toString()).val(choosePropertyList[trId].name); $("#propertyId" + thisRowNum.toString()).val(choosePropertyList[trId].name);
loadPic();
}}); }});
}); });
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<div class="layui-form-item layui-col-xs12" id="canNotChoose"> <div class="layui-form-item layui-col-xs12" id="canNotChoose">
<label class="layui-form-label">默认值<i class="red">*</i></label> <label class="layui-form-label">默认值<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" id="defaultValue" name="defaultValue" placeholder="请输入默认值" class="layui-input" maxlength="300"/> <textarea id="defaultValue" name="defaultValue" placeholder="请输入默认值" class="layui-textarea" style="height: 100px;"></textarea>
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12" style="display: none" id="canChoose"> <div class="layui-form-item layui-col-xs12" style="display: none" id="canChoose">
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<title></title> <title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" /> <link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" /> <link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
<link href="../../assets/report/css/ruler.css" rel="stylesheet" />
</head> </head>
<body> <body>
<div style="margin:0 auto;padding:20px;"> <div style="margin:0 auto;padding:20px;">
...@@ -24,6 +23,12 @@ ...@@ -24,6 +23,12 @@
<div class="layui-input-block winui-radio" id="enabled"> <div class="layui-input-block winui-radio" id="enabled">
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">logo<i class="red">*</i></label>
<div class="layui-input-block">
<div class="upload" id="logo"></div>
</div>
</div>
<div class="layui-form-item layui-col-xs6"> <div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">默认宽度<i class="red">*</i></label> <label class="layui-form-label">默认宽度<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block">
...@@ -68,24 +73,9 @@ ...@@ -68,24 +73,9 @@
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-xs12"> <div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="line-height: 45px">效果图<i class="red">*</i></label> <label class="layui-form-label">效果图</label>
<div class="layui-col-xs8" style="line-height: 60px"> <div class="layui-input-block ver-center">
<div class="layui-col-xs10" id="printPic" style="width: 90px; height: 60px; text-align: center; line-height: 60px; background-color: white;"> <div class="layui-col-xs12" id="printPic">
<font>Hello, Skyeye</font>
</div>
<div class="layui-col-xs2">
<a href="javascript:;" class="layui-btn layui-btn-xs" id="createPic" style="margin-left: 10px;margin-top: 10px;">生成图片</a>
</div>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label" style="line-height: 45px">预览图<i class="red">*</i></label>
<div class="layui-col-xs6" style="line-height: 60px">
<div class="layui-col-xs10" id="images">
</div>
<div class="layui-col-xs2">
<a href="javascript:;" class="layui-btn layui-btn-xs" id="download" style="margin-left: 10px;margin-top: 10px; display: none">下载</a>
</div> </div>
</div> </div>
</div> </div>
...@@ -103,7 +93,7 @@ ...@@ -103,7 +93,7 @@
<script type="text/x-handlebars-template" id="usetableTemplate"> <script type="text/x-handlebars-template" id="usetableTemplate">
<tr trcusid="{{trId}}"> <tr trcusid="{{trId}}">
<td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td> <td><input type="checkbox" rowId="{{id}}" lay-filter="checkboxProperty" name="tableCheckRow"/></td>
<td> <td class="input-add-icon">
<input type="text" id="{{propertyId}}" name="{{propertyId}}" placeholder="请选择属性" class="layui-input" win-verify="required" readonly="readonly"> <input type="text" id="{{propertyId}}" name="{{propertyId}}" placeholder="请选择属性" class="layui-input" win-verify="required" readonly="readonly">
<i class="fa fa-plus-circle input-icon choosePropertyBtn" style="top: 12px;"></i> <i class="fa fa-plus-circle input-icon choosePropertyBtn" style="top: 12px;"></i>
</td> </td>
...@@ -120,11 +110,6 @@ ...@@ -120,11 +110,6 @@
<script src="../../assets/lib/layui/layui.js"></script> <script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script> <script src="../../assets/lib/layui/custom.js"></script>
<!-- html2canvas将Dom节点在Canvas里边画出来 -->
<script src="../../assets/html2canvas/js/html2canvas.min.js"></script>
<!-- 将canvas图片保存成图片 -->
<script src="../../assets/html2canvas/js/canvas2image.js"></script>
<script src="../../assets/html2canvas/js/base64.js"></script>
<script type="text/javascript"> <script type="text/javascript">
layui.config({base: '../../js/reportWordModel/'}).use('reportWordModelWrite'); layui.config({base: '../../js/reportWordModel/'}).use('reportWordModelWrite');
</script> </script>
......
...@@ -59,6 +59,7 @@ layui.config({ ...@@ -59,6 +59,7 @@ layui.config({
keyId: 'id', keyId: 'id',
keyPid: 'parentId', keyPid: 'parentId',
title: 'name', title: 'name',
showCache: "sysEveMenuUnfoldStatus"
}); });
tableTree.getTable().on('tool(messageTable)', function (obj) { tableTree.getTable().on('tool(messageTable)', function (obj) {
......
...@@ -2331,7 +2331,7 @@ hr, ...@@ -2331,7 +2331,7 @@ hr,
z-index: 9999; z-index: 9999;
min-width: 100%; min-width: 100%;
border: 1px solid #d2d2d2; border: 1px solid #d2d2d2;
max-height: 300px; max-height: 200px;
overflow-y: auto; overflow-y: auto;
background-color: #fff; background-color: #fff;
border-radius: 2px; border-radius: 2px;
......
...@@ -1384,7 +1384,7 @@ var commonHtml = { ...@@ -1384,7 +1384,7 @@ var commonHtml = {
</div>`, </div>`,
'dsFormPage': `<div class="layui-form-item layui-col-xs12"> 'dsFormPage': `<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">表单布局<i class="red">*</i></label> <label class="layui-form-label">表单布局<i class="red">*</i></label>
<div class="layui-input-block"> <div class="layui-input-block input-add-icon">
<input type="text" id="pageUrl" name="pageUrl" placeholder="请选择表单布局" win-verify="required" class="layui-input" readonly="readonly"/> <input type="text" id="pageUrl" name="pageUrl" placeholder="请选择表单布局" win-verify="required" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon chooseBtn" style="top: 12px;"></i> <i class="fa fa-plus-circle input-icon chooseBtn" style="top: 12px;"></i>
</div> </div>
......
...@@ -773,15 +773,32 @@ var dsFormUtil = { ...@@ -773,15 +773,32 @@ var dsFormUtil = {
url += `&objectId=${objectId}`; url += `&objectId=${objectId}`;
url += `&objectKey=${objectKey}`; url += `&objectKey=${objectKey}`;
} }
_openNewWindows({ if (operate.openType == 1) {
url: url, // 正常打开
title: operateOpenPage.name, _openNewWindows({
pageId: 'page' + operate.id, url: url,
area: ['90vw', '90vh'], title: operateOpenPage.name,
callBack: function (refreshCode) { pageId: 'page' + operate.id,
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); area: ['90vw', '90vh'],
dsFormTableUtil.loadTable(); callBack: function (refreshCode) {
}}); winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
dsFormTableUtil.loadTable();
}});
} else if (operate.openType == 2) {
// 父页面打开
parent._openNewWindows({
url: url,
title: operateOpenPage.name,
pageId: 'page' + operate.id,
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
dsFormTableUtil.loadTable();
}});
} else if (operate.openType == 3) {
// 新窗口打开
window.open(sysMainMation.homePagePath + url, '_blank');
}
} else if (operate.eventType == 'ajax') { } else if (operate.eventType == 'ajax') {
// 发送请求 // 发送请求
var businessApi = operate.businessApi; var businessApi = operate.businessApi;
......
...@@ -56,7 +56,7 @@ var initTableChooseUtil = { ...@@ -56,7 +56,7 @@ var initTableChooseUtil = {
' </div>' + ' </div>' +
' </div>' + ' </div>' +
' <div class="layui-form-mid layui-word-aux" style="width: 100%">' + newOptions.placeholder + '</div>' + ' <div class="layui-form-mid layui-word-aux" style="width: 100%">' + newOptions.placeholder + '</div>' +
' <div style="width: 100%; overflow-x: auto;">' + ' <div style="width: 100%; overflow-x: auto; margin-bottom: 10px;">' +
' <table class="layui-table" style="width: auto">' + ' <table class="layui-table" style="width: auto">' +
' <thead>' + ' <thead>' +
' <tr id="header' + newOptions.id + '"></tr>' + ' <tr id="header' + newOptions.id + '"></tr>' +
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
"applicableObjectsType": {"name": "适用对象类型", "className": "skyeye-pro#com.skyeye.common.enumeration.ApplicableObjectsType"}, "applicableObjectsType": {"name": "适用对象类型", "className": "skyeye-pro#com.skyeye.common.enumeration.ApplicableObjectsType"},
"checkDayType": {"name": "日程插件上的类型(包含日程的)", "className": "skyeye-pro#com.skyeye.common.enumeration.CheckDayType"}, "checkDayType": {"name": "日程插件上的类型(包含日程的)", "className": "skyeye-pro#com.skyeye.common.enumeration.CheckDayType"},
"userStaffType": {"name": "员工类型", "className": "skyeye-pro#com.skyeye.personnel.classenum.UserStaffType"}, "userStaffType": {"name": "员工类型", "className": "skyeye-pro#com.skyeye.personnel.classenum.UserStaffType"},
"pageOpenType": {"name": "页面布局打开方式", "className": "skyeye-pro#com.skyeye.operate.classenum.PageOpenType"},
"menuType": {"name": "APP菜单类型", "className": "skyeye-pro#com.skyeye.menu.classenum.MenuType"}, "menuType": {"name": "APP菜单类型", "className": "skyeye-pro#com.skyeye.menu.classenum.MenuType"},
"urlType": {"name": "APP菜单URL类型", "className": "skyeye-pro#com.skyeye.menu.classenum.UrlType"}, "urlType": {"name": "APP菜单URL类型", "className": "skyeye-pro#com.skyeye.menu.classenum.UrlType"},
...@@ -48,15 +49,16 @@ ...@@ -48,15 +49,16 @@
"erpOrderStateEnum": {"name": "ERP单据状态", "className": "skyeye-erp#com.skyeye.classenum.ErpOrderStateEnum"}, "erpOrderStateEnum": {"name": "ERP单据状态", "className": "skyeye-erp#com.skyeye.classenum.ErpOrderStateEnum"},
"supplierContractStateEnum": {"name": "供应商合同状态", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractStateEnum"}, "supplierContractStateEnum": {"name": "供应商合同状态", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractStateEnum"},
"supplierContractAuthEnum": {"name": "供应商合同权限", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractAuthEnum", "pageUrl": "../../tpl/supplierContract/supplierContractList.html"}, "supplierContractAuthEnum": {"name": "供应商合同权限", "className": "skyeye-erp#com.skyeye.contract.classenum.SupplierContractAuthEnum", "pageUrl": "../../tpl/supplierContract/supplierContractList.html"},
"productionState": {"name": "生产计划单状态", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionStateEnum"},
"machinStateEnum": {"name": "加工单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinStateEnum"}, "machinStateEnum": {"name": "加工单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinStateEnum"},
"machinPickStateEnum": {"name": "加工单领料状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinPickStateEnum"}, "machinPickStateEnum": {"name": "加工单领料状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinPickStateEnum"},
"machinChildStateEnum": {"name": "工序验收单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinChildStateEnum"}, "machinChildStateEnum": {"name": "工序验收单状态", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinChildStateEnum"},
"materialNormsCodeInDepot": {"name": "商品规格一物一码库存状态", "className": "skyeye-erp#com.skyeye.material.classenum.MaterialNormsCodeInDepot"}, "materialNormsCodeInDepot": {"name": "商品规格一物一码库存状态", "className": "skyeye-erp#com.skyeye.material.classenum.MaterialNormsCodeInDepot"},
"orderItemQualityInspectionType": {"name": "ERP采购子单据质检类型", "className": "skyeye-erp#com.skyeye.business.classenum.OrderItemQualityInspectionType"}, "orderItemQualityInspectionType": {"name": "ERP采购子单据质检类型", "className": "skyeye-erp#com.skyeye.business.classenum.OrderItemQualityInspectionType"},
"procedureCapacitySubject": {"name": "工序产能主体", "className": "skyeye-erp#com.skyeye.procedure.classenum.ProcedureCapacitySubject"},
"orderArrivalState": {"name": "采购订单到货状态", "className": "skyeye-erp#com.skyeye.purchase.classenum.OrderArrivalState"}, "orderArrivalState": {"name": "采购订单到货状态", "className": "skyeye-erp#com.skyeye.purchase.classenum.OrderArrivalState"},
"holderNormsChildState": {"name": "关联的客户/供应商/会员购买或者出售的商品子信息状态", "className": "skyeye-erp#com.skyeye.holder.classenum.HolderNormsChildState"}, "holderNormsChildState": {"name": "关联的客户/供应商/会员购买或者出售的商品子信息状态", "className": "skyeye-erp#com.skyeye.holder.classenum.HolderNormsChildState"},
"depotOutState": {"name": "仓库出库单状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotOutState"},
"purchaseOrderFromType": {"name": "采购订单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseOrderFromType"}, "purchaseOrderFromType": {"name": "采购订单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseOrderFromType"},
"purchaseDeliveryFromType": {"name": "到货单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseDeliveryFromType"}, "purchaseDeliveryFromType": {"name": "到货单来源单据类型", "className": "skyeye-erp#com.skyeye.purchase.classenum.PurchaseDeliveryFromType"},
...@@ -69,6 +71,19 @@ ...@@ -69,6 +71,19 @@
"sealOutLetFromType": {"name": "销售出库单来源单据类型", "className": "skyeye-erp#com.skyeye.seal.classenum.SealOutLetFromType"}, "sealOutLetFromType": {"name": "销售出库单来源单据类型", "className": "skyeye-erp#com.skyeye.seal.classenum.SealOutLetFromType"},
"sealReturnFromType": {"name": "销售退货单来源单据类型", "className": "skyeye-erp#com.skyeye.seal.classenum.SealReturnFromType"}, "sealReturnFromType": {"name": "销售退货单来源单据类型", "className": "skyeye-erp#com.skyeye.seal.classenum.SealReturnFromType"},
"crmContractFromType": {"name": "客户合同来源单据类型", "className": "skyeye-crm#com.skyeye.contract.classenum.CrmContractFromType"}, "crmContractFromType": {"name": "客户合同来源单据类型", "className": "skyeye-crm#com.skyeye.contract.classenum.CrmContractFromType"},
"pickFromType": {"name": "领料申请单/补料申请单/退料申请单来源单据类型", "className": "skyeye-erp#com.skyeye.pick.classenum.PickFromType"},
"requisitionOutLetFromType": {"name": "领料出库单来源单据类型", "className": "skyeye-erp#com.skyeye.pick.classenum.RequisitionOutLetFromType"},
"patchOutLetFromType": {"name": "补料出库单来源单据类型", "className": "skyeye-erp#com.skyeye.pick.classenum.PatchOutLetFromType"},
"returnPutFromType": {"name": "退料入库单来源单据类型", "className": "skyeye-erp#com.skyeye.pick.classenum.ReturnPutFromType"},
"confirmFromType": {"name": "物料接收单/物料退货单来源单据类型", "className": "skyeye-erp#com.skyeye.pickconfirm.classenum.ConfirmFromType"},
"productionFromType": {"name": "生产计划单来源单据类型", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionFromType"},
"productionPlanFromType": {"name": "预生产计划单来源单据类型", "className": "skyeye-erp#com.skyeye.production.classenum.ProductionPlanFromType"},
"machinFromType": {"name": "加工单来源单据类型", "className": "skyeye-erp#com.skyeye.machin.classenum.MachinFromType"},
"wholeOrderOutFromType": {"name": "整单委外单来源单据类型", "className": "skyeye-erp#com.skyeye.whole.classenum.WholeOrderOutFromType"},
"depotOutFromType": {"name": "仓库出库单来源单据类型", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotOutFromType"},
"depotOutState": {"name": "仓库出库单出库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotOutState"},
"depotPutFromType": {"name": "仓库入库单来源单据类型", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutFromType"},
"depotPutState": {"name": "仓库入库单入库状态", "className": "skyeye-erp#com.skyeye.depot.classenum.DepotPutState"},
"skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"}, "skyeyeView": {"name": "视图类型", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"widthScale": {"name": "宽度比例", "className": "skyeye-pro#com.skyeye.attr.classenum.WidthScale"}, "widthScale": {"name": "宽度比例", "className": "skyeye-pro#com.skyeye.attr.classenum.WidthScale"},
...@@ -92,6 +107,7 @@ ...@@ -92,6 +107,7 @@
"taskAuthEnum": {"name": "项目任务权限", "className": "skyeye-project#com.skyeye.task.classenum.TaskAuthEnum", "pageUrl": "../../tpl/proTask/proTaskList.html"}, "taskAuthEnum": {"name": "项目任务权限", "className": "skyeye-project#com.skyeye.task.classenum.TaskAuthEnum", "pageUrl": "../../tpl/proTask/proTaskList.html"},
"milestoneStateEnum": {"name": "里程碑状态", "className": "skyeye-project#com.skyeye.milestone.classenum.MilestoneStateEnum"}, "milestoneStateEnum": {"name": "里程碑状态", "className": "skyeye-project#com.skyeye.milestone.classenum.MilestoneStateEnum"},
"milestoneImported": {"name": "里程碑重要性", "className": "skyeye-project#com.skyeye.milestone.classenum.MilestoneImported"}, "milestoneImported": {"name": "里程碑重要性", "className": "skyeye-project#com.skyeye.milestone.classenum.MilestoneImported"},
"taskImported": {"name": "任务重要性", "className": "skyeye-project#com.skyeye.task.classenum.TaskImported"},
"dsFormPageType": {"name": "表单布局类型", "className": "skyeye-pro#com.skyeye.dsform.classenum.DsFormPageType"}, "dsFormPageType": {"name": "表单布局类型", "className": "skyeye-pro#com.skyeye.dsform.classenum.DsFormPageType"},
"simpleTableWhetherChoose": {"name": "表格类型的布局是否开启选择功能", "className": "skyeye-pro#com.skyeye.dsform.classenum.SimpleTableWhetherChoose"}, "simpleTableWhetherChoose": {"name": "表格类型的布局是否开启选择功能", "className": "skyeye-pro#com.skyeye.dsform.classenum.SimpleTableWhetherChoose"},
...@@ -138,6 +154,8 @@ ...@@ -138,6 +154,8 @@
"gwDocumentPeriod": {"name": "公文-保密期间", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentPeriod"}, "gwDocumentPeriod": {"name": "公文-保密期间", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentPeriod"},
"gwDocumentSecret": {"name": "公文-公文密级", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentSecret"}, "gwDocumentSecret": {"name": "公文-公文密级", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentSecret"},
"gwDocumentUrgency": {"name": "公文-紧急程度", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentUrgency"}, "gwDocumentUrgency": {"name": "公文-紧急程度", "className": "skyeye-adm#com.skyeye.eve.gw.classenum.GwDocumentUrgency"},
"assetPurchasePutFromType": {"name": "采购入库单来源单据类型", "className": "skyeye-adm#com.skyeye.eve.assets.classenum.PurchasePutFromType"},
"assetPurchaseReturnFromType": {"name": "采购退货单来源单据类型", "className": "skyeye-adm#com.skyeye.eve.assets.classenum.PurchaseReturnFromType"},
"schoolPower": {"name": "学校数据权限", "className": "skyeye-school#com.skyeye.eve.classenum.SchoolPower"}, "schoolPower": {"name": "学校数据权限", "className": "skyeye-school#com.skyeye.eve.classenum.SchoolPower"},
"admissionMethod": {"name": "入学方式", "className": "skyeye-school#com.skyeye.school.student.classenum.AdmissionMethod"}, "admissionMethod": {"name": "入学方式", "className": "skyeye-school#com.skyeye.school.student.classenum.AdmissionMethod"},
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
"splitListOrder": {"name": "拆分订单", "key": "com.skyeye.other.service.impl.SplitListServiceImpl"}, "splitListOrder": {"name": "拆分订单", "key": "com.skyeye.other.service.impl.SplitListServiceImpl"},
"assemblySheetOrder": {"name": "组装订单", "key": "com.skyeye.other.service.impl.AssemblySheetServiceImpl"}, "assemblySheetOrder": {"name": "组装订单", "key": "com.skyeye.other.service.impl.AssemblySheetServiceImpl"},
"allocationFormOrder": {"name": "调拨订单", "key": "com.skyeye.other.service.impl.AllocationServiceImpl"}, "allocationFormOrder": {"name": "调拨订单", "key": "com.skyeye.other.service.impl.AllocationServiceImpl"},
"depotOutOrder": {"name": "仓库出库单", "key": "com.skyeye.depot.service.impl.DepotOutServiceImpl"},
"depotPutOrder": {"name": "仓库入库单", "key": "com.skyeye.depot.service.impl.DepotPutServiceImpl"},
"putAcceptanceWarehousing": {"name": "验收入库单", "key": "com.skyeye.machin.service.impl.ErpAcceptanceReceiptServiceImpl"}, "putAcceptanceWarehousing": {"name": "验收入库单", "key": "com.skyeye.machin.service.impl.ErpAcceptanceReceiptServiceImpl"},
"machinHeader": {"name": "加工单", "key": "com.skyeye.machin.service.impl.ErpMachinServiceImpl"}, "machinHeader": {"name": "加工单", "key": "com.skyeye.machin.service.impl.ErpMachinServiceImpl"},
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
<dl class="layui-nav-child"> <dl class="layui-nav-child">
{{#each childs}} {{#each childs}}
<dd> <dd>
<a href="javascript:;" class="page-item-click" data-url="{{pageURL}}" data-id="{{id}}" data-title="{{icon}}{{name}}" data-type="{{menuType}}" <a href="javascript:;" class="page-item-click" data-url="{{pageURL}}" data-id="{{id}}" data-title="{{icon}}{{name}}" data-type="{{type}}"
data-sysWinUrl="{{sysWinUrl}}"> data-sysWinUrl="{{sysWinUrl}}">
{{{icon}}} {{{icon}}}
<cite>{{name}}</cite> <cite>{{name}}</cite>
...@@ -224,7 +224,7 @@ ...@@ -224,7 +224,7 @@
<script type="text/x-handlebars-template" id="menuTemplate"> <script type="text/x-handlebars-template" id="menuTemplate">
{{#bean}} {{#bean}}
<li class="layui-nav-item"> <li class="layui-nav-item">
<a href="javascript:;" class="page-item-click" data-url="{{pageURL}}" data-id="{{id}}" data-title="{{icon}}{{name}}" data-type="{{menuType}}" <a href="javascript:;" class="page-item-click" data-url="{{pageURL}}" data-id="{{id}}" data-title="{{icon}}{{name}}" data-type="{{type}}"
data-sysWinUrl="{{sysWinUrl}}"> data-sysWinUrl="{{sysWinUrl}}">
{{{icon}}} {{{icon}}}
<cite>{{name}}</cite> <cite>{{name}}</cite>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册