|
@@ -774,9 +774,11 @@ module.exports = app => {
|
|
|
|
|
|
// 获取是否已存在调用变更令
|
|
|
let changeUsedData = await ctx.service.stageChange.getFinalUsedData(ctx.tender.id, change.cid);
|
|
|
- changeUsedData = ctx.helper._.uniqWith(ctx.helper._.orderBy(ctx.helper._.filter(changeUsedData, function(item) {
|
|
|
+ changeUsedData = ctx.helper._.uniqWith(ctx.helper._.sortBy(ctx.helper._.orderBy(ctx.helper._.filter(changeUsedData, function(item) {
|
|
|
return item.qty !== null;
|
|
|
- }), ['sorder'], ['desc']), function(item1, item2) {
|
|
|
+ }), ['sorder'], ['desc']), 'sorder', function(item3) {
|
|
|
+ return item3.sorder === 0;// 针对未审批完成期需要读取sorder为0的在前面
|
|
|
+ }), function(item1, item2) {
|
|
|
return item1.cbid === item2.cbid;
|
|
|
});
|
|
|
renderData.changeUsedData = changeUsedData;
|