Browse Source

mycomponents/receive 文件迁移Vue2升级Vue3 8/2-10/25

hella_vue3
王志国 3 weeks ago
parent
commit
bbc67e3d70
  1. 34
      src/mycomponents/receive/receiveBottom.vue
  2. 28
      src/mycomponents/receive/receiveNumber.vue
  3. 50
      src/mycomponents/receive/receiveStatus.vue
  4. 40
      src/mycomponents/receive/receiveTop.vue
  5. 101
      src/mycomponents/receive/recordComDetailCard.vue
  6. 32
      src/mycomponents/receive/recordComMainCard.vue

34
src/mycomponents/receive/receiveBottom.vue

@ -14,35 +14,17 @@
</view> </view>
</template> </template>
<script> <script setup>
import { import {
dateFormat dateFormat
} from '@/common/basic.js'; } from '@/common/basic.js';
const props = defineProps({
export default { dataContent: {
components: { type: Object,
default: {}
}, }
data() { })
return { const formatDate = date => dateFormat(date)
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
return dateFormat(val)
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">

28
src/mycomponents/receive/receiveNumber.vue

@ -5,27 +5,13 @@
</view> </view>
</template> </template>
<script> <script setup>
export default { const props = defineProps({
components: {}, number: {
data() { type: String,
return { default: ''
},
}; })
},
watch: {
},
props: {
number: {
type: String,
default: ''
},
},
methods: {}
}
</script> </script>
<style lang="scss"> <style lang="scss">

50
src/mycomponents/receive/receiveStatus.vue

@ -6,39 +6,23 @@
</view> </view>
</template> </template>
<script> <script setup>
import { import {
getReceiveStateInfo, getReceiveStateInfo,
getJobStateInfo } from '@/common/directory.js';
} from '@/common/directory.js'; import { ref } from 'vue'
const props = defineProps({
export default { receiveStatus: {
components: { type: String,
default: ""
}, }
data() { })
return { const receiveStatusInfo = ref({})
receiveStatusInfo: {}
}; const statusStyle = (value) => {
}, receiveStatusInfo.value = getReceiveStateInfo(value);
watch: {}, return getReceiveStateInfo(value).remark
}
props: {
receiveStatus: {
type: String,
default: ""
}
},
mounted() {},
methods: {
statusStyle(value) {
this.receiveStatusInfo = getReceiveStateInfo(value);
return getReceiveStateInfo(value).remark
}
}
}
</script> </script>

40
src/mycomponents/receive/receiveTop.vue

@ -7,34 +7,20 @@
</view> </view>
</template> </template>
<script> <script setup>
import receiveNumber from '@/mycomponents/receive/receiveNumber.vue' import receiveNumber from '@/mycomponents/receive/receiveNumber.vue'
import receiveStatus from '@/mycomponents/receive/receiveStatus.vue' import receiveStatus from '@/mycomponents/receive/receiveStatus.vue'
export default {
components: {
receiveNumber,
receiveStatus
},
data() {
return {
}; const props = defineProps({
}, dataContent: {
watch: {}, type: Object,
default: {}
props: { },
dataContent: { })
type: Object, const openDetail = (item)=>{
default: {} emit("openDetail", dataContent.value);
}, }
}, const emit = defineEmits(['openDetail'])
methods: {
openDetail(item) {
this.$emit("openDetail", this.dataContent);
},
}
}
</script> </script>
<style lang="scss"> <style lang="scss">

101
src/mycomponents/receive/recordComDetailCard.vue

@ -23,67 +23,48 @@
</view> </view>
</template> </template>
<script> <script setup>
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import level from '@/mycomponents/balance/level.vue' import level from '@/mycomponents/balance/level.vue'
export default { const props = defineProps({
components: { dataContent: {
pack, type: Object,
location, default: {}
toLocation, },
batch, isShowContainer: {
itemCompareQty, type: Boolean,
level default: true
}, },
data() { isShowPack: {
return {}; type: Boolean,
}, default: true
},
props: { isShowBatch: {
dataContent: { type: Boolean,
type: Object, default: true
default: {} },
}, isShowFromLocation: {
isShowContainer: { type: Boolean,
type: Boolean, default: true
default: true },
}, isShowToLocation: {
isShowPack: { type: Boolean,
type: Boolean, default: true
default: true },
}, isShowDeliverType: {
isShowBatch: { type: Boolean,
type: Boolean, default: false
default: true },
}, isShowPackCount: {
isShowFromLocation: { type: Boolean,
type: Boolean, default: false
default: true }
}, })
isShowToLocation: {
type: Boolean,
default: true
},
isShowDeliverType: {
type: Boolean,
default: false
},
isShowPackCount: {
type: Boolean,
default: false
}
},
methods: {
}
}
</script> </script>
<style lang="scss"> <style lang="scss">

32
src/mycomponents/receive/recordComMainCard.vue

@ -10,30 +10,16 @@
</view> </view>
</template> </template>
<script> <script setup>
import receiveTop from '@/mycomponents/receive/receiveTop.vue' import receiveTop from '@/mycomponents/receive/receiveTop.vue'
import receiveBottom from '@/mycomponents/receive/receiveBottom.vue' import receiveBottom from '@/mycomponents/receive/receiveBottom.vue'
export default { const props = defineProps({
components: { dataContent: {
receiveTop, type: Object,
receiveBottom, default: {}
}, }
data() { })
return {};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
</script> </script>
<style lang="scss"> <style lang="scss">

Loading…
Cancel
Save