| | |
| | | // default: false, |
| | | // }, |
| | | }, |
| | | emits: ['close', 'confirmQuery', 'update:modelValue', 'open', 'beforeClose'], |
| | | emits: ['close', 'confirmQueryForBase', 'update:modelValue', 'open', 'beforeClose'], |
| | | setup(props: any, { emit, slots, attrs }: any) { |
| | | // const size = computed(() => { |
| | | // if (attrs.size.includes('px')) { |
| | |
| | | å
³é |
| | | </el-button> |
| | | <el-button |
| | | onClick={() => emit('confirmQuery')} |
| | | onClick={() => emit('confirmQueryForBase')} |
| | | type="primary" |
| | | class={{ |
| | | [styles.csBaseBtn]: true, |
| | |
| | | * 确认æ¥è¯¢ |
| | | */ |
| | | const onConfirmQuery = async () => { |
| | | ElMessage.success('ç¹å»äºæ¥è¯¢æé®') |
| | | await formRef.value?.validate() |
| | | alert('ä½ æ¥åæå
鍿¹æ³äºå'); |
| | | |
| | | //await formRef.value?.validate() |
| | | const data = { |
| | | materialCode: formData.value.materialCode, |
| | | materialName: formData.value.materialName, |
| | |
| | | ElMessage.success('ä¿åæå') |
| | | //ctx.emit('confirmQuery') |
| | | //å¢å ä¼ éåæ° ãEditby shaocx,2025-05-03ã |
| | | debugger |
| | | console.log("æ°ä¼ éåæ°æ¯:"+data); |
| | | alert("æ°ä¼ éåæ°æ¯:"+data); |
| | | ctx.emit('confirmQuery',data) |
| | | } |
| | | |
| | |
| | | default: 0, |
| | | }, |
| | | }, |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirmquery'], |
| | | emits: ['update:modelValue', 'close', 'submit', 'confirmquery1'], |
| | | setup(props: Record<string, any>, ctx: SetupContext) { |
| | | const { |
| | | onClose, |
| | |
| | | title={props.title || 'é«çº§æ¥è¯¢'} |
| | | v-model={visible.value} |
| | | close-on-click-modal={true} |
| | | confirmQuery={onConfirmQuery} |
| | | onConfirmQueryForBase={onConfirmQuery} |
| | | onOpen={onOpen} |
| | | before-close={onClose} |
| | | onClose={onClose} |
| | |
| | | }) |
| | | |
| | | // æ°å¢çæ¥è¯¢æ¹æ³ |
| | | const handleQuery = async () => { |
| | | console.log('æ¥è¯¢æ¡ä»¶:', queryParams.value) |
| | | // tableRef.value.getTableList() |
| | | tableRef.value.getList(queryParams.value) |
| | | const handleQuery = async (extraParams = {}) => { |
| | | //console.log('æ°çæ¥è¯¢æ¡ä»¶:', extraParams) |
| | | //debugger |
| | | alert('è°ç¨handleQueryæ¹æ³'); |
| | | console.log('æ°çæ¥è¯¢æ¡ä»¶:', extraParams) |
| | | // è¿æ»¤æ undefined çå¼ |
| | | const filteredData = Object.assign( |
| | | {}, |
| | | ...Object.entries(extraParams).map(([key, value]) => (value !== undefined ? { [key]: value } : {})) |
| | | ); |
| | | |
| | | tableRef.value.getList(filteredData) |
| | | // debugger |
| | | // console.log('æ°çæ¥è¯¢æ¡ä»¶:', extraParams) |
| | | // tableRef.value.getList(extraParams) |
| | | // console.log('æ¥è¯¢æ¡ä»¶:', queryParams.value) |
| | | // // tableRef.value.getTableList() |
| | | // tableRef.value.getList(queryParams.value) |
| | | } |
| | | |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | |
| | | title={dialogConfigForQuery.title} |
| | | row={current.value} |
| | | sort={sort.value} |
| | | onConfirmQuery={onConfirmWmsMaterial} |
| | | onConfirmQuery={handleQuery} |
| | | /> |
| | | |
| | | {/* æ°å¢çæ¥è¯¢è¡¨å */} |
| | |
| | | onConfirm={onSearch} |
| | | style={{ marginTop: '-1px' }} |
| | | /> |
| | | <IconButton type="primary" icon="search" onClick={handleQuery}> |
| | | æ¥è¯¢ |
| | | </IconButton> |
| | | <IconButton |
| | | style="" |
| | | icon="refresh" |