后端: - trans_service 新增 scrap_borrow 方法:未归还借用标记为 scrapped, 扣减总库存 stock_quantity(可用已在借出时冻结),生成 TransScrap 报废记录 - transactions.py 新增 POST /borrow/scrap 接口(复用 op_return:operation 权限,库管/主管可操作) - scrap.py query_records 支持 trans_borrow 来源的物料名解析 + 行级隔离 前端: - records.vue 未归还记录新增「报废」按钮(库管/主管可见) - 报废弹窗:勾选明细 + 填报废原因 + 二次确认 - 状态显示新增「已报废」标签;整单所有明细报废时标记为 scrapped
Vue 3 + TypeScript + Vite
This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 <script setup> SFCs, check out the script setup docs to learn more.
Learn more about the recommended Project Setup and IDE Support in the Vue Docs TypeScript Guide.