Browse Source

tableForm验证

master
zhangli 1 year ago
parent
commit
0560afde25
  1. 10
      src/components/BasicForm/src/BasicForm.vue
  2. 7
      src/components/TableForm/src/TableForm.vue
  3. 5
      src/utils/disposition/tableColumns.ts
  4. 1
      src/views/wms/itempackaging/index.vue

10
src/components/BasicForm/src/BasicForm.vue

@ -1,7 +1,7 @@
<template> <template>
<Dialog :title="dialogTitle" v-model="dialogVisible"> <Dialog :title="dialogTitle" v-model="dialogVisible">
<Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="formSchema" :is-col="true" /> <Form ref="formRef" v-loading="formLoading" :rules="rules" :schema="formSchema" :is-col="true" />
<div class="table"> <div class="table" v-if="isBusiness">
<TableForm ref="tableFormRef" <TableForm ref="tableFormRef"
class="w-[100%]" class="w-[100%]"
:tableFields="tableAllSchemas.tableFormColumns" :tableFields="tableAllSchemas.tableFormColumns"
@ -94,6 +94,12 @@ const props = defineProps({
type: Function, type: Function,
required: true, required: true,
default: null default: null
},
// tableForm
isBusiness: {
type: Boolean,
required: true,
default: true
} }
}) })
@ -244,6 +250,8 @@ const handleAddTable = () => {
} }
// //
const inpuFocus = (headerItem) => { const inpuFocus = (headerItem) => {
console.log(11);
opensearchTable() opensearchTable()
} }
</script> </script>

7
src/components/TableForm/src/TableForm.vue

@ -384,6 +384,7 @@ const handleAddTable = () => {
} }
// //
const inpuFocus = (headerItem)=>{ const inpuFocus = (headerItem)=>{
if(headerItem?.tableForm?.isInpuFocusShow){ if(headerItem?.tableForm?.isInpuFocusShow){
emit('inpuFocus') emit('inpuFocus')
} }
@ -394,12 +395,6 @@ defineExpose({
validateForm validateForm
}) })
/** 弹层操作 */
const searchTableRef = ref()
const opensearchTable = () => {
searchTableRef.value.open('信息', props.searchTableAllSchemas, props.searchTablePage)
}
</script> </script>

5
src/utils/disposition/tableColumns.ts

@ -5898,7 +5898,10 @@ export const PurchaseclaimRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const PurchaseclaimRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '批次', label: '批次',
field: 'batch' field: 'batch',
tableForm:{
isInpuFocusShow:true
}
}, },
{ {
label: '替代批次', label: '替代批次',

1
src/views/wms/itempackaging/index.vue

@ -68,6 +68,7 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'Itempackaging' }) defineOptions({ name: 'Itempackaging' })
console.log(PurchaseclaimRequestDetail.allSchemas);
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //

Loading…
Cancel
Save