|
@@ -745,7 +745,7 @@ $(document).ready(function() {
|
|
|
}, null, true);
|
|
|
},
|
|
|
selectionChanged: function (e, info) {
|
|
|
- if (!info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
+ if (!info.oldSelections || !info.oldSelections[0] || info.newSelections[0].row !== info.oldSelections[0].row) {
|
|
|
posOperationObj.loadCurPosData();
|
|
|
SpreadJsObj.resetTopAndSelect(posSpread.getActiveSheet());
|
|
|
posSearch.search($('#pos-keyword').val());
|
|
@@ -2105,6 +2105,11 @@ $(document).ready(function() {
|
|
|
this.obj = obj;
|
|
|
this.billsCount = 6;
|
|
|
this.posCount = 1000;
|
|
|
+ this.filter = getLocalCache('zh-calc-batch-filter');
|
|
|
+ if (!this.filter) {
|
|
|
+ this.filter = '1';
|
|
|
+ }
|
|
|
+ $('input[name=batch-filter]')[0].checked = this.filter && this.filter != '0';
|
|
|
// 初始化 清单编号窗口 参数
|
|
|
this.qdSpreadSetting = {
|
|
|
cols: [
|
|
@@ -2296,6 +2301,9 @@ $(document).ready(function() {
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
+ $('input[name=batch-filter]').change(function () {
|
|
|
+ setLocalCache('zh-calc-batch-filter', this.checked ? 1 : 0);
|
|
|
+ });
|
|
|
}
|
|
|
// 初始化左侧表格
|
|
|
initView () {
|
|
@@ -2341,7 +2349,6 @@ $(document).ready(function() {
|
|
|
price: _.toNumber(qdSheet.getText(iRow, 3)),
|
|
|
pos: [],
|
|
|
};
|
|
|
- result.push(qd);
|
|
|
for (let iPosRow = 0; iPosRow < posSheet.getRowCount(); iPosRow++) {
|
|
|
const value = _.toNumber(posSheet.getText(iPosRow, iRow + 2));
|
|
|
if (value !== 0 && !isNaN(value)) {
|
|
@@ -2352,6 +2359,7 @@ $(document).ready(function() {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ if (!$('input[name=batch-filter]')[0].checked || qd.pos.length > 0) result.push(qd);
|
|
|
}
|
|
|
return result;
|
|
|
}
|