Browse Source

采购收货申请

hella_online_20240829
zhang_li 4 months ago
parent
commit
4f57778086
  1. 33
      src/components/BasicForm/src/BasicForm.vue
  2. 11
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

33
src/components/BasicForm/src/BasicForm.vue

@ -134,8 +134,7 @@
:showSearchTableQueryFields="showSearchTableQueryFields" :showSearchTableQueryFields="showSearchTableQueryFields"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccess"
> >
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{ selections }">
<template v-for="name in Object.keys($slots)" :key="name" #[name]="{selections}">
<slot :name="name" :selections="selections"></slot> <slot :name="name" :selections="selections"></slot>
</template> </template>
</SearchTable> </SearchTable>
@ -845,16 +844,23 @@ const onBlur = async (field, e) => {
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch) { if (formSchemaObj?.enterSearch) {
await FormBlur(field, e, routeName.value, formRef.value, props.detailData, formSchemaObj, (list) => { await FormBlur(
field,
e,
routeName.value,
formRef.value,
props.detailData,
formSchemaObj,
(list) => {
emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form') emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form')
}) }
)
} else { } else {
emit('onBlur', field, e) emit('onBlur', field, e)
} }
isExecute.value = true isExecute.value = true
} }
// //
const batchAdd = async (val) => { const batchAdd = async (val) => {
const row = {} const row = {}
@ -921,8 +927,23 @@ const inputStringBlur = async (headerItem, val, row, index) => {
* @param field 当前操作字段 * @param field 当前操作字段
* @param e * @param e
*/ */
const onEnter = (field, value, e) => { const onEnter = async (field, value, e) => {
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps
if (formSchemaObj?.enterSearch && formSchemaObj?.isEnter ) {
await FormBlur(
field,
value,
routeName.value,
formRef.value,
props.detailData,
formSchemaObj,
(list) => {
emit('onEnter', field, value, e) emit('onEnter', field, value, e)
}
)
} else {
emit('onEnter', field, value, e)
}
} }
// //

11
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/purchasereceiptRequestMain.data.ts

@ -68,6 +68,7 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
searchDetailSchemas:PurchaseDetail.allSchemas, searchDetailSchemas:PurchaseDetail.allSchemas,
searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类 searchAllSchemas: PurchaseMain.allSchemas, // 查询弹窗所需类
searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法 searchPage: PurchaseDetailApi.getPurchaseDetailPageWMS, // 查询弹窗所需分页方法
isEnter:true,
searchCondition: [{ searchCondition: [{
key:'status', key:'status',
value:'2', value:'2',
@ -80,7 +81,15 @@ export const PurchasereceiptRequestMain = useCrudSchemas(reactive<CrudSchema[]>(
action: '==', // 查询拼接条件 action: '==', // 查询拼接条件
isSearch: true, // 使用自定义拼接条件 isSearch: true, // 使用自定义拼接条件
isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 isMainValue: false // 拼接条件必须要 false 同时不能与 isMainValue: true 同用
}] }],
verificationParams: [{
key: 'number',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
} }
}, },
isForm: true, isForm: true,

Loading…
Cancel
Save