mbzm_view.js 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * Created by zhang on 2018/11/26.
  3. */
  4. let mbzm_obj={
  5. spread:null,
  6. setting:{
  7. header: [
  8. {headerName: "编码", headerWidth: 130, dataCode: "code", dataType: "String", formatter: "@"},
  9. {headerName: "模板类别", headerWidth: 260, dataCode: "templateType", dataType: "String", hAlign: "left"},
  10. {headerName: "系数", headerWidth: 65, dataCode: "coe", dataType: "Number"},
  11. {headerName: "单位", headerWidth: 45, dataCode: "unit", dataType: "String", hAlign: "center"},
  12. {headerName: "工程量", headerWidth: 65, dataCode: "quantity", dataType: "Number",decimalField: "ration.quantity"},
  13. {headerName: "关联类别", headerWidth: 100, dataCode: "type", dataType: "String"},
  14. {headerName: "清单位置", headerWidth: 200, dataCode: "billsPosition", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition'},
  15. {headerName: "清单位置", headerWidth: 200, dataCode: "fxPosition", hAlign: "left", dataType: "String",cellType:'selectButton',getText:'forPosition',visible:false}
  16. ],
  17. view: {
  18. lockColumns:["code","content","unit","type","billsPosition","fxPosition"],
  19. rowHeaderWidth:25
  20. },
  21. },
  22. initSpread:function () {
  23. this.spread = SheetDataHelper.createNewSpread($("#mbzmSpread")[0]);
  24. sheetCommonObj.spreadDefaultStyle(this.spread);
  25. this.sheet = this.spread.getSheet(0);
  26. sheetCommonObj.initSheet(this.sheet, this.setting);
  27. this.sheet.setRowCount(0);
  28. },
  29. refresh:function () {
  30. this.spread?this.spread.refresh():'';
  31. },
  32. showMBZMData:function(node){
  33. let selected = node?node:projectObj.project.mainTree.selected;
  34. }
  35. }