|
@ -21,6 +21,7 @@ |
|
|
v-model="formSchema.type" |
|
|
v-model="formSchema.type" |
|
|
placeholder="选择盘点类型" |
|
|
placeholder="选择盘点类型" |
|
|
@change="selectChange('type', $event)" |
|
|
@change="selectChange('type', $event)" |
|
|
|
|
|
v-if="!isDetail" |
|
|
> |
|
|
> |
|
|
<el-option |
|
|
<el-option |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)" |
|
|
v-for="dict in getStrDictOptions(DICT_TYPE.COUNT_TYPE)" |
|
@ -29,6 +30,34 @@ |
|
|
:value="dict.value" |
|
|
:value="dict.value" |
|
|
/> |
|
|
/> |
|
|
</el-select> |
|
|
</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> |
|
|
</template> |
|
|
</Form> |
|
|
</Form> |
|
|
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> |
|
|
<div class="table" v-if="isBusiness && formType == 'create' && fromeWhere != 'countPlan'"> |
|
@ -165,11 +194,30 @@ const props = defineProps({ |
|
|
required: false, |
|
|
required: false, |
|
|
default: '' |
|
|
default: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 盘点范围类型 |
|
|
countScopeType: { |
|
|
countScopeType: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
required: false, |
|
|
required: false, |
|
|
default: null |
|
|
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() // 国际化 |
|
|
const { t } = useI18n() // 国际化 |
|
@ -184,7 +232,7 @@ const formRef = ref() // 表单 Ref |
|
|
const formSchema = ref(props.formAllSchemas?.formSchema) |
|
|
const formSchema = ref(props.formAllSchemas?.formSchema) |
|
|
const tableAllSchemas = ref(props.tableAllSchemas) |
|
|
const tableAllSchemas = ref(props.tableAllSchemas) |
|
|
const tableFormRules = ref(props.tableFormRules) |
|
|
const tableFormRules = ref(props.tableFormRules) |
|
|
console.log('tableAllSchemas', tableAllSchemas.value) |
|
|
console.log('fromeWhere', props.fromeWhere) |
|
|
|
|
|
|
|
|
/** 弹层操作 */ |
|
|
/** 弹层操作 */ |
|
|
// formField form表单中的字段 |
|
|
// formField form表单中的字段 |
|
@ -377,6 +425,7 @@ const emit = defineEmits([ |
|
|
'opensearchTable', |
|
|
'opensearchTable', |
|
|
'submitForm', |
|
|
'submitForm', |
|
|
'selectChange', |
|
|
'selectChange', |
|
|
|
|
|
'selectChangeDetail', |
|
|
'tableFormChange' |
|
|
'tableFormChange' |
|
|
]) |
|
|
]) |
|
|
//普通下拉改变事件 |
|
|
//普通下拉改变事件 |
|
@ -431,6 +480,12 @@ const inpuFocus = (headerItem, row, index) => { |
|
|
const selectChange = (field, val) => { |
|
|
const selectChange = (field, val) => { |
|
|
emit('selectChange', field, val) |
|
|
emit('selectChange', field, val) |
|
|
} |
|
|
} |
|
|
|
|
|
// 修改盘点范围类型 |
|
|
|
|
|
const selectChangeDetail = (field, val,formSchema) => { |
|
|
|
|
|
formSchema.value = '' |
|
|
|
|
|
emit('selectChangeDetail', field, val) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const tableFormChange = (field, val, row) => { |
|
|
const tableFormChange = (field, val, row) => { |
|
|
emit('tableFormChange', field, val, row) |
|
|
emit('tableFormChange', field, val, row) |
|
|