1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
| <script setup>
| import {defineEmits, ref} from "vue";
|
|
| const value1 = ref('')
| const value2 = ref('')
|
| const options1 = [
| {
| value: 'Option1',
| label: '5',
| },
| {
| value: 'Option2',
| label: '6',
| },
| {
| value: 'Option3',
| label: '8',
| },
| {
| value: 'Option4',
| label: '10',
| },
| {
| value: 'Option5',
| label: '12',
| },
| ]
| const options2 = [
| {
| value: 'Option1',
| label: '白玻',
| },
| {
| value: 'Option2',
| label: '灰镜',
| },
| {
| value: 'Option3',
| label: 'Low-e',
| },
| ]
|
| const emit = defineEmits(['send-data-inventory',]);
| const props = defineProps({
| closeDialog: Function,
| thickNess:null,
| model:null
| });
|
| value1.value=props.thickNess
| value2.value=props.model
|
| const CheckInventory = () => {
| const selectedLabel1 = value1.value;
| const selectedLabel2 = value2.value;
| // 判断两个值是否都被选择了,如果有一个为空字符串,则提示并返回,不执行后续操作
| if (selectedLabel1==="" || selectedLabel2==="") {
| window.alert('请输入');
| return;
| }
| props.closeDialog(1);
| emit('send-data-inventory', selectedLabel1,selectedLabel2);
| };
|
| </script>
|
| <template>
| <div id="box">
| <div>
| <span>厚度(mm):</span>
| <el-input v-model="value1" style="width: 140px"></el-input>
| </div>
|
| <div style="margin-top: 30px">
| <span>玻璃类型 :</span>
| <el-input v-model="value2" style="width: 140px">
|
| </el-input>
| </div>
|
| <div style="float: right; margin:-55px 35px 0 0;">
| <el-button type="primary" @click="CheckInventory">查询</el-button>
| </div>
| </div>
| </template>
|
| <style scoped>
| #box {
| width: 100%;
| height: 100%;
| padding: 10px;
| margin-top: -20px;
| border-radius: 5px;
| }
| </style>
|
|