|
@@ -19,11 +19,7 @@
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
|
<el-form-item label="部件类型">
|
|
|
- <el-select v-model="state.filterModel.bomType" placeholder="请选择部件类型" clearable class="w100">
|
|
|
- <el-option label="计税主板" value="1"></el-option>
|
|
|
- <el-option label="油气回收" value="2"></el-option>
|
|
|
- <el-option label="计量主板" value="3"></el-option>
|
|
|
- </el-select>
|
|
|
+ <MySelectRequest :textPla="props.textPla" :select="props.select" :code="props.code" @search="search"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="8" :lg="6" :xl="4" class="mb20">
|
|
@@ -134,7 +130,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="admin/product/bom">
|
|
|
-import {ref, reactive, onMounted, onBeforeMount, computed, defineAsyncComponent} from 'vue'
|
|
|
+import {ref, reactive, onMounted, onBeforeMount, computed, defineAsyncComponent, watch} from 'vue'
|
|
|
import { ComponentTypeApi } from '/@/api/admin/productionManagement/ComponentType'
|
|
|
import dayjs from 'dayjs'
|
|
|
import eventBus from '/@/utils/mitt'
|
|
@@ -148,6 +144,22 @@ import {ComponentGetPageDto} from "/@/api/admin/productionManagement/ComponentTy
|
|
|
|
|
|
/**引入组件*/
|
|
|
const EditDialog = defineAsyncComponent(() => import('./components/form-edit.vue'))
|
|
|
+const MySelectRequest = defineAsyncComponent(() => import('/@/components/my-select-request/index.vue'))
|
|
|
+/**
|
|
|
+ * 向子组件传值,
|
|
|
+ * code 字段编码
|
|
|
+ * select 默认值
|
|
|
+ */
|
|
|
+const props = reactive({
|
|
|
+ code:'componentType',
|
|
|
+ select:'',
|
|
|
+ textPla:'请选择部件类型'
|
|
|
+})
|
|
|
+const search = (val) => {
|
|
|
+ state.filterModel.bomType = val.value
|
|
|
+ props.select = val.value
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
const editDialogRef = ref()
|
|
|
|
|
@@ -229,6 +241,7 @@ const resetSearchForm = () => {
|
|
|
state.filterModel.bomName = ''
|
|
|
state.filterModel.bomProNo = ''
|
|
|
state.filterModel.bomMateNo = ''
|
|
|
+ props.select = ''
|
|
|
}
|
|
|
|
|
|
/**添加*/
|