|
@@ -985,11 +985,16 @@ const billsGuidance = (function () {
|
|
|
}
|
|
|
//更新项目指引
|
|
|
//@param {Array}updateDatas {Function}callback @return {void}
|
|
|
- function updateGuideItems(updateDatas, callback){
|
|
|
+ function updateGuideItems(updateDatas, callback, errCB){
|
|
|
CommonAjax.post('/billsGuidance/api/updateItems', {updateDatas: updateDatas}, function (rstData) {
|
|
|
if(callback){
|
|
|
callback(rstData);
|
|
|
}
|
|
|
+ }, function () {
|
|
|
+ if(errCB) {
|
|
|
+ errCB();
|
|
|
+ }
|
|
|
+ $.bootstrapLoading.end();
|
|
|
});
|
|
|
}
|
|
|
//编辑后自动去除换行符回车符
|
|
@@ -1009,13 +1014,13 @@ const billsGuidance = (function () {
|
|
|
text = text.replace(deESC, '');
|
|
|
sheet.setValue(cell.row, cell.col, text);
|
|
|
if(node.data.name != text){
|
|
|
- syncDatas.push({node: node, text: text, field});
|
|
|
+ syncDatas.push({node: node, text: text, field, cell});
|
|
|
updateDatas.push({updateType: updateType.update, findData: {ID: node.getID()}, updateData: {name: text}});
|
|
|
}
|
|
|
} else if (field === 'outputItemCharacter' || field === 'required') {
|
|
|
const val = !sheet.getValue(cell.row, cell.col);
|
|
|
sheet.setValue(cell.row, cell.col, val);
|
|
|
- syncDatas.push({node: node, text: val, field});
|
|
|
+ syncDatas.push({node: node, text: val, field, cell });
|
|
|
updateDatas.push({updateType: updateType.update, findData: {ID: node.getID()}, updateData: {[field]: val}});
|
|
|
}
|
|
|
}
|
|
@@ -1028,7 +1033,7 @@ const billsGuidance = (function () {
|
|
|
//失败恢复
|
|
|
renderSheetFunc(sheet, function () {
|
|
|
for(let syncData of syncDatas){
|
|
|
- sheet.setValue(syncData.node.serialNo(), 0, syncData.node.data[syncData.field] ? syncData.node.data[syncData.field] : '');
|
|
|
+ sheet.setValue(syncData.node.serialNo(), syncData.cell.col, syncData.node.data[syncData.field] ? syncData.node.data[syncData.field] : '');
|
|
|
}
|
|
|
});
|
|
|
});
|