|
|
@ -20,6 +20,7 @@ |
|
|
|
@onChange="onChange" |
|
|
|
@onBlur="onBlur" |
|
|
|
@onEnter="onEnter" |
|
|
|
@onFocus="onFocus" |
|
|
|
> |
|
|
|
<template #crontab="formSchema1" v-if="fromeWhere == 'countPlan'"> |
|
|
|
<crontab |
|
|
@ -105,6 +106,7 @@ |
|
|
|
@batchAdd="batchAdd" |
|
|
|
:routeName="routeName" |
|
|
|
@visibleChange="visibleChange" |
|
|
|
@inputStringFcous='inputStringFcous' |
|
|
|
> |
|
|
|
<template v-slot="{ row }"> |
|
|
|
<slot :row="row"></slot> |
|
|
@ -126,7 +128,7 @@ |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<slot name="foorter"></slot> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" /> |
|
|
|
<ButtonBase :Butttondata="Butttondata" @button-base-click="buttonBaseClick" :key="count" /> |
|
|
|
</template> |
|
|
|
</Dialog> |
|
|
|
<SearchTable |
|
|
@ -148,6 +150,7 @@ import TableFormCountPlan from '@/components/TableFormCountPlan/src/TableFormCou |
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
import { tableFormBlurVer, FormBlur, getListByBottonInput } from '@/api/wms/business/inputBlur' |
|
|
|
import { isString } from 'min-dash' |
|
|
|
const count = ref(0) |
|
|
|
|
|
|
|
const props = defineProps({ |
|
|
|
// 显示窗口宽度设置 |
|
|
@ -365,7 +368,6 @@ const tableFormRules = ref(props.tableFormRules) |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref('') |
|
|
|
routeName.value = route.name |
|
|
|
const isExecute = ref(true) //如果走失去焦点的方法只有为true的时候才能进行保存 |
|
|
|
|
|
|
|
// 列表-按钮 |
|
|
|
// const buttondata = [ |
|
|
@ -424,8 +426,9 @@ const opensearchTable = ( |
|
|
|
: '' |
|
|
|
}) |
|
|
|
} else { |
|
|
|
|
|
|
|
_searchCondition[searchCondition[i].key] = formRef.value.formModel[searchCondition[i].value] |
|
|
|
_searchCondition[searchCondition[i].key] = formRef.value.formModel[ |
|
|
|
searchCondition[i].value |
|
|
|
] |
|
|
|
? formRef.value.formModel[searchCondition[i].value] |
|
|
|
: props.detailData |
|
|
|
? props.detailData[searchCondition[i].value] |
|
|
@ -447,7 +450,6 @@ const opensearchTable = ( |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else if (searchCondition[i].isTableRowValue) { |
|
|
|
if (searchCondition[i].required) { |
|
|
|
if (row[searchCondition[i].value] == '' || row[searchCondition[i].value] == undefined) { |
|
|
@ -613,6 +615,7 @@ const open = async ( |
|
|
|
} |
|
|
|
formType.value = type |
|
|
|
resetForm() |
|
|
|
count.value = 0 |
|
|
|
// 修改时,设置数据 |
|
|
|
// 如果是从主表的详情页面进图添加子表,需要添加masterId,number参数 |
|
|
|
if (masterParmas) { |
|
|
@ -856,10 +859,9 @@ const onChange = (field, cur) => { |
|
|
|
* @param field 当前操作字段 |
|
|
|
* @param e |
|
|
|
*/ |
|
|
|
|
|
|
|
const onBlur = async (field, e) => { |
|
|
|
isExecute.value = false |
|
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
|
|
|
|
|
if (formSchemaObj?.enterSearch) { |
|
|
|
await FormBlur( |
|
|
|
field, |
|
|
@ -872,10 +874,17 @@ const onBlur = async (field, e) => { |
|
|
|
emit('searchTableSuccess', field, formSchemaObj.searchField, list, formRef.value, 'form') |
|
|
|
} |
|
|
|
) |
|
|
|
console.log(22222) |
|
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} else { |
|
|
|
emit('onBlur', field, e) |
|
|
|
} |
|
|
|
isExecute.value = true |
|
|
|
} |
|
|
|
|
|
|
|
// 批量增加 |
|
|
@ -908,10 +917,10 @@ const batchAdd = async (val) => { |
|
|
|
) |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
const inputStringBlur = async (headerItem, val, row, index) => { |
|
|
|
// isExecute.value = false |
|
|
|
await tableFormBlurVer( |
|
|
|
headerItem, |
|
|
|
val, |
|
|
@ -935,10 +944,38 @@ const inputStringBlur = async (headerItem, val, row, index) => { |
|
|
|
) |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
// isExecute.value = true |
|
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn(null), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
// 聚焦 |
|
|
|
const onFocus = (field) => { |
|
|
|
let formSchemaObj = formSchema.value.find((item) => item.field == field)?.componentProps |
|
|
|
if (formSchemaObj?.enterSearch) { |
|
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn({ disabled: true }), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
} |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
const inputStringFcous= (headerItem) => { |
|
|
|
if (headerItem?.tableForm?.searchPage && headerItem?.tableForm?.verificationParams) { |
|
|
|
if (props.isShowFooterButtton && !props.footButttondata) { |
|
|
|
Butttondata = [ |
|
|
|
defaultButtons.formSaveBtn({ disabled: true }), // 保存 |
|
|
|
defaultButtons.formCloseBtn(null) // 关闭 |
|
|
|
] |
|
|
|
} |
|
|
|
count.value++ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 回车事件 |
|
|
|
* @param field 当前操作字段 |
|
|
|