zmhs_view.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. /**
  2. * Created by zhang on 2018/5/30.
  3. */
  4. let zmhs_obj = {
  5. module: 'subZmhs',
  6. coeSpread:null,
  7. coeSheet:null,
  8. coeSheetData:[],
  9. coeSetting: {
  10. header: [
  11. {headerName: "调整", headerWidth: 35, dataCode: "isAdjust", dataType: "String", cellType: "checkBox"},
  12. {headerName: "条件", headerWidth: 250, dataCode: "name", dataType: "String", cellType: "button"},
  13. {headerName: "内容", headerWidth: 160, dataCode: "content", dataType: "String", hAlign: "left",getText:'forContent'}
  14. ],
  15. view: {
  16. lockColumns:[0,1,2],
  17. rowHeaderWidth:25
  18. },
  19. getText:{
  20. forContent:function (item) {
  21. if(gljUtil.isDef(item.select_code)&&item.select_code!=""){
  22. return item.select_code;
  23. }else {
  24. return item.content;
  25. }
  26. }
  27. },
  28. autoFit:true,
  29. fitRow:['name']
  30. },
  31. cusSpread:null,
  32. cusSheet:null,
  33. cusSheetData:null,
  34. cusSetting:{
  35. header: [
  36. {headerName: "类型", headerWidth: 250, dataCode: "coeType", dataType: "String",hAlign: "left"},
  37. {headerName: "系数", headerWidth: 160, dataCode: "amount", dataType: "String", hAlign: "right",validator:"number"}
  38. ],
  39. view: {
  40. lockColumns:["coeType"],
  41. rowHeaderWidth:25
  42. }
  43. },
  44. assSpread:null,
  45. assSheet:null,
  46. assSheetData: [],
  47. assSetting: {
  48. header: [
  49. {headerName: "调整名称", headerWidth: 100, dataCode: "name", dataType: "String"},
  50. {headerName: "定额值", headerWidth: 80, dataCode: "stdValue", hAlign: "right", dataType: "String"},
  51. {headerName: "实际值", headerWidth: 80, dataCode: "actualValue", hAlign: "right", dataType: "String"}
  52. ],
  53. view: {
  54. lockColumns: [0, 1],
  55. rowHeaderWidth:25
  56. }
  57. },
  58. initSpread:function () {
  59. this.initCoeSpread();
  60. this.initAssSpread();
  61. },
  62. initCoeSpread:function () {
  63. if(zmhs_obj.coeSpread == null){
  64. this.coeSpread = SheetDataHelper.createNewSpread($("#coeSpread")[0]);
  65. sheetCommonObj.spreadDefaultStyle(this.coeSpread);
  66. this.coeSheet = this.coeSpread.getSheet(0);
  67. sheetCommonObj.initSheet(this.coeSheet, this.coeSetting, 30);
  68. this.coeSheet.name('ration_coe');
  69. this.coeSheet.bind(GC.Spread.Sheets.Events.CellClick, this.onCoeCellClick);
  70. this.coeSpread.bind(GC.Spread.Sheets.Events.ButtonClicked, this.onButtonClick);
  71. this.coeSheet.bind(GC.Spread.Sheets.Events.ValueChanged,this.onCoeValueChange);
  72. this.coeSheet.bind(GC.Spread.Sheets.Events.SelectionChanged, function (e,args) {
  73. args.sheet.repaint();
  74. });
  75. SheetDataHelper.protectdSheet(this.coeSheet);
  76. }
  77. },
  78. initCusSpread:function () {
  79. if(zmhs_obj.cusSpread == null){
  80. this.cusSpread = SheetDataHelper.createNewSpread($("#cusSpread")[0]);
  81. sheetCommonObj.spreadDefaultStyle(this.cusSpread);
  82. this.cusSheet = this.cusSpread.getSheet(0);
  83. sheetCommonObj.initSheet(this.cusSheet, this.cusSetting, 30);
  84. this.cusSheet.name('ration_cus');
  85. this.cusSheet.bind(GC.Spread.Sheets.Events.ValueChanged,this.onCusValueChange);
  86. this.cusSheet.bind(GC.Spread.Sheets.Events.RangeChanged, this.onCusRangeChanged);
  87. SheetDataHelper.protectdSheet(this.cusSheet);
  88. }
  89. },
  90. initAssSpread:function () {
  91. if(zmhs_obj.assSheet == null){
  92. this.assSpread = SheetDataHelper.createNewSpread($("#assSpread")[0]);
  93. sheetCommonObj.spreadDefaultStyle(this.assSpread);
  94. this.assSheet = this.assSpread.getSheet(0);
  95. sheetCommonObj.initSheet(this.assSheet, this.assSetting, 30);
  96. this.assSheet.bind(GC.Spread.Sheets.Events.EditEnded, this.onAssEditEnded);
  97. this.assSheet.bind(GC.Spread.Sheets.Events.RangeChanged, this.onAssRangeChanged);
  98. this.assSheet.name('ration_ass');
  99. SheetDataHelper.protectdSheet(this.assSheet);
  100. }
  101. },
  102. showCoeData:function (node) {
  103. let selected = node?node:projectObj.project.mainTree.selected;
  104. let ration_coe = projectObj.project.ration_coe;
  105. let coeList = [];
  106. if(selected&&selected.sourceType == "ration"){
  107. let ration = selected.data;
  108. coeList = ration_coe.getCoeByRationID(ration.ID);
  109. _.remove(coeList,{"coeID":-1})//2018-12-24 新需求,把自定义乘系数分离出来,这里排除自定义乘系数行
  110. }
  111. this.coeSheet.setRowCount(0);
  112. sheetCommonObj.showData(this.coeSheet, this.coeSetting,coeList);
  113. if (coeList.length > 0) {
  114. this.coeSheet.suspendPaint();
  115. this.coeSheet.suspendEvent();
  116. for(let i =0;i<coeList.length;i++ ){
  117. if(gljUtil.isDef(coeList[i].option_codes)&&coeList[i].option_codes!=""){
  118. this.getComboBoxForCodes(coeList[i],i);//设置可选类型的下拉框
  119. // sheet.setValue(row, col, val, ch);
  120. } else if(coeList[i].coeID == -1){ //自定义系数列
  121. this.coeSheet.getCell(i, 1, GC.Spread.Sheets.SheetArea.viewport).locked(false);
  122. this.coeSheet.setCellType(i, 1, sheetCommonObj.getCustomerCoeCellType(this.generateHtmlString,this.bindCusEditorValue,this.updateCusCoeAfterEditor), GC.Spread.Sheets.SheetArea.viewport);
  123. }
  124. }
  125. this.coeSheet.resumeEvent();
  126. this.coeSheet.resumePaint();
  127. }
  128. this.coeSheetData = coeList;
  129. if(projectReadOnly){
  130. disableSpread(zmhs_obj.coeSpread);
  131. }
  132. },
  133. showCusData:function (node) {
  134. let selected = node?node:projectObj.project.mainTree.selected;
  135. let ration_coe = projectObj.project.ration_coe;
  136. let cusList = [];
  137. if(selected&&selected.sourceType == "ration"){
  138. let ration = selected.data;
  139. let coeList = ration_coe.getCoeByRationID(ration.ID);
  140. this.cusSheetData = _.find(coeList,{"coeID":-1});
  141. if(this.cusSheetData) cusList = this.cusSheetData.coes;
  142. }
  143. sheetCommonObj.showData(this.cusSheet, this.cusSetting,cusList);
  144. this.cusSheet.getRange(cusList.length,-1,this.cusSheet.getRowCount()-cusList.length, -1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
  145. if(projectReadOnly){
  146. disableSpread(zmhs_obj.cusSpread);
  147. }
  148. },
  149. getComboBoxForCodes:function (coe,i) {
  150. this.coeSheet.getCell(i, 2, GC.Spread.Sheets.SheetArea.viewport).locked(false);
  151. let options = coe.option_codes.split("|");
  152. let combo = sheetCommonObj.getDynamicCombo(true);
  153. combo.items(options);//itemHeight(options.length).
  154. this.coeSheet.setCellType(i, 2, combo, GC.Spread.Sheets.SheetArea.viewport);
  155. this.coeSheet.setValue(i, 2, coe.select_code);
  156. },
  157. showAssData:function (node) {
  158. this.assSheet.suspendPaint();
  159. this.assSheet.suspendEvent();
  160. let selected = node?node:projectObj.project.mainTree.selected;
  161. let assList = selected&&selected.data.rationAssList ? selected.data.rationAssList : [];
  162. this.assSheet.setRowCount(0);
  163. sheetCommonObj.showData(this.assSheet, this.assSetting, assList);
  164. this.assSheetData = assList;
  165. this.assSheet.getRange(assList.length,-1,this.assSheet.getRowCount()-assList.length, -1, GC.Spread.Sheets.SheetArea.viewport).locked(true);
  166. this.assSheet.resumePaint();
  167. this.assSheet.resumeEvent();
  168. if(projectReadOnly){
  169. disableSpread(this.assSpread);
  170. }
  171. },
  172. refreshAfterUpdate:function(result,reload){
  173. let ration_glj = projectObj.project.ration_glj;
  174. let calcInstall = false;//是否记录安装增加费
  175. let nodes = projectObj.project.updateNodesCache([{type:ModuleNames.ration,data:result.ration}]);
  176. if(result.add && result.add.length > 0){//需添加定额工料机的情况
  177. ration_glj.datas = ration_glj.datas.concat(result.add);
  178. gljOprObj.sheetData = gljOprObj.sheetData.concat(result.add);
  179. }
  180. if(result.delete && result.delete.length > 0 && this.deleteGLJs(result.delete)) calcInstall = true; //这样保证delete返回值是true的时候才改变变量类型
  181. if(result.replace && result.replace.length > 0){ //替换工料机的情况
  182. for(let r of result.replace){//替换缓存内容
  183. ration_glj.datas.splice(_.findIndex(ration_glj.datas,{'ID': r.ID}),1,r);
  184. gljOprObj.sheetData.splice(_.findIndex(gljOprObj.sheetData,{'ID': r.ID}),1,r);
  185. let node = ration_glj.updateGLJNodeAfterReplace(r);
  186. if(node) nodes.push(node);
  187. }
  188. }
  189. projectObj.mainController.refreshTreeNode(nodes, false);
  190. let rationID= ration_glj.updateCacheAfterAdjust(result.ration_glj);
  191. if(reload == true){//有添加、替换、工料机等需重新加载的情况
  192. $.bootstrapLoading.start();
  193. projectObj.project.projectGLJ.loadData(function () {
  194. $.bootstrapLoading.end();
  195. if(result.add && result.add.length > 0) ration_glj.addToMainTree(result.add);//这个方法有再去项目工料机那里取价格,所以要在回调里调用,不像替换工料的情况
  196. ration_glj.reCalcWhenGLJChange({rationID:rationID});
  197. if(result.delete && result.delete.length > 0 && calcInstall) installationFeeObj.calcInstallationFee();//如果是删除节点的话,
  198. });
  199. }else {
  200. ration_glj.reCalcWhenGLJChange({rationID:rationID});
  201. }
  202. gljOprObj.showRationGLJSheetData(true);
  203. },
  204. deleteGLJs:function (IDs) {
  205. let ration_glj = projectObj.project.ration_glj;
  206. let glj_list = ration_glj.datas;
  207. let calcInstall = false;
  208. let oldData = _.remove(glj_list, function (o) {
  209. return _.includes(IDs,o.ID);
  210. });
  211. _.remove(gljOprObj.sheetData, function (o) {
  212. return _.includes(IDs,o.ID);
  213. });
  214. for (let o of oldData) {
  215. if (ration_glj.needShowToTree(o)) {
  216. let node = ration_glj.findGLJNodeByID(o.ID); //找到对应的树节点
  217. projectObj.mainController.deleteNode(node, null);
  218. calcInstall = true;
  219. }
  220. }
  221. return calcInstall;
  222. },
  223. refresh:function () {
  224. $('#coeSpread').is(':visible')&&this.coeSpread?this.coeSpread.refresh():'';
  225. $('#cusSpread').is(':visible')&&this.cusSpread?this.cusSpread.refresh():'';
  226. $('#assSpread').is(':visible')&&this.assSpread?this.assSpread.refresh():'';
  227. },
  228. showDatas:function () {
  229. if($('#coeSpread').is(':visible')) this.showCoeData();
  230. if($('#cusSpread').is(':visible')) this.showCusData();
  231. if($('#assSpread').is(':visible')) this.showAssData();
  232. },
  233. showZMHSData:function (node) {
  234. if(this.coeSpread&& this.assSpread && $('#linkZMHS').hasClass('active')){
  235. this.showCoeData(node);
  236. this.showAssData(node);
  237. }
  238. },
  239. onCoeCellClick: function (sender, args) {
  240. let me = zmhs_obj;
  241. let sheet = args.sheet, row = args.row, col = args.col;
  242. if(sheet.getCell(row, col).locked() !=true){
  243. if(!sheet.isEditing()) sheet.startEdit();
  244. }
  245. },
  246. onButtonClick:function (sender, args) {
  247. let me = zmhs_obj;
  248. let sheet = args.sheet, row = args.row, col = args.col;
  249. let cellType = sheet.getCellType(row, col);
  250. if (args.sheetName == 'ration_coe' && cellType instanceof GC.Spread.Sheets.CellTypes.CheckBox) {
  251. me.onCoeCheckBoxClick(sender, args)
  252. }
  253. },
  254. bindCusEditorValue:function(context){
  255. let me = zmhs_obj;
  256. if(me.coeSheetData[context.row]){
  257. let data = me.coeSheetData[context.row];
  258. for(let c of data.coes){
  259. $("#"+ c.coeType).val(c.amount);
  260. }
  261. /*$('#coe_ration').val(data.coes[0].amount);
  262. $('#manual').val(data.coes[1].amount);
  263. $('#material').val(data.coes[2].amount);
  264. $('#manchine').val(data.coes[3].amount);
  265. $('#mainM').val(data.coes[4].amount);
  266. $('#equipment').val(data.coes[5].amount);*/
  267. }
  268. },
  269. updateCusCoeAfterEditor:function(){
  270. let me = zmhs_obj;
  271. let result = me.checkIfNeedUpdate();
  272. if (result.isNeed) {
  273. projectObj.project.ration_coe.updateCustomerCoe(result);
  274. }
  275. },
  276. onInputChange(id, name){
  277. var coe = _.find(zmhs_obj.coeSheetData, function (c) {
  278. return c.coeID == -1;
  279. });
  280. if(coe){
  281. let newValue = zmhs_obj.numberValueChecking($('#' + id).val());
  282. if (newValue) {
  283. newValue = _.round(newValue, 2);
  284. if (newValue == coe.coes[name].amount) return;
  285. if (id == '定额') {
  286. for(let c of coe.coes){
  287. $('#'+c.coeType).val(newValue)
  288. }
  289. } else {
  290. $('#' + id).val(newValue);
  291. }
  292. } else {
  293. $('#' + id).val(coe.coes[name].amount);
  294. }
  295. }
  296. },
  297. onInputClick(ele){//点中系数单元格,则默认选中系数值
  298. setSelection(ele,0,$(ele).val().length)
  299. },
  300. checkIfNeedUpdate(){
  301. let data = _.find(zmhs_obj.coeSheetData, function (c) {
  302. return c.coeID == -1;
  303. });
  304. let result = {isNeed: false};
  305. if(data){
  306. for(let c of data.coes){
  307. let amount = $("#"+c.coeType).val();
  308. if(amount!=c.amount){
  309. result.isNeed = true;
  310. c.amount = amount;
  311. }
  312. }
  313. if (result.isNeed) {
  314. result.doc = {
  315. coes: data.coes
  316. };
  317. result.query = {
  318. projectID: data.projectID,
  319. ID: data.ID,
  320. rationID: data.rationID
  321. };
  322. }
  323. }
  324. return result;
  325. },
  326. numberValueChecking: function (val) {
  327. var newval = Number(val);
  328. if (number_util.isNumber(newval)) {
  329. return newval;
  330. } else {
  331. if (val) {
  332. alert('您输入的数据类型不正确,请重新输入。');
  333. }
  334. newval = null;
  335. }
  336. return newval;
  337. },
  338. onCoeCheckBoxClick:function (sender, args) {
  339. let me = zmhs_obj;
  340. let checkboxValue = args.sheet.getCell(args.row, args.col).value();
  341. let newval = 0;
  342. if (checkboxValue) {
  343. newval = 0;
  344. args.sheet.getCell(args.row, args.col).value(newval);
  345. } else {
  346. newval = 1;
  347. args.sheet.getCell(args.row, args.col).value(newval);
  348. }
  349. let recode = me.coeSheetData[args.row];
  350. projectObj.project.ration_coe.adjustCoeClick(recode, newval);
  351. },
  352. generateHtmlString: function (context,cellRect,$editor) {//这里要改成动态的了,根据自定义系数内容生成对应的输入框
  353. let me = zmhs_obj;
  354. let height = cellRect.height;
  355. let offect = 0;
  356. let newString = "<form style='margin-top:1px' ><table width='100%' cellpadding='0' border='1px' bordercolor='#CCCCCC' cellspacing='0px' style='border-collapse:collapse;'>";
  357. let cus_coe = me.coeSheetData[context.row];
  358. if(cus_coe){
  359. for(let i =0;i< cus_coe.coes.length;i++){
  360. newString += me.getOneRow(cus_coe.coes[i].coeType, i, cus_coe.coes[i].coeType,height);
  361. offect += height +3
  362. }
  363. }
  364. newString += "</table></form><div style='height:"+ height+"px'><div onclick='zmhs_obj.coeSheet.endEdit()' style='margin:-1px 1px 0px'>自定义系数</div></div>";
  365. $editor.html(newString);
  366. $editor.css("margin-top",-(offect+2));
  367. return newString;
  368. },
  369. getOneRow: function (text, name, id,inputHeight) {
  370. var rowstr = "<tr ><td style='width: 50%'>" + text
  371. + ":</td><td style='width: 50%' align='right'><input class='text-right' type='text' value='1' name=" + name
  372. + " style='width:100%;border:0;height:"+ inputHeight+"px;' align='right' id=" + id + " onchange='zmhs_obj.onInputChange(this.id,this.name)' onclick='zmhs_obj.onInputClick(this)' autocomplete='off'></td></tr>";
  373. return rowstr;
  374. },
  375. coeStartEdit(){
  376. if(zmhs_obj.coeSheet.isEditing()){
  377. return;
  378. }else {
  379. zmhs_obj.coeSheet.startEdit();
  380. }
  381. },
  382. onCoeValueChange:function (e,args) {
  383. let fieldID = zmhs_obj.coeSetting.header[args.col].dataCode;
  384. let recode = zmhs_obj.coeSheetData[args.row];
  385. if(gljUtil.isDef(recode.option_codes)&&recode.option_codes!=""&& fieldID == 'content'){//说明是选择了下拉框
  386. projectObj.project.ration_coe.adjustCoeClick(recode, 1,{'select_code':args.newValue});
  387. }
  388. },
  389. onCusValueChange:function (e,args) {
  390. zmhs_obj.changeCusValue([{row:args.row,col:args.col,value:args.newValue}]);
  391. },
  392. changeCusValue:function (datas) {//[{row:,col,value}]
  393. if(this.cusSheetData){
  394. let tem_coes = _.cloneDeep(this.cusSheetData.coes);
  395. for(let d of datas){
  396. if(d.value&&!sheetCommonObj.checkData(d.col,this.cusSetting,d.value)){
  397. this.showDatas();
  398. alert('输入的数据类型不对,请重新输入!');
  399. return;
  400. }
  401. if(gljUtil.isDef(d.value)&&d.value !=""){
  402. if(tem_coes[d.row].coeType=="定额"){
  403. for(let t of tem_coes){
  404. t.amount = d.value;
  405. }
  406. }else {
  407. tem_coes[d.row].amount = d.value;
  408. }
  409. }
  410. }
  411. let doc = {'coes':tem_coes,'content':this.generationContent(tem_coes)};
  412. projectObj.project.ration_coe.adjustCoeClick(this.cusSheetData, 1,doc);
  413. }
  414. },
  415. generationContent:function (coes) {
  416. let rationAmount = coes[0].amount;
  417. let string ='';
  418. if(_.every(coes,'amount',rationAmount)){
  419. string = coes[0].coeType + 'x'+rationAmount;
  420. }else {
  421. let context_arr =[];
  422. for(let i =1;i<coes.length;i++){
  423. context_arr.push( coes[i].coeType + 'x'+coes[i].amount);
  424. }
  425. string = context_arr.join(',');
  426. }
  427. return string;
  428. },
  429. onAssEditEnded:function (e,args) {
  430. var me = zmhs_obj;
  431. if (args.row >= me.assSheetData.length) {
  432. me.assSheet.getCell(args.row, args.col).value(null);
  433. return;
  434. }
  435. if (me.assSetting.header[args.col].dataCode == 'actualValue') {//实际值
  436. me.updateRationAss(args);
  437. }
  438. },
  439. onCusRangeChanged:function (e,args) {
  440. let datas = [];
  441. for(let c of args.changedCells){
  442. let value= args.sheet.getCell(c.row, c.col).text();
  443. datas.push({row:c.row,col:c.col,value:value})
  444. }
  445. zmhs_obj.changeCusValue(datas);
  446. },
  447. onAssRangeChanged:function (e,args) {
  448. let me = zmhs_obj;
  449. if (args.action == GC.Spread.Sheets.RangeChangedAction.clear) {
  450. args.editingText = null;
  451. }else if(args.action == GC.Spread.Sheets.RangeChangedAction.paste){
  452. args.editingText = args.sheet.getCell(args.row,args.col).value();
  453. }
  454. if (args.sheetName == 'ration_ass') {
  455. me.updateRationAss(args);
  456. }
  457. },
  458. updateRationAss: function (args) {
  459. var me = zmhs_obj;
  460. var newval;
  461. newval = me.numberValueChecking(args.editingText);
  462. var recode = me.assSheetData[args.row];
  463. if (args.editingText === null) {
  464. newval = parseFloat(recode.stdValue);
  465. }
  466. var isValidate = false;
  467. if (newval) {
  468. isValidate = me.checkingActualValue(recode, newval)
  469. }
  470. if (isValidate) {
  471. newval = scMathUtil.roundTo(newval, -2);
  472. projectObj.project.ration_ass.updateActualValue(me.assSheetData, args.row, newval);
  473. } else {
  474. newval = recode.actualValue;
  475. me.assSheet.getCell(args.row, args.col).value(newval);
  476. }
  477. },
  478. checkingActualValue(record, newval){
  479. let minExist = record.minValue && record.minValue != '0' ? true : false;
  480. let maxExist = record.maxValue && record.maxValue != '0' ? true : false;
  481. let minValue = parseFloat(record.minValue);
  482. let maxValue = parseFloat(record.maxValue);
  483. if (!maxExist && minExist) {
  484. if (newval < minValue) {
  485. alert('实际值应≥' + minValue);
  486. return false;
  487. }
  488. }
  489. if (maxExist && !minExist) {
  490. if (newval > maxValue) {
  491. alert('实际值应≤' + maxValue);
  492. return false;
  493. }
  494. }
  495. if (maxExist && minExist) {
  496. if (newval < minValue || newval > maxValue) {
  497. alert('实际值应介于' + minValue + '~' + maxValue + '之间');
  498. return false;
  499. }
  500. }
  501. return true;
  502. },
  503. getSideResize: function () {
  504. let zmhs_sideResizeEles = {};
  505. zmhs_sideResizeEles.eleObj = {
  506. module: zmhs_obj.module,
  507. resize: $('#zmhsResize'),
  508. parent: $('#tabZMHS'),
  509. left: $('#coeSpread'),
  510. right: $('#assDiv')
  511. };
  512. zmhs_sideResizeEles.limit = {
  513. min: 100,
  514. max: `$('#tabZMHS').width()-100`
  515. };
  516. return zmhs_sideResizeEles;
  517. },
  518. loadSideResize: function () {
  519. let resizeObj = this.getSideResize();
  520. SlideResize.loadHorizonWidth(resizeObj.eleObj.module, [resizeObj.eleObj.resize], [resizeObj.eleObj.left, resizeObj.eleObj.right]);
  521. }
  522. };
  523. /*let zmhsResize = zmhs_obj.getSideResize();
  524. SlideResize.horizontalSlide(zmhsResize.eleObj, zmhsResize.limit, function () {
  525. zmhs_obj.refresh();
  526. });*/