|
@@ -2,78 +2,6 @@
|
|
|
* Created by Zhong on 2017/8/14.
|
|
|
*/
|
|
|
const locked = lockUtil.getLocked();
|
|
|
-$(document).ready(function () {
|
|
|
- let moduleName = "stdGLj";
|
|
|
- function refreshALlWorkBook() {
|
|
|
- if (gljClassTreeObj.workBook) {
|
|
|
- gljClassTreeObj.workBook.refresh();
|
|
|
- }
|
|
|
- if (repositoryGljObj.workBook) {
|
|
|
- repositoryGljObj.workBook.refresh();
|
|
|
- }
|
|
|
- if (gljComponentOprObj.workBook) {
|
|
|
- gljComponentOprObj.workBook.refresh();
|
|
|
- }
|
|
|
- }
|
|
|
- SlideResize.loadHorizonWidth(
|
|
|
- moduleName,
|
|
|
- [$("#slideResizeLeft"), $("#slideResizeRight")],
|
|
|
- [$("#leftContent"), $("#midContent"), $("#rightContent")],
|
|
|
- function () {
|
|
|
- refreshALlWorkBook();
|
|
|
- }
|
|
|
- );
|
|
|
- //章节树与人材机表
|
|
|
- let leftElesObj = {};
|
|
|
- leftElesObj.module = moduleName;
|
|
|
- leftElesObj.resize = $("#slideResizeLeft");
|
|
|
- leftElesObj.parent = $("#dataRow");
|
|
|
- leftElesObj.left = $("#leftContent");
|
|
|
- leftElesObj.right = $("#midContent");
|
|
|
- SlideResize.horizontalSlide(
|
|
|
- leftElesObj,
|
|
|
- {
|
|
|
- min: 375,
|
|
|
- max: `$('#dataRow').width() - $('#rightContent').width() - 375`,
|
|
|
- },
|
|
|
- function () {
|
|
|
- refreshALlWorkBook();
|
|
|
- }
|
|
|
- );
|
|
|
- //人材机表与人材机组成物表
|
|
|
- let rightElesObj = {};
|
|
|
- rightElesObj.module = moduleName;
|
|
|
- rightElesObj.resize = $("#slideResizeRight");
|
|
|
- rightElesObj.parent = $("#dataRow");
|
|
|
- rightElesObj.left = $("#midContent");
|
|
|
- rightElesObj.right = $("#rightContent");
|
|
|
- SlideResize.horizontalSlide(
|
|
|
- rightElesObj,
|
|
|
- {
|
|
|
- min: 200,
|
|
|
- max: `$('#dataRow').width() - $('#leftContent').width() - 200`,
|
|
|
- },
|
|
|
- function () {
|
|
|
- let resizeRate =
|
|
|
- (SlideResize.resizeWidth * 100) / $("#midContent").width(),
|
|
|
- sheetRate = 100 - resizeRate;
|
|
|
- $("#slideResizeLeft").css("width", `${resizeRate}%`);
|
|
|
- $("#GLJListSheet").css("width", `${sheetRate}%`);
|
|
|
- refreshALlWorkBook();
|
|
|
- }
|
|
|
- );
|
|
|
-
|
|
|
- $("#gljSearch").keydown(function (event) {
|
|
|
- if (event.keyCode === 13) {
|
|
|
- $(this).blur();
|
|
|
- const gljCode = $(this).val();
|
|
|
- if (gljCode) {
|
|
|
- repositoryGljObj.locateGlj(gljCode);
|
|
|
- // sectionTreeObj.locateToSection(rationCode);
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
-});
|
|
|
|
|
|
const digital = {
|
|
|
basePrice: -2,
|
|
@@ -565,6 +493,7 @@ let repositoryGljObj = {
|
|
|
cache: false,
|
|
|
timeout: 20000,
|
|
|
success: function (result, textStatus, status) {
|
|
|
+ debugger;
|
|
|
if (status.status == 200) {
|
|
|
zTreeHelper.createTree(result.data, gljSetting, "repositoryTree", me);
|
|
|
zTreeHelper.createTree(
|
|
@@ -1575,6 +1504,18 @@ let repositoryGljObj = {
|
|
|
me.getUsedInfo(glj);
|
|
|
},
|
|
|
},
|
|
|
+ moveTo: {
|
|
|
+ name: "移动分类至…",
|
|
|
+ disabled: function () {
|
|
|
+ return (
|
|
|
+ locked || !(me.currentCache && me.currentCache[target.row])
|
|
|
+ );
|
|
|
+ },
|
|
|
+ icon: "fa-exchange",
|
|
|
+ callback: function (key, opt) {
|
|
|
+ me.moveTo([]);
|
|
|
+ },
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
} else {
|
|
@@ -1618,6 +1559,10 @@ let repositoryGljObj = {
|
|
|
}
|
|
|
);
|
|
|
},
|
|
|
+ moveTo: function () {
|
|
|
+ $("#moveToConfirm").prop("disabled", true);
|
|
|
+ $("#moveTo").modal("show");
|
|
|
+ },
|
|
|
getUsedInfo: function (glj) {
|
|
|
$.bootstrapLoading.start();
|
|
|
$("#usedInfo").modal("show");
|
|
@@ -2533,3 +2478,95 @@ let gljTypeTreeOprObj = {
|
|
|
.remove();
|
|
|
},
|
|
|
};
|
|
|
+
|
|
|
+$(document).ready(function () {
|
|
|
+ let moduleName = "stdGLj";
|
|
|
+ function refreshALlWorkBook() {
|
|
|
+ if (gljClassTreeObj.workBook) {
|
|
|
+ gljClassTreeObj.workBook.refresh();
|
|
|
+ }
|
|
|
+ if (repositoryGljObj.workBook) {
|
|
|
+ repositoryGljObj.workBook.refresh();
|
|
|
+ }
|
|
|
+ if (gljComponentOprObj.workBook) {
|
|
|
+ gljComponentOprObj.workBook.refresh();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ SlideResize.loadHorizonWidth(
|
|
|
+ moduleName,
|
|
|
+ [$("#slideResizeLeft"), $("#slideResizeRight")],
|
|
|
+ [$("#leftContent"), $("#midContent"), $("#rightContent")],
|
|
|
+ function () {
|
|
|
+ refreshALlWorkBook();
|
|
|
+ }
|
|
|
+ );
|
|
|
+ //章节树与人材机表
|
|
|
+ let leftElesObj = {};
|
|
|
+ leftElesObj.module = moduleName;
|
|
|
+ leftElesObj.resize = $("#slideResizeLeft");
|
|
|
+ leftElesObj.parent = $("#dataRow");
|
|
|
+ leftElesObj.left = $("#leftContent");
|
|
|
+ leftElesObj.right = $("#midContent");
|
|
|
+ SlideResize.horizontalSlide(
|
|
|
+ leftElesObj,
|
|
|
+ {
|
|
|
+ min: 375,
|
|
|
+ max: `$('#dataRow').width() - $('#rightContent').width() - 375`,
|
|
|
+ },
|
|
|
+ function () {
|
|
|
+ refreshALlWorkBook();
|
|
|
+ }
|
|
|
+ );
|
|
|
+ //人材机表与人材机组成物表
|
|
|
+ let rightElesObj = {};
|
|
|
+ rightElesObj.module = moduleName;
|
|
|
+ rightElesObj.resize = $("#slideResizeRight");
|
|
|
+ rightElesObj.parent = $("#dataRow");
|
|
|
+ rightElesObj.left = $("#midContent");
|
|
|
+ rightElesObj.right = $("#rightContent");
|
|
|
+ SlideResize.horizontalSlide(
|
|
|
+ rightElesObj,
|
|
|
+ {
|
|
|
+ min: 200,
|
|
|
+ max: `$('#dataRow').width() - $('#leftContent').width() - 200`,
|
|
|
+ },
|
|
|
+ function () {
|
|
|
+ let resizeRate =
|
|
|
+ (SlideResize.resizeWidth * 100) / $("#midContent").width(),
|
|
|
+ sheetRate = 100 - resizeRate;
|
|
|
+ $("#slideResizeLeft").css("width", `${resizeRate}%`);
|
|
|
+ $("#GLJListSheet").css("width", `${sheetRate}%`);
|
|
|
+ refreshALlWorkBook();
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ $("#gljSearch").keydown(function (event) {
|
|
|
+ if (event.keyCode === 13) {
|
|
|
+ $(this).blur();
|
|
|
+ const gljCode = $(this).val();
|
|
|
+ if (gljCode) {
|
|
|
+ repositoryGljObj.locateGlj(gljCode);
|
|
|
+ // sectionTreeObj.locateToSection(rationCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#moveToConfirm").click(function () {
|
|
|
+ let sheet = repositoryGljObj.workBook.getSheet(0);
|
|
|
+ let sel = sheet.getSelections()[0];
|
|
|
+ let gljs = repositoryGljObj.currentCache.slice(
|
|
|
+ sel.row,
|
|
|
+ sel.row + sel.rowCount
|
|
|
+ );
|
|
|
+ let node = gljClassTreeObj.zTreeSetting.selected;
|
|
|
+
|
|
|
+ let updateArr = [];
|
|
|
+ for (let glj of gljs) {
|
|
|
+ const data = _.cloneDeep(glj);
|
|
|
+ data.gljClass = node.ID;
|
|
|
+ updateArr.push(data);
|
|
|
+ }
|
|
|
+ repositoryGljObj.mixUpdateRequest(updateArr, [], []);
|
|
|
+ $("#moveTo").modal("hide");
|
|
|
+ });
|
|
|
+});
|