Quellcode durchsuchen

修复新增部位粘贴bug

ellisran vor 1 Jahr
Ursprung
Commit
e0f5a14883
1 geänderte Dateien mit 5 neuen und 1 gelöschten Zeilen
  1. 5 1
      app/service/change_pos.js

+ 5 - 1
app/service/change_pos.js

@@ -373,7 +373,11 @@ module.exports = app => {
                     updateBills.sjcl_tp = this.ctx.helper.mul(updateBills.sjcl_qty, bills.unit_price, info.decimal.tp);
                     updateBills.qtcl_tp = this.ctx.helper.mul(updateBills.qtcl_qty, bills.unit_price, info.decimal.tp);
                     updateBills.total_price = this.ctx.helper.mul(updateBills.quantity, bills.unit_price, info.decimal.tp);
-                    if (newBills) await transaction.update(this.ctx.service.changeLedger.tableName, updateBills);
+                    if (newBills) {
+                        const newUpdateBills = this._.cloneDeep(updateBills);
+                        delete newUpdateBills.cid;
+                        await transaction.update(this.ctx.service.changeLedger.tableName, newUpdateBills);
+                    }
                     updateBills.ledger_id = bills.ledger_id;
                 }
                 await this.ctx.service.changeAuditList.updateDataByRevisePos(transaction, tid, data);