|
@@ -2803,11 +2803,14 @@ $(document).ready(() => {
|
|
|
if (newValue !== '') {
|
|
|
update[field] = newValue;
|
|
|
if (data.custom_define.indexOf(field) === -1) update.custom_define.push(field);
|
|
|
+ return true;
|
|
|
}
|
|
|
} else if (newValue !== org[field]){
|
|
|
update[field] = newValue;
|
|
|
if (data.custom_define.indexOf(field) === -1) update.custom_define.push(field);
|
|
|
+ return true;
|
|
|
}
|
|
|
+ return false;
|
|
|
}
|
|
|
|
|
|
const data = SpreadJsObj.getSelectObject(self.spread.getActiveSheet());
|
|
@@ -2824,26 +2827,28 @@ $(document).ready(() => {
|
|
|
updateData.pos_name = data.pos_name;
|
|
|
updateData.custom_define = [];
|
|
|
}
|
|
|
- check('bw', $('#bw-name'), data, updateData);
|
|
|
- check('peg', $('#peg'), data, updateData);
|
|
|
- check('xm', $('#xm-name'), data, updateData);
|
|
|
- check('position', $('#position'), data, updateData);
|
|
|
- check('jldy', $('#jldy'), data, updateData);
|
|
|
- check('drawing_code', $('#drawing-code'), data, updateData);
|
|
|
- check('calc_memo', $('#calc-memo'), data, updateData);
|
|
|
+ let infoUpdate = false;
|
|
|
+ infoUpdate = infoUpdate || check('bw', $('#bw-name'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('peg', $('#peg'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('xm', $('#xm-name'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('position', $('#position'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('jldy', $('#jldy'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('drawing_code', $('#drawing-code'), data, updateData);
|
|
|
+ infoUpdate = infoUpdate || check('calc_memo', $('#calc-memo'), data, updateData);
|
|
|
updateData.custom_define = updateData.custom_define.join(',');
|
|
|
- postData(window.location.pathname + '/detail/save', updateData, function (result) {
|
|
|
- stageIm.loadUpdateDetailData(result);
|
|
|
- self.reLoadDetailData();
|
|
|
- if (self.updateImageData && !self.updateImageData.uuid) {
|
|
|
- self.updateImageData.uuid = result.uuid;
|
|
|
+ if (infoUpdate) {
|
|
|
+ postData(window.location.pathname + '/detail/save', updateData, function (result) {
|
|
|
+ stageIm.loadUpdateDetailData(result);
|
|
|
+ self.reLoadDetailData();
|
|
|
+ if (!self.updateImageData) return;
|
|
|
+
|
|
|
+ if (!self.updateImageData.uuid) self.updateImageData.uuid = result.uuid;
|
|
|
postData(window.location.pathname + '/detail/merge-img', self.updateImageData, function (result) {
|
|
|
stageIm.loadUpdateDetailData(result);
|
|
|
self.reLoadDetailData();
|
|
|
});
|
|
|
- }
|
|
|
- });
|
|
|
- if (self.updateImageData && self.updateImageData.uuid) {
|
|
|
+ });
|
|
|
+ } else if (self.updateImageData) {
|
|
|
postData(window.location.pathname + '/detail/merge-img', self.updateImageData, function (result) {
|
|
|
stageIm.loadUpdateDetailData(result);
|
|
|
self.reLoadDetailData();
|
|
@@ -2958,7 +2963,7 @@ $(document).ready(() => {
|
|
|
$('#edit-img-ok').click(function () {
|
|
|
// 记录上传的图片的信息
|
|
|
const items = $('.img-item');
|
|
|
- const img_remark = $('#text-edit').val()
|
|
|
+ const img_remark = $('#text-edit').val();
|
|
|
const data = SpreadJsObj.getSelectObject(self.spread.getActiveSheet());
|
|
|
if (items.length > 0) {
|
|
|
const itemInfo = [];
|