廖井涛
2024-10-24 014cf0c32726b85230809c78a83963af8707ae6b
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
98
99
100
101
102
103
<script setup>
import {ref} from "vue"
import {useI18n} from "vue-i18n"
const { t } = useI18n()
 
const props  = defineProps({
  basicData:{
    stuffColor:null,
    stuffThickness:null,
    process:[]
  }
})
console.log(props.basicData)
let stuff = ref({
  thickness:'',
  color:'',
  process:'',
  price:null,
  type:'process'
})
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="12">
      <el-select v-model.trim="stuff.process" size="small" clearable placeholder="原片工艺"  filterable>
        <el-option v-for="item in props.basicData.process"
                   :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
          v-model="stuff.price"
          type="number"
          placeholder="元/m²"
          class="delInput"/>
    </el-col>
  </el-row>
  <el-row :gutter="8">
    <el-col :span="3">
      <el-button @click="save" type="primary" >保存</el-button>
    </el-col>
  </el-row>
 
 
 
 
</template>
 
<style scoped>
.el-row{
  margin-bottom: 5px;
}
.el-input{
  width: 182px;
}
/deep/.delInput input::-webkit-outer-spin-button,
/deep/.delInput input::-webkit-inner-spin-button {
  -webkit-appearance: none!important;
}
/deep/.delInput input[type="number"]{
  -moz-appearance: textfield;
}
 
 
</style>