Sfoglia il codice sorgente

调用变更令相关

MaiXinRong 5 anni fa
parent
commit
a2fd687a4f
2 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 6 2
      app/service/change.js
  2. 1 1
      app/view/shares/delete_hint_modal.ejs

+ 6 - 2
app/service/change.js

@@ -833,7 +833,11 @@ module.exports = app => {
          */
         async getValidChanges(tid, bills, pos) {
             const timesLen = 100;
-            const filter = 'cb.`code` = ' + this.db.escape(bills.b_code) + (pos ? ' And cb.`bwmx` = ' + this.db.escape(pos.name) : '');
+            const filter = 'cb.`code` = ' + this.db.escape(bills.b_code) +
+                ' And cb.`name` = ' + this.db.escape(bills.name) +
+                ' And cb.`unit` = ' + this.db.escape(bills.unit) +
+                ' And cb.`unit_price` = ' + this.db.escape(bills.unit_price) +
+                (pos ? ' And cb.`bwmx` = ' + this.db.escape(pos.name) : '');
             const sql = 'SELECT c.cid, c.code, c.name, c.w_code, c.p_code, c.peg, c.org_name, c.org_code, c.new_name, c.new_code,' +
                         '    c.content, c.basis, c.memo, c.type, c.class, c.quality, c.company, c.charge, ' +
                         '    cb.id As cbid, cb.code As b_code, cb.name As b_name, cb.unit As b_unit, cb.samount As b_amount, cb.detail As b_detail, cb.bwmx As b_bwmx, ' +
@@ -928,7 +932,7 @@ module.exports = app => {
                 // 先删除清单,审批人列表
                 await this.transaction.delete(this.ctx.service.changeAuditList.tableName, { cid });
                 await this.transaction.delete(this.ctx.service.changeAudit.tableName, { cid });
-                // 再删除附件和附件文件
+                // 再删除附件和附件文件ni zuo
                 const attList = await this.ctx.service.changeAtt.getAllDataByCondition({ where: { cid } });
                 if (attList.length !== 0) {
                     for (const att of attList) {

+ 1 - 1
app/view/shares/delete_hint_modal.ejs

@@ -23,6 +23,6 @@
         if (hint) $('#del-node-hint').html(hint);
         $('#del-node').bind('hidden.bs.modal', function () {
             $('#del-node-ok').unbind('click');
-        })
+        });
     }
 </script>