| | |
| | | return await PackagRst.EditAsync(packagItems); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除包装信息 |
| | | /// </summary> |
| | |
| | | { |
| | | throw Oops.Bah("包装信息不存在!"); |
| | | } |
| | | var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo); |
| | | if (modMaterial != null) |
| | | //admin可以跳过此验证 |
| | | if (userId != 1) |
| | | { |
| | | throw Oops.Bah("存在正在使用此包装的物料!"); |
| | | var modMaterial = await Db.Queryable<SysMaterials>().FirstAsync(a => a.IsDel == "0" && a.PackagNo == packagItems.PackagNo); |
| | | if (modMaterial != null) |
| | | { |
| | | throw Oops.Bah("存在正在使用此包装的物料!"); |
| | | } |
| | | } |
| | | |
| | | packagItems.IsDel = "1"; |