|
@@ -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) {
|