| | |
| | | :disabled=" |
| | | !scope.row.isEdit || |
| | | scope.row.hasProductionRecord || |
| | | !canEditLedger(scope.row) |
| | | !canEditLedger(scope.row) || |
| | | scope.row.isFh |
| | | " |
| | | >编辑 |
| | | </el-button> |
| | |
| | | proxy.$modal.msgWarning("当前系统登录人不是维护人,不能编辑数据"); |
| | | return; |
| | | } |
| | | // 已发货的销售订单不允许编辑(列表接口未返回 isFh 时按产品发货状态兜底判断) |
| | | if (type === "edit" && row) { |
| | | let products = |
| | | row.children && row.children.length > 0 ? row.children : null; |
| | | if (!products) { |
| | | try { |
| | | const res = await productList({ salesLedgerId: row.id, type: 1 }); |
| | | products = res.data || []; |
| | | } catch { |
| | | products = []; |
| | | } |
| | | } |
| | | if (hasShippedProducts(products)) { |
| | | proxy.$modal.msgWarning("该销售订单已发货,不能编辑"); |
| | | return; |
| | | } |
| | | } |
| | | operationType.value = type; |
| | | form.value = {}; |
| | | productData.value = []; |