schangxiang@126.com
2025-05-13 9cf7b57cd6f3d56a80a5925add2d8dabee28437f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * 物料基础信息查询弹出框
 */
import { SetupContext, defineComponent } from 'vue'
import BaseQueryDrawer from '@/components/BaseQueryDrawer/BaseQueryDrawer'
import styles from './WmsMaterialStockQueryDrawer.module.scss'
import { useWmsMaterialStockQueryDrawer } from '../../../../Controllers/WmsMaterialStockQueryDrawer.tsx'
import DyForm from '@/components/DyForm/DyForm'
 
// @ts-ignore
export default defineComponent<{
  [key: string]: any
}>({
  name: '弹窗',
  props: {
    //枚举类型字典
    enumListDict: {
      type: Array as () => Array<{ key: string; value: object }>, // 定义数组元素类型
      default: () => [], // 默认值
    },
    modelValue: {
      type: Boolean,
      default: false,
    },
    title: {
      type: String,
      default: '',
    },
    row: {
      type: Object,
    },
    sort: {
      type: Number,
      default: 0,
    },
  },
  emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'],
  setup(props: Record<string, any>, ctx: SetupContext) {
    const {
      onClose,
      onConfirmQuery,
      onOpen,
      onReset,
      formRef,
      visible,
      formItems,
      formData,
    } = useWmsMaterialStockQueryDrawer(props, ctx)
    return () => (
      <BaseQueryDrawer
        class={styles.drawer}
        size="800px"
        title={props.title || '高级查询'}
        v-model={visible.value}
        close-on-click-modal={true}
        onReset={onReset}
        onConfirmQueryForBase={onConfirmQuery}
        onOpen={onOpen}
        before-close={onClose}
        onClose={onClose}
      >
        <DyForm
          ref={formRef}
          formData={formData.value}
          labelWidth="106px"
          formItemProps={formItems}
        ></DyForm>
      </BaseQueryDrawer>
    )
  },
})