Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-ui into master_hella

hella_online_20240829
songguoqiang 3 months ago
parent
commit
eea41932b7
  1. 73
      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. 6
      src/views/qms/inspectionRecord/index.vue
  6. 2
      src/views/qms/inspectionRecord/useAddForm.vue
  7. 1
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

73
src/components/BasicForm/src/BasicForm.vue

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

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

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

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

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

5
src/directives/permission/clientTable.ts

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

6
src/views/qms/inspectionRecord/index.vue

@ -281,13 +281,13 @@ const buttonTableClick = async (val, row) => {
// //
// 1使 // 1使
if (row.estimateCode == 1) { if (row.estimateCode == 1) {
InspectionRecordUser.allSchemas.formSchema.forEach((itemColumn) => { InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') { if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1) itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value == 1)
} }
}) })
} else if (row.estimateCode == 2) { } else if (row.estimateCode == 2) {
InspectionRecordUser.allSchemas.formSchema.forEach((itemColumn) => { InspectionRecordMain.allSchemas.formSchema.forEach((itemColumn) => {
if (itemColumn.field == 'useDecision') { if (itemColumn.field == 'useDecision') {
itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1) itemColumn.componentProps.options = useDecisionList?.filter((item) => item.value != 1)
} }
@ -430,9 +430,7 @@ const submitForm = async (formType, data) => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))
} }
formRef.value.dialogVisible = false formRef.value.dialogVisible = false
if (!data.isPublished) {
handleOrderPub(rowData.value) handleOrderPub(rowData.value)
}
// //
getList() getList()
} finally { } finally {

2
src/views/qms/inspectionRecord/useAddForm.vue

@ -140,7 +140,7 @@ const open = async (type: string, row?: any, masterParmas?: any, titleName?: any
if(row.estimateCode == 1){ if(row.estimateCode == 1){
data.value.useDecision = '1' data.value.useDecision = '1'
}else{ }else{
data.value.useDecision =row.useDecision||'' data.value.useDecision =''
} }
// == // ==
if(data.value.useDecision == 1){ if(data.value.useDecision == 1){

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

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

Loading…
Cancel
Save