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.
47 lines
751 B
47 lines
751 B
1 year ago
|
<template>
|
||
|
<view class="std_pack" v-if="dataContent.packQty!=undefined">
|
||
|
<text>
|
||
|
{{Number(dataContent.packQty)}}{{getUomInfo(dataContent.uom)}}/{{getPackUnitName(dataContent.packUnit)}}
|
||
|
</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>
|