|
@@ -545,10 +545,7 @@ module.exports = app => {
|
|
|
// 根据auditStatus获取审批人列表
|
|
|
const auditList = await ctx.service.changeAudit.getListByStatus(change, auditStatus);
|
|
|
// 获取已选清单
|
|
|
- let changeList = await ctx.service.changeAuditList.getAllDataByCondition({
|
|
|
- where: { cid: change.cid },
|
|
|
- orders: [['lid', 'desc'], ['id', 'asc']],
|
|
|
- });
|
|
|
+ let changeList = await ctx.service.changeAuditList.getList(change.cid);
|
|
|
|
|
|
// 获取用户人验证手机号
|
|
|
const pa = await ctx.service.projectAccount.getDataById(ctx.session.sessionUser.accountId);
|
|
@@ -734,18 +731,12 @@ module.exports = app => {
|
|
|
case 'paste':
|
|
|
await ctx.service.changeAuditList.saveDatas(data.updateData);
|
|
|
// 取所有工料表
|
|
|
- responseData.data = await ctx.service.changeAuditList.getAllDataByCondition({
|
|
|
- where: { cid: ctx.change.cid },
|
|
|
- orders: [['lid', 'desc'], ['id', 'asc']],
|
|
|
- });
|
|
|
+ responseData.data = await ctx.service.changeAuditList.getList(ctx.change.cid);
|
|
|
break;
|
|
|
case 'ledger_list':
|
|
|
await ctx.service.changeAuditList.saveLedgerListDatas(data.updateData);
|
|
|
// 取所有工料表
|
|
|
- responseData.data = await ctx.service.changeAuditList.getAllDataByCondition({
|
|
|
- where: { cid: ctx.change.cid },
|
|
|
- orders: [['lid', 'desc'], ['id', 'asc']],
|
|
|
- });
|
|
|
+ responseData.data = await ctx.service.changeAuditList.getList(ctx.change.cid);
|
|
|
break;
|
|
|
case 'info':
|
|
|
await ctx.service.change.saveInfo(data.updateData);
|
|
@@ -754,10 +745,7 @@ module.exports = app => {
|
|
|
break;
|
|
|
case 'paste_amount_rows':
|
|
|
await ctx.service.changeAuditList.saveDatas(data.updateData);
|
|
|
- let changeList = await ctx.service.changeAuditList.getAllDataByCondition({
|
|
|
- where: { cid: ctx.change.cid },
|
|
|
- orders: [['lid', 'desc'], ['id', 'asc']],
|
|
|
- });
|
|
|
+ let changeList = await ctx.service.changeAuditList.getList(ctx.change.cid);
|
|
|
const auditList2 = await ctx.service.changeAudit.getListGroupByTimes(ctx.change.cid, ctx.change.times);
|
|
|
changeList = JSON.parse(JSON.stringify(changeList.sort())).sort().sort();
|
|
|
for (const cl of changeList) {
|