| | |
| | | </el-tabs> |
| | | <!-- 操作按钮区 --> |
| | | <el-space> |
| | | <!-- <el-button type="danger" :icon="Delete">删除</el-button>--> |
| | | <el-button type="danger" :icon="Delete" @click="batchDelete(type)">删除</el-button> |
| | | <!-- <el-button type="info" plain :icon="Download">导出</el-button> --> |
| | | <el-button |
| | | type="success" |
| | |
| | | coalPlanList, |
| | | officialInventoryList, |
| | | pendingInventoryList, |
| | | batchDeletePendingInventoryByIds, |
| | | batchDeleteOfficialInventoryByIds, |
| | | editOfficial, |
| | | merge |
| | | } from "@/api/warehouseManagement/index.js"; |
| | | import { editOfficial, merge } from "../../api/warehouseManagement/index.js"; |
| | | import { getSupplyList } from "@/api/procureMent/index.js"; |
| | | import { getCoalInfoList } from "@/api/production/index.js"; |
| | | import { ElMessage } from "element-plus"; |
| | |
| | | // 标签页数据 |
| | | const tabs = reactive([ |
| | | { name: "pendingInbound", label: "待入库" }, |
| | | { name: "officialInventory", label: "正式库存" }, |
| | | { name: "officialInventory", label: "烟煤库存" }, |
| | | { name: "officialInventory", label: "型煤库存" }, |
| | | ]); |
| | | // 查询参数 |
| | | const queryParams = reactive({ |
| | |
| | | `${new Date().getTime()}${name}${new Date().toLocaleDateString("en-CA")}.xlsx` |
| | | ); |
| | | }; |
| | | |
| | | const batchDelete = () => { |
| | | if (selectedRows.value.length === 0) { |
| | | proxy.$modal.msgWarning("请选择要删除的数据"); |
| | | return; |
| | | } |
| | | proxy.$modal |
| | | .confirm("是否要删除" +`选中的${selectedRows.value.length}条数据?`) |
| | | .then((res) => { |
| | | if (res) { |
| | | deleteData(); |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }; |
| | | // 删除库存数据方法 |
| | | const deleteData = () => { |
| | | if (activeTab.value === "pendingInbound") { |
| | | batchDeletePendingInventoryByIds(selectedRows.value.map((row) => row.id)).then((res) => { |
| | | if (res.result.code === 200) { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | } else { |
| | | proxy.$modal.msgError("删除失败:" + res.result.msg); |
| | | } |
| | | }); |
| | | } else { |
| | | batchDeleteOfficialInventoryByIds(selectedRows.value.map((row) => row.id)).then((res) => { |
| | | if (res.result.code === 200) { |
| | | proxy.$modal.msgSuccess("删除成功"); |
| | | getList(); |
| | | } else { |
| | | proxy.$modal.msgError("删除失败:" + res.result.msg); |
| | | } |
| | | }) |
| | | } |
| | | handleQuery() |
| | | }; |
| | | // 合并库存数据方法 |
| | | const mergeRows = (type, row) => { |
| | | getDropdownData(); |