'use strict'; /** * 期 - 甲供材料 * * @author Mai * @date 2020/2/12 * @version */ const spreadSetting = { cols: [ {title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 185, formatter: '@'}, {title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 50, formatter: '@', cellType: 'unit'}, {title: '单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 60, type: 'Number'}, {title: '本期到场|数量', colSpan: '2|1', rowSpan: '1|1', field: 'get_qty', hAlign: 2, width: 60, type: 'Number'}, {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'get_tp', hAlign: 2, width: 60, type: 'Number'}, {title: '截止本期到场|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_get_qty', hAlign: 2, width: 60, type: 'Number'}, {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_get_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true}, {title: '本期扣回|数量', colSpan: '2|1', rowSpan: '1|1', field: 'deduct_qty', hAlign: 2, width: 60, type: 'Number'}, {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'deduct_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true}, {title: '截止本期扣回|数量', colSpan: '2|1', rowSpan: '1|1', field: 'end_deduct_qty', hAlign: 2, width: 60, type: 'Number'}, {title: '|金额', colSpan: '|1', rowSpan: '|1', field: 'end_deduct_tp', hAlign: 2, width: 60, type: 'Number', readOnly: true}, {title: '材料来源', colSpan: '1', rowSpan: '2', field: 'source', hAlign: 0, width: 80, formatter: '@'}, {title: '单据号', colSpan: '1', rowSpan: '2', field: 'bills_code', hAlign: 0, width: 80, formatter: '@'}, {title: '检验单编号', colSpan: '1', rowSpan: '2', field: 'check_code', hAlign: 0, width: 80, formatter: '@'}, {title: '备注', colSpan: '1', rowSpan: '2', field: 'memo', hAlign: 0, width: 100, formatter: '@', cellType: 'ellipsisAutoTip'} ], emptyRows: 3, headRows: 2, headRowHeight: [25, 25], defaultRowHeight: 21, headerFont: '12px 微软雅黑', font: '12px 微软雅黑', }; $(document).ready(() => { autoFlashHeight(); const jgclSpread = SpreadJsObj.createNewSpread($('#jgcl-spread')[0]); const jgclSheet = jgclSpread.getActiveSheet(); SpreadJsObj.initSheet(jgclSheet, spreadSetting); $.subMenu({ menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list', toMenu: '#to-menu', toMiniMenu: '#to-mini-menu', key: 'menu.1.0.0', miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1', callback: function (info) { if (info.mini) { $('.panel-title').addClass('fluid'); $('#sub-menu').removeClass('panel-sidebar'); } else { $('.panel-title').removeClass('fluid'); $('#sub-menu').addClass('panel-sidebar'); } autoFlashHeight(); jgclSpread.refresh(); } }); });