<template>
	<div>
		<el-select v-model="value" placeholder="请选择业务类型" style="width: 100%;" @change="change">
			<el-option v-for="(item,index) in options" :key="index" :value="item">
			</el-option>
		</el-select>
	</div>
</template>

<script lang="ts">
	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
	import api from "@/api/order";
	@Component
	export default class Focus extends Vue {
		@Prop()
		propValue : any;
		value : any = '';
		options : any = []
		@Watch('propValue')
		propValueChange(v : any) {
			this.value = v;
		};
		created() {
			api.getbusinessType('supplyOutOrder').then((res : any) => {
				if (res.code === 200) {
					this.options = res.data;
				}
			}).catch(() => {});
		}
		change(e : any) {
			this.$emit('onChange', e)
		}
	}
</script>