feat(productionOrder): 添加生产订单结束功能并优化界面组件
- 在生产订单表格中新增结束生产操作按钮
- 实现finishOrder API接口用于结束生产订单
- 优化工作订单界面防止对已结束的生产订单进行操作
- 在销售台账中增加UID码字段显示
- 调整生产订单界面代码格式和导入模块顺序
- 更新搜索按钮样式和输入框事件绑定方式
- 优化进度条组件的属性绑定格式化
| | |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | export function finishOrder(id) { |
| | | return request({ |
| | | url: `/productOrder/${id}`, |
| | | method: "patch", |
| | | }); |
| | | } |
| | |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" |
| | | @click="handleQuery">搜索</el-button> |
| | | @click="handleQuery">搜索 |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | |
| | | productOrderListPage, |
| | | listProcessRoute, |
| | | bindingRoute, |
| | | listProcessBom, delProductOrder, |
| | | delProductOrder, finishOrder, |
| | | } from "@/api/productionManagement/productionOrder.js"; |
| | | import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import {fileDel} from "@/api/financialManagement/revenueManagement.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | |
| | | const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue")); |
| | | |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | type: "text", |
| | | clickFun: row => { |
| | | showProductStructure(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "结束生产", |
| | | type: "text", |
| | | showHide: row => !row.isEnd, |
| | | clickFun: row => { |
| | | handleFinishOrder(row); |
| | | }, |
| | | }, |
| | | ], |
| | |
| | | }); |
| | | }; |
| | | |
| | | const handleConfirmRoute = () => {}; |
| | | const handleConfirmRoute = () => { |
| | | }; |
| | | |
| | | const handleFinishOrder = (row) => { |
| | | ElMessageBox.confirm("是否确认结束?", "结束", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | finishOrder(row.id).then(res => { |
| | | proxy.$modal.msgSuccess("结束成功"); |
| | | getList() |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | getList(); |
| | | }); |
| | |
| | | clickFun: row => { |
| | | showReportDialog(row); |
| | | }, |
| | | disabled: row => row.planQuantity <= 0, |
| | | disabled: row => row.planQuantity <= 0 || row.productOrderIsEnd, |
| | | }, |
| | | ], |
| | | }, |
| | |
| | | <el-table-column align="center" label="序号" type="index" width="60" /> |
| | | <el-table-column label="产品大类" prop="productCategory" /> |
| | | <el-table-column label="规格型号" prop="specificationModel" /> |
| | | <el-table-column label="UID码" prop="uidNo" /> |
| | | <el-table-column label="单位" prop="unit" /> |
| | | <el-table-column label="数量" prop="quantity" /> |
| | | <el-table-column label="税率(%)" prop="taxRate" /> |