|
@@ -0,0 +1,53 @@
|
|
|
+'use strict';
|
|
|
+
|
|
|
+/**
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * @author Mai
|
|
|
+ * @date
|
|
|
+ * @version
|
|
|
+ */
|
|
|
+
|
|
|
+$(document).ready(() => {
|
|
|
+ autoFlashHeight();
|
|
|
+
|
|
|
+ const priceSpread = SpreadJsObj.createNewSpread($('#price-spread')[0]);
|
|
|
+ const priceSheet = priceSpread.getActiveSheet();
|
|
|
+
|
|
|
+ const priceSpreadSetting = {
|
|
|
+ cols: [
|
|
|
+ { title: '清单编号', colSpan: '1', rowSpan: '2', field: 'b_code', hAlign: 0, width: 100, formatter: '@', readOnly: true },
|
|
|
+ { title: '名称', colSpan: '1', rowSpan: '2', field: 'name', hAlign: 0, width: 210, formatter: '@', readOnly: true },
|
|
|
+ { title: '单位', colSpan: '1', rowSpan: '2', field: 'unit', hAlign: 1, width: 60, formatter: '@', readOnly: true },
|
|
|
+ { title: '当前单价', colSpan: '1', rowSpan: '2', field: 'unit_price', hAlign: 2, width: 80, type: 'Number', readOnly: true },
|
|
|
+ { title: '变更后单价', colSpan: '1', rowSpan: '2', field: 'new_price', hAlign: 2, width: 80, type: 'Number' },
|
|
|
+ { title: '备注', colSpan: '1', rowSpan: '2', field: 'new_price', hAlign: 2, width: 150, formatter: '@' },
|
|
|
+ ],
|
|
|
+ emptyRows: 0,
|
|
|
+ headRows: 1,
|
|
|
+ headRowHeight: [32],
|
|
|
+ headColWidth: [30],
|
|
|
+ defaultRowHeight: 21,
|
|
|
+ headerFont: '12px 微软雅黑',
|
|
|
+ font: '12px 微软雅黑',
|
|
|
+ };
|
|
|
+ SpreadJsObj.initSheet(priceSheet, priceSpreadSetting);
|
|
|
+
|
|
|
+ $.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();
|
|
|
+ priceSpread.refresh();
|
|
|
+ }
|
|
|
+ });
|
|
|
+});
|