warehouse-receipt.vue 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <app-modal direction="right" height="100%">
  3. <app-view class="g-form">
  4. <template #header>
  5. <app-navbar title="选择点选仓单" @back="closed" />
  6. </template>
  7. <RadioGroup class="g-form__container" v-model="checkedRow" v-if="dataList.length">
  8. <CellGroup v-for="(item, index) in dataList" :key="index" @click="onChange(item)" inset>
  9. <Cell>
  10. <template #title>
  11. <Radio :name="item" checked-color="#ee0a24">
  12. <ul style="margin-left: .2rem;">
  13. <li>
  14. <span>持有人:</span>
  15. <span>{{ item.username }}</span>
  16. </li>
  17. <li>
  18. <span>商品:</span>
  19. <span>{{ item.wrstandardname }}</span>
  20. </li>
  21. <li>
  22. <span>仓库:</span>
  23. <span>{{ item.warehousename }}</span>
  24. </li>
  25. <li>
  26. <span>数量:</span>
  27. <span>{{ item.avalidqty }}</span>
  28. </li>
  29. <li>
  30. <span>升贴水:</span>
  31. <span>{{ item.pricemove }}</span>
  32. </li>
  33. </ul>
  34. </Radio>
  35. </template>
  36. </Cell>
  37. </CellGroup>
  38. </RadioGroup>
  39. <Empty description="暂无数据" v-else />
  40. </app-view>
  41. </app-modal>
  42. </template>
  43. <script lang="ts" setup>
  44. import { shallowRef } from 'vue'
  45. import { RadioGroup, Radio, Cell, CellGroup, Empty } from 'vant'
  46. import { useRequest } from '@/hooks/request'
  47. import { queryWrDeliveryAvalidHoldLB } from '@/services/api/transfer'
  48. import AppModal from '@/components/base/modal/index.vue'
  49. const props = defineProps({
  50. goodsId: {
  51. type: Number,
  52. required: true,
  53. },
  54. })
  55. const emit = defineEmits(['update:show', 'change'])
  56. const checkedRow = shallowRef<Model.WrDeliveryAvalidHoldLBRsp>()
  57. const { dataList } = useRequest(queryWrDeliveryAvalidHoldLB, {
  58. params: {
  59. goodsid: props.goodsId,
  60. },
  61. })
  62. // 选择仓单
  63. const onChange = (item: Model.WrDeliveryAvalidHoldLBRsp) => {
  64. checkedRow.value = item
  65. emit('change', item)
  66. }
  67. // 关闭弹窗
  68. const closed = () => {
  69. emit('update:show', false)
  70. }
  71. </script>