zhou.xiaoning před 2 roky
rodič
revize
67506499fc

+ 34 - 0
src/constants/order.ts

@@ -427,4 +427,38 @@ export function getListingSelectTypeName(value: number) {
 export function getDeliveryStatusName(value: number) {
     const enums = getDeliveryStatusList()
     return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取付款方式类型列表
+ * @returns 
+ */
+ export function getDeliveryPayModeList() {
+    return getEnumTypeList('deliveryPayMode')
+}
+
+/**
+ * 获取付款方式类型名称
+ * @returns 
+ */
+export function getDeliveryPayModeName(value: number) {
+    const enums = getDeliveryPayModeList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取确认状态类型列表
+ * @returns 
+ */
+ export function getConfirmStatusList() {
+    return getEnumTypeList('confirmStatus')
+}
+
+/**
+ * 获取确认状态类型名称
+ * @returns 
+ */
+export function getConfirmStatusName(value: number) {
+    const enums = getConfirmStatusList()
+    return getEnumTypeName(enums, value)
 }

+ 84 - 0
src/packages/sbyj/views/delivery/components/processing/components/files/index.vue

@@ -0,0 +1,84 @@
+<template>
+    <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
+        <app-view class="bank-statement">
+            <template #header>
+                <app-navbar title="货款明细">
+                </app-navbar>
+            </template>
+            <app-pull-refresh v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
+                :page-count="pageCount" @refresh="run">
+                <app-list class="bank-statement__table" :columns="columns" :data-list="dataList">
+                    <template #operatetime="{ value }">
+                        <span>{{ formatDate(value, 'YYYY-MM-DD') }}</span>
+                        <span>{{ formatDate(value, 'HH:mm:ss') }}</span>
+                    </template>
+                </app-list>
+            </app-pull-refresh>
+        </app-view>
+    </app-modal>
+</template>
+
+<script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { formatDate } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryMyDeliveryOfflineOperateLogs } from '@/services/api/order'
+import AppPullRefresh from '@/packages/sbyj/components/base/pull-refresh/index.vue'
+import AppList from '@/packages/sbyj/components/base/list/index.vue'
+import AppModal from '@/components/base/modal/index.vue'
+
+const dataList = shallowRef<Model.MyDeliveryOfflineOperateLogRsp[]>([])
+const error = shallowRef(false)
+const showModal = shallowRef(true)
+const refresh = shallowRef(false) // 是否刷新父组件数据
+
+const props = defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.MyTradeGoodsDeliveryOfflineRsp>,
+        required: true,
+    }
+})
+
+const columns: Model.TableColumn[] = [
+    { prop: 'operatetime', label: '时间' },
+    { prop: 'remark', label: '上传说明' },
+    { prop: 'fileaddress', label: '图片' },
+]
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryMyDeliveryOfflineOperateLogs, {
+    manual: true,
+    params: {
+        deliveryorderid: props.selectedRow.deliveryorderid,
+        operatetype: 3,
+        pagesize: 20,
+    },
+    onSuccess: (res) => {
+        if (pageIndex.value === 1) {
+            dataList.value = []
+        }
+        dataList.value.push(...res.data)
+    },
+    onError: () => {
+        error.value = true
+    }
+})
+</script>
+
+<style lang="less">
+.bank-statement {
+    &__table {
+        td.app-list__column {
+            &:first-child {
+                span:last-child {
+                    color: #999;
+                    font-size: .24rem;
+                }
+            }
+
+            &:not(:first-child) {
+                font-size: .32rem;
+            }
+        }
+    }
+}
+</style>

+ 8 - 1
src/packages/sbyj/views/delivery/components/processing/components/pay-detail/index.vue

@@ -8,10 +8,16 @@
             <app-pull-refresh v-model:loading="loading" v-model:error="error" v-model:pageIndex="pageIndex"
                 :page-count="pageCount" @refresh="run">
                 <app-list class="bank-statement__table" :columns="columns" :data-list="dataList">
-                    <template #createtime="{ value }">
+                    <template #operatetime="{ value }">
                         <span>{{ formatDate(value, 'YYYY-MM-DD') }}</span>
                         <span>{{ formatDate(value, 'HH:mm:ss') }}</span>
                     </template>
+                    <template #deliverypaymode="{ row }">
+                        <span>{{ getDeliveryPayModeName(row.deliverypaymode) }}</span>
+                    </template>
+                    <template #confirmstatus="{ row }">
+                        <span>{{ getConfirmStatusName(row.confirmstatus) }}</span>
+                    </template>
                 </app-list>
             </app-pull-refresh>
         </app-view>
@@ -26,6 +32,7 @@ import { queryMyDeliveryOfflineOperateLogs } from '@/services/api/order'
 import AppPullRefresh from '@/packages/sbyj/components/base/pull-refresh/index.vue'
 import AppList from '@/packages/sbyj/components/base/list/index.vue'
 import AppModal from '@/components/base/modal/index.vue'
+import { getDeliveryPayModeName, getConfirmStatusName } from '@/constants/order'
 
 const dataList = shallowRef<Model.MyDeliveryOfflineOperateLogRsp[]>([])
 const error = shallowRef(false)

+ 7 - 1
src/packages/sbyj/views/delivery/detail/index.vue

@@ -3,7 +3,13 @@
     <app-modal direction="right" height="100%" v-model:show="showModal" :refresh="refresh">
         <app-view class="g-form">
             <template #header>
-                <app-navbar title="交收详情" @back="closed" />
+                <app-navbar title="交收详情" @back="closed">
+                    <template #right>
+                    <div class="button-more">
+                        <span>文件列表</span>
+                    </div>
+                </template>
+                </app-navbar>
             </template>
             <div class="order-detail__container g-form__container">
                 <CellGroup inset>

+ 1 - 1
src/packages/sbyj/views/order/list/index.vue

@@ -89,7 +89,7 @@ const componentMap = new Map<string, unknown>([
 ])
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 
-const { loading, pageIndex, pageCount, run } = useRequest(querySBYJMyOrders, {
+const { pageIndex } = useRequest(querySBYJMyOrders, {
     onSuccess: (res) => {
         if (pageIndex.value === 1) {
             dataList.value = []

+ 1 - 1
src/stores/modules/enum.ts

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['deliveryStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
+const enumKeys = ['confirmStatus', 'deliveryPayMode', 'deliveryStatus', 'clientType', 'stepStatus', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2', 'buildtype', 'listingselecttype'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()