廖井涛
2025-08-04 4ed43bcaca53599880c7cfdfaf7e29d328a0a483
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
<script setup>
import {ref} from "vue"
import {useI18n} from "vue-i18n"
const { t } = useI18n()
 
const props  = defineProps({
  basicData:{
    stuffColor:null,
    stuffThickness:null
  }
})
let stuff = ref({
  thickness:'',
  color:'',
  price:null,
  type:'glass'
})
const emit = defineEmits(['getChild'])
 
const save = ()=>{
  emit('getChild',stuff.value)
}
 
</script>
 
<template>
  <el-row :gutter="8">
    <el-col :span="12">
      <el-select v-model.trim="stuff.thickness" size="small" clearable :placeholder="$t('product.msg.thickness')" >
        <el-option v-for="item in props.basicData.stuffThickness"
                   :key="item.id"
                   :label="item.basicName"
                   :value="item.basicName"
        />
      </el-select>
 
    </el-col>
  </el-row>
 
  <el-row :gutter="8">
    <el-col :span="12">
      <el-select v-model.trim="stuff.color" size="small" clearable :placeholder="$t('product.msg.color')"  filterable>
        <el-option v-for="item in props.basicData.stuffColor"
                   :key="item.id"
                   :label="item.basicName"
                   :value="item.basicName"
        />
      </el-select>
    </el-col>
  </el-row>
 
  <el-row :gutter="8">
    <el-col :span="3">
    <el-input-number
        v-model="stuff.price"
        controls-position="right"
        :step="0.01"
        :max="99999.99"
        :placeholder="$t('glassPrice.unit')"
        class="delInput"/>
    </el-col>
  </el-row>
  <el-row :gutter="8">
    <el-col :span="3">
      <el-button @click="save" type="primary" >{{$t('basicData.save')}}</el-button>
    </el-col>
  </el-row>
 
 
 
 
</template>
 
<style scoped>
.el-row{
  margin-bottom: 5px;
}
.el-input-number{
  width: 182px;
}
 
 
</style>