Browse Source

采购员,隐藏筛选按钮

master_hella_20240701
yufei0306 6 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"
:is-col="true"
@opensearchTable="opensearchTable"
@hiddenFilterButton="hiddenSearchTableFilterButton"
@clearSearchInput="clearSearchInput"
@onChange="onChange"
@onBlur="onBlur"
@ -433,7 +434,9 @@ const opensearchTable = (
searchDetailSchemas
)
}
const hiddenSearchTableFilterButton = ()=>{
searchTableRef.value.hiddenFilterButton()
}
const clearSearchInput = (field)=>{
emit('clearSearchInput',field)
}

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

@ -55,7 +55,7 @@ export default defineComponent({
vLoading: propTypes.bool.def(false),
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 }) {
// element form
const elFormRef = ref<ComponentRef<typeof ElForm>>()
@ -278,7 +278,14 @@ export default defineComponent({
item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas,
item?.componentProps?.searchDetailSchemas,
)}}/>
)
//
if(item?.componentProps?.hiddenFilterButton){
emit('hiddenFilterButton')
}
}}/>
</>
)
}
@ -316,7 +323,12 @@ export default defineComponent({
item?.componentProps?.multiple,
item?.componentProps?.isConcatDetailSchemas,
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 HeadButttondata = [
const HeadButttondata = ref([
defaultButtons.defaultFilterBtn(null), //
]
])
/** 打开弹窗 */
const getListRef = ref()
@ -70,6 +70,9 @@ const multipleBol = ref(false)
const searchConditionRef = ref()
const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
dialogTitle.value = titleName
tableObjectRef.value = tableObject
searchDialogVisible.value = true
@ -79,6 +82,10 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
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) => {
HeadButttondata.value = [
defaultButtons.defaultFilterBtn(null), //
]
searchDialogVisible.value = true
formFieldRef.value = formField
searchFieldRef.value = searchField
@ -112,6 +119,10 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
getList()
}
const hiddenFilterButton = ()=>{
HeadButttondata.value = []
}
//
const searchFormClick = (searchData) => {
console.log(99, rowRef.value)
@ -153,7 +164,7 @@ const searchFormClick = (searchData) => {
getListRef.value() //
}
defineExpose({ open,openData }) // open
defineExpose({ open,openData,hiddenFilterButton }) // open
// Table 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: '信息提示说明!!!',
componentProps: {
isSearchList: true, // 开启查询弹窗
hiddenFilterButton:true,//是否隐藏筛选按钮
searchListPlaceholder: '请选择采购员', // 输入框占位文本
searchField: 'id', // 查询弹窗赋值字段
searchTitle: '采购员信息', // 查询弹窗标题

Loading…
Cancel
Save