| | |
| | | title="单个修正" |
| | | width="520px"> |
| | | <el-form :model="adjustForm" label-width="120px"> |
| | | <el-form-item label="报工单号"> |
| | | <el-input v-model="adjustForm.reportNo" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="报工人员"> |
| | | <el-input v-model="adjustForm.schedulingUserName" disabled /> |
| | | </el-form-item> |
| | | <el-form-item label="工资"> |
| | | <el-form-item label="修正金额"> |
| | | <el-input-number v-model="adjustForm.wages" :min="0" :precision="2" style="width: 100%" /> |
| | | </el-form-item> |
| | | <el-form-item label="修正说明"> |
| | |
| | | import { |
| | | salesLedgerProductionAccountingListProductionDetails, |
| | | salesLedgerProductionAccountingList, |
| | | productionAccountingBatchAccounting, |
| | | productionAccountingSingleAdjust, |
| | | } from "@/api/productionManagement/productionCosting.js"; |
| | | const { proxy } = getCurrentInstance(); |
| | | |
| | |
| | | }, |
| | | { |
| | | label: "审核状态", |
| | | prop: "auditStatusName", |
| | | prop: "auditStatus", |
| | | minWidth: 100, |
| | | dataType: "tag", |
| | | formatData: val => formatTag(val, { |
| | |
| | | }, |
| | | { |
| | | label: "报工类型", |
| | | prop: "reportTypeName", |
| | | prop: "reportType", |
| | | minWidth: 100, |
| | | dataType: "tag", |
| | | formatData: val => formatTag(val, { |
| | |
| | | prop: "wages", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "修正说明", |
| | | prop: "adjustRemark", |
| | | minWidth: 160, |
| | | }, |
| | | ]); |
| | | |
| | | // 左侧汇总台账列(生产人、产量、工资、合格率) |
| | |
| | | const adjustDialogVisible = ref(false); |
| | | const adjustForm = reactive({ |
| | | id: null, |
| | | reportNo: "", |
| | | schedulingUserName: "", |
| | | wages: 0, |
| | | remark: "", |
| | |
| | | }) |
| | | .then(() => { |
| | | proxy.download( |
| | | "/salesLedger/productionAccounting/export", |
| | | "/productionAccount/exportSalarySlip", |
| | | { ...searchForm.value }, |
| | | "生产核算.xlsx" |
| | | "生产工资条.xlsx" |
| | | ); |
| | | }) |
| | | .catch(() => { |
| | |
| | | }; |
| | | |
| | | const handleBatchAccounting = () => { |
| | | proxy.$modal.msgWarning("当前页面已按审核通过的合格报工汇总工资,批量核算接口后续可直接接入。"); |
| | | ElMessageBox.confirm("确定要按当前筛选条件执行批量核算吗?", "批量核算", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | const { dateRange, ...batchPayload } = searchForm.value; |
| | | return productionAccountingBatchAccounting(batchPayload); |
| | | }) |
| | | .then(() => { |
| | | proxy.$modal.msgSuccess("批量核算成功"); |
| | | reloadData(); |
| | | }) |
| | | .catch(() => { |
| | | proxy.$modal.msg("已取消"); |
| | | }); |
| | | }; |
| | | |
| | | const handleSingleAdjust = () => { |
| | |
| | | } |
| | | const row = selectedRows.value[0]; |
| | | adjustForm.id = row.id; |
| | | adjustForm.reportNo = row.reportNo || ""; |
| | | adjustForm.schedulingUserName = row.schedulingUserName || ""; |
| | | adjustForm.wages = Number(row.wages || 0); |
| | | adjustForm.remark = ""; |
| | |
| | | }; |
| | | |
| | | const confirmAdjust = () => { |
| | | proxy.$modal.msgSuccess("已保存修正说明,后续可接入工资修正接口。"); |
| | | adjustDialogVisible.value = false; |
| | | const selectedRow = selectedRows.value[0]; |
| | | if (!selectedRow || !selectedRow.userId) { |
| | | proxy.$modal.msgWarning("当前记录缺少报工人员信息,无法修正"); |
| | | return; |
| | | } |
| | | if (!adjustForm.wages && adjustForm.wages !== 0) { |
| | | proxy.$modal.msgWarning("请输入修正金额"); |
| | | return; |
| | | } |
| | | productionAccountingSingleAdjust({ |
| | | productionProductMainId: adjustForm.id, |
| | | schedulingUserId: selectedRow.userId, |
| | | schedulingUserName: adjustForm.schedulingUserName, |
| | | adjustAmount: adjustForm.wages, |
| | | adjustRemark: adjustForm.remark, |
| | | adjustUser: proxy.$store?.state?.user?.userId || undefined, |
| | | }).then(() => { |
| | | proxy.$modal.msgSuccess("修正成功"); |
| | | adjustDialogVisible.value = false; |
| | | reloadData(); |
| | | }).catch(() => {}); |
| | | }; |
| | | |
| | | const handleRowAdjust = row => { |