|
@@ -2183,7 +2183,7 @@ $(document).ready(() => {
|
|
|
name: '按比例计量',
|
|
|
visible: function (key, opt) {
|
|
|
const data = spSpread.getActiveSheet().zh_data;
|
|
|
- return data && data.length > 0;
|
|
|
+ return checkTzMeasureType() && data && data.length > 0;
|
|
|
},
|
|
|
disabled: function (key, opt) {
|
|
|
const node = SpreadJsObj.getSelectObject(slSpread.getActiveSheet());
|
|
@@ -2226,7 +2226,7 @@ $(document).ready(() => {
|
|
|
|
|
|
const qty = ZhCalc.sub(curPos.quantity, curPos.pre_contract_qty);
|
|
|
const differ = ZhCalc.sub(curPos.quantity, curPos.end_contract_qty);
|
|
|
- if (differ) data.updateData.push({ pid: curPos.id, lid: curPos.lid, contract_qty: qty });
|
|
|
+ if (differ) data.updateData.push({ pid: curPos.id, lid: curPos.lid, contract_qty: qty, contract_expr: '' });
|
|
|
}
|
|
|
if (data.updateData.length > 0) {
|
|
|
postData(window.location.pathname + '/update', {pos: data}, function (result) {
|
|
@@ -2245,6 +2245,9 @@ $(document).ready(() => {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ visible: function(key, opt) {
|
|
|
+ return checkTzMeasureType();
|
|
|
+ },
|
|
|
},
|
|
|
'remainAll': {
|
|
|
name: '填剩余量(全部行)',
|
|
@@ -2261,7 +2264,7 @@ $(document).ready(() => {
|
|
|
for (const curPos of sheet.zh_data) {
|
|
|
const qty = ZhCalc.sub(curPos.quantity, curPos.pre_contract_qty);
|
|
|
const differ = ZhCalc.sub(curPos.quantity, curPos.end_contract_qty);
|
|
|
- if (differ) data.updateData.push({ pid: curPos.id, lid: curPos.lid, contract_qty: qty });
|
|
|
+ if (differ) data.updateData.push({ pid: curPos.id, lid: curPos.lid, contract_qty: qty, contract_expr: '' });
|
|
|
}
|
|
|
if (data.updateData.length > 0) {
|
|
|
postData(window.location.pathname + '/update', {pos: data}, function (result) {
|
|
@@ -2279,7 +2282,9 @@ $(document).ready(() => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ },
|
|
|
+ visible: function(key, opt) {
|
|
|
+ return checkTzMeasureType();
|
|
|
},
|
|
|
},
|
|
|
'shoufangdan': {
|