Quellcode durchsuchen

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi vor 2 Jahren
Ursprung
Commit
1ac78343f3

+ 3 - 1
src/business/user/address.ts

@@ -2,7 +2,7 @@ import { shallowRef, reactive, computed } from 'vue'
 import { useDataTable } from '@/hooks/datatable'
 import { useLoginStore } from '@/stores'
 import { queryUserReceiveInfo, userReceiveInfo, delUserReceiveInfo, userReceiveIsDefault } from '@/services/api/user'
-import { getCertificateTypeList } from '@/constants/certificate'
+import { getCertificateTypeList, getSCertificateTypeList } from '@/constants/certificate'
 
 const loginStore = useLoginStore()
 
@@ -34,6 +34,7 @@ export function useAddress() {
 export function useAddressForm(selectedRow?: Model.UserReceiveInfoRsp) {
     const loading = shallowRef(false)
     const certificateTypeList = getCertificateTypeList()
+    const scertificateTypeList = getSCertificateTypeList()
 
     const formData = reactive<Proto.UserReceiveInfoReq>({
         ReceiveInfoId: 0,
@@ -111,6 +112,7 @@ export function useAddressForm(selectedRow?: Model.UserReceiveInfoRsp) {
     return {
         loading,
         certificateTypeList,
+        scertificateTypeList,
         formData,
         regionName,
         addOrUpdate,

+ 28 - 0
src/constants/certificate.ts

@@ -2,6 +2,34 @@ import { useEnumStore } from '@/stores'
 
 const { getEnumTypeList, getEnumTypeName } = useEnumStore()
 
+/// 特殊处理证件类型
+export enum SCertificateType {
+    /// 个人
+    Person = 1,
+    /// 通用
+    Normal = 3,
+}
+
+/**
+ * 特殊处理证件类型列表
+ * @returns 
+ */
+export function getSCertificateTypeList() {
+    return [
+        { label: '个人', value: SCertificateType.Person },
+        { label: '通用', value: SCertificateType.Normal },
+    ]
+}
+
+/**
+ * 特殊处理证件类型名称
+ * @returns 
+ */
+export function getSCertificateTypeName(value?: number) {
+    const enums = getSCertificateTypeList()
+    return getEnumTypeName(enums, value)
+}
+
 /**
  * 获取证件类型列表
  * @returns 

+ 87 - 0
src/packages/pc/views/account/address/components/new/index.vue

@@ -0,0 +1,87 @@
+<!-- 账户管理-收货地址管理-编辑 -->
+<template>
+    <app-drawer title='新增地址' :width="880" v-model:show="show" :loading="loading"
+        :refresh="refresh">
+        <el-form ref="formRef" class="el-form--horizontal" label-width="100px" :model="formData" :rules="formRules">
+            <el-form-item label="收货人" prop="ReceiverName">
+                <el-input placeholder="请输入" v-model="formData.ReceiverName" />
+            </el-form-item>
+            <el-form-item label="证件类型" prop="CardTypeID">
+                <el-select v-model="formData.CardTypeID">
+                    <el-option :label="item.label" :value="item.value" v-for="(item, index) in certificateTypeList"
+                        :key="index" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="联系电话" prop="PhoneNum">
+                <el-input placeholder="请输入" v-model="formData.PhoneNum" />
+            </el-form-item>
+            <el-form-item label="证件号码" prop="CardNum">
+                <el-input placeholder="请输入" v-model="formData.CardNum" />
+            </el-form-item>
+            <el-form-item class="el-form-item--row" label="收货地址" prop="area">
+                <app-region class="el-form-item--col" v-model:province="formData.ProvinceID"
+                    v-model:city="formData.CityID" v-model:district="formData.DistrictID" />
+            </el-form-item>
+            <el-form-item class="el-form-item--row" prop="Address">
+                <el-input placeholder="请输入" v-model="formData.Address" />
+            </el-form-item>
+        </el-form>
+        <template #footer>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="onSubmit">提交</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref } from 'vue'
+import { ElMessage } from 'element-plus'
+import type { FormInstance, FormRules } from 'element-plus'
+import { useAddressForm } from '@/business/user/address'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+import AppRegion from '@pc/components/base/region/index.vue'
+
+const { loading, formData, certificateTypeList, addOrUpdate } = useAddressForm()
+const show = ref(true)
+const refresh = ref(false)
+const formRef = ref<FormInstance>()
+
+const formRules: FormRules = {
+    ReceiverName: [{ required: true, message: '请输入收货人', trigger: 'blur' }],
+    CardTypeID: [{ required: true, message: '请选择证件类型' }],
+    PhoneNum: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
+    CardNum: [{ required: true, message: '请输入证件号码', trigger: 'blur' }],
+    Address: [{ required: true, message: '请输入详细地址', trigger: 'blur' }],
+    area: [
+        {
+            required: true,
+            validator: (rule, value, callback) => {
+                const ids = [10, 18, 34] // 香港、台湾、澳门没有市区选择
+                if ((formData.ProvinceID && formData.CityID && formData.DistrictID) || ids.includes(formData.ProvinceID ?? 0)) {
+                    callback()
+                } else {
+                    callback(new Error('请选择收货地区'))
+                }
+            }
+        }
+    ],
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            addOrUpdate().then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
+    })
+}
+</script>

+ 4 - 3
src/packages/pc/views/account/address/index.vue

@@ -18,10 +18,10 @@
             {{ value ? '是' : '否' }}
         </template>
         <!-- 操作 -->
-        <template #expand>
+    <template #expand="{ row }">
             <div class="buttonbar">
                 <el-button type="primary" size="small" @click="openComponent('edit')">编辑</el-button>
-                <el-button type="success" size="small" @click="openComponent('default')">设置默认</el-button>
+                <el-button type="success" size="small" v-if="row?.isdefault === 0" @click="openComponent('default')">设置默认</el-button>
                 <el-button type="danger" size="small" @click="openComponent('delete')">删除</el-button>
             </div>
         </template>
@@ -45,6 +45,7 @@ const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('./components/edit/index.vue'))],
     ['default', defineAsyncComponent(() => import('./components/default/index.vue'))],
     ['delete', defineAsyncComponent(() => import('./components/delete/index.vue'))],
+    ['new', defineAsyncComponent(() => import('./components/new/index.vue'))],
 ])
 
 const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.UserReceiveInfoRsp>({ rowKey: 'autoid' })
@@ -65,6 +66,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 ])
 
 filterOptons.buttonList = [
-    { lable: '新增地址', className: 'el-button--primary', onClick: () => openComponent('edit') },
+    { lable: '新增地址', className: 'el-button--primary', onClick: () => openComponent('new') },
 ]
 </script>

+ 75 - 0
src/packages/pc/views/account/receipt/components/new/index.vue

@@ -0,0 +1,75 @@
+<!-- 账户管理-发票信息管理-编辑 -->
+<template>
+    <app-drawer title='新增发票' :width="460" v-model:show="show" :loading="loading"
+        :refresh="refresh">
+        <el-form ref="formRef" class="el-form--vertical" label-width="100px" :model="formData" :rules="formRules">
+            <el-form-item label="发票类型" prop="ReceiptType">
+                <el-radio-group v-model="formData.ReceiptType">
+                    <el-radio :label="1">个人</el-radio>
+                    <el-radio :label="2">企业</el-radio>
+                </el-radio-group>
+            </el-form-item>
+            <el-form-item label="发票抬头" prop="UserName">
+                <el-input placeholder="请输入" v-model="formData.UserName" />
+            </el-form-item>
+            <template v-if="formData.ReceiptType === 2">
+                <el-form-item label="税号" prop="TaxpayerID">
+                    <el-input placeholder="请输入" v-model="formData.TaxpayerID" />
+                </el-form-item>
+                <el-form-item label="开户银行" prop="ReceiptBank">
+                    <el-input placeholder="请输入" v-model="formData.ReceiptBank" />
+                </el-form-item>
+                <el-form-item label="银行账号" prop="ReceiptAccount">
+                    <el-input placeholder="请输入" v-model="formData.ReceiptAccount" />
+                </el-form-item>
+                <el-form-item label="企业地址" prop="Address">
+                    <el-input placeholder="请输入" v-model="formData.Address" />
+                </el-form-item>
+                <el-form-item label="企业电话" prop="ContactInfo">
+                    <el-input placeholder="请输入" v-model="formData.ContactInfo" />
+                </el-form-item>
+            </template>
+        </el-form>
+        <template #footer>
+            <el-button type="info" @click="onCancel(false)">取消</el-button>
+            <el-button type="primary" @click="onSubmit">提交</el-button>
+        </template>
+    </app-drawer>
+</template>
+
+<script lang="ts" setup>
+import { ref } from 'vue'
+import { ElMessage } from 'element-plus'
+import type { FormInstance, FormRules } from 'element-plus'
+import { useInvoiceForm } from '@/business/user/invoice'
+import AppDrawer from '@pc/components/base/drawer/index.vue'
+
+const { loading, formData, addOrUpdate } = useInvoiceForm()
+const show = ref(true)
+const refresh = ref(false)
+const formRef = ref<FormInstance>()
+
+const formRules: FormRules = {
+    ReceiptType: [{ required: true, message: '请选择发票类型' }],
+    UserName: [{ required: true, message: '请输入发票抬头', trigger: 'blur' }],
+    TaxpayerID: [{ required: true, message: '请输入税号', trigger: 'blur' }],
+}
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    formRef.value?.validate((valid) => {
+        if (valid) {
+            addOrUpdate().then(() => {
+                ElMessage.success('提交成功')
+                onCancel(true)
+            }).catch((err) => {
+                ElMessage.error('提交失败:' + err)
+            })
+        }
+    })
+}
+</script>

+ 2 - 1
src/packages/pc/views/account/receipt/index.vue

@@ -34,6 +34,7 @@ import AppFilter from '@pc/components/base/table-filter/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['edit', defineAsyncComponent(() => import('./components/edit/index.vue'))],
+    ['new', defineAsyncComponent(() => import('./components/new/index.vue'))],
     ['delete', defineAsyncComponent(() => import('./components/delete/index.vue'))],
 ])
 
@@ -56,6 +57,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
 ])
 
 filterOptons.buttonList = [
-    { lable: '新增发票', className: 'el-button--primary', onClick: () => openComponent('edit') },
+    { lable: '新增发票', className: 'el-button--primary', onClick: () => openComponent('new') },
 ]
 </script>

+ 0 - 1
src/packages/pc/views/footer/capital/statement/index.vue

@@ -21,7 +21,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'accountid', label: '资金账号' },
     { prop: 'operatetypename', label: '资金类型' },
     { prop: 'amount', label: '金额' },
-    { prop: 'currentbalance', label: '余额' },
     { prop: 'createtime', label: '时间' }
 ])
 </script>

+ 3 - 3
src/packages/pc/views/footer/goods/position/components/delivery/index.vue

@@ -28,14 +28,14 @@
             </el-form-item>
             <el-form-item label="参考损益">
                 <template #value>
-                    <span :class="closepl ? 'g-price-up' : 'g-price-down'">{{ formatDecimal(closepl) }}</span>
+                    <span :class="closepl ? 'g-price-up' : 'g-price-down'">{{ handleNumberValue(closepl) }}</span>
                 </template>
             </el-form-item>
             <el-form-item prop="DeliveryLot" label="交收数量">
                 <el-input-number placeholder="请输入数量" v-model="formData.DeliveryLot" :max="selectedRow.enableqty" :min="0" />
             </el-form-item>
             <el-form-item prop="DeliveryInfo" label="交收信息">
-                <el-input placeholder="请输入交收信息" v-model="formData.DeliveryInfo" />
+                <el-input type="textarea" placeholder="请输入交收信息" v-model="formData.DeliveryInfo" />
             </el-form-item>
         </el-form>
         <template #footer>
@@ -51,7 +51,7 @@ import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useOfflineDelivery } from '@/business/trade'
 import { useFuturesStore } from '@/stores'
 import { getBuyOrSellName, BuyOrSell } from '@/constants/order'
-import { formatDecimal } from '@/filters'
+import { formatDecimal, handleNumberValue } from '@/filters'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 
 const props = defineProps({

+ 13 - 9
src/packages/pc/views/footer/goods/position/index.vue

@@ -6,12 +6,14 @@
             {{ getBuyOrSellName(value) }}
         </template>
         <!-- 最新价 -->
-        <template #last="{ row }">
-            {{ last(row.goodsCode) }}
+        <template #lastprice="{ row }">
+            <span :class="lastColor(row)">
+                {{ lastprice(row) }}
+            </span>
         </template>
         <!-- 浮动盈亏-->
         <template #closepl="{ row }">
-            <span :class="lastColor(row.goodscode)">{{ closepl(row).toFixed(2) }}</span>
+            <span :class="handlePriceColor(closepl(row), 0.0)">{{ closepl(row).toFixed(2) }}</span>
         </template>
          <!-- 展开行 -->
          <template #expand>
@@ -34,15 +36,17 @@ import { useComposeTable } from '@pc/components/base/table'
 import { queryTradePosition } from '@/services/api/order'
 import { useFuturesStore } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
+import { handlePriceColor } from '@/filters'
 
 const futuresStore = useFuturesStore()
 
-const last = (goodsCode: string) => {
-    return futuresStore.getQuotePrice(goodsCode)
+const lastprice = (item: Model.TradePositionRsp) => {
+    const { last = 0 } = futuresStore.getQuoteInfo(item.goodscode).value ?? {}
+    return last
 }
 
-const lastColor = (goodsCode: string) => {
-    return futuresStore.getQuoteInfo(goodsCode).value?.lastColor
+const lastColor = (item: Model.TradePositionRsp) => {
+    return futuresStore.getQuoteInfo(item.goodscode).value?.lastColor
 }
 
 /// 计算参考损益
@@ -71,7 +75,7 @@ const { loading, dataList, run } = useRequest(queryTradePosition, {
     },
 })
 
-const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.TradePositionRsp>({ rowKey: 'accountid' })
+const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.TradePositionRsp>({ rowKey: 'goodsid' })
 
 const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'goodsname', label: '订单合约' },
@@ -80,7 +84,7 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'enableqty', label: '可用数量' },
     { prop: 'frozenqty', label: '冻结数量' },
     { prop: 'averageprice', label: '均价' },
-    { prop: 'last', label: '现价' },
+    { prop: 'lastprice', label: '现价' },
     { prop: 'curholderamount', label: '持仓金额' },
     { prop: 'usedmargin', label: '占用保证金' },
     { prop: 'closepl', label: '浮动盈亏' },

+ 1 - 1
src/packages/pc/views/footer/performance/components/contracted/index.vue

@@ -9,7 +9,7 @@
                 <span>{{ handleNumberValue(getPerformanceStepStatusName(selectedRow.steptypeid)) }}</span>
             </el-form-item>
             <el-form-item label="备注" prop="ApplyRemark">
-                <el-input type="textarea" :rows="3" v-model="formData.ApplyRemark" />
+                <el-input type="textarea" :rows="4" v-model="formData.ApplyRemark" />
             </el-form-item>
             <el-form-item label="附件" prop="Attachment">
                 <app-upload :file-types="['image']" type-message="请选择正确的图片类型" @change="onUploadChange" />

+ 0 - 1
src/packages/pc/views/query/capital/history/index.vue

@@ -34,7 +34,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'accountid', label: '资金账号' },
     { prop: 'operatetypename', label: '资金类型' },
     { prop: 'amount', label: '金额' },
-    { prop: 'currentbalance', label: '余额' },
     { prop: 'createtime', label: '时间' }
 ])
 

+ 0 - 1
src/packages/pc/views/query/capital/list/index.vue

@@ -21,7 +21,6 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'accountid', label: '资金账号' },
     { prop: 'operatetypename', label: '资金类型' },
     { prop: 'amount', label: '金额' },
-    { prop: 'currentbalance', label: '余额' },
     { prop: 'createtime', label: '时间' }
 ])
 </script>

+ 30 - 2
src/packages/pc/views/query/performance/buy/all/index.vue

@@ -1,6 +1,14 @@
 <!-- 资金流水-买履约-全部 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <template #header>
+            <app-filter :options="filterOptons">
+                <template #before>
+                    <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
+                        v-model="filterDate" />
+                </template>
+            </app-filter>
+        </template>
          <!-- 履约状态 -->
          <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
@@ -23,13 +31,17 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
+import { useDataFilter } from '@/hooks/datatable'
 import { useRequest } from '@/hooks/request'
 import { queryPerformancePlan } from '@/services/api/performance'
 import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
 
+const { filterOptons, getQueryParams } = useDataFilter<Model.WrOrderDetailRsp>()
+const filterDate = shallowRef<string[]>([])
 
-const { loading, dataList } = useRequest(queryPerformancePlan, {
+const { loading, dataList, run } = useRequest(queryPerformancePlan, {
     params: {
         buyorsell: BuyOrSell.Buy
     },
@@ -50,6 +62,22 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'performancestatus', label: '履约状态' },
     { prop: 'curstepname', label: '当前步骤' },
     { prop: 'starttime', label: '开始时间' },
-    
 ])
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--info', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--info', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    if (clear) {
+        filterDate.value = []
+    }
+    getQueryParams((qs) => {
+        qs.begindate = filterDate.value[0]
+        qs.enddate = filterDate.value[1]
+        run(qs)
+    }, clear)
+}
+
 </script>

+ 30 - 2
src/packages/pc/views/query/performance/sell/all/index.vue

@@ -1,6 +1,14 @@
 <!-- 资金流水-卖履约-全部 -->
 <template>
     <app-table :data="dataList" v-model:columns="tableColumns" :loading="loading">
+        <template #header>
+            <app-filter :options="filterOptons">
+                <template #before>
+                    <el-date-picker type="daterange" start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYYMMDD"
+                        v-model="filterDate" />
+                </template>
+            </app-filter>
+        </template>
          <!-- 履约状态 -->
          <template #performancestatus="{ value }">
             {{ getPerformanceStatusName(value) }}
@@ -23,13 +31,17 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { formatDate } from '@/filters'
+import { useDataFilter } from '@/hooks/datatable'
 import { useRequest } from '@/hooks/request'
 import { queryPerformancePlan } from '@/services/api/performance'
 import { BuyOrSell, getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName } from '@/constants/order'
 import AppTable from '@pc/components/base/table/index.vue'
+import AppFilter from '@pc/components/base/table-filter/index.vue'
 
+const { filterOptons, getQueryParams } = useDataFilter<Model.WrOrderDetailRsp>()
+const filterDate = shallowRef<string[]>([])
 
-const { loading, dataList } = useRequest(queryPerformancePlan, {
+const { loading, dataList, run } = useRequest(queryPerformancePlan, {
     params: {
         buyorsell: BuyOrSell.Sell
     },
@@ -50,6 +62,22 @@ const tableColumns = shallowRef<Model.TableColumn[]>([
     { prop: 'performancestatus', label: '履约状态' },
     { prop: 'curstepname', label: '当前步骤' },
     { prop: 'starttime', label: '开始时间' },
-    
 ])
+
+filterOptons.buttonList = [
+    { lable: '查询', className: 'el-button--info', onClick: () => onSearch() },
+    { lable: '重置', className: 'el-button--info', onClick: () => onSearch(true) }
+]
+
+const onSearch = (clear = false) => {
+    if (clear) {
+        filterDate.value = []
+    }
+    getQueryParams((qs) => {
+        qs.begindate = filterDate.value[0]
+        qs.enddate = filterDate.value[1]
+        run(qs)
+    }, clear)
+}
+
 </script>

+ 114 - 0
src/packages/sbyj/views/delivery/components/pending/list/index.vue

@@ -0,0 +1,114 @@
+<!-- 水贝亿爵-我的交收-待审核 -->
+<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>
+                    </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'))], // 详情
+])
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    pullRefreshRef.value?.refresh()
+})
+
+const { loading, pageIndex, pageCount, run } = useRequest(queryMyTradeGoodsDeliveryOfflines, {
+    params: {
+        pagesize: 20,
+        status: '1',
+    },
+    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>

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

@@ -1,4 +1,4 @@
-我的交收 - 付款>
+<!-- 我的交收 - 付款 -->
 <template>
     <app-view>
         <template #header>
@@ -6,22 +6,58 @@
         </template>
         <div class="order-detail__container g-form__container">
             <CellGroup inset>
-                <Cell title="交收单号" :value="selectedRow.deliveryorderID" />
+                <Cell title="交收单号" :value="selectedRow.deliveryorderid" />
                 <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
-                <Cell title="交收重量" :value="selectedRow.deliveryQty + getGoodsUnitName(selectedRow.goodunitid)" />
-                <Cell title="总货款" :value="selectedRow.deliveryTotalAmount" />
-                <Cell title="已付货款" :value="selectedRow.payedAmount" />
-                <Cell title="剩余货款" :value="selectedRow.deliveryTotalAmount - selectedRow.payedAmount - payAmount" />
+                <Cell title="交收重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
+                <Cell title="总货款" :value="selectedRow.deliverytotalamount" />
+                <Cell title="已付货款" :value="selectedRow.payedamount" />
+                <Cell title="剩余货款"
+                    :value="selectedRow.deliverytotalamount - selectedRow.payedamount - formData.PayAmount" />
             </CellGroup>
         </div>
+        <Form class="pricing-detail__form" ref="formRef" style="padding: 0.2rem; background-color: white;"
+            @submit="onSubmit">
+            <Field label="类型">
+                <template #input>
+                    <RadioGroup v-model="formData.DeliveryPayMode" @click="onDeliveryPayModeChanged">
+                        <Radio :name="2">线下支付</Radio>
+                        <Radio :name="1">余额补货款</Radio>
+                    </RadioGroup>
+                </template>
+            </Field>
+            <Field name="PayAmount" :rules="formRules.PayAmount">
+                <template #input>
+                    <div class="goods-listing__stepper">
+                        <div>
+                            <span>
+                                <Stepper v-model="formData.PayAmount" theme="round" button-size="22" :min="0" />
+                            </span>
+                        </div>
+                    </div>
+                </template>
+            </Field>
+            <Field label="上传凭证" v-if="formData.DeliveryPayMode === 2" :rules="formRules.headurl">
+                <template #input>
+                    <Uploader v-model="fileList" :max-count="1" :max-size="5 * 1024 * 1024" @oversize="onOversize" :after-read="afterRead" />
+                </template>
+            </Field>
+        </Form>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType } from 'vue'
+import { ref, shallowRef, PropType, reactive } from 'vue'
 import { getGoodsUnitName } from '@/constants/unit'
+import { showFailToast, showSuccessToast, Uploader, UploaderFileListItem, Form, Field, Stepper, Button, FieldRule, FormInstance, Radio, RadioGroup, Checkbox } from 'vant'
+import { fullloading, dialog } from '@/utils/vant'
+import axios from 'axios'
+import service from '@/services'
 
-const payAmount = shallowRef(0)
+const fileList = ref<UploaderFileListItem[]>([])
+const formData = reactive<Proto.DeliveryClientOperatorReq>({
+    DeliveryPayMode: 2, // 默认线下支付
+    PayAmount: 0,
+})
 
 defineProps({
     selectedRow: {
@@ -30,5 +66,76 @@ defineProps({
     }
 })
 
+// 表单验证规则
+const formRules: { [key: string]: FieldRule[] } = {
+    PayAmount: [{
+        message: '请输入支付金额',
+        validator: () => {
+            return !!formData.PayAmount
+        }
+    }],
+}
+
+const onDeliveryPayModeChanged = () => {
+    console.log('')
+}
+
+const onOversize = () => {
+    showFailToast('图片大小不能超过 5Mb')
+}
+
+// eslint-disable-next-line
+const afterRead = (file: any) => {
+    const data = new FormData()
+    data.append('file', file.file)
+
+    file.status = 'uploading'
+    file.message = '上传中...'
+    axios.post(service.getConfig('uploadUrl'), data).then(res => {
+        if (res.status == 200) {
+            file.status = 'success'
+            file.message = '上传成功'
+            if (res.data.length) {
+                // emit('success', res.data[0].filePath)
+                showSuccessToast('上传成功')
+            }
+        } else {
+            file.status = 'failed'
+            file.message = '上传失败'
+        }
+    })
+}
+
+// 下单
+const onSubmit = () => {
+    dialog({
+        allowHtml: true,
+        message: `确认要提交吗?\n`,
+        showCancelButton: true,
+    }).then(() => {
+
+        // const { marketid = 0, goodsid = 0 } = quote.value ?? {}
+        // /// 获取对应的市场ID
+        // formData.MarketID = marketid
+        // formData.PriceMode = EPriceMode.PRICEMODE_MARKET
+        // formData.GoodsID = goodsid
+        // formData.TimevalidType = EValidType.VALIDTYPE_DR
+        // formData.OperateType = EOrderOperateType.ORDEROPERATETYPE_NORMAL
+        // formData.BuildType = EBuildType.BUILDTYPE_OPEN
+        // formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+
+        // fullloading((hideLoading) => {
+        //     formSubmit().then(() => {
+        //         hideLoading('提交成功。', 'success')
+        //         // 刷新订单列表
+        //         getSBYJMyOrders()
+        //     }).catch((err) => {
+        //         hideLoading(err, 'fail')
+        //     })
+        // })
+    })
+}
+
+
 
 </script>

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

@@ -7,15 +7,15 @@
             </template>
             <div class="order-detail__container g-form__container">
                 <CellGroup inset>
-                    <Cell title="交收单号" :value="selectedRow.deliveryorderID" />
+                    <Cell title="交收单号" :value="selectedRow.deliveryorderid" />
                     <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
-                    <Cell title="交收重量" :value="selectedRow.deliveryQty + getGoodsUnitName(selectedRow.goodunitid)" />
-                    <Cell title="交收价格" :value="selectedRow.deliveryPrice" />
-                    <Cell title="升贴水" :value="selectedRow.deliveryPremium" />
-                    <Cell title="总货款" :value="selectedRow.deliveryTotalAmount" />
-                    <Cell title="已付货款" :value="selectedRow.payedAmount" />
-                    <Cell title="冻结货款" :value="selectedRow.freezeAmount" />
-                    <Cell title="申请时间" :value="selectedRow.reqTime" />
+                    <Cell title="交收重量" :value="selectedRow.deliveryqty + getGoodsUnitName(selectedRow.goodunitid)" />
+                    <Cell title="交收价格" :value="selectedRow.deliveryprice" />
+                    <Cell title="升贴水" :value="selectedRow.deliverypremium" />
+                    <Cell title="总货款" :value="selectedRow.deliverytotalamount" />
+                    <Cell title="已付货款" :value="selectedRow.payedamount" />
+                    <Cell title="冻结货款" :value="selectedRow.freezeamount" />
+                    <Cell title="申请时间" :value="selectedRow.reqtime" />
                 </CellGroup>
             </div>
             <div class="g-order-list">
@@ -82,7 +82,7 @@ const props = defineProps({
 // 查询订单明细
 const { pageIndex } = useRequest(queryMyDeliveryofflinedetails, {
     params: {
-        deliveryorderid: props.selectedRow.deliveryorderID
+        deliveryorderid: props.selectedRow.deliveryorderid
     },
     onSuccess: (res) => {
         if (pageIndex.value === 1) {

+ 41 - 41
src/types/model/order.d.ts

@@ -1559,69 +1559,69 @@ declare namespace Model {
 
     /* 查询我的交收 回复*/
     interface MyTradeGoodsDeliveryOfflineRsp {
-        /// 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        deliveryorderID: number;
-        /// 申请用户ID
-        userID: number;
-        /// 账户ID
-        accountID: number;
-        /// 商品ID
-        goodsID: number;
-        /// 市场ID
-        marketID: number;
+        /// 交收单号(905+unix秒时间戳(10位)+2位(marketserviceid)+xxxx)
+        deliveryorderid: string;
+        /// 申请用户id
+        userid: number;
+        /// 账户id
+        accountid: number;
+        /// 商品id
+        goodsid: number;
+        /// 市场id
+        marketid: number;
         /// 交收方向 - 0:买 1:卖
-        buyOrSell: number;
+        buyorsell: number;
         /// 交收手数
-        deliveryLot: number;
+        deliverylot: number;
         /// 交收数量 (手数*合约乘数)
-        deliveryQty: number;
+        deliveryqty: number;
         /// 交收信息
-        deliveryInfo: string;
-        /// 对手方UserID
-        matchUserID: number;
-        /// 对手方AccountID
-        matchAccountID: number;
+        deliveryinfo: string;
+        /// 对手方userid
+        matchuserid: number;
+        /// 对手方accountid
+        matchaccountid: number;
         /// 申请时间
-        reqTime: string;
+        reqtime: string;
         /// 申请交易日
-        reqTradeDate: string;
-        /// 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryOrderStatus
-        orderStatus: number;
+        reqtradedate: string;
+        /// 线下交收单状态 - 1:待处理 2:交收中 3:已完成 4:申请失败 枚举deliveryorderstatus
+        orderstatus: number;
         /// 交收价格
-        deliveryPrice: number;
+        deliveryprice: number;
         /// 交收货款
-        deliveryAmount: number;
+        deliveryamount: number;
         /// 完成时间
-        closeTime: Date;
+        closetime: date;
         /// 完成交易日
-        closeTradeDate: string;
+        closetradedate: string;
         /// 交割手续费
-        deliveryCharge: number;
+        deliverycharge: number;
         /// 手续费收取方式  1:比率  2:固定
-        feeAlgorithm: number;
+        feealgorithm: number;
         /// 会员手续费设置值
-        memberChargeValue: number;
+        memberchargevalue: number;
         /// 交易所手续费设置值
-        exchChargeValue: number;
+        exchchargevalue: number;
         /// 处理状态
-        handleStatus: number;
+        handlestatus: number;
         /// 交收升贴水(每单位)
-        deliveryPremium: number;
+        deliverypremium: number;
         /// 交收总货款 = 交收货款 + 交收升贴水 * 交收数量
-        deliveryTotalAmount: number;
-        /// 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliveryStatus
-        deliveryStatus: number;
+        deliverytotalamount: number;
+        /// 交收单状态2(52模式使用) - 1:待审核 2:待确认 3:待付款 4:付款中 5:已完成付款 6:处理中 20:交收完成 21:审核拒绝 22:确认过期 23:付款过期 24:财务撤销 -- 枚举deliverystatus
+        deliverystatus: number;
         /// 确认截止时间(买交收)
-        toConfirmTime: Date;
+        toconfirmtime: date;
         /// 付款截止时间(买交收)
-        toPayTime: Date;
+        topaytime: date;
         /// 已付货款
-        payedAmount: number;
+        payedamount: number;
         /// 冻结货款
-        freezeAmount: number;
+        freezeamount: number;
         goodscode: string;//商品代码(内部)
         goodsname: string;//商品名称
-        goodunitid: number;//报价单位ID
+        goodunitid: number;//报价单位id
         agreeunit: number;//合约单位
         decimalplace: number;//报价小数位
     }
@@ -1635,7 +1635,7 @@ declare namespace Model {
         /// 用户id
         userid?: number
         /// 交收单号(905+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-        deliveryorderid: number
+        deliveryorderid: string
     }
 
     /* 查询我的交收-订单明细 回复*/

+ 2 - 2
src/types/proto/trade.d.ts

@@ -689,8 +689,8 @@ declare global {
             AccountID?: number; // 交易账号,必填
             DeliveryOrderID?: number; // 交收单号,必填
             OperateType?: number; // 操作类型,必填1:客户确认2:客户付款
-            DeliveryPayMode?: number; // 付款方式,必填1:线上支付2:线下支付
-            PayAmount?: number; // 付款金额,必填
+            DeliveryPayMode: number; // 付款方式,必填1:线上支付2:线下支付
+            PayAmount: number; // 付款金额,必填
             PayAttr?: PayAttrs[]; // 付款凭证,必填
             OperatorID?: number; // 操作人ID
             OperatorAccount?: string; // 操作人账号