|
@@ -1129,9 +1129,10 @@ module.exports = app => {
|
|
|
this.clearParentingData(updateData2);
|
|
|
await this.transaction.update(this.tableName, updateData2);
|
|
|
await this._deleteChangeAuditListData(mid, [pre]);
|
|
|
- } else if (!pre.ccid && pre.is_leaf === 1) {
|
|
|
- throw '原台账节点为子项时不能降级成为它的子项';
|
|
|
}
|
|
|
+ // else if (!pre.ccid && pre.is_leaf === 1) {
|
|
|
+ // throw '原台账节点为子项时不能降级成为它的子项';
|
|
|
+ // }
|
|
|
await this.transaction.commit();
|
|
|
this.transaction = null;
|
|
|
} catch (err) {
|
|
@@ -1372,9 +1373,10 @@ module.exports = app => {
|
|
|
quantity: null, unit_price: null, total_price: null, deal_qty: null, deal_tp: null
|
|
|
},
|
|
|
{ where: {tender_id: tenderId, ledger_id: selectData.ledger_id} });
|
|
|
- } else if (!selectData.ccid && children.length === 0) {
|
|
|
- throw '原台账节点为子项时不能添加它的子项';
|
|
|
}
|
|
|
+ // else if (!selectData.ccid && children.length === 0) {
|
|
|
+ // throw '原台账节点为子项时不能添加它的子项';
|
|
|
+ // }
|
|
|
await this.transaction.commit();
|
|
|
} catch (err) {
|
|
|
this.transaction.rollback();
|
|
@@ -1492,9 +1494,9 @@ module.exports = app => {
|
|
|
const ledgerChildren = await this.getChildrenByParentId(this.ctx.service.ledger.tableName, tenderId, parent.ledger_id);
|
|
|
children = this._.orderBy(this._.concat(ledgerChildren, children), [this.setting.order], ['asc']);
|
|
|
}
|
|
|
- if (children.length === 0 && !parent.ccid) {
|
|
|
- throw '原台账节点为子项时不能添加它的子项';
|
|
|
- }
|
|
|
+ // if (children.length === 0 && !parent.ccid) {
|
|
|
+ // throw '原台账节点为子项时不能添加它的子项';
|
|
|
+ // }
|
|
|
isNew = true;
|
|
|
const newData = this._filterStdData(stdNode);
|
|
|
newData.is_leaf = (i === len - 1);
|