| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <template>
- <app-modal direction="right" height="100%">
- <app-view class="g-form">
- <template #header>
- <app-navbar title="选择点选仓单" @back="closed" />
- </template>
- <RadioGroup class="g-form__container" v-model="checkedRow" v-if="dataList.length">
- <CellGroup v-for="(item, index) in dataList" :key="index" @click="onChange(item)" inset>
- <Cell>
- <template #title>
- <Radio :name="item" checked-color="#ee0a24">
- <ul style="margin-left: .2rem;">
- <li>
- <span>持有人:</span>
- <span>{{ item.username }}</span>
- </li>
- <li>
- <span>商品:</span>
- <span>{{ item.wrstandardname }}</span>
- </li>
- <li>
- <span>仓库:</span>
- <span>{{ item.warehousename }}</span>
- </li>
- <li>
- <span>数量:</span>
- <span>{{ item.avalidqty }}</span>
- </li>
- <li>
- <span>升贴水:</span>
- <span>{{ item.pricemove }}</span>
- </li>
- </ul>
- </Radio>
- </template>
- </Cell>
- </CellGroup>
- </RadioGroup>
- <Empty description="暂无数据" v-else />
- </app-view>
- </app-modal>
- </template>
- <script lang="ts" setup>
- import { shallowRef } from 'vue'
- import { RadioGroup, Radio, Cell, CellGroup, Empty } from 'vant'
- import { useRequest } from '@/hooks/request'
- import { queryWrDeliveryAvalidHoldLB } from '@/services/api/transfer'
- import AppModal from '@/components/base/modal/index.vue'
- const props = defineProps({
- goodsId: {
- type: Number,
- required: true,
- },
- })
- const emit = defineEmits(['update:show', 'change'])
- const checkedRow = shallowRef<Model.WrDeliveryAvalidHoldLBRsp>()
- const { dataList } = useRequest(queryWrDeliveryAvalidHoldLB, {
- params: {
- goodsid: props.goodsId,
- },
- })
- // 选择仓单
- const onChange = (item: Model.WrDeliveryAvalidHoldLBRsp) => {
- checkedRow.value = item
- emit('change', item)
- }
- // 关闭弹窗
- const closed = () => {
- emit('update:show', false)
- }
- </script>
|