|
@@ -96,7 +96,7 @@ $(document).ready(() => {
|
|
|
return payCol.readOnly.isSpecial(data) || payCol.readOnly.isOld(data);
|
|
|
},
|
|
|
minus: function (data) {
|
|
|
- return readOnly && (payCol.readOnly.isSpecial(data) || payCol.readOnly.isOld(data));
|
|
|
+ return readOnly || (payCol.readOnly.isSpecial(data) || payCol.readOnly.isOld(data));
|
|
|
},
|
|
|
tp: function (data) {
|
|
|
return data.ptype === 2 || data.ptype === 4 || payCol.readOnly.isOld(data);
|
|
@@ -210,6 +210,7 @@ $(document).ready(() => {
|
|
|
if (info.sheet.zh_setting) {
|
|
|
const select = SpreadJsObj.getSelectObject(info.sheet);
|
|
|
const col = info.sheet.zh_setting.cols[info.col];
|
|
|
+ if (col.field === 'minus') { return; }
|
|
|
// 未改变值则不提交
|
|
|
const orgValue = select[col.field];
|
|
|
if (orgValue == info.editingText || ((!orgValue || orgValue === '') && (info.editingText === ''))) {
|
|
@@ -232,7 +233,7 @@ $(document).ready(() => {
|
|
|
checkExpr(validText, data.updateData, 'sprice', 'sexpr');
|
|
|
} else if (col.field === 'rprice') {
|
|
|
checkExpr(validText, data.updateData, 'rprice', 'rexpr');
|
|
|
- } else {
|
|
|
+ } else if (col.field === 'minus') {
|
|
|
data.updateData[col.field] = validText;
|
|
|
}
|
|
|
} else {
|
|
@@ -250,14 +251,18 @@ $(document).ready(() => {
|
|
|
if (info.sheet.zh_setting) {
|
|
|
const select = SpreadJsObj.getSelectObject(info.sheet);
|
|
|
const col = info.sheet.zh_setting.cols[info.col];
|
|
|
+ if (payCol.readOnly.minus(select)) { return; }
|
|
|
if (col.field === 'minus') {
|
|
|
+ if (info.sheet.isEditing) {
|
|
|
+ info.sheet.endEdit(true);
|
|
|
+ }
|
|
|
// 获取更新数据
|
|
|
// 获取更新信息
|
|
|
const data = {
|
|
|
type: 'info',
|
|
|
updateData: { id: select.pid },
|
|
|
};
|
|
|
- data.updateData.minus = info.sheet.getValue(info.row, info.col);
|
|
|
+ data.updateData.minus = info.sheet.getValue(info.row, info.col) || false;
|
|
|
// 更新至服务器
|
|
|
postData(window.location.pathname + '/save', data, function (result) {
|
|
|
loadUpdateDealPays(result);
|