|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div>
|
|
|
|
|
- <layout>
|
|
|
|
|
|
|
+ <div ref="dahuobaobiaoPageRef" class="dahuobaobiao-page">
|
|
|
|
|
+ <layout class="dahuobaobiao-root">
|
|
|
<layout-header>
|
|
<layout-header>
|
|
|
<div class="top-action-bar action-buttons">
|
|
<div class="top-action-bar action-buttons">
|
|
|
<el-input
|
|
<el-input
|
|
@@ -27,33 +27,38 @@
|
|
|
|
|
|
|
|
<!-- 右侧表格区域 -->
|
|
<!-- 右侧表格区域 -->
|
|
|
<layout-content class="dahuobaobiao-content">
|
|
<layout-content class="dahuobaobiao-content">
|
|
|
- <el-main class="dahuobaobiao-main">
|
|
|
|
|
- <div class="gva-table-box">
|
|
|
|
|
- <!-- 表格数据 -->
|
|
|
|
|
- <el-table ref="multipleTable" style="width: 100%; height: 40vh" tooltip-effect="dark"
|
|
|
|
|
|
|
+ <div class="dahuobaobiao-main">
|
|
|
|
|
+ <div class="dahuobaobiao-panel dahuobaobiao-panel--main">
|
|
|
|
|
+ <div ref="mainTableWrapRef" class="dahuobaobiao-table-wrap dahuobaobiao-table-wrap--main">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ ref="multipleTable"
|
|
|
|
|
+ :height="mainTableHeight"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ tooltip-effect="dark"
|
|
|
:row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
|
|
:row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:data="tableData" border row-key="ID"
|
|
:data="tableData" border row-key="ID"
|
|
|
size="small"
|
|
size="small"
|
|
|
highlight-current-row="true"
|
|
highlight-current-row="true"
|
|
|
|
|
+ scrollbar-always-on
|
|
|
@row-click="tableRowClick" @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
|
|
@row-click="tableRowClick" @selection-change="handleSelectionChange" :show-overflow-tooltip="true">
|
|
|
<el-table-column type="selection" width="40" fixed="left" />
|
|
<el-table-column type="selection" width="40" fixed="left" />
|
|
|
|
|
|
|
|
- <el-table-column sortable align="center" label="款式" prop="款式" width="120" />
|
|
|
|
|
|
|
+ <el-table-column sortable align="left" label="款式" prop="款式" width="130" />
|
|
|
<el-table-column sortable align="center" label="客人编号" prop="客人编号" width="100" />
|
|
<el-table-column sortable align="center" label="客人编号" prop="客人编号" width="100" />
|
|
|
<el-table-column sortable align="center" label="下单日期" prop="下单日期" width="100" />
|
|
<el-table-column sortable align="center" label="下单日期" prop="下单日期" width="100" />
|
|
|
<el-table-column sortable align="center" label="货期" prop="货期" width="100" />
|
|
<el-table-column sortable align="center" label="货期" prop="货期" width="100" />
|
|
|
- <el-table-column sortable align="center" label="款号" prop="款号" width="150" />
|
|
|
|
|
|
|
+ <el-table-column sortable align="center" label="款号" prop="款号" width="170" />
|
|
|
<el-table-column align="center" label="计划生产小组" width="140">
|
|
<el-table-column align="center" label="计划生产小组" width="140">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-autocomplete
|
|
<el-autocomplete
|
|
|
v-model="row['计划生产小组']"
|
|
v-model="row['计划生产小组']"
|
|
|
:fetch-suggestions="queryPlanGroupSuggestions"
|
|
:fetch-suggestions="queryPlanGroupSuggestions"
|
|
|
clearable
|
|
clearable
|
|
|
- placeholder="请选择或输入"
|
|
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
value-key="value"
|
|
value-key="value"
|
|
|
@select="(item) => savePlanGroupRow(row, item?.value ?? item)"
|
|
@select="(item) => savePlanGroupRow(row, item?.value ?? item)"
|
|
|
|
|
+ @focus="() => onPlanGroupFocus(row)"
|
|
|
@blur="() => savePlanGroupRowOnBlur(row)"
|
|
@blur="() => savePlanGroupRowOnBlur(row)"
|
|
|
@clear="() => savePlanGroupRow(row, '')"
|
|
@clear="() => savePlanGroupRow(row, '')"
|
|
|
/>
|
|
/>
|
|
@@ -95,6 +100,7 @@
|
|
|
<el-table-column sortable align="center" label="后道完成日期" prop="后道完成日期" width="140" />
|
|
<el-table-column sortable align="center" label="后道完成日期" prop="后道完成日期" width="140" />
|
|
|
<el-table-column sortable align="center" label="备注" prop="备注" width="150" />
|
|
<el-table-column sortable align="center" label="备注" prop="备注" width="150" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
|
<div class="gva-pagination">
|
|
<div class="gva-pagination">
|
|
@@ -111,16 +117,24 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 下方BOM表格 -->
|
|
<!-- 下方BOM表格 -->
|
|
|
- <div class="gva-table-box dahuobaobiao-detail-box">
|
|
|
|
|
|
|
+ <div class="dahuobaobiao-panel dahuobaobiao-panel--detail">
|
|
|
<h3 class="dahuobaobiao-detail-title">订单开工详情</h3>
|
|
<h3 class="dahuobaobiao-detail-title">订单开工详情</h3>
|
|
|
- <el-table ref="bomTable" style="width: 100%; height: 30vh" tooltip-effect="dark"
|
|
|
|
|
|
|
+ <div ref="detailTableWrapRef" class="dahuobaobiao-table-wrap dahuobaobiao-table-wrap--detail">
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ ref="bomTable"
|
|
|
|
|
+ :height="detailTableHeight"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ tooltip-effect="dark"
|
|
|
:row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
|
|
:row-style="{ height: '25px' }" :header-cell-style="{ padding: '0px' }"
|
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
:cell-style="{ padding: '0px' }" :header-row-style="{ height: '20px' }"
|
|
|
:data="bomData" border
|
|
:data="bomData" border
|
|
|
size="small"
|
|
size="small"
|
|
|
|
|
+ scrollbar-always-on
|
|
|
:show-overflow-tooltip="true">
|
|
:show-overflow-tooltip="true">
|
|
|
<el-table-column prop="物料名称" label="物料名称" width="200" />
|
|
<el-table-column prop="物料名称" label="物料名称" width="200" />
|
|
|
- <el-table-column prop="核批日期" label="核批日期" width="110" />
|
|
|
|
|
|
|
+ <el-table-column prop="核批日期" label="核批日期" width="110">
|
|
|
|
|
+ <template #default="{ row }">{{ stripDateTime(row.核批日期) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="核批人" label="核批人" width="130" />
|
|
<el-table-column prop="核批人" label="核批人" width="130" />
|
|
|
<el-table-column prop="计划入库时间" label="计划入库时间" width="140">
|
|
<el-table-column prop="计划入库时间" label="计划入库时间" width="140">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
@@ -133,12 +147,15 @@
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column prop="实际入库时间" label="实际入库时间" width="130" />
|
|
|
|
|
|
|
+ <el-table-column prop="实际入库时间" label="实际入库时间" width="130">
|
|
|
|
|
+ <template #default="{ row }">{{ stripDateTime(row.实际入库时间) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="入库数量" label="入库数量" width="100" />
|
|
<el-table-column prop="入库数量" label="入库数量" width="100" />
|
|
|
<el-table-column prop="计划入库操作人" label="计划入库操作人" width="130" />
|
|
<el-table-column prop="计划入库操作人" label="计划入库操作人" width="130" />
|
|
|
</el-table>
|
|
</el-table>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </el-main>
|
|
|
|
|
|
|
+ </div>
|
|
|
</layout-content>
|
|
</layout-content>
|
|
|
</layout>
|
|
</layout>
|
|
|
</layout>
|
|
</layout>
|
|
@@ -177,7 +194,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
|
- import { ref, reactive, onMounted, computed } from 'vue'
|
|
|
|
|
|
|
+ import { ref, reactive, onMounted, onUnmounted, onActivated, onDeactivated, nextTick, computed } from 'vue'
|
|
|
import { Layout, LayoutSider, LayoutContent, LayoutHeader } from '@arco-design/web-vue'
|
|
import { Layout, LayoutSider, LayoutContent, LayoutHeader } from '@arco-design/web-vue'
|
|
|
import {
|
|
import {
|
|
|
orderBomList, FabricEdit, Approval, AccessoriesInboundTime,
|
|
orderBomList, FabricEdit, Approval, AccessoriesInboundTime,
|
|
@@ -195,6 +212,84 @@
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
const _username = ref('')
|
|
const _username = ref('')
|
|
|
_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
_username.value = userStore.userInfo.userName + '/' + userStore.userInfo.nickName
|
|
|
|
|
+
|
|
|
|
|
+ const dahuobaobiaoPageRef = ref(null)
|
|
|
|
|
+ const mainTableWrapRef = ref(null)
|
|
|
|
|
+ const detailTableWrapRef = ref(null)
|
|
|
|
|
+ const mainTableHeight = ref(320)
|
|
|
|
|
+ const detailTableHeight = ref(220)
|
|
|
|
|
+ let tableLayoutResizeObserver = null
|
|
|
|
|
+ let mainElResizeObserver = null
|
|
|
|
|
+ let layoutMainEl = null
|
|
|
|
|
+ let layoutMainOverflowSaved = ''
|
|
|
|
|
+
|
|
|
|
|
+ const syncDahuobaobiaoPageHeight = () => {
|
|
|
|
|
+ const root = dahuobaobiaoPageRef.value
|
|
|
|
|
+ if (!root) return
|
|
|
|
|
+ const main = root.closest('.el-main')
|
|
|
|
|
+ if (!main) return
|
|
|
|
|
+ const mainBr = main.getBoundingClientRect()
|
|
|
|
|
+ const rootBr = root.getBoundingClientRect()
|
|
|
|
|
+ let h = Math.floor(mainBr.bottom - rootBr.top - 8)
|
|
|
|
|
+ if (!Number.isFinite(h) || h < 120) {
|
|
|
|
|
+ const cs = getComputedStyle(main)
|
|
|
|
|
+ const padY = (parseFloat(cs.paddingTop) || 0) + (parseFloat(cs.paddingBottom) || 0)
|
|
|
|
|
+ h = Math.max(120, main.clientHeight - padY - 8)
|
|
|
|
|
+ }
|
|
|
|
|
+ root.style.height = `${h}px`
|
|
|
|
|
+ root.style.maxHeight = `${h}px`
|
|
|
|
|
+ root.style.minHeight = '0'
|
|
|
|
|
+ root.style.overflow = 'hidden'
|
|
|
|
|
+ updateTableHeights()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const onPageLayoutResize = () => {
|
|
|
|
|
+ syncDahuobaobiaoPageHeight()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const lockLayoutMainOverflow = () => {
|
|
|
|
|
+ const main = dahuobaobiaoPageRef.value?.closest?.('.el-main')
|
|
|
|
|
+ if (!main) return
|
|
|
|
|
+ if (layoutMainEl !== main) {
|
|
|
|
|
+ layoutMainOverflowSaved = main.style.overflow || ''
|
|
|
|
|
+ }
|
|
|
|
|
+ layoutMainEl = main
|
|
|
|
|
+ main.style.overflow = 'hidden'
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const restoreLayoutMainOverflow = () => {
|
|
|
|
|
+ if (layoutMainEl) {
|
|
|
|
|
+ layoutMainEl.style.overflow = layoutMainOverflowSaved
|
|
|
|
|
+ }
|
|
|
|
|
+ layoutMainEl = null
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const updateTableHeights = () => {
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ requestAnimationFrame(() => {
|
|
|
|
|
+ const mainH = mainTableWrapRef.value?.clientHeight || 0
|
|
|
|
|
+ const detailH = detailTableWrapRef.value?.clientHeight || 0
|
|
|
|
|
+ if (mainH > 120) {
|
|
|
|
|
+ mainTableHeight.value = Math.floor(mainH)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (detailH > 100) {
|
|
|
|
|
+ detailTableHeight.value = Math.floor(detailH)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const attachTableLayoutResizeObserver = () => {
|
|
|
|
|
+ tableLayoutResizeObserver?.disconnect()
|
|
|
|
|
+ if (typeof ResizeObserver === 'undefined') return
|
|
|
|
|
+ tableLayoutResizeObserver = new ResizeObserver(updateTableHeights)
|
|
|
|
|
+ if (mainTableWrapRef.value) {
|
|
|
|
|
+ tableLayoutResizeObserver.observe(mainTableWrapRef.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (detailTableWrapRef.value) {
|
|
|
|
|
+ tableLayoutResizeObserver.observe(detailTableWrapRef.value)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
// 左侧树形数据
|
|
// 左侧树形数据
|
|
@@ -207,7 +302,7 @@
|
|
|
const tableData = reactive([])
|
|
const tableData = reactive([])
|
|
|
const page = ref(1)
|
|
const page = ref(1)
|
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
|
- const pageSize = ref(30)
|
|
|
|
|
|
|
+ const pageSize = ref(100)
|
|
|
/** 列表查询方式:month 按月份 / search 按关键字 */
|
|
/** 列表查询方式:month 按月份 / search 按关键字 */
|
|
|
const listQueryMode = ref('month')
|
|
const listQueryMode = ref('month')
|
|
|
|
|
|
|
@@ -231,8 +326,8 @@
|
|
|
const sortedData = [...(list || [])].sort((a, b) => {
|
|
const sortedData = [...(list || [])].sort((a, b) => {
|
|
|
return (a['货期'] || '').localeCompare(b['货期'] || '')
|
|
return (a['货期'] || '').localeCompare(b['货期'] || '')
|
|
|
})
|
|
})
|
|
|
- const formattedData = sortedData.map((item, index) =>
|
|
|
|
|
- initRowPlanGroupPath({
|
|
|
|
|
|
|
+ const formattedData = sortedData.map((item, index) => {
|
|
|
|
|
+ const row = initRowPlanGroupPath({
|
|
|
ID: rowOffset + index + 1,
|
|
ID: rowOffset + index + 1,
|
|
|
...item,
|
|
...item,
|
|
|
'下单日期': formatDate(item['下单日期']),
|
|
'下单日期': formatDate(item['下单日期']),
|
|
@@ -243,10 +338,15 @@
|
|
|
'车位完成日期': formatDate(item['车位完成日期']),
|
|
'车位完成日期': formatDate(item['车位完成日期']),
|
|
|
'后道完成日期': formatDate(item['后道完成日期']),
|
|
'后道完成日期': formatDate(item['后道完成日期']),
|
|
|
})
|
|
})
|
|
|
- )
|
|
|
|
|
|
|
+ row.辅料计划入库时间 = stripDateTime(row.辅料计划入库时间)
|
|
|
|
|
+ row.核批日期 = stripDateTime(row.核批日期)
|
|
|
|
|
+ initRowEditableSavedState(row)
|
|
|
|
|
+ return row
|
|
|
|
|
+ })
|
|
|
tableData.splice(0, tableData.length, ...formattedData)
|
|
tableData.splice(0, tableData.length, ...formattedData)
|
|
|
total.value = totalCount
|
|
total.value = totalCount
|
|
|
bomData.value = []
|
|
bomData.value = []
|
|
|
|
|
+ updateTableHeights()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/** 请求列表(服务端分页:page + limit) */
|
|
/** 请求列表(服务端分页:page + limit) */
|
|
@@ -384,6 +484,41 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const planGroupSavedMap = new WeakMap()
|
|
const planGroupSavedMap = new WeakMap()
|
|
|
|
|
+ const planGroupFocusMap = new WeakMap()
|
|
|
|
|
+ const accessoryDateSavedMap = new WeakMap()
|
|
|
|
|
+ const approvalDateSavedMap = new WeakMap()
|
|
|
|
|
+ const planDateSavedMap = new WeakMap()
|
|
|
|
|
+
|
|
|
|
|
+ const stripDateTime = (val) => {
|
|
|
|
|
+ if (val == null || String(val).trim() === '') return ''
|
|
|
|
|
+ const s = String(val).trim()
|
|
|
|
|
+ const matched = s.match(/^(\d{4}-\d{2}-\d{2})/)
|
|
|
|
|
+ if (matched) return matched[1]
|
|
|
|
|
+ if (s.includes(' ')) return s.split(' ')[0]
|
|
|
|
|
+ return s
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const normalizeDateVal = (val) => {
|
|
|
|
|
+ if (val == null || String(val).trim() === '') return ''
|
|
|
|
|
+ return stripDateTime(val)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const initRowEditableSavedState = (row) => {
|
|
|
|
|
+ planGroupSavedMap.set(row, String(row['计划生产小组'] ?? '').trim())
|
|
|
|
|
+ accessoryDateSavedMap.set(row, normalizeDateVal(row.辅料计划入库时间))
|
|
|
|
|
+ approvalDateSavedMap.set(row, normalizeDateVal(row.核批日期))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const initBomRowSavedState = (row) => {
|
|
|
|
|
+ row.核批日期 = stripDateTime(row.核批日期)
|
|
|
|
|
+ row.计划入库时间 = stripDateTime(row.计划入库时间)
|
|
|
|
|
+ row.实际入库时间 = stripDateTime(row.实际入库时间)
|
|
|
|
|
+ planDateSavedMap.set(row, normalizeDateVal(row.计划入库时间))
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const onPlanGroupFocus = (row) => {
|
|
|
|
|
+ planGroupFocusMap.set(row, String(row['计划生产小组'] ?? '').trim())
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const queryPlanGroupSuggestions = (queryString, cb) => {
|
|
const queryPlanGroupSuggestions = (queryString, cb) => {
|
|
|
const q = String(queryString ?? '').trim().toLowerCase()
|
|
const q = String(queryString ?? '').trim().toLowerCase()
|
|
@@ -403,9 +538,14 @@
|
|
|
if (ok) planGroupSavedMap.set(row, name)
|
|
if (ok) planGroupSavedMap.set(row, name)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /** 自定义输入后未点选下拉项,失焦时也会保存 */
|
|
|
|
|
|
|
+ /** 自定义输入后未点选下拉项,失焦时也会保存(仅值有变化时) */
|
|
|
const savePlanGroupRowOnBlur = async (row) => {
|
|
const savePlanGroupRowOnBlur = async (row) => {
|
|
|
- await savePlanGroupRow(row, row['计划生产小组'])
|
|
|
|
|
|
|
+ if (!planGroupFocusMap.has(row)) return
|
|
|
|
|
+ const before = planGroupFocusMap.get(row)
|
|
|
|
|
+ planGroupFocusMap.delete(row)
|
|
|
|
|
+ const current = String(row['计划生产小组'] ?? '').trim()
|
|
|
|
|
+ if (before === current) return
|
|
|
|
|
+ await savePlanGroupRow(row, current)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const loadPlanGroupOptions = async () => {
|
|
const loadPlanGroupOptions = async () => {
|
|
@@ -531,7 +671,9 @@
|
|
|
// 获取BOM数据
|
|
// 获取BOM数据
|
|
|
const orderBomListdata = await orderBomList({ order: row.订单编号 });
|
|
const orderBomListdata = await orderBomList({ order: row.订单编号 });
|
|
|
if (orderBomListdata.code === 0) {
|
|
if (orderBomListdata.code === 0) {
|
|
|
- bomData.value = orderBomListdata.data;
|
|
|
|
|
|
|
+ bomData.value = orderBomListdata.data
|
|
|
|
|
+ bomData.value.forEach((item) => initBomRowSavedState(item))
|
|
|
|
|
+ updateTableHeights()
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error('获取BOM数据失败');
|
|
ElMessage.error('获取BOM数据失败');
|
|
|
}
|
|
}
|
|
@@ -708,10 +850,48 @@
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getDateList();
|
|
getDateList();
|
|
|
loadPlanGroupOptions();
|
|
loadPlanGroupOptions();
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ lockLayoutMainOverflow()
|
|
|
|
|
+ syncDahuobaobiaoPageHeight()
|
|
|
|
|
+ requestAnimationFrame(() => {
|
|
|
|
|
+ syncDahuobaobiaoPageHeight()
|
|
|
|
|
+ attachTableLayoutResizeObserver()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ window.addEventListener('resize', onPageLayoutResize)
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ const mainEl = dahuobaobiaoPageRef.value?.closest?.('.el-main')
|
|
|
|
|
+ if (mainEl) {
|
|
|
|
|
+ mainElResizeObserver = new ResizeObserver(onPageLayoutResize)
|
|
|
|
|
+ mainElResizeObserver.observe(mainEl)
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ onUnmounted(() => {
|
|
|
|
|
+ window.removeEventListener('resize', onPageLayoutResize)
|
|
|
|
|
+ tableLayoutResizeObserver?.disconnect()
|
|
|
|
|
+ mainElResizeObserver?.disconnect()
|
|
|
|
|
+ restoreLayoutMainOverflow()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ onActivated(() => {
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ lockLayoutMainOverflow()
|
|
|
|
|
+ syncDahuobaobiaoPageHeight()
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ onDeactivated(() => {
|
|
|
|
|
+ restoreLayoutMainOverflow()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 计划入库时间编辑相关
|
|
// 计划入库时间编辑相关
|
|
|
const handlePlanDateChange = async (row, newDate) => {
|
|
const handlePlanDateChange = async (row, newDate) => {
|
|
|
|
|
+ const next = normalizeDateVal(newDate ?? row.计划入库时间)
|
|
|
|
|
+ const saved = normalizeDateVal(planDateSavedMap.get(row))
|
|
|
|
|
+ if (saved === next) return
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
const formattedData = [{
|
|
const formattedData = [{
|
|
|
BOM_工单编号: selectedOrder.value.订单编号,
|
|
BOM_工单编号: selectedOrder.value.订单编号,
|
|
@@ -737,6 +917,7 @@
|
|
|
|
|
|
|
|
const add_FabricEditdata = await FabricEdit(formattedData);
|
|
const add_FabricEditdata = await FabricEdit(formattedData);
|
|
|
if (add_FabricEditdata.code === 0) {
|
|
if (add_FabricEditdata.code === 0) {
|
|
|
|
|
+ planDateSavedMap.set(row, next)
|
|
|
ElMessage.success('修改成功');
|
|
ElMessage.success('修改成功');
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error('修改失败');
|
|
ElMessage.error('修改失败');
|
|
@@ -749,6 +930,10 @@
|
|
|
|
|
|
|
|
// 样衣核批日期编辑相关
|
|
// 样衣核批日期编辑相关
|
|
|
const handleApprovalDateChange = async (row, newDate) => {
|
|
const handleApprovalDateChange = async (row, newDate) => {
|
|
|
|
|
+ const next = normalizeDateVal(newDate ?? row.核批日期)
|
|
|
|
|
+ const saved = normalizeDateVal(approvalDateSavedMap.get(row))
|
|
|
|
|
+ if (saved === next) return
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
if (!row.Uniqid) {
|
|
if (!row.Uniqid) {
|
|
|
ElMessage.error('缺少Uniqid,无法提交');
|
|
ElMessage.error('缺少Uniqid,无法提交');
|
|
@@ -765,6 +950,7 @@
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
|
|
+ approvalDateSavedMap.set(row, next)
|
|
|
ElMessage.success('样衣核批提交成功');
|
|
ElMessage.success('样衣核批提交成功');
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error('样衣核批提交失败');
|
|
ElMessage.error('样衣核批提交失败');
|
|
@@ -777,6 +963,10 @@
|
|
|
|
|
|
|
|
/** 辅料计划入库时间:AccessoriesInboundTime 传 Uniqid + rq(日期) + sys_id(不传 计划生产小组) */
|
|
/** 辅料计划入库时间:AccessoriesInboundTime 传 Uniqid + rq(日期) + sys_id(不传 计划生产小组) */
|
|
|
const handleAccessoryDateChange = async (row, newDate) => {
|
|
const handleAccessoryDateChange = async (row, newDate) => {
|
|
|
|
|
+ const next = normalizeDateVal(newDate ?? row.辅料计划入库时间)
|
|
|
|
|
+ const saved = normalizeDateVal(accessoryDateSavedMap.get(row))
|
|
|
|
|
+ if (saved === next) return
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
if (!row.Uniqid) {
|
|
if (!row.Uniqid) {
|
|
|
ElMessage.error('缺少Uniqid,无法提交');
|
|
ElMessage.error('缺少Uniqid,无法提交');
|
|
@@ -793,6 +983,7 @@
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
if (response.code === 0) {
|
|
if (response.code === 0) {
|
|
|
|
|
+ accessoryDateSavedMap.set(row, next)
|
|
|
ElMessage.success('辅料计划入库时间修改成功');
|
|
ElMessage.success('辅料计划入库时间修改成功');
|
|
|
} else {
|
|
} else {
|
|
|
ElMessage.error('辅料计划入库时间修改失败');
|
|
ElMessage.error('辅料计划入库时间修改失败');
|
|
@@ -1002,6 +1193,7 @@
|
|
|
padding: 10px 20px;
|
|
padding: 10px 20px;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
border-bottom: 1px solid #e8e8e8;
|
|
border-bottom: 1px solid #e8e8e8;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.action-buttons {
|
|
.action-buttons {
|
|
@@ -1010,60 +1202,178 @@
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 左右栏底部对齐:侧栏与右侧双表区域同高 */
|
|
|
|
|
|
|
+ .dahuobaobiao-page {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-page > :deep(.dahuobaobiao-root),
|
|
|
|
|
+ .dahuobaobiao-page > :deep(.arco-layout) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-root {
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-root :deep(.arco-layout-header) {
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /* 左右栏同高,底部对齐 */
|
|
|
|
|
+ .dahuobaobiao-root :deep(.dahuobaobiao-body-layout) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ display: flex !important;
|
|
|
|
|
+ flex-direction: row !important;
|
|
|
|
|
+ align-items: stretch !important;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.dahuobaobiao-body-layout {
|
|
.dahuobaobiao-body-layout {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
align-items: stretch !important;
|
|
align-items: stretch !important;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-page :deep(.arco-layout-has-sider) {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ overflow: hidden;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-sider {
|
|
.dahuobaobiao-sider {
|
|
|
margin-right: 0 !important;
|
|
margin-right: 0 !important;
|
|
|
align-self: stretch !important;
|
|
align-self: stretch !important;
|
|
|
|
|
+ height: auto !important;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ background: #fff;
|
|
|
|
|
+ border-right: 1px solid #e8e8e8;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-body-layout :deep(.arco-layout-sider) {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-self: stretch !important;
|
|
|
|
|
+ height: auto !important;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+ padding-bottom: 0 !important;
|
|
|
|
|
+ background: #fff;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-body-layout :deep(.arco-layout-sider-children) {
|
|
.dahuobaobiao-body-layout :deep(.arco-layout-sider-children) {
|
|
|
|
|
+ flex: 1;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
- padding-bottom: 10px !important;
|
|
|
|
|
|
|
+ padding: 0 !important;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
+ min-height: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-content {
|
|
.dahuobaobiao-content {
|
|
|
padding-left: 0 !important;
|
|
padding-left: 0 !important;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ height: auto !important;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+ align-self: stretch !important;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-body-layout :deep(.arco-layout-content) {
|
|
.dahuobaobiao-body-layout :deep(.arco-layout-content) {
|
|
|
padding-bottom: 0 !important;
|
|
padding-bottom: 0 !important;
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ height: auto !important;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-main {
|
|
.dahuobaobiao-main {
|
|
|
- padding: 0 10px 10px 0 !important;
|
|
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ padding: 0 10px 0 0 !important;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: 0;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-panel {
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-panel--main {
|
|
|
|
|
+ flex: 3;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-panel--detail {
|
|
|
|
|
+ flex: 2;
|
|
|
|
|
+ min-height: 160px;
|
|
|
|
|
+ margin-top: 0;
|
|
|
|
|
+ padding-top: 0;
|
|
|
|
|
+ border-top: none;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .dahuobaobiao-detail-box {
|
|
|
|
|
- margin-top: 6px;
|
|
|
|
|
|
|
+ .dahuobaobiao-table-wrap {
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-table-wrap--main {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-table-wrap--detail {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ min-height: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.dahuobaobiao-detail-title {
|
|
.dahuobaobiao-detail-title {
|
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
- margin: 0 0 6px;
|
|
|
|
|
|
|
+ margin: 0 0 4px;
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
line-height: 1.4;
|
|
line-height: 1.4;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- /* 左侧树状图区域:高度与右侧 40vh+30vh 及分页、标题区一致 */
|
|
|
|
|
|
|
+ /* 左侧树状图:撑满侧栏高度,与右侧表格底部对齐 */
|
|
|
.dahuobaobiao-sider .JKWTree-tree {
|
|
.dahuobaobiao-sider .JKWTree-tree {
|
|
|
- flex: 1;
|
|
|
|
|
- min-height: calc(70vh + 72px);
|
|
|
|
|
- height: calc(70vh + 72px);
|
|
|
|
|
- max-height: calc(70vh + 72px);
|
|
|
|
|
|
|
+ flex: 1 1 auto;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ min-height: 100%;
|
|
|
|
|
+ max-height: none;
|
|
|
overflow-x: hidden;
|
|
overflow-x: hidden;
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
padding: 10px 6px 10px 10px;
|
|
padding: 10px 6px 10px 10px;
|
|
|
background: #fff;
|
|
background: #fff;
|
|
|
- border-right: 1px solid #e8e8e8;
|
|
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1080,6 +1390,19 @@
|
|
|
|
|
|
|
|
.gva-pagination {
|
|
.gva-pagination {
|
|
|
text-align: right;
|
|
text-align: right;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
|
+ padding: 0;
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-panel--main .gva-pagination {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .dahuobaobiao-panel--main :deep(.el-pagination) {
|
|
|
|
|
+ margin-top: 0;
|
|
|
|
|
+ padding-top: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 表格单元格样式 */
|
|
/* 表格单元格样式 */
|