Browse Source

变更勾选问题

ellisran 1 year ago
parent
commit
d4888ea664

+ 3 - 0
app/public/js/change_information_approval.js

@@ -673,6 +673,9 @@ function makePushBwmx(clinfo, listinfo, removeList, updateList) {
             let needUpdate = false;
             // 判断要不要更新名称,单位,原数量,单价
             checkKey.forEach(function (key) {
+                if ((key === 'name' || key === 'unit') && listinfo[key] === null) {
+                    listinfo[key] = '';
+                }
                 if (listinfo[key] !== clinfo[key]) {
                     oneUpdate[key] = listinfo[key];
                     clinfo[key] = listinfo[key];

+ 3 - 0
app/public/js/change_information_set.js

@@ -2229,6 +2229,9 @@ function makePushBwmx(clinfo, listinfo, removeList, updateList, lidIsNumber) {
             let needUpdate = false;
             // 判断要不要更新名称,单位,原数量,单价
             checkKey.forEach(function (key) {
+                if ((key === 'name' || key === 'unit') && listinfo[key] === null) {
+                    listinfo[key] = '';
+                }
                 if (listinfo[key] !== clinfo[key]) {
                     oneUpdate[key] = listinfo[key];
                     clinfo[key] = listinfo[key];

+ 3 - 0
app/view/change/modal.ejs

@@ -1082,6 +1082,9 @@
                     const oneUpdate = { id: clinfo.id };
                     // 判断要不要更新名称,单位,原数量,单价
                     checkKey.forEach(function (key) {
+                        if ((key === 'name' || key === 'unit') && listinfo[key] === null) {
+                            listinfo[key] = '';
+                        }
                         if (listinfo[key] !== clinfo[key]) {
                             oneUpdate[key] = listinfo[key];
                             // clinfo[key] = listinfo[key];