|
@@ -70,7 +70,7 @@ $(document).ready(() => {
|
|
|
title: (audit && audit.length > 1 ? (aid + '审') : audit[0].name) + ' 审批|数量',
|
|
|
colSpan: '2|1', rowSpan: '1|1',
|
|
|
field: 'audit_amount_' + aid,
|
|
|
- hAlign: 2, width: 60, type: 'Number', readOnly: _.findIndex(auditors2[aid - 1], { uid: parseInt(accountId) }) === -1 ? true : 'readOnly.isSettle' ,
|
|
|
+ hAlign: 2, width: 60, type: 'Number', readOnly: _.findIndex(audit, { uid: parseInt(accountId) }) === -1 ? true : 'readOnly.isSettle' ,
|
|
|
};
|
|
|
const newColTp = {
|
|
|
title: '|金额',
|
|
@@ -222,6 +222,41 @@ $(document).ready(() => {
|
|
|
}
|
|
|
},
|
|
|
deletePress: function (sheet) {
|
|
|
+ if (!sheet.zh_setting) return;
|
|
|
+ // 暂时仅支持移除数量
|
|
|
+ const sel = sheet.getSelections()[0], datas = [];
|
|
|
+ for (let iRow = sel.row; iRow < sel.row + sel.rowCount; iRow++) {
|
|
|
+ let bDel = false;
|
|
|
+ const node = sheet.zh_data[iRow];
|
|
|
+ const data = { id: node.id };
|
|
|
+ for (let iCol = sel.col; iCol < sel.col + sel.colCount; iCol++) {
|
|
|
+ const col = sheet.zh_setting.cols[iCol];
|
|
|
+ if (col.field === 'oamount2' || (col.readOnly !== true && _.includes(col.field, 'audit_amount_') && !checkIsSettle(node))) {
|
|
|
+ // node[col.field] = null;
|
|
|
+ if (col.field !== 'oamount2') {
|
|
|
+ data.spamount = null;
|
|
|
+ } else {
|
|
|
+ data[col.field] = null;
|
|
|
+ }
|
|
|
+ bDel = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (bDel) datas.push(data);
|
|
|
+ }
|
|
|
+ if (datas.length > 0) {
|
|
|
+ // 更新至服务器
|
|
|
+ postData(window.location.pathname + '/save', { type:'paste_amount_rows', updateData: datas }, function (result) {
|
|
|
+ changeList = result;
|
|
|
+ changeSpreadObj.setAuditValue();
|
|
|
+ SpreadJsObj.loadSheetData(changeSpreadSheet, SpreadJsObj.DataType.Data, changeList);
|
|
|
+ changeSpreadObj.makeSjsFooter();
|
|
|
+ changeSpreadObj.resetXmjSpread(SpreadJsObj.getSelectObject(changeSpreadSheet));
|
|
|
+ }, function () {
|
|
|
+ changeSpreadObj.setAuditValue();
|
|
|
+ SpreadJsObj.reLoadRowData(info.sheet, info.cellRange.row, info.cellRange.rowCount);
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }
|
|
|
return;
|
|
|
},
|
|
|
editEnded: function (e, info) {
|