Browse Source

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

Tony Kang 10 months ago
parent
commit
2fbeffb346

+ 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];

+ 4 - 4
app/public/js/change_revise.js

@@ -627,8 +627,8 @@ $(document).ready(() => {
                         const data = {
                             lid: select.id,
                             code: gclInfo.b_code,
-                            name: gclInfo.name,
-                            unit: gclInfo.unit,
+                            name: gclInfo.name || '',
+                            unit: gclInfo.unit || '',
                             unit_price: gclInfo.unit_price,
                             oamount: xmjInfo.quantity,
                             oamount2: oldCInfo ? oldCInfo.oamount2 : xmjInfo.quantity,
@@ -1790,8 +1790,8 @@ $(document).ready(() => {
                         const data = {
                             lid: select.lid,
                             code: gclInfo.b_code,
-                            name: gclInfo.name,
-                            unit: gclInfo.unit,
+                            name: gclInfo.name || '',
+                            unit: gclInfo.unit || '',
                             unit_price: gclInfo.unit_price,
                             oamount: xmjInfo.quantity,
                             oamount2: oldCInfo ? oldCInfo.oamount2 : xmjInfo.quantity,

+ 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];