Browse Source

HL-4981SCP 供应商发货申请,新增时,明细中存在多条明细,无法同时查看下面的数据和表头

hella_online_20240829
wangyufei 3 months ago
parent
commit
f58e702552
  1. 63
      src/components/BasicForm/src/BasicForm.vue
  2. 12
      src/components/CollectionTable/src/CollectionTable.vue
  3. 12
      src/components/TableForm/src/TableForm.vue
  4. 5
      src/directives/permission/clientTable.ts
  5. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

63
src/components/BasicForm/src/BasicForm.vue

@ -89,6 +89,8 @@
<TableForm
ref="tableFormRef"
class="w-[100%]"
:fixedScrollHieght="fixedScrollHieght"
:maxHeight="fixedScrollHieght?'auto':490"
:tableFields="tableAllSchemas.tableFormColumns"
:tableData="tableData"
:tableFormRules="tableFormRules"
@ -137,6 +139,7 @@
</div>
<div v-if="includeCollectionTable&&formType=='create'&&tableAllSchemas&&tableAllSchemas.tableFormColumns.find(item=>item.field == 'itemCode')" v-show="tabSheet=='CollectionTable'">
<CollectionTable
:fixedScrollHieght="fixedScrollHieght"
:tableFields="tableAllSchemas?tableAllSchemas.tableFormColumns:[]"
:tableData="tableData"
></CollectionTable>
@ -381,6 +384,11 @@ const props = defineProps({
type:Boolean,
default:false
},
//
fixedScrollHieght:{
type:Boolean,
default:false
}
})
const { t } = useI18n() //
@ -394,14 +402,25 @@ if (props.basicFormWidth) {
const collectionRef = ref()
const updateFullscreen = (isFullscreen) => {
if(props.fixedScrollHieght){
formHeight.value.height = isFullscreen ? 'auto' : '60vh'
nextTick(()=>{
tableFormRef.value?.reloadFullscreen(isFullscreen)
collectionRef.value?.reloadFullscreen(isFullscreen)
})
}else{
if(isFullscreen){
formHeight.value = {
'max-height':'100%',
}
}else{
formHeight.value = {
'max-height': '60vh'
}
}
}
}
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
@ -417,23 +436,14 @@ const routeName = ref('')
const sureDisabled = ref(false)
const tabSheet = ref('TableForm')
routeName.value = route.name
const formHeight = ref({
'max-height': '60vh'
})
const formHeight = ref({})
const tabChange = (item) => {
tabSheet.value = item.prop
}
// if(!props.tableAllSchemas||formType.value!='create'){
// formHeight.value = {
// height:'auto'
// }
// }else{
// formHeight.value = {
// height:'60vh'
// }
// }
// -
// const buttondata = [
// defaultButtons.mainListEditBtn(null), //
@ -683,15 +693,24 @@ const open = async (
dialogTitle.value = t('action.' + type)
}
formType.value = type
// if(!props.tableAllSchemas||formType.value!='create'){
// formHeight.value = {
// height:'auto'
// }
// }else{
// formHeight.value = {
// height:'60vh'
// }
// }
if(props.fixedScrollHieght){
if(!props.tableAllSchemas||formType.value!='create'){
formHeight.value = {
height:'auto'
}
}else{
formHeight.value = {
height:'70vh'
}
}
}else{
formHeight.value = {
'max-height': '60vh'
}
}
resetForm()
count.value = 0
//

12
src/components/CollectionTable/src/CollectionTable.vue

@ -7,7 +7,12 @@
isShowButton: false,
isFullscreen:isFullscreen
}" -->
<el-table class="collection" :data="showList" border :style="{width:tableWidth+'px'}">
<el-table v-clientTableForm="{
fixedScrollHieght:fixedScrollHieght,
isShowPagination:false,
isShowButton: false,
isFullscreen:isFullscreen
}" class="collection" :data="showList" border :style="{width:tableWidth+'px'}">
<el-table-column type="index" width="60" label="序号" align="center"/>
<el-table-column border row-key="id"
v-for="headerItem in fields.filter((item) => !!item.checked)"
@ -41,6 +46,11 @@ const props = defineProps({
default: () => {
return []
}
},
//
fixedScrollHieght:{
type:Boolean,
default:false
}
})

12
src/components/TableForm/src/TableForm.vue

@ -7,7 +7,12 @@
isShowButton: isShowButton || isShowReduceButtonSelection,
isFullscreen:isFullscreen
}" -->
<el-table
<el-table v-clientTableForm="{
fixedScrollHieght:fixedScrollHieght,
isShowPagination:tableData.length > 10,
isShowButton: isShowButton || isShowReduceButtonSelection,
isFullscreen:isFullscreen
}"
class="multipleTableComponents"
ref="TableBaseComponents_Ref"
v-loading="tableLoading"
@ -516,6 +521,11 @@ const props = defineProps({
sureDisabled: {
type: Boolean,
default: false
},
//
fixedScrollHieght:{
type:Boolean,
default:false
}
})
let isShowTableFormSearch = ref({})

5
src/directives/permission/clientTable.ts

@ -43,7 +43,10 @@ export function clientTable(app: App<Element>) {
})
app.directive('clientTableForm', (el, binding) => {
nextTick(() => {
let {isShowPagination,isShowButton,isFullscreen} = binding.value
let {isShowPagination,isShowButton,isFullscreen,fixedScrollHieght} = binding.value
if(!fixedScrollHieght&&!isFullscreen){
return
}
let footerHeight = 0
let headerHeight = 0
el.offsetParent?.children?.forEach(element => {

1
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -3,6 +3,7 @@
<!-- 供应商发货申请 -->
<BasicForm
ref="formRef"
:fixedScrollHieght="true"
:isOpenSearchTable="true"
fieldTableColumn="poNumber"
@success="getList"

Loading…
Cancel
Save