zhang_li
1 month ago
9 changed files with 236 additions and 63 deletions
@ -0,0 +1,97 @@ |
|||
<template> |
|||
<view> |
|||
<status v-if="isShowStatus" :status='dataContent.inventoryStatus'></status> |
|||
|
|||
<view class="uni-flex uni-row center"> |
|||
<view class="text_recommend " v-if="Number(recommendQty)"> |
|||
{{Number(recommendQty)}}/ |
|||
</view> |
|||
<view class="text_recommend "> |
|||
{{Number(dataContent.qty)}} |
|||
</view> |
|||
</view> |
|||
|
|||
<view> |
|||
<pack-unit :dataContent="dataContent"></pack-unit> |
|||
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> --> |
|||
</view> |
|||
</view> |
|||
</template> |
|||
|
|||
<script> |
|||
// import packQty from '@/mycomponents/qty/packQty.vue' |
|||
import packUnit from '@/mycomponents/qty/packUnit.vue' |
|||
import uom from '@/mycomponents/qty/uom.vue' |
|||
import status from '@/mycomponents/status/status.vue' |
|||
|
|||
export default { |
|||
components: { |
|||
// packQty, |
|||
packUnit, |
|||
uom, |
|||
status |
|||
}, |
|||
data() { |
|||
return { |
|||
|
|||
}; |
|||
}, |
|||
// 此处定义传入的数据 |
|||
props: { |
|||
type: { |
|||
type: String, |
|||
default: 'default' //recommend:推荐 compare:对比 |
|||
}, |
|||
|
|||
dataContent: { |
|||
type: Object, |
|||
default: {} |
|||
}, |
|||
recommendQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
|
|||
handleQty: { |
|||
type: Number, |
|||
default: 0 |
|||
}, |
|||
|
|||
isShowStatus: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowStdPack: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
objTextStyle: { |
|||
type: Object, |
|||
default: null |
|||
}, |
|||
isShowPackCount: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
isShowCount: { |
|||
type: Boolean, |
|||
default: true |
|||
} |
|||
}, |
|||
watch: { |
|||
|
|||
}, |
|||
methods: { |
|||
calc(qty, packQty) { |
|||
if(qty&&packQty){ |
|||
return Math.ceil(Number(qty) / Number(packQty)); |
|||
}else{ |
|||
return 0 |
|||
} |
|||
} |
|||
}, |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss"> |
|||
</style> |
Loading…
Reference in new issue