|
@@ -154,7 +154,7 @@ module.exports = app => {
|
|
const material_highOrder = await ctx.service.material.count({
|
|
const material_highOrder = await ctx.service.material.count({
|
|
tid: ctx.tender.id,
|
|
tid: ctx.tender.id,
|
|
});
|
|
});
|
|
- if (materialInfo === undefined || !ctx.session.sessionUser.is_admin || material_highOrder !== materialInfo.order) {
|
|
|
|
|
|
+ if (materialInfo === undefined || !(ctx.session.sessionUser.is_admin || ((materialInfo.status === auditConst.status.uncheck || materialInfo.status === auditConst.status.checkNo) && materialInfo.user_id === ctx.session.sessionUser.accountId)) || material_highOrder !== materialInfo.order) {
|
|
throw '您无权删除材料调差期';
|
|
throw '您无权删除材料调差期';
|
|
}
|
|
}
|
|
const result = await ctx.service.material.deleteMaterial(material_id);
|
|
const result = await ctx.service.material.deleteMaterial(material_id);
|