|
@@ -109,7 +109,7 @@ module.exports = app => {
|
|
const delConfirm = [];
|
|
const delConfirm = [];
|
|
for (const pc of preConfirm) {
|
|
for (const pc of preConfirm) {
|
|
const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: pc.ledger_id });
|
|
const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: pc.ledger_id });
|
|
- const billsOwner = bills.full_path.split('-');
|
|
|
|
|
|
+ const billsOwner = bills ? bills.full_path.split('-') : [];
|
|
const exist = locked.find(x => {
|
|
const exist = locked.find(x => {
|
|
for (const id of x.locked_ledger_id) {
|
|
for (const id of x.locked_ledger_id) {
|
|
if (billsOwner.indexOf(id) >= 0) return true;
|
|
if (billsOwner.indexOf(id) >= 0) return true;
|
|
@@ -141,10 +141,10 @@ module.exports = app => {
|
|
if (a.aid === uid) break;
|
|
if (a.aid === uid) break;
|
|
keepUid.push(a.aid);
|
|
keepUid.push(a.aid);
|
|
}
|
|
}
|
|
- const keepConfirm = await this.getAllDataByCondition({ where: { sid: stage.id, times: stage.curTimes, uid: keepUid } });
|
|
|
|
|
|
+ const keepConfirm = await this.getAllDataByCondition({ where: { sid: stage.id, times: stage.curTimes, user_id: keepUid } });
|
|
for (const kc of keepConfirm) {
|
|
for (const kc of keepConfirm) {
|
|
const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: kc.ledger_id });
|
|
const bills = await this.ctx.service.ledger.getDataByCondition({ tender_id: stage.tid, ledger_id: kc.ledger_id });
|
|
- const billsOwner = bills.full_path.split('-');
|
|
|
|
|
|
+ const billsOwner = bills ? bills.full_path.split('-') : [];
|
|
const exist = lockConfirm.find(x => {
|
|
const exist = lockConfirm.find(x => {
|
|
const lid = x.ass_ledger_id.split(',');
|
|
const lid = x.ass_ledger_id.split(',');
|
|
for (const id of lid) {
|
|
for (const id of lid) {
|