|
@@ -1245,7 +1245,7 @@ $(document).ready(() => {
|
|
|
const curBills = data[info.row];
|
|
|
if (!curBills) { return }
|
|
|
|
|
|
- SpreadJsObj.locateTreeNode(self.mainSpread.getActiveSheet(), curBills.ledger_id);
|
|
|
+ SpreadJsObj.locateTreeNode(self.mainSpread.getActiveSheet(), curBills.ledger_id, true);
|
|
|
stagePosSpreadObj.loadCurPosData();
|
|
|
});
|
|
|
}
|
|
@@ -1267,7 +1267,9 @@ $(document).ready(() => {
|
|
|
if ((node.code && node.code.indexOf(keyword) > -1) ||
|
|
|
node.b_code && node.b_code.indexOf(keyword) > -1 ||
|
|
|
node.name && node.name.indexOf(keyword) > -1) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
}
|
|
|
this.calculateCompletePercent();
|
|
@@ -1281,11 +1283,15 @@ $(document).ready(() => {
|
|
|
if (node.children && node.children.length > 0) continue;
|
|
|
if (node.end_gather_qty) {
|
|
|
if (!node.quantity || Math.abs(node.end_gather_qty) > Math.abs(node.quantity)) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
} else if (node.end_gather_tp) {
|
|
|
if (!node.total_price || Math.abs(node.end_gather_tp) > Math.abs(node.total_price)) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1299,11 +1305,15 @@ $(document).ready(() => {
|
|
|
if (node.children && node.children.length > 0) continue;
|
|
|
if (node.quantity) {
|
|
|
if (!node.end_gather_qty || checkZero(node.end_gather_qty)) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
} else if (node.total_price) {
|
|
|
if (!node.end_gather_tp || checkZero(node.end_gather_tp)) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1317,11 +1327,15 @@ $(document).ready(() => {
|
|
|
if (node.children && node.children.length > 0) continue;
|
|
|
if (node.quantity) {
|
|
|
if (ZhCalc.sub(node.quantity, node.end_gather_qty) > 0) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
} else if (node.total_price) {
|
|
|
if (ZhCalc.sub(node.total_price, node.end_gather_tp) > 0) {
|
|
|
- this.searchResult.push(node);
|
|
|
+ const data = JSON.parse(JSON.stringify(node));
|
|
|
+ data.visible = true;
|
|
|
+ this.searchResult.push(data);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1426,6 +1440,19 @@ $(document).ready(() => {
|
|
|
} else {
|
|
|
$('[for=' + this.id +']').removeClass('text-warning');
|
|
|
}
|
|
|
+ if (this.checked) {
|
|
|
+ if ($('#pos-over-search')[0].checked) {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '按名称查询');
|
|
|
+ } else {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '漏计中按名称查询');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ($('#pos-over-search')[0].checked) {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '超计中按名称查询');
|
|
|
+ } else {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '按名称查询');
|
|
|
+ }
|
|
|
+ }
|
|
|
posSearch.searchAndLocate();
|
|
|
});
|
|
|
$('#pos-over-search').click(function () {
|
|
@@ -1434,6 +1461,19 @@ $(document).ready(() => {
|
|
|
} else {
|
|
|
$('[for=' + this.id +']').removeClass('text-danger');
|
|
|
}
|
|
|
+ if (this.checked) {
|
|
|
+ if ($('#pos-empty-search')[0].checked) {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '按名称查询');
|
|
|
+ } else {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '超计中按名称查询');
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if ($('#pos-empty-search')[0].checked) {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '漏计中按名称查询');
|
|
|
+ } else {
|
|
|
+ $('#pos-search-keyword').attr('placeholder', '按名称查询');
|
|
|
+ }
|
|
|
+ }
|
|
|
posSearch.searchAndLocate();
|
|
|
});
|
|
|
$('#pos-search-next').click(() => {posSearch.locateNext()});
|