|
@@ -68,7 +68,17 @@ module.exports = app => {
|
|
|
const caList = await ctx.service.changeAuditList.getList(c.cid, 0);
|
|
|
const gclIdList = ctx.helper._.uniq(ctx.helper._.map(caList, 'gcl_id'));
|
|
|
for (const gcl of gclIdList) {
|
|
|
- if (gcl && (ctx.helper._.findIndex(changeLedgerList, { id: gcl }) !== -1 || ctx.helper._.findIndex(changePosList, { lid: gcl }) !== -1)) {
|
|
|
+ if (gcl && (ctx.helper._.findIndex(changeLedgerList, { id: gcl }) !== -1)) {
|
|
|
+ changeValid = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!changeValid) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ const posIdList = ctx.helper._.uniq(ctx.helper._.map(caList, 'mx_id'));
|
|
|
+ for (const pos of posIdList) {
|
|
|
+ if (pos && (ctx.helper._.findIndex(changePosList, { id: pos }) !== -1)) {
|
|
|
changeValid = false;
|
|
|
break;
|
|
|
}
|