| | |
| | | prop: "userName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工序", |
| | | prop: "process", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工单编号", |
| | | prop: "workOrderNo", |
| | | width: 140, |
| | | }, |
| | | { |
| | | label: "销售合同号", |
| | | prop: "salesContractNo", |
| | | width: 140, |
| | | }, |
| | | { |
| | | label: "生产订单号", |
| | | prop: "productOrderNpsNo", |
| | | width: 140, |
| | | }, |
| | | // { |
| | | // label: "工序", |
| | | // prop: "process", |
| | | // width: 120, |
| | | // }, |
| | | // { |
| | | // label: "工单编号", |
| | | // prop: "workOrderNo", |
| | | // width: 140, |
| | | // }, |
| | | // { |
| | | // label: "销售合同号", |
| | | // prop: "salesContractNo", |
| | | // width: 140, |
| | | // }, |
| | | // { |
| | | // label: "生产订单号", |
| | | // prop: "productOrderNpsNo", |
| | | // width: 140, |
| | | // }, |
| | | { |
| | | label: "产品名称", |
| | | prop: "productName", |
| | |
| | | width: 160, |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "合格", |
| | | prop: "quantity", |
| | | width: 100, |
| | |
| | | prop: "scrapQty", |
| | | width: 100, |
| | | }, |
| | | { |
| | | label: "单位", |
| | | prop: "unit", |
| | | width: 100, |
| | | }, |
| | | |
| | | { |
| | | label: "工序标准工时(小时)", |
| | | prop: "processStandardHours", |
| | |
| | | getDetailList(); |
| | | }; |
| | | const getDetailList = () => { |
| | | if (!currentDetailRow.value?.id) return; |
| | | if (!currentDetailRow.value?.workOrderId) return; |
| | | detailLoading.value = true; |
| | | productionProductMainListPageDetail({ |
| | | id: currentDetailRow.value.id, |
| | | workOrderId: currentDetailRow.value.workOrderId, |
| | | current: detailPage.current, |
| | | size: detailPage.size, |
| | | }) |
| | |
| | | |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |
| | | const workOrderIds = [...new Set( |
| | | (selectedRows.value || []) |
| | | .map(item => item.workOrderId) |
| | | .filter(item => item !== undefined && item !== null && item !== "") |
| | | )]; |
| | | const exportParams = { |
| | | ...searchForm.value, |
| | | ...(workOrderIds.length ? { workOrderIds } : {}), |
| | | }; |
| | | ElMessageBox.confirm("将导出当前查询结果,勾选数据时仅导出选中内容,是否继续?", "导出", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | proxy.download("/productionProductMain/export", {}, "生产报工.xlsx"); |
| | | proxy.download( |
| | | "/productionProductMain/exportDetail", |
| | | exportParams, |
| | | "生产报工.xlsx" |
| | | ); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |