|
@@ -28,6 +28,25 @@ function transExpr(expr) {
|
|
|
return $.trim(expr).replace('\t', '').replace('=', '').replace('%', '/100');
|
|
|
}
|
|
|
const copyBlockTag = 'zh.calc.copyBlock';
|
|
|
+const checkOption = {
|
|
|
+ sibling: { enable: 1 },
|
|
|
+ empty_code: { enable: 1 },
|
|
|
+ calc: {
|
|
|
+ enable: 1,
|
|
|
+ fields: ['sgfh_qty', 'qtcl_qty', 'sjcl_qty', 'quantity'],
|
|
|
+ },
|
|
|
+ zero: { enable: 1 },
|
|
|
+ tp: {
|
|
|
+ enable: 1,
|
|
|
+ fields: [
|
|
|
+ {qty: 'sgfh_qty', tp: 'sgfh_tp'},
|
|
|
+ {qty: 'sjcl_qty', tp: 'sjcl_tp'},
|
|
|
+ {qty: 'qtcl_qty', tp: 'qtcl_tp'},
|
|
|
+ {qty: 'quantity', tp: 'total_price'},
|
|
|
+ {qty: 'deal_qty', tp: 'deal_tp'},
|
|
|
+ ],
|
|
|
+ },
|
|
|
+};
|
|
|
|
|
|
$(document).ready(() => {
|
|
|
let stdXmj, stdGcl, searchLedger;
|
|
@@ -65,7 +84,7 @@ $(document).ready(() => {
|
|
|
selector: '#check-list',
|
|
|
relaSpread: billsSpread,
|
|
|
storeKey: 'revise-check-' + window.location.pathname.split('/')[2] + '-' + window.location.pathname.split('/')[4],
|
|
|
- checkType: ledgerCheckType,
|
|
|
+ checkType: getCheckType(checkOption),
|
|
|
afterLocated: function () {
|
|
|
posSpreadObj.loadCurPosData();
|
|
|
},
|
|
@@ -2559,30 +2578,21 @@ $(document).ready(() => {
|
|
|
errorList: errorList,
|
|
|
});
|
|
|
|
|
|
- LedgerChecker({
|
|
|
- ledgerTree: billsTree,
|
|
|
- ledgerPos: pos,
|
|
|
- checkList: checkList,
|
|
|
- decimal: decimal,
|
|
|
- checkOption: {
|
|
|
- sibling: { enable: 1 },
|
|
|
- empty_code: { enable: 1 },
|
|
|
- calc: {
|
|
|
- enable: 1,
|
|
|
- fields: ['sgfh_qty', 'qtcl_qty', 'sjcl_qty', 'quantity'],
|
|
|
- },
|
|
|
- zero: { enable: 1 },
|
|
|
- tp: {
|
|
|
- enable: 1,
|
|
|
- fields: [
|
|
|
- {qty: 'sgfh_qty', tp: 'sgfh_tp'},
|
|
|
- {qty: 'sjcl_qty', tp: 'sjcl_tp'},
|
|
|
- {qty: 'qtcl_qty', tp: 'qtcl_tp'},
|
|
|
- {qty: 'quantity', tp: 'total_price'},
|
|
|
- {qty: 'deal_qty', tp: 'deal_tp'},
|
|
|
- ],
|
|
|
- },
|
|
|
- }
|
|
|
+ $('#ledger-check2').click(() => {
|
|
|
+ const result = ledgerCheck2({
|
|
|
+ ledgerTree: billsTree,
|
|
|
+ ledgerPos: pos,
|
|
|
+ checkList: checkList,
|
|
|
+ decimal: decimal,
|
|
|
+ checkOption: checkOption,
|
|
|
+ });
|
|
|
+ check2Viewing({
|
|
|
+ extra: ZhCalc.div(billsTree.datas.length + pos.datas.length, 10000, 0),
|
|
|
+ randomWait: true,
|
|
|
+ prefix: 'check2-',
|
|
|
+ checks: result,
|
|
|
+ checkList: checkList,
|
|
|
+ })
|
|
|
});
|
|
|
|
|
|
$('[name=revise-start]').submit(function (e) {
|