| | |
| | | <el-form :inline="true"> |
| | | <el-form-item label="开工日期"> |
| | | <div> |
| | | <el-date-picker |
| | | v-model="tableSearchParam.dateStart" |
| | | type="date" |
| | | placeholder="开始日期" |
| | | style="width: 150px;" |
| | | :default-time="defaultTime" |
| | | /> |
| | | <el-date-picker v-model="tableSearchParam.dateStart" type="date" placeholder="开始日期" |
| | | style="width: 150px;" :default-time="defaultTime" /> |
| | | </div> |
| | | <div style="margin-left: 5px;margin-right: 5px"> |
| | | <span >-</span> |
| | | </div> |
| | | <div> |
| | | <el-date-picker |
| | | v-model="tableSearchParam.dateEnd" |
| | | type="date" |
| | | placeholder="结束日期" |
| | | style="width: 150px;" |
| | | :default-time="defaultTime" |
| | | /> |
| | | <el-date-picker v-model="tableSearchParam.dateEnd" type="date" placeholder="结束日期" |
| | | style="width: 150px;" :default-time="defaultTime" /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="客户"> |
| | | <el-select v-model="tableSearchParam.fcustid" placeholder="选择客户" style="width: 150px"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单据号"> |
| | | <el-input v-model="tableSearchParam.fbillno" placeholder="请输入单据号" style="width: 150px;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="生产单号"> |
| | | <el-input v-model="tableSearchParam.fentryselfp0362" placeholder="请输入生产单号" style="width: 150px;"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="供应商"> |
| | | <el-select v-model="tableSearchParam.fsupplyid" placeholder="选择供应商" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="业务类型"> |
| | | <el-select v-model="tableSearchParam.bizTypeName" placeholder="选择业务类型" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in businessOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="状态"> |
| | | <el-select v-model="tableSearchParam.fstatus" placeholder="选择状态" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in statusOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="生产部门"> |
| | | <el-select v-model="tableSearchParam.fheadselfp0339" placeholder="选择生产部门" style="width: 150px" > |
| | | <el-option |
| | | v-for="item in depOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label=""> |
| | | <el-button type="primary" @click="search" circle > |
| | | <el-icon><Search /></el-icon> |
| | | <el-icon> |
| | | <Search /> |
| | | </el-icon> |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | <el-button type="danger" @click="selectDelete">删除</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 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="fdate" label="日期"> |
| | | </el-table-column> |
| | | <el-table-column prop="venName" label="供应商" width="100" :show-overflow-tooltip="true"> |
| | | <el-table-column prop="custName" label="客户" width="100" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="bizTypeName" label="业务类型" > |
| | | <el-table-column prop="fheadselfs0237" 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="invStd" label="物料规格"> |
| | | </el-table-column> |
| | | <el-table-column prop="fqty" label="数量"> |
| | | </el-table-column> |
| | | <el-table-column prop="inStockQty" label="立库入库量"> |
| | | <el-table-column prop="ffetchdate" label="交货日期"> |
| | | </el-table-column> |
| | | <el-table-column prop="forderbillno" label="订单单号"> |
| | | <el-table-column prop="memo" 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 prop="soCode" label="订单单号"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div style="margin-top: 10px"> |
| | |
| | | <el-form-item label="制单日期" > |
| | | <el-input v-model="formData.fdate" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="业务类型" > |
| | | <el-input v-model="formData.bizTypeName" disabled></el-input> |
| | | <el-form-item label="客户"> |
| | | <el-input v-model="formData.custName" disabled></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="供应商" required> |
| | | <el-select v-model="formData.fsupplyid" placeholder="选择车间" style="width: 240px" > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="交货日期" required> |
| | | <el-date-picker |
| | | v-model="formData.fheadselfp0338" |
| | | type="date" |
| | | placeholder="选择交货日期" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="生产车间" > |
| | | <el-input v-model="formData.fheadselfp0339" disabled></el-input> |
| | | <el-form-item label="发货日期" required> |
| | | <el-date-picker v-model="formData.fheadselfs0237" type="date" placeholder="选择发货日期" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <el-form :inline="true" label-width="auto"> |
| | |
| | | <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="650"> |
| | | <el-table-column type="selection" > |
| | | </el-table-column> |
| | | <el-table-column type="index" width="50" > |
| | | </el-table-column> |
| | | <el-table-column prop="invCode" label="物料编码" > |
| | | </el-table-column> |
| | | <el-table-column prop="invName" label="物料名称"> |
| | | <el-table-column prop="invName" label="物料名称" width="150" :show-overflow-tooltip="true"> |
| | | </el-table-column> |
| | | <el-table-column prop="invStd" label="物料规格"> |
| | | </el-table-column> |
| | |
| | | <el-input v-model="scope.row.fqty"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="inStockQty" label="立库入库量"> |
| | | <el-table-column prop="inStockQty" label="备注"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.memo"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="forderbillno" label="订单单号"> |
| | | <el-table-column prop="forderbillno" label="交货日期"> |
| | | <template #default="scope"> |
| | | <el-date-picker v-model="scope.row.ffetchdate" type="date" placeholder="交货日期" |
| | | style="width: 150px;" :value-format="yyyy-MM-dd" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="fentryselfp0362" label="生产单号"> |
| | | <el-table-column prop="fentryselfp0362" label="订单单号"> |
| | | </el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | |
| | | // 导入中文语言包 |
| | | 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({ |
| | |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/mo/poinstock/getList", |
| | | url: "http://127.0.0.1:9090/mo/outstock/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:9090/mo/outstock/softDelete", |
| | | data: JSON.stringify(selectList.value), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | |
| | | function formatLocalDate(date) { |
| | | if (!date) return ''; |
| | | var d = new Date(date); |
| | | d.setHours(d.getHours() + 8); |
| | | // 直接返回标准ISO 8601格式 (UTF-8兼容) |
| | | return d.toISOString(); |
| | | } |
| | | |
| | | function save(){ |
| | | if (!formData.value.fheadselfs0237) { |
| | | ElementPlus.ElMessage({ |
| | | message: "请选择发货日期", |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | ElementPlus.ElMessageBox.confirm('确定保存吗?') |
| | | .then(() => { |
| | | const loading = ElementPlus.ElLoading.service({ |
| | |
| | | text: 'Loading', |
| | | background: 'rgba(0, 0, 0, 0.7)', |
| | | }) |
| | | const poInStockDTO = JSON.parse(JSON.stringify(formData.value)); |
| | | const poInStockDTOS = JSON.parse(JSON.stringify(tableDataDialog.value)); |
| | | const outstockDTO = JSON.parse(JSON.stringify(formData.value)); |
| | | const outstockDTOS = JSON.parse(JSON.stringify(tableDataDialog.value)); |
| | | |
| | | poInStockDTO.fheadselfp0338 = formatLocalDate(poInStockDTO.fheadselfp0338); |
| | | outstockDTO.fheadselfs0237 = formatLocalDate(outstockDTO.fheadselfs0237); |
| | | outstockDTOS.forEach(item => { |
| | | item.ffetchdate = formatLocalDate(item.ffetchdate); |
| | | }); |
| | | $.ajax({ |
| | | url:"http://127.0.0.1:9090/mo/poinstock/saveorupdate", |
| | | url: "http://127.0.0.1:9090/mo/outstock/saveorupdate", |
| | | data: JSON.stringify({ |
| | | poInStockDTO : poInStockDTO, |
| | | poInStockDTOS: poInStockDTOS |
| | | outStockDTO: outstockDTO, |
| | | outStockDTOS: outstockDTOS |
| | | }), |
| | | 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:9090/mo/outstock/getbyid", |
| | | data: JSON.stringify(row), |
| | | dataType: 'json', |
| | | contentType: 'application/json;charset=UTF-8', |
| | |
| | | }); |
| | | } |
| | | |
| | | function getCustomer() { |
| | | $.ajax({ |
| | | url: "http://127.0.0.1:9090/basicinfo/customer/getlistfordropdown", |
| | | contentType: 'application/json;charset=UTF-8', |
| | | method: 'GET', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | res.data.map(item => { |
| | | options.value.push({ |
| | | value: item.custId, label: item.custName |
| | | }) |
| | | }) |
| | | } else { |
| | | ElementPlus.ElMessage({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | 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 = 70 // 卡片底部内边距/外边距预留,可按需调整 |
| | | const available = window.innerHeight - tableTop - paginationH - bottomPadding |
| | | // 给个最小值避免过小 |
| | | tableHeight.value = Math.max(300, available) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | page() |
| | | nextTick(() => { |
| | | calcTableHeight() |
| | | }) |
| | | window.addEventListener('resize', calcTableHeight) |
| | | }) |
| | | onBeforeUnmount(() => { |
| | | window.removeEventListener('resize', calcTableHeight) |
| | | }) |
| | | onBeforeMount(() => { |
| | | getVendor() |
| | | |
| | | getCustomer() |
| | | }) |
| | | |
| | | return { |
| | | tableHeight, |
| | | mainTable, |
| | | paginationRef, |
| | | calcTableHeight, |
| | | tableData, |
| | | currentPage, |
| | | pageSizes, |