|
@@ -209,6 +209,15 @@ $(document).ready(() => {
|
|
|
del: function () {
|
|
|
const sheet = paySpread.getActiveSheet();
|
|
|
const select = SpreadJsObj.getSelectObject(sheet);
|
|
|
+ if (payCol.readOnly.isNonZero(select.tp)) {
|
|
|
+ toast('该支付(扣款)项存在数据,如需删除请先清除本期金额!');
|
|
|
+ return;
|
|
|
+ } else if (payCol.readOnly.isOld(select)) {
|
|
|
+ if (payCol.readOnly.isStarted(select)) {
|
|
|
+ toast('该合同支付项往期已进行计算,不允许删除');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
postData(window.location.pathname + '/save', {type: 'del', id: select.pid}, function (result) {
|
|
|
const index = dealPay.indexOf(select);
|
|
|
dealPay.splice(index, 1);
|