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.
 
 
 
 

49 lines
960 B

<template>
<view class="std_pack" v-if="dataContent.packQty">
<text>
<!-- {{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}} -->
<!-- {{getPackUnitName(dataContent.packUnit)}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}) -->
{{dataContent.packUnit}}({{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}})
</text>
</view>
</template>
<script>
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
export default {
data() {
return {
};
},
// 此处定义传入的数据
props: {
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getUomInfo(uom) {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
},
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
}
}
}
</script>
<style>
</style>