| | |
| | | <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="620" @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> |
| | | |
| | |
| | | <el-button type="danger" @click="selectDeleteDialog">删行</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-table :data="tableDataDialog" border style="width: 100%" row-key="id" @selection-change="handleSelectionChangeDialog" max-height="650"> |
| | | <el-table :data="tableDataDialog" border style="width: 100%" row-key="id" @selection-change="handleSelectionChangeDialog" max-height="600"> |
| | | <el-table-column type="selection" > |
| | | </el-table-column> |
| | | <el-table-column type="index" width="50" > |
| | |
| | | // 导入中文语言包 |
| | | 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 pageSize = ref(100) |
| | | const pageTotal = ref(0) |
| | | const tableSearchParam = ref({ |
| | | dateStart:null, |
| | | dateEnd: null, |
| | | // dateStart:new Date(), |
| | | // dateEnd: new Date(), |
| | | // dateStart:null, |
| | | // dateEnd: null, |
| | | dateStart:new Date(), |
| | | dateEnd: new Date(), |
| | | fbillno: null, |
| | | fsupplyid:null, |
| | | bizTypeName:null, |
| | |
| | | |
| | | const options = ref([ |
| | | ]) |
| | | |
| | | |
| | | |
| | | const depOptions = ref([ |
| | | { |
| | |
| | | ] |
| | | |
| | | const dialogVisible = ref(false) |
| | | const formData = ref({}) |
| | | const formData = ref({}) |
| | | |
| | | function search(){ |
| | | currentPage.value = 1 |
| | |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/mo/poinstock/getList", |
| | | url: "http://127.0.0.1:8133/mo/poinstock/getList", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/poinstock/softDelete", |
| | | url:"http://127.0.0.1:8133/mo/poinstock/softDelete", |
| | | data: JSON.stringify(selectList.value), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | |
| | | |
| | | poInStockDTO.fheadselfp0338 = formatLocalDate(poInStockDTO.fheadselfp0338); |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/poinstock/saveorupdate", |
| | | url:"http://127.0.0.1:8133/mo/poinstock/saveorupdate", |
| | | data: JSON.stringify({ |
| | | poInStockDTO : poInStockDTO, |
| | | poInStockDTOS: poInStockDTOS |
| | |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/poinstock/softclose", |
| | | url:"http://127.0.0.1:8133/mo/poinstock/softclose", |
| | | data: JSON.stringify(selectList.value), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/poinstock/getbyid", |
| | | url:"http://127.0.0.1:8133/mo/poinstock/getbyid", |
| | | data: JSON.stringify(row), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | |
| | | |
| | | function getVendor(){ |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/basicinfo/vendor/getlistfordropdown", |
| | | url: "http://127.0.0.1:8133/basicinfo/vendor/getlistfordropdown", |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | | success: function(res) { |
| | |
| | | }); |
| | | } |
| | | |
| | | 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, |