Browse Source

采购员,隐藏筛选按钮

master_hella_20240701
yufei0306 7 months ago
parent
commit
f8a9e4e133
  1. 5
      src/components/BasicForm/src/BasicForm.vue
  2. 18
      src/components/Form/src/Form.vue
  3. 17
      src/components/SearchTable/src/SearchTable.vue
  4. 1
      src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

5
src/components/BasicForm/src/BasicForm.vue

@ -15,6 +15,7 @@
:schema="formSchema" :schema="formSchema"
:is-col="true" :is-col="true"
@opensearchTable="opensearchTable" @opensearchTable="opensearchTable"
@hiddenFilterButton="hiddenSearchTableFilterButton"
@clearSearchInput="clearSearchInput" @clearSearchInput="clearSearchInput"
@onChange="onChange" @onChange="onChange"
@onBlur="onBlur" @onBlur="onBlur"
@ -433,7 +434,9 @@ const opensearchTable = (
searchDetailSchemas searchDetailSchemas
) )
} }
const hiddenSearchTableFilterButton = ()=>{
searchTableRef.value.hiddenFilterButton()
}
const clearSearchInput = (field)=>{ const clearSearchInput = (field)=>{
emit('clearSearchInput',field) emit('clearSearchInput',field)
} }

18
src/components/Form/src/Form.vue

@ -55,7 +55,7 @@ export default defineComponent({
vLoading: propTypes.bool.def(false), vLoading: propTypes.bool.def(false),
labelPosition: propTypes.string.def('left'), labelPosition: propTypes.string.def('left'),
}, },
emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter'], emits: ['register','opensearchTable','clearSearchInput', 'onChange', 'onBlur','onEnter','hiddenFilterButton'],
setup(props, { slots, expose, emit }) { setup(props, { slots, expose, emit }) {
// element form // element form
const elFormRef = ref<ComponentRef<typeof ElForm>>() const elFormRef = ref<ComponentRef<typeof ElForm>>()
@ -278,7 +278,14 @@ export default defineComponent({
item?.componentProps?.multiple, item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas, item?.componentProps?.isConcatDetailSchemas,
item?.componentProps?.searchDetailSchemas, item?.componentProps?.searchDetailSchemas,
)}}/> )
//
if(item?.componentProps?.hiddenFilterButton){
emit('hiddenFilterButton')
}
}}/>
</> </>
) )
} }
@ -316,7 +323,12 @@ export default defineComponent({
item?.componentProps?.multiple, item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas, item?.componentProps?.isConcatDetailSchemas,
item?.componentProps?.searchDetailSchemas, item?.componentProps?.searchDetailSchemas,
)}}/> )
//
if(item?.componentProps?.hiddenFilterButton){
emit('hiddenFilterButton')
}
}}/>
</> </>
) )
} }

17
src/components/SearchTable/src/SearchTable.vue

@ -50,9 +50,9 @@ const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
// //
const HeadButttondata = [ const HeadButttondata = ref([
defaultButtons.defaultFilterBtn(null), // defaultButtons.defaultFilterBtn(null), //
] ])
/** 打开弹窗 */ /** 打开弹窗 */
const getListRef = ref() const getListRef = ref()
@ -70,6 +70,9 @@ const multipleBol = ref(false)
const searchConditionRef = ref() const searchConditionRef = ref()
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => { const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
dialogTitle.value = titleName dialogTitle.value = titleName
tableObjectRef.value = tableObject tableObjectRef.value = tableObject
searchDialogVisible.value = true searchDialogVisible.value = true
@ -79,6 +82,10 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
tableColumns.value = allSchemas.tableColumns tableColumns.value = allSchemas.tableColumns
} }
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => { const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
searchDialogVisible.value = true searchDialogVisible.value = true
formFieldRef.value = formField formFieldRef.value = formField
searchFieldRef.value = searchField searchFieldRef.value = searchField
@ -112,6 +119,10 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getList() getList()
} }
const hiddenFilterButton = ()=>{
HeadButttondata.value = []
}
// //
const searchFormClick = (searchData) => { const searchFormClick = (searchData) => {
console.log(99, rowRef.value) console.log(99, rowRef.value)
@ -153,7 +164,7 @@ const searchFormClick = (searchData) => {
getListRef.value() // getListRef.value() //
} }
defineExpose({ open,openData }) // open defineExpose({ open,openData,hiddenFilterButton }) // open
// Table ref // Table ref
const searchTableRef = ref() const searchTableRef = ref()

1
src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/supplierinvoiceRequestMain.data.ts

@ -518,6 +518,7 @@ export const SupplierinvoiceRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
// labelMessage: '信息提示说明!!!', // labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
isSearchList: true, // 开启查询弹窗 isSearchList: true, // 开启查询弹窗
hiddenFilterButton:true,//是否隐藏筛选按钮
searchListPlaceholder: '请选择采购员', // 输入框占位文本 searchListPlaceholder: '请选择采购员', // 输入框占位文本
searchField: 'id', // 查询弹窗赋值字段 searchField: 'id', // 查询弹窗赋值字段
searchTitle: '采购员信息', // 查询弹窗标题 searchTitle: '采购员信息', // 查询弹窗标题

Loading…
Cancel
Save