|
|
@ -21,6 +21,7 @@ |
|
|
|
v-model="formSchema.type" |
|
|
|
placeholder="选择盘点类型" |
|
|
|
@change="selectChange('type', $event)" |
|
|
|
v-if="!isDetail" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)" |
|
|
@ -29,6 +30,34 @@ |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-select |
|
|
|
v-model="formSchema.type" |
|
|
|
placeholder="选择盘点范围类型" |
|
|
|
@change="selectChangeDetail('type', $event,formSchema)" |
|
|
|
v-if="isDetail" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_SCOPE_TYPE)" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
<template #value="formSchema" v-if="fromeWhere == 'countPlan'"> |
|
|
|
<el-select |
|
|
|
v-model="formSchema.value" |
|
|
|
placeholder="选择盘点范围值" |
|
|
|
v-if="isDetail&& formTypeDetail =='Select'" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="dict in countPlanAllList" |
|
|
|
:key="dict.value" |
|
|
|
:label="dict.label" |
|
|
|
:value="dict.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
<el-input v-model="formSchema.value" v-if="isDetail && formTypeDetail =='InputString'"/> |
|
|
|
</template> |
|
|
|
</Form> |
|
|
|
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> |
|
|
@ -165,11 +194,30 @@ const props = defineProps({ |
|
|
|
required: false, |
|
|
|
default: '' |
|
|
|
}, |
|
|
|
// 盘点范围类型 |
|
|
|
countScopeType: { |
|
|
|
type: Array, |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
} |
|
|
|
}, |
|
|
|
// 是否从详情进入 |
|
|
|
isDetail: { |
|
|
|
type: Boolean, |
|
|
|
required: false, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
//盘点详情子表新增的时候判断盘点范围值显示输入框还是下拉框 |
|
|
|
formTypeDetail: { |
|
|
|
type: String, |
|
|
|
required: false, |
|
|
|
default: 'InputString' |
|
|
|
}, |
|
|
|
//盘点详情子表新增的时候判断盘点范围值的下拉列表 |
|
|
|
countPlanAllList: { |
|
|
|
type: Array, |
|
|
|
required: false, |
|
|
|
default: null |
|
|
|
}, |
|
|
|
}) |
|
|
|
|
|
|
|
const { t } = useI18n() // 国际化 |
|
|
@ -184,7 +232,7 @@ const formRef = ref() // 表单 Ref |
|
|
|
const formSchema = ref(props.formAllSchemas?.formSchema) |
|
|
|
const tableAllSchemas = ref(props.tableAllSchemas) |
|
|
|
const tableFormRules = ref(props.tableFormRules) |
|
|
|
console.log('tableAllSchemas', tableAllSchemas.value) |
|
|
|
console.log('fromeWhere', props.fromeWhere) |
|
|
|
|
|
|
|
/** 弹层操作 */ |
|
|
|
// formField form表单中的字段 |
|
|
@ -377,6 +425,7 @@ const emit = defineEmits([ |
|
|
|
'opensearchTable', |
|
|
|
'submitForm', |
|
|
|
'selectChange', |
|
|
|
'selectChangeDetail', |
|
|
|
'tableFormChange' |
|
|
|
]) |
|
|
|
//普通下拉改变事件 |
|
|
@ -431,6 +480,12 @@ const inpuFocus = (headerItem, row, index) => { |
|
|
|
const selectChange = (field, val) => { |
|
|
|
emit('selectChange', field, val) |
|
|
|
} |
|
|
|
// 修改盘点范围类型 |
|
|
|
const selectChangeDetail = (field, val,formSchema) => { |
|
|
|
formSchema.value = '' |
|
|
|
emit('selectChangeDetail', field, val) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const tableFormChange = (field, val, row) => { |
|
|
|
emit('tableFormChange', field, val, row) |
|
|
|