|
|
@@ -518,6 +518,7 @@ class PhasePayDetail extends TreeService {
|
|
|
|
|
|
async addNext(phasePay, select, count = 1) {
|
|
|
const masterId = this.getMasterKey(phasePay);
|
|
|
+ const parent = await this.getDataByKid(masterId, select[this.setting.pid]);
|
|
|
this.transaction = await this.db.beginTransaction();
|
|
|
try {
|
|
|
if (select) await this._updateChildrenOrder(masterId, select[this.setting.pid], select[this.setting.order] + 1, count);
|
|
|
@@ -533,7 +534,7 @@ class PhasePayDetail extends TreeService {
|
|
|
? select[this.setting.fullPath].replace('-' + select[this.setting.kid], '-' + newData[this.setting.kid])
|
|
|
: newData[this.setting.kid] + '';
|
|
|
newData[this.setting.isLeaf] = 1;
|
|
|
- this._getDefaultData(newData, phasePay);
|
|
|
+ this._getDefaultData(newData, phasePay, parent);
|
|
|
newDatas.push(newData);
|
|
|
}
|
|
|
const insertResult = await this.transaction.insert(this.tableName, newDatas);
|