You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
691 B

<template>
<view class="std_pack" v-if="dataContent.stdPackQty!=undefined">
<text>
{{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.uom)}}
</text>
<!-- dataContent.StdPackUom -->
</view>
</template>
<script>
import {
// getStdPackUnitInfo,
getUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
// 此处定义传入的数据
props: {
dataContent: {
stdPackQty: 1000,
uom: "EA",
},
},
methods: {
getStdPackUnit(stdPackUnit) {
let std = getUnitInfo(stdPackUnit);
console.log("单位",std.label)
return std == "" ? stdPackUnit : std.label;
}
}
}
</script>
<style>
</style>