|
|
@@ -2,72 +2,73 @@
|
|
|
<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> {{ item.buyOrSell === BuyOrSell.Buy ? '买料交收单:' : '卖料交收单:' }}{{ item.deliveryorderID
|
|
|
- }} </h5>
|
|
|
+ :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="right">
|
|
|
- <span >{{ getDeliveryStatusName(item.deliveryStatus) }}</span>
|
|
|
+ <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" round>货款明细</Button>
|
|
|
+ <Button size="small" v-if="item.orderStatus === 2" @click="deliveryCommit(item)" round>确认</Button>
|
|
|
+ <Button size="small" v-if="[3, 4].includes(item.orderStatus)" round>付款</Button>
|
|
|
</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" round>货款明细</Button>
|
|
|
- <Button size="small" round>确认</Button>
|
|
|
- <Button size="small" round>付款</Button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
|
|
|
- v-if="componentId" />
|
|
|
- </app-pull-refresh>
|
|
|
+ <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 } from 'vue'
|
|
|
+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'
|
|
|
@@ -75,13 +76,16 @@ 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 formData = reactive<Proto.DeliveryClientOperatorReq>({})
|
|
|
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['detail', defineAsyncComponent(() => import('../../../detail/index.vue'))], // 详情
|
|
|
@@ -111,4 +115,23 @@ const showComponent = (componentName: string, row: Model.MyTradeGoodsDeliveryOff
|
|
|
openComponent(componentName)
|
|
|
}
|
|
|
|
|
|
+// 交收确认
|
|
|
+const deliveryCommit = (item: Model.MyTradeGoodsDeliveryOfflineRsp) => {
|
|
|
+ dialog({
|
|
|
+ message: '是否追加未付转让定金?',
|
|
|
+ showCancelButton: true,
|
|
|
+ }).then(() => {
|
|
|
+ formData.DeliveryOrderID = item.deliveryorderID
|
|
|
+ formData.OperateType = 1 // 操作类型,必填1:客户确认2:客户付款
|
|
|
+ fullloading((hideLoading) => {
|
|
|
+ deliveryClientOperator({ data: formData }).then(() => {
|
|
|
+ hideLoading('提交成功', 'success')
|
|
|
+ // closed(true)
|
|
|
+ }).catch((err) => {
|
|
|
+ hideLoading(err, 'fail')
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
</script>
|