Browse Source

mycomponents/balance下 文件迁移 8/8-10/25

hella_vue3
王志国 4 weeks ago
parent
commit
9e3e4b8fe4
  1. 9
      src/mycomponents/balance/balance.vue
  2. 85
      src/mycomponents/balance/handleBalanceBatch.vue
  3. 8
      src/mycomponents/balance/pack.vue
  4. 77
      src/mycomponents/balance/recommendBalanceBatch.vue

9
src/mycomponents/balance/balance.vue

@ -2,7 +2,8 @@
<view :class="dataContent.scaned ? 'scan_view' : ''"> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx"> <view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view> <view>
<pack v-if="dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack> <pack v-if="isShowParentPack && dataContent.parentNumber" title="父包装"
:packingCode="dataContent.parentNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack> <pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> <location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
@ -66,7 +67,11 @@ const props = defineProps({
isShowToLocation: { isShowToLocation: {
type: Boolean, type: Boolean,
default: false default: false
} },
isShowParentPack: {
type: Boolean,
default: true
},
}) })
const copy = () => { const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100

85
src/mycomponents/balance/handleBalanceBatch.vue

@ -0,0 +1,85 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff;">
<view class="space_between center">
<view style="word-break: break-all;width: 60%;">
<pack title='外包装' v-if="detail.parentPackingNumber"
:packingCode="detail.parentPackingNumber"></pack>
<pack v-if="isShowPack" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
<view style="word-break: break-all;">
<recommend-qty v-if="detail.record==null || detail.record==undefined" :dataContent="detail"
:isShowStatus='isShowStatus' :isShowStdPack="true" :isShowCount='false'></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="detail.qty" :handleQty="detail.record.qty"
:isShowStatus='isShowStatus' :isShowStdPack="true">
</compare-qty>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>

8
src/mycomponents/balance/pack.vue

@ -1,11 +1,13 @@
<template> <template>
<view class="card_view"> <view class="card_view" v-if="ShowPackingNumber">
<text class="card_packing_code">{{ title }}</text> <text class="card_packing_code">{{ title }}</text>
<text class="card_content">{{ packingCode }}</text> <text class="card_content">{{ packingCode }}</text>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {getSwitchInfoByCode} from '@/common/basic.js';
import {onMounted} from "vue";
const props = defineProps({ const props = defineProps({
packingCode: { packingCode: {
type: String, type: String,
@ -16,6 +18,10 @@ const props = defineProps({
default: '包装' default: '包装'
} }
}) })
const ShowPackingNumber = ref(true)
onMounted(()=>{
ShowPackingNumber.value = getSwitchInfoByCode('ShowPackingNumber')
})
</script> </script>
<style></style> <style></style>

77
src/mycomponents/balance/recommendBalanceBatch.vue

@ -0,0 +1,77 @@
<template>
<view>
<view class="uni-flex uni-row space-between center ">
<view class="uni-flex uni-row " style="width: 60%;" >
<view style=" width: 25rpx;color: #32C1E8;">
推荐
</view>
<view style="word-break: break-all">
<pack v-if="isShowPack&&detail.packingNumber" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch&&detail.batch" :batch="detail.batch"></batch>
<location v-if="isShowLocation" :locationCode="detail.fromLocationCode"></location>
</view>
</view>
</view>
</view>
</template>
<script>
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
export default {
components: {
pack,
location,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
},
watch: {
},
methods: {
}
}
</script>
<style>
.recommend {
position: absolute;
left: 25px;
top: 70px;
width: 10px;
height: 30px;
opacity: 1;
}
</style>
Loading…
Cancel
Save