文字修改

This commit is contained in:
砂糖
2025-07-21 10:56:50 +08:00
parent 73ea2dd932
commit 442406d20f
8 changed files with 197 additions and 108 deletions

View File

@@ -6,13 +6,19 @@
filterable
@change="onChange"
style="width: 100%"
:value-key="'productId'"
>
<el-option
v-for="item in productOptions"
:key="item.productId"
:label="item.productName"
:label="`${item.productName}${item.productCode}`"
:value="item.productId"
/>
>
<div class="option-label">
<span class="product-name">{{ item.productName }}</span>
<span class="product-code">{{ item.productCode }}</span>
</div>
</el-option>
</el-select>
</template>
@@ -22,7 +28,7 @@ import { listProduct } from '@/api/wms/product';
export default {
name: 'ProductSelect',
props: {
value: [String, Number],
value: [String, null],
disabled: Boolean,
placeholder: {
type: String,
@@ -59,3 +65,20 @@ export default {
}
};
</script>
<style scoped>
.option-label {
display: flex;
justify-content: space-between;
align-items: center;
}
.product-name {
font-size: 14px;
color: #333;
}
.product-code {
font-size: 12px;
color: #999;
margin-left: 10px;
}
</style>

View File

@@ -6,13 +6,19 @@
clearable
@change="onChange"
style="width: 100%"
:value-key="'rawMaterialId'"
>
<el-option
v-for="item in options"
:key="item.rawMaterialId"
:label="item.rawMaterialName"
:label="`${item.rawMaterialName}${item.rawMaterialCode}`"
:value="item.rawMaterialId"
/>
>
<div class="option-label">
<span class="material-name">{{ item.rawMaterialName }}</span>
<span class="material-code">{{ item.rawMaterialCode }}</span>
</div>
</el-option>
</el-select>
</template>
@@ -22,7 +28,7 @@ import { listRawMaterial } from "@/api/wms/rawMaterial";
export default {
name: "RawMaterialSelect",
props: {
value: [String, Number],
value: [String, null],
placeholder: {
type: String,
default: "请选择原材料"
@@ -37,6 +43,10 @@ export default {
watch: {
value(val) {
this.selected = val;
},
selected(val) {
this.$emit("input", val);
this.$emit("change", val);
}
},
mounted() {
@@ -55,3 +65,20 @@ export default {
}
};
</script>
<style scoped>
.option-label {
display: flex;
justify-content: space-between;
align-items: center;
}
.material-name {
font-size: 14px;
color: #333;
}
.material-code {
font-size: 12px;
color: #999;
margin-left: 10px;
}
</style>