| | |
| | | <el-button type="danger" @click="selectClose">关闭</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table size="small" :data="tableData" border style="width: 100%" @selection-change="handleSelectionChange" max-height="600" @cell-dblclick="dblclick"> |
| | | <el-table-column type="selection" > |
| | | </el-table-column> |
| | | <el-table-column type="index" width="55" > |
| | | </el-table-column> |
| | | <el-table-column prop="fbillno" label="单据编号" width="150" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="fdate" label="日期"> |
| | | </el-table-column> |
| | | <el-table-column prop="venName" label="供应商" width="100" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="bizTypeName" label="业务类型" > |
| | | </el-table-column> |
| | | <el-table-column prop="invCode" label="物料编码" width="150" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="invName" label="物料名称" width="150" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="fqty" label="数量"> |
| | | </el-table-column> |
| | | <el-table-column prop="inStockQty" label="立库入库量"> |
| | | </el-table-column> |
| | | <el-table-column prop="forderbillno" label="订单单号"> |
| | | </el-table-column> |
| | | <el-table-column prop="fentryselfp0362" label="生产单号"> |
| | | </el-table-column> |
| | | <el-table-column prop="fheadselfp0339" label="生产部门"> |
| | | </el-table-column> |
| | | <el-table-column prop="fheadselfp0338" label="交货日期"> |
| | | </el-table-column> |
| | | <!-- 修改 el-table:把固定 max-height 改为动态 height,并加上 ref --> |
| | | <el-table |
| | | size="small" |
| | | :data="tableData" |
| | | border |
| | | style="width: 100%" |
| | | @selection-change="handleSelectionChange" |
| | | :height="tableHeight" |
| | | @cell-dblclick="dblclick" |
| | | ref="mainTable" |
| | | > |
| | | <el-table-column type="selection"></el-table-column> |
| | | <el-table-column type="index" width="55"></el-table-column> |
| | | <el-table-column prop="fbillno" label="单据编号" width="150" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="fdate" label="日期"></el-table-column> |
| | | <el-table-column prop="venName" label="供应商" width="100" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="bizTypeName" label="业务类型"></el-table-column> |
| | | <el-table-column prop="invCode" label="物料编码" width="150" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="invName" label="物料名称" width="150" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="fqty" label="数量"></el-table-column> |
| | | <el-table-column prop="inStockQty" label="立库入库量"></el-table-column> |
| | | <el-table-column prop="forderbillno" label="订单单号"></el-table-column> |
| | | <el-table-column prop="fentryselfp0362" label="生产单号"></el-table-column> |
| | | <el-table-column prop="fheadselfp0339" label="生产部门"></el-table-column> |
| | | <el-table-column prop="fheadselfp0338" label="交货日期"></el-table-column> |
| | | </el-table> |
| | | <div style="margin-top: 10px"> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" |
| | | :current-page="currentPage" :page-sizes="pageSizes" :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" :total="pageTotal"> |
| | | <div style="margin-top: 10px" ref="paginationRef"> |
| | | <el-pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | :current-page="currentPage" |
| | | :page-sizes="pageSizes" |
| | | :page-size="pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pageTotal" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | |
| | |
| | | // 导入中文语言包 |
| | | import zhCn from '../../static/js/erp/zh-cn.js'; |
| | | |
| | | const { createApp, ref, onMounted,onBeforeMount } = Vue; |
| | | const { createApp, ref, onMounted, onBeforeMount, nextTick, onBeforeUnmount } = Vue; |
| | | |
| | | |
| | | const app = createApp({ |
| | |
| | | |
| | | const options = ref([ |
| | | ]) |
| | | |
| | | |
| | | |
| | | const depOptions = ref([ |
| | | { |
| | |
| | | ] |
| | | |
| | | const dialogVisible = ref(false) |
| | | const formData = ref({}) |
| | | const formData = ref({}) |
| | | |
| | | function search(){ |
| | | currentPage.value = 1 |
| | |
| | | }); |
| | | } |
| | | |
| | | const tableHeight = ref(600) |
| | | const mainTable = ref(null) |
| | | const paginationRef = ref(null) |
| | | |
| | | function calcTableHeight() { |
| | | const tableEl = mainTable.value?.$el |
| | | if (!tableEl) return |
| | | const tableTop = tableEl.getBoundingClientRect().top |
| | | const paginationH = paginationRef.value ? paginationRef.value.offsetHeight : 0 |
| | | const bottomPadding = 40 // 卡片底部内边距/外边距预留,可按需调整 |
| | | const available = window.innerHeight - tableTop - paginationH - bottomPadding |
| | | // 给个最小值避免过小 |
| | | tableHeight.value = Math.max(300, available) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | page() |
| | | nextTick(() => { |
| | | calcTableHeight() |
| | | }) |
| | | window.addEventListener('resize', calcTableHeight) |
| | | }) |
| | | onBeforeMount(() => { |
| | | getVendor() |
| | | |
| | | }) |
| | | onBeforeUnmount(() => { |
| | | window.removeEventListener('resize', calcTableHeight) |
| | | }) |
| | | |
| | | return { |
| | |
| | | formData, |
| | | tableDataDialog, |
| | | selectListDialog, |
| | | tableHeight, |
| | | mainTable, |
| | | paginationRef, |
| | | calcTableHeight, |
| | | search, |
| | | page, |
| | | save, |