Browse Source

form组件插槽修改

master
zhang_li 1 year ago
parent
commit
b865235265
  1. 13
      src/components/BasicForm/src/BasicForm.vue
  2. 2
      src/views/wms/countManage/count/countPlanMain/index.vue

13
src/components/BasicForm/src/BasicForm.vue

@ -8,10 +8,10 @@
:is-col="true"
@opensearchTable="opensearchTable"
>
<template #crontab="formSchema">
<template #crontab="formSchema" v-if="fromeWhere == 'countPlan'">
<crontab v-model="formSchema.crontab" />
</template>
<template #type="formSchema">
<template #type="formSchema" v-if="fromeWhere == 'countPlan'">
<el-select v-model="formSchema.type" placeholder="选择盘点类型" @change="selectChange('type',$event)">
<el-option
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)"
@ -130,13 +130,19 @@ const props = defineProps({
type: Object,
required: true,
default: null
}
},
// //
// masterParmas: {
// type: Object,
// required: false,
// default: null
// },
// countPlan
fromeWhere: {
type: String,
required: false,
default: ''
}
})
const { t } = useI18n() //
@ -149,6 +155,7 @@ const formType = ref('') // 表单的类型:create - 新增;update - 修改
const formRef = ref() // Ref
const formSchema = ref(props.formAllSchemas?.formSchema)
console.log('props.formAllSchemas',props.formAllSchemas)
/** 弹层操作 */
// formField form

2
src/views/wms/countManage/count/countPlanMain/index.vue

@ -54,6 +54,7 @@
:apiUpdate="CountPlanMainApi.updateCountPlanMain"
:apiCreate="CountPlanMainApi.createCountPlanMain"
:isBusiness="true"
fromeWhere="countPlan"
@handleAddTable="handleAddTable"
@handleDeleteTable="handleDeleteTable"
@searchTableSuccess="searchTableSuccess"
@ -342,7 +343,6 @@ const searchFormClick = (searchData) => {
const selectChange = (field,val)=>{
console.log(val)
if(field == 'type'){
console.log(CountPlanMain.allSchemas.formSchema)
if(val =='DYNAMIC'){
CountPlanMain.allSchemas.formSchema[3].label = '限值(%)'
CountPlanMain.allSchemas.formSchema[3].componentProps.min = 0

Loading…
Cancel
Save