|
@@ -1029,8 +1029,6 @@ $(document).ready(function() {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
this.posSpread = SpreadJsObj.createNewSpread($('.batch-l-b', this.obj)[0]);
|
|
this.posSpread = SpreadJsObj.createNewSpread($('.batch-l-b', this.obj)[0]);
|
|
- // 初始化 清单编号、部位数量复核表 表格
|
|
|
|
- this.initView();
|
|
|
|
// 初始化 签约清单 参数
|
|
// 初始化 签约清单 参数
|
|
this.dealSpreadSetting = {
|
|
this.dealSpreadSetting = {
|
|
cols: [
|
|
cols: [
|
|
@@ -1044,6 +1042,8 @@ $(document).ready(function() {
|
|
headRowHeight: [40],
|
|
headRowHeight: [40],
|
|
};
|
|
};
|
|
this.dealSpread = SpreadJsObj.createNewSpread($('.batch-r', this.obj)[0]);
|
|
this.dealSpread = SpreadJsObj.createNewSpread($('.batch-r', this.obj)[0]);
|
|
|
|
+ // 初始化 清单编号、部位数量复核表 表格
|
|
|
|
+ this.initView();
|
|
SpreadJsObj.initSheet(this.dealSpread.getActiveSheet(), this.dealSpreadSetting);
|
|
SpreadJsObj.initSheet(this.dealSpread.getActiveSheet(), this.dealSpreadSetting);
|
|
// 拉取签约清单数据
|
|
// 拉取签约清单数据
|
|
if (dealBills) {
|
|
if (dealBills) {
|
|
@@ -1056,21 +1056,22 @@ $(document).ready(function() {
|
|
// 双击签约清单,自动添加到清单编号窗口
|
|
// 双击签约清单,自动添加到清单编号窗口
|
|
this.dealSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (e, info) {
|
|
this.dealSpread.bind(GC.Spread.Sheets.Events.CellDoubleClick, function (e, info) {
|
|
const deal = info.sheet.zh_data[info.row];
|
|
const deal = info.sheet.zh_data[info.row];
|
|
- const sel = self.gclSpread.getActiveSheet().getSelections()[0];
|
|
|
|
- self.qdSpread.getActiveSheet().getCell(sel.row, 0).value(deal.code);
|
|
|
|
- self.qdSpread.getActiveSheet().getCell(sel.row, 1).value(deal.name);
|
|
|
|
- self.qdSpread.getActiveSheet().getCell(sel.row, 2).value(deal.unit);
|
|
|
|
- self.qdSpread.getActiveSheet().getCell(sel.row, 3).value(deal.unit_price);
|
|
|
|
- if (sel.row + 1 === self.gclSpread.getActiveSheet().getRowCount()) {
|
|
|
|
|
|
+ const qdSheet = self.qdSpread.getActiveSheet(), posSheet = self.posSpread.getActiveSheet();
|
|
|
|
+ const sel = qdSheet.getSelections()[0];
|
|
|
|
+ qdSheet.getCell(sel.row, 0).value(deal.code);
|
|
|
|
+ qdSheet.getCell(sel.row, 1).value(deal.name);
|
|
|
|
+ qdSheet.getCell(sel.row, 2).value(deal.unit);
|
|
|
|
+ qdSheet.getCell(sel.row, 3).value(deal.unit_price);
|
|
|
|
+ if (sel.row + 1 === qdSheet.getRowCount()) {
|
|
const count = sel.row + 2;
|
|
const count = sel.row + 2;
|
|
- self.qdSpread.getActiveSheet().setRowCount(count);
|
|
|
|
- self.qdSpread.getActiveSheet().getCell(sel.row + 1, 0, GC.Spread.Sheets.SheetArea.rowHeader).text('清单' + count);
|
|
|
|
|
|
+ qdSheet.setRowCount(count);
|
|
|
|
+ qdSheet.getCell(sel.row + 1, 0, GC.Spread.Sheets.SheetArea.rowHeader).text('清单' + count);
|
|
|
|
|
|
- const colCount = self.posSpread.getActiveSheet().getColumnCount() + 1
|
|
|
|
- self.posSpread.getActiveSheet().setColumnCount(colCount);
|
|
|
|
- self.posSpread.getActiveSheet().getCell(0, colCount - 1, GC.Spread.Sheets.SheetArea.colHeader).text('数量' + count);
|
|
|
|
|
|
+ const colCount = posSheet.getColumnCount() + 1
|
|
|
|
+ posSheet.setColumnCount(colCount);
|
|
|
|
+ posSheet.getCell(0, colCount - 1, GC.Spread.Sheets.SheetArea.colHeader).text('数量' + count);
|
|
}
|
|
}
|
|
- self.qdSpread.getActiveSheet().setSelection(sel.row + 1, sel.col, 1, 1);
|
|
|
|
|
|
+ qdSheet.setSelection(sel.row + 1, sel.col, 1, 1);
|
|
});
|
|
});
|
|
|
|
|
|
this.obj.bind('shown.bs.modal', function () {
|
|
this.obj.bind('shown.bs.modal', function () {
|
|
@@ -1120,6 +1121,10 @@ $(document).ready(function() {
|
|
posSheet.setColumnWidth(0, 45, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
posSheet.setColumnWidth(0, 45, GC.Spread.Sheets.SheetArea.rowHeader);
|
|
posSheet.clear(0, 0, posSheet.getRowCount(), posSheet.getColumnCount(), GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.StorageType.data);
|
|
posSheet.clear(0, 0, posSheet.getRowCount(), posSheet.getColumnCount(), GC.Spread.Sheets.SheetArea.viewport, GC.Spread.Sheets.StorageType.data);
|
|
SpreadJsObj.endMassOperation(posSheet);
|
|
SpreadJsObj.endMassOperation(posSheet);
|
|
|
|
+ // 检查签约清单数据,以工具栏数据为准
|
|
|
|
+ if (dealBills) {
|
|
|
|
+ SpreadJsObj.loadSheetData(this.dealSpread.getActiveSheet(), 'data', dealBills.data);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// 获取界面数据
|
|
// 获取界面数据
|
|
getBatchData () {
|
|
getBatchData () {
|