|
|
@@ -0,0 +1,116 @@
|
|
|
+<!-- 水贝亿爵-我的交收-已完成 -->
|
|
|
+<template>
|
|
|
+ <app-view>
|
|
|
+ <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
|
|
|
+ :page-count="pageCount" @refresh="run">
|
|
|
+ <div class="g-order-list">
|
|
|
+ <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <div class="g-order-list__titlebar">
|
|
|
+ <div class="left">
|
|
|
+ <h5 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'"> {{ item.buyorsell
|
|
|
+ === BuyOrSell.Buy ? '买料交收单: ' : '卖料交收单: ' }}{{ item.deliveryorderid
|
|
|
+ }} </h5>
|
|
|
+ </div>
|
|
|
+ <div class="right">
|
|
|
+ <span>{{ getDeliveryStatusName(item.deliverystatus) }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="g-order-list__content">
|
|
|
+ <ul>
|
|
|
+ <li>
|
|
|
+ <span>商品名称:</span>
|
|
|
+ <span>{{ item.goodsname }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>交收重量:</span>
|
|
|
+ <span>{{ item.deliveryqty }}{{
|
|
|
+ getGoodsUnitName(item.goodunitid) }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>升贴水:</span>
|
|
|
+ <span>{{ item.deliverypremium }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>交收价格:</span>
|
|
|
+ <span>{{ item.deliveryprice }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>总货款:</span>
|
|
|
+ <span>{{ item.deliveryamount }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>已付货款:</span>
|
|
|
+ <span>{{ item.payedamount }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>冻结货款:</span>
|
|
|
+ <span>{{ item.freezeamount }}</span>
|
|
|
+ </li>
|
|
|
+ <li>
|
|
|
+ <span>申请时间:</span>
|
|
|
+ <span>{{ item.reqtime }}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="g-order-list__btnbar">
|
|
|
+ <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
|
|
|
+ <Button size="small" @click="showComponent('paydetail', item)" round>货款明细</Button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
|
|
|
+ @closed="closeComponent" v-if="componentId" />
|
|
|
+ </app-pull-refresh>
|
|
|
+ </app-view>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup>
|
|
|
+
|
|
|
+import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent, reactive } from 'vue'
|
|
|
+import { BuyOrSell } from '@/constants/order'
|
|
|
+import { formatDate, formatDecimal, parsePercent, handleNumberValue } from '@/filters'
|
|
|
+import { getGoodsUnitName } from '@/constants/unit'
|
|
|
+import { useComponent } from '@/hooks/component'
|
|
|
+import { useRequest } from '@/hooks/request'
|
|
|
+import { queryMyTradeGoodsDeliveryOfflines } from '@/services/api/order'
|
|
|
+import { Button } from 'vant'
|
|
|
+import { fullloading, dialog } from '@/utils/vant'
|
|
|
+import AppPullRefresh from '@/packages/sbyj/components/base/pull-refresh/index.vue'
|
|
|
+import { getDeliveryStatusName } from '@/constants/order'
|
|
|
+import { deliveryClientOperator } from '@/services/api/trade'
|
|
|
+
|
|
|
+const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
|
|
|
+const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
|
|
|
+const error = shallowRef(false)
|
|
|
+const pullRefreshRef = shallowRef()
|
|
|
+
|
|
|
+const componentMap = new Map<string, unknown>([
|
|
|
+ ['detail', defineAsyncComponent(() => import('../../../detail/index.vue'))], // 详情
|
|
|
+ ['paydetail', defineAsyncComponent(() => import('../../processing/components/pay-detail/index.vue'))], // 货款明细
|
|
|
+])
|
|
|
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
|
|
|
+ pullRefreshRef.value?.refresh()
|
|
|
+})
|
|
|
+
|
|
|
+const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliveryOfflines, {
|
|
|
+ params: {
|
|
|
+ pagesize: 20,
|
|
|
+ status: '20,21,22,23,24,25,26,27,28,29',
|
|
|
+ },
|
|
|
+ onSuccess: (res) => {
|
|
|
+ if (pageIndex.value === 1) {
|
|
|
+ dataList.value = []
|
|
|
+ }
|
|
|
+ dataList.value.push(...res.data)
|
|
|
+ },
|
|
|
+ onError: () => {
|
|
|
+ error.value = true
|
|
|
+ }
|
|
|
+})
|
|
|
+
|
|
|
+const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOfflineRsp) => {
|
|
|
+ selectedRow.value = row
|
|
|
+ openComponent(componentName)
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|