| | |
| | | :column="leftTableColumn" |
| | | :tableData="leftTableData" |
| | | :tableLoading="tableLoading" |
| | | @rowClick="handleLeftRowClick" |
| | | ></PIMTable> |
| | | :page="page" |
| | | :height="200" |
| | | @row-click="handleLeftRowClick" |
| | | @pagination="pagination" |
| | | ></PIMTable> |
| | | </div> |
| | | |
| | | <!-- 右侧明细(原有内容) --> |
| | |
| | | rowKey="id" |
| | | :column="tableColumn" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | :page="page1" |
| | | :tableLoading="tableLoading" |
| | | style="margin-right: 20px;" |
| | | @pagination="pagination" |
| | | @pagination="pagination1" |
| | | ></PIMTable> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | const tableData = ref([]); |
| | | const tableLoading = ref(false); |
| | | const tableLoading1 = ref(false); |
| | | const leftTableData = ref([]); |
| | | // 日 / 月 切换(默认按日) |
| | | const dateType = ref("day"); |
| | |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | |
| | | const page1 = reactive({ |
| | | current: 1, |
| | | size: 100, |
| | | total: 0, |
| | | }); |
| | | |
| | | const data = reactive({ |
| | |
| | | }); |
| | | const { searchForm } = toRefs(data); |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page.current = 1; |
| | | getList(); |
| | | }; |
| | | const pagination = (obj) => { |
| | | page.current = obj.page; |
| | | page.size = obj.limit; |
| | | getList(); |
| | | }; |
| | | |
| | | const pagination1 = (obj) => { |
| | | page1.current = obj.page; |
| | | page1.size = obj.limit; |
| | | getList1(); |
| | | }; |
| | | |
| | | const changeDaterange = (value) => { |
| | | if (value) { |
| | | searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD"); |
| | |
| | | const params = { ...searchForm.value, ...page }; |
| | | params.dateType = dateType.value; |
| | | params.entryDate = undefined |
| | | |
| | | salesLedgerProductionAccountingList(params).then((res) => { |
| | | tableLoading.value = false; |
| | | const records = res.data.records || []; |
| | | // console.log("resdsd",records) |
| | | leftTableData.value = records; |
| | | page.total = res.data.total || 0; |
| | | // buildLeftTableData(records); |
| | | }); |
| | | |
| | | }; |
| | | |
| | | const getList1 = () => { |
| | | tableLoading1.value = true; |
| | | const params = { ...page1, ...searchForm.value }; |
| | | salesLedgerProductionAccountingListProductionDetails(params).then((res) => { |
| | | tableLoading.value = false; |
| | | tableLoading1.value = false; |
| | | tableData.value = res.data.records || [];; |
| | | page.total = res.data.total || 0; |
| | | }); |
| | | page1.total = res.data.total || 0; |
| | | }); |
| | | }; |
| | | |
| | | // 构建左侧汇总台账(按生产人汇总产量、工资等) |
| | |
| | | // 左侧日/月切换 |
| | | const handleDateTypeChange = () => { |
| | | // 这里只作为筛选条件的一部分,直接重新查询列表 |
| | | handleQuery(); |
| | | page.current = 1; |
| | | getList(); |
| | | handleQuery() |
| | | }; |
| | | |
| | | // 点击左侧行,刷右侧明细(按生产人过滤) |
| | |
| | | handleQuery(); |
| | | }; |
| | | |
| | | // 查询列表 |
| | | /** 搜索按钮操作 */ |
| | | const handleQuery = () => { |
| | | page1.current = 1; |
| | | getList1(); |
| | | }; |
| | | |
| | | |
| | | // 导出 |
| | | const handleOut = () => { |
| | | ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { |