li.shaoyi 2 éve
szülő
commit
ce25c6dbda

+ 1 - 1
android/fxgl.txt

@@ -17,7 +17,7 @@ http://103.40.249.126:18280/cfg?key=mtp_20
 
 甘肃碳交
 cn.muchinfo.cgeex_trial_v1.0.0.apk
-http://8.130.36.162:8280/cfg?key=mtp_20 
+http://8.130.36.162:8280/cfg?key=mtp_20
 
 
 黔鑫生态

+ 59 - 0
src/packages/sbyj/assets/themes/global/global.less

@@ -367,6 +367,65 @@
     }
 }
 
+.g-qty-group {
+    flex: 1;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+
+    &__stepper {
+        display: flex;
+        align-items: center;
+        gap: .1rem;
+        width: 100%;
+
+        .van-stepper {
+            flex: 1;
+            display: flex;
+
+            &__input {
+                flex: 1;
+            }
+        }
+    }
+
+    .van-radio-group {
+        display: flex;
+        flex-wrap: wrap;
+        width: 100%;
+        margin-top: .2rem;
+    }
+
+    .van-radio {
+        width: 25%;
+        padding: .04rem;
+        margin-right: 0;
+
+        .van-radio__icon {
+            display: none;
+        }
+
+        &__label {
+            display: block;
+            width: 100%;
+            font-size: .24rem;
+            text-align: center;
+            color: #666;
+            border: 1px solid #e5e5e5;
+            border-radius: .08rem;
+            padding: .04rem;
+            margin-left: 0;
+        }
+
+        &[aria-checked="true"] {
+            .van-radio__label {
+                color: var(--van-radio-checked-icon-color);
+                border-color: var(--van-radio-checked-icon-color);
+            }
+        }
+    }
+}
+
 .van {
     &-dialog {
         &__message {

+ 15 - 21
src/packages/sbyj/views/delivery/components/completed/list/index.vue

@@ -7,9 +7,10 @@
                 <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>
+                            <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
+                                {{ item.buyorsell === BuyOrSell.Buy ? '买料: ' : '卖料: ' }}
+                                {{ item.goodscode + '/' + item.goodsname }}
+                            </h4>
                         </div>
                         <div class="right">
                             <span>{{ getDeliveryStatusName(item.deliverystatus) }}</span>
@@ -18,37 +19,32 @@
                     <div class="g-order-list__content">
                         <ul>
                             <li>
-                                <span>商品名称:</span>
-                                <span>{{ item.goodsname }}</span>
+                                <span>交收重量</span>
+                                <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                             </li>
                             <li>
-                                <span>交收重量:</span>
-                                <span>{{ item.deliveryqty }}{{
-                                    getGoodsUnitName(item.goodunitid) }}</span>
-                            </li>
-                            <li>
-                                <span>升贴水:</span>
+                                <span>升贴水</span>
                                 <span>{{ item.deliverypremium }}</span>
                             </li>
                             <li>
-                                <span>交收价格</span>
+                                <span>交收价格</span>
                                 <span>{{ item.deliveryprice }}</span>
                             </li>
                             <li>
-                                <span>总货款</span>
+                                <span>总货款</span>
                                 <span>{{ item.deliveryamount }}</span>
                             </li>
                             <li>
-                                <span>已付货款</span>
+                                <span>已付货款</span>
                                 <span>{{ item.payedamount }}</span>
                             </li>
                             <li>
-                                <span>冻结货款</span>
+                                <span>冻结货款</span>
                                 <span>{{ item.freezeamount }}</span>
                             </li>
                             <li>
-                                <span>申请时间:</span>
-                                <span>{{ item.reqtime }}</span>
+                                <span>申请日期</span>
+                                <span>{{ formatDate(item.reqtime, 'YYYY-MM-DD') }}</span>
                             </li>
                         </ul>
                     </div>
@@ -66,18 +62,16 @@
 
 <script lang="ts" setup>
 
-import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent, reactive } from 'vue'
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { formatDate } from '@/filters'
 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>()

+ 15 - 21
src/packages/sbyj/views/delivery/components/pending/list/index.vue

@@ -7,9 +7,10 @@
                 <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>
+                            <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
+                                {{ item.buyorsell === BuyOrSell.Buy ? '买料: ' : '卖料: ' }}
+                                {{ item.goodscode + '/' + item.goodsname }}
+                            </h4>
                         </div>
                         <div class="right">
                             <span>{{ getDeliveryStatusName(item.deliverystatus) }}</span>
@@ -18,37 +19,32 @@
                     <div class="g-order-list__content">
                         <ul>
                             <li>
-                                <span>商品名称:</span>
-                                <span>{{ item.goodsname }}</span>
+                                <span>交收重量</span>
+                                <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                             </li>
                             <li>
-                                <span>交收重量:</span>
-                                <span>{{ item.deliveryqty }}{{
-                                    getGoodsUnitName(item.goodunitid) }}</span>
-                            </li>
-                            <li>
-                                <span>升贴水:</span>
+                                <span>升贴水</span>
                                 <span>{{ item.deliverypremium }}</span>
                             </li>
                             <li>
-                                <span>交收价格</span>
+                                <span>交收价格</span>
                                 <span>{{ item.deliveryprice }}</span>
                             </li>
                             <li>
-                                <span>总货款</span>
+                                <span>总货款</span>
                                 <span>{{ item.deliveryamount }}</span>
                             </li>
                             <!-- <li>
-                                <span>已付货款</span>
+                                <span>已付货款</span>
                                 <span>{{ item.payedamount }}</span>
                             </li>
                             <li>
-                                <span>冻结货款</span>
+                                <span>冻结货款</span>
                                 <span>{{ item.freezeamount }}</span>
                             </li> -->
                             <li>
-                                <span>申请时间:</span>
-                                <span>{{ item.reqtime }}</span>
+                                <span>申请日期</span>
+                                <span>{{ formatDate(item.reqtime, 'YYYY-MM-DD') }}</span>
                             </li>
                         </ul>
                     </div>
@@ -65,18 +61,16 @@
 
 <script lang="ts" setup>
 
-import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent, reactive } from 'vue'
+import { shallowRef, defineAsyncComponent } from 'vue'
+import { formatDate } from '@/filters'
 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>()

+ 20 - 22
src/packages/sbyj/views/delivery/components/processing/list/index.vue

@@ -7,9 +7,10 @@
                 <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>
+                            <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
+                                {{ item.buyorsell === BuyOrSell.Buy ? '买料: ' : '卖料: ' }}
+                                {{ item.goodscode + '/' + item.goodsname }}
+                            </h4>
                         </div>
                         <div class="right">
                             <span>{{ getDeliveryStatusName(item.deliverystatus) }}</span>
@@ -18,45 +19,42 @@
                     <div class="g-order-list__content">
                         <ul>
                             <li>
-                                <span>商品名称:</span>
-                                <span>{{ item.goodsname }}</span>
+                                <span>交收重量</span>
+                                <span>{{ item.deliveryqty }}{{ getGoodsUnitName(item.goodunitid) }}</span>
                             </li>
                             <li>
-                                <span>交收重量:</span>
-                                <span>{{ item.deliveryqty }}{{
-                                    getGoodsUnitName(item.goodunitid) }}</span>
-                            </li>
-                            <li>
-                                <span>升贴水:</span>
+                                <span>升贴水</span>
                                 <span>{{ item.deliverypremium }}</span>
                             </li>
                             <li>
-                                <span>交收价格</span>
+                                <span>交收价格</span>
                                 <span>{{ item.deliveryprice }}</span>
                             </li>
                             <li>
-                                <span>总货款</span>
+                                <span>总货款</span>
                                 <span>{{ item.deliveryamount }}</span>
                             </li>
                             <li>
-                                <span>已付货款</span>
+                                <span>已付货款</span>
                                 <span>{{ item.payedamount }}</span>
                             </li>
                             <li>
-                                <span>冻结货款</span>
+                                <span>冻结货款</span>
                                 <span>{{ item.freezeamount }}</span>
                             </li>
                             <li>
-                                <span>申请时间:</span>
-                                <span>{{ item.reqtime }}</span>
+                                <span>申请日期</span>
+                                <span>{{ formatDate(item.reqtime, 'YYYY-MM-DD') }}</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>
-                        <Button size="small" v-if="item.deliverystatus === 2" @click="deliveryCommit(item)" round>确认</Button>
-                        <Button size="small" v-if="[3, 4].includes(item.deliverystatus)"  @click="showComponent('pay', item)" round>付款</Button>
+                        <Button size="small" v-if="item.deliverystatus === 2" @click="deliveryCommit(item)"
+                            round>确认</Button>
+                        <Button size="small" v-if="[3, 4].includes(item.deliverystatus)" @click="showComponent('pay', item)"
+                            round>付款</Button>
                     </div>
                 </div>
             </div>
@@ -68,9 +66,9 @@
 
 <script lang="ts" setup>
 
-import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent, reactive } from 'vue'
+import { shallowRef, defineAsyncComponent, reactive } from 'vue'
+import { formatDate } from '@/filters'
 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'
@@ -85,7 +83,7 @@ const dataList = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp[]>([])
 const selectedRow = shallowRef<Model.MyTradeGoodsDeliveryOfflineRsp>()
 const error = shallowRef(false)
 const pullRefreshRef = shallowRef()
-const formData = reactive<Proto.DeliveryClientOperatorReq>({PayAmount: 0, DeliveryPayMode: 2})
+const formData = reactive<Proto.DeliveryClientOperatorReq>({ PayAmount: 0, DeliveryPayMode: 2 })
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../../../detail/index.vue'))], // 详情

+ 2 - 1
src/packages/sbyj/views/home/main/index.vue

@@ -32,7 +32,7 @@
             </template>
           </Cell>
           <template v-for="(item, index) in newsList" :key="index">
-            <Cell class="article-item" :title="item.data.content" :value="item.time" />
+            <Cell class="article-item" :title="item.data.content" :value="formatDate(item.time, 'MM/DD')" />
           </template>
         </CellGroup>
       </app-block>
@@ -43,6 +43,7 @@
 <script lang="ts" setup>
 import { shallowRef } from "vue";
 import { Cell, CellGroup, PullRefresh } from "vant";
+import { formatDate } from "@/filters";
 import { useNavigation } from '@/packages/sbyj/router/navigation';
 import { queryImageConfigs, getJ10News } from "@/services/api/common";
 import { useLoginStore } from '@/stores'

+ 5 - 52
src/packages/sbyj/views/market/detail/index.less

@@ -24,22 +24,17 @@
             }
         }
 
-        .form-qty {
-            flex: 1;
+        .form-submit {
             display: flex;
-            flex-direction: column;
-            align-items: center;
+            gap: .32rem;
+            padding: .32rem;
+        }
 
+        .g-qty-group {
             &__stepper {
-                display: flex;
-                align-items: center;
-                gap: .1rem;
                 width: 70%;
 
                 .van-stepper {
-                    flex: 1;
-                    display: flex;
-
                     &__input {
                         flex: 1;
                         font-size: .32rem;
@@ -57,48 +52,6 @@
                     }
                 }
             }
-
-            .van-radio-group {
-                display: flex;
-                flex-wrap: wrap;
-                width: 100%;
-                margin-top: .2rem;
-            }
-
-            .van-radio {
-                width: 25%;
-                padding: .04rem;
-                margin-right: 0;
-
-                .van-radio__icon {
-                    display: none;
-                }
-
-                &__label {
-                    display: block;
-                    width: 100%;
-                    font-size: .24rem;
-                    text-align: center;
-                    color: #666;
-                    border: 1px solid #e5e5e5;
-                    border-radius: .08rem;
-                    padding: .04rem;
-                    margin-left: 0;
-                }
-
-                &[aria-checked="true"] {
-                    .van-radio__label {
-                        color: var(--van-radio-checked-icon-color);
-                        border-color: var(--van-radio-checked-icon-color);
-                    }
-                }
-            }
-        }
-
-        .form-submit {
-            display: flex;
-            gap: .32rem;
-            padding: .32rem;
         }
     }
 

+ 25 - 18
src/packages/sbyj/views/market/detail/index.vue

@@ -17,8 +17,8 @@
             <Form ref="formRef" @submit="onSubmit">
                 <Field name="OrderQty" :rules="formRules.OrderQty">
                     <template #input>
-                        <div class="form-qty">
-                            <div class="form-qty__stepper">
+                        <div class="g-qty-group">
+                            <div class="g-qty-group__stepper">
                                 <Stepper v-model="orderQty" :min="0" :step="qtyStep" integer />
                                 <span>{{ getGoodsUnitName(quote?.goodunitid) }}</span>
                             </div>
@@ -41,9 +41,10 @@
                 <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.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '买料订单:' : '卖料订单:' }}{{
-                                item.tHDetailEx.tradeID
-                            }} </h5>
+                            <h4>
+                                {{ item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '买料订单:' : '卖料订单:' }}
+                                {{ item.tHDetailEx.tradeID }}
+                            </h4>
                         </div>
                         <div class="right">
                             <span :class="item.tHDetailEx.depositRate <= 0.4 ? 'g-price-up' : ''">{{
@@ -53,37 +54,41 @@
                     <div class="g-order-list__content">
                         <ul>
                             <li>
-                                <span>订单重量:</span>
-                                <span>{{ item.tHDetailEx.holderQty * item.agreeUnit }}{{ getGoodsUnitName(item.goodsUnitID)
-                                }}</span>
+                                <span>订单重量</span>
+                                <span>
+                                    {{ item.tHDetailEx.holderQty * item.agreeUnit }}
+                                    {{ getGoodsUnitName(item.goodsUnitID) }}
+                                </span>
                             </li>
                             <li>
-                                <span>可用重量:</span>
-                                <span>{{ (item.tHDetailEx.holderQty - item.tHDetailEx.freezeQty) * item.agreeUnit }}{{
-                                    getGoodsUnitName(item.goodsUnitID) }}</span>
+                                <span>可用重量</span>
+                                <span>
+                                    {{ (item.tHDetailEx.holderQty - item.tHDetailEx.freezeQty) * item.agreeUnit }}
+                                    {{ getGoodsUnitName(item.goodsUnitID) }}
+                                </span>
                             </li>
                             <li>
-                                <span>订单金额</span>
+                                <span>订单金额</span>
                                 <span>{{ item.tHDetailEx.holderAmount }}</span>
                             </li>
                             <li>
-                                <span>订单价格</span>
+                                <span>订单价格</span>
                                 <span>{{ formatDecimal(item.tHDetailEx.holderPrice) }}</span>
                             </li>
                             <li>
-                                <span>已付定金</span>
+                                <span>已付定金</span>
                                 <span>{{ item.tHDetailEx.payedDeposit }}</span>
                             </li>
                             <li>
-                                <span>已补定金</span>
+                                <span>已补定金</span>
                                 <span>{{ handleNumberValue(item.tHDetailEx.restockDeposit) }}</span>
                             </li>
                             <li>
-                                <span>订单天数</span>
+                                <span>订单天数</span>
                                 <span>{{ item.tHDetailEx.holdDays }}天</span>
                             </li>
                             <li>
-                                <span>滞纳金</span>
+                                <span>滞纳金</span>
                                 <span>{{ handleNumberValue(item.tHDetailEx.callAteFee) }}</span>
                             </li>
                         </ul>
@@ -138,7 +143,9 @@ const componentMap = new Map<string, unknown>([
     ['delivery', defineAsyncComponent(() => import('../../order/list/components/market-order-delivery/index.vue'))], // 交收
     ['closeholder', defineAsyncComponent(() => import('../../order/list/components/close-holder/index.vue'))], // 转让
 ])
-const { componentRef, componentId, openComponent, closeComponent } = useComponent()
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    getSBYJMyOrders()
+})
 // 合约乘数
 const agreeunit = computed(() => quote.value?.agreeunit ?? 0)
 // 数量步长列表

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

@@ -7,22 +7,30 @@
             </template>
             <div class="order-detail__container g-form__container">
                 <CellGroup inset>
+                    <Cell :title="selectedRow.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '买料订单' : '卖料订单'"
+                        :value="selectedRow.tHDetailEx.tradeID" />
                     <Cell title="商品代码/名称" :value="selectedRow.goodsCode + '/' + selectedRow.goodsName" />
-                    <Cell title="订单重量" :value="(selectedRow.tHDetailEx.holderQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Cell title="可用数量" :value="((selectedRow.tHDetailEx.holderQty - selectedRow.tHDetailEx.freezeQty) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
+                    <Cell title="订单重量"
+                        :value="(selectedRow.tHDetailEx.holderQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
+                    <Cell title="可用数量"
+                        :value="((selectedRow.tHDetailEx.holderQty - selectedRow.tHDetailEx.freezeQty) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
                     <Cell title="订单价格" :value="selectedRow.tHDetailEx.holderPrice" />
                     <Cell title="已付定金" :value="selectedRow.tHDetailEx.payedDeposit" />
                     <Cell title="已补定金" :value="selectedRow.tHDetailEx.restockDeposit" />
                     <Cell title="订单天数" :value="selectedRow.tHDetailEx.holdDays" />
                     <Cell title="滞纳金" :value="selectedRow.tHDetailEx.callAteFee" />
-                    <Cell  title="定金率">
+                    <Cell title="定金率">
                         <template #value>
-                            <span :class="selectedRow.tHDetailEx.depositRate <= 0.4 ? 'g-price-up' : ''">{{ parsePercent(selectedRow.tHDetailEx.depositRate) }}</span>
+                            <span :class="selectedRow.tHDetailEx.depositRate <= 0.4 ? 'g-price-up' : ''">{{
+                                parsePercent(selectedRow.tHDetailEx.depositRate) }}</span>
                         </template>
                     </Cell>
-                    <Cell title="冻结重量" :value="(selectedRow.tHDetailEx.freezeQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Cell title="交收重量" :value="(selectedRow.tHDetailEx.deliveryQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Cell title="订单时间" :value="(selectedRow.tHDetailEx.deliveryQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
+                    <Cell title="冻结重量"
+                        :value="(selectedRow.tHDetailEx.freezeQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
+                    <Cell title="交收重量"
+                        :value="(selectedRow.tHDetailEx.deliveryQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
+                    <Cell title="订单时间"
+                        :value="(selectedRow.tHDetailEx.deliveryQty * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
                 </CellGroup>
             </div>
         </app-view>
@@ -32,9 +40,9 @@
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
-import { formatDate, formatDecimal, parsePercent } from '@/filters'
+import { parsePercent } from '@/filters'
+import { BuyOrSell } from '@/constants/order'
 import AppModal from '@/components/base/modal/index.vue'
-import { getBuyOrSellName, getWrTradeTypeName } from '@/constants/order'
 import { getGoodsUnitName } from '@/constants/unit'
 
 const showModal = shallowRef(true)

+ 26 - 30
src/packages/sbyj/views/order/list/components/close-holder/index.vue

@@ -9,19 +9,16 @@
                 <CellGroup inset>
                     <Cell title="可用重量"
                         :value="((selectedRow.tHDetailEx.holderPrice - selectedRow.tHDetailEx.freezeQty) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Field name="OrderQty" :rules="formRules.OrderQty">
+                    <Field name="OrderQty" label="转让重量" :rules="formRules.OrderQty">
                         <template #input>
-                            <div class="goods-listing__stepper">
-                                <div>
-                                    <span>
-                                        <Stepper v-model="orderQty" theme="round" button-size="22" :min="0" :step="qtyStep"
-                                            integer />
-                                    </span>
+                            <div class="g-qty-group">
+                                <div class="g-qty-group__stepper">
+                                    <Stepper v-model="orderQty" :min="0" :step="qtyStep" integer />
                                     <span>{{ getGoodsUnitName(selectedRow.goodsUnitID) }}</span>
                                 </div>
-                                <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange" title="转让重量">
-                                    <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">{{ value }} {{
-                                        getGoodsUnitName(selectedRow.goodsUnitID) }}
+                                <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
+                                    <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">
+                                        {{ value + getGoodsUnitName(selectedRow.goodsUnitID) }}
                                     </Radio>
                                 </RadioGroup>
                             </div>
@@ -39,11 +36,10 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType, onMounted,onUnmounted, computed, reactive } from 'vue'
+import { shallowRef, PropType, onMounted, onUnmounted, computed } from 'vue'
 import { CellGroup, Cell, Button, Stepper, Field, Form, FormInstance, FieldRule, RadioGroup, Radio } from 'vant'
 import { fullloading } from '@/utils/vant'
 import AppModal from '@/components/base/modal/index.vue'
-import { formatDate, formatDecimal, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useOrder } from '@/business/trade'
 import quoteSocket from '@/services/websocket/quote'
@@ -80,7 +76,7 @@ const qtyStepList = computed(() => {
 })
 
 // 表单验证规则
-const formRules:{ [key in keyof Proto.OrderReq]?: FieldRule[] } = {
+const formRules: { [key in keyof Proto.OrderReq]?: FieldRule[] } = {
     OrderQty: [{
         message: '请输入转让重量',
         validator: (val) => {
@@ -104,25 +100,25 @@ const onRadioChange = (value: number) => {
 const onSubmit = () => {
     const { tHDetailEx } = props.selectedRow ?? {}
     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_CLOSE
-        formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
-        formData.RelatedID = tHDetailEx.tradeID // 关联单号
-        formData.BuyOrSell = tHDetailEx.buyOrSell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy // 持仓反方向
+    /// 获取对应的市场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_CLOSE
+    formData.OrderQty = orderQty.value / agreeunit.value // 数量÷合约乘数
+    formData.RelatedID = tHDetailEx.tradeID // 关联单号
+    formData.BuyOrSell = tHDetailEx.buyOrSell === BuyOrSell.Buy ? BuyOrSell.Sell : BuyOrSell.Buy // 持仓反方向
 
-        fullloading((hideLoading) => {
-            formSubmit().then(() => {
-                hideLoading('提交成功', 'success')
-                closed(true)
-            }).catch((err) => {
-                hideLoading(err, 'fail')
-            })
+    fullloading((hideLoading) => {
+        formSubmit().then(() => {
+            hideLoading('提交成功', 'success')
+            closed(true)
+        }).catch((err) => {
+            hideLoading(err, 'fail')
         })
+    })
 }
 
 // 关闭弹窗

+ 8 - 12
src/packages/sbyj/views/order/list/components/market-order-delivery/index.vue

@@ -9,19 +9,16 @@
                 <CellGroup inset>
                     <Cell title="可用重量"
                         :value="((selectedRow.tHDetailEx.holderPrice - selectedRow.tHDetailEx.freezeQty) * selectedRow.agreeUnit) + getGoodsUnitName(selectedRow.goodsUnitID)" />
-                    <Field name="OrderQty" :rules="formRules.OrderQty">
+                    <Field name="OrderQty" label="交收重量" :rules="formRules.OrderQty">
                         <template #input>
-                            <div class="goods-listing__stepper">
-                                <div>
-                                    <span>
-                                        <Stepper v-model="orderQty" theme="round" button-size="22" :min="0" :step="qtyStep"
-                                            integer />
-                                    </span>
+                            <div class="g-qty-group">
+                                <div class="g-qty-group__stepper">
+                                    <Stepper v-model="orderQty" :min="0" :step="qtyStep" integer />
                                     <span>{{ getGoodsUnitName(selectedRow.goodsUnitID) }}</span>
                                 </div>
-                                <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange" title="交收重量">
-                                    <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">{{ value }} {{
-                                        getGoodsUnitName(selectedRow.goodsUnitID) }}
+                                <RadioGroup v-model="qtyStep" direction="horizontal" @change="onRadioChange">
+                                    <Radio v-for="(value, index) in qtyStepList" :key="index" :name="value">
+                                        {{ value + getGoodsUnitName(selectedRow.goodsUnitID) }}
                                     </Radio>
                                 </RadioGroup>
                             </div>
@@ -43,7 +40,6 @@ import { shallowRef, PropType, onMounted, computed, reactive } from 'vue'
 import { CellGroup, Cell, Button, Stepper, Field, Form, FormInstance, FieldRule, RadioGroup, Radio } from 'vant'
 import { fullloading } from '@/utils/vant'
 import AppModal from '@/components/base/modal/index.vue'
-import { formatDate, formatDecimal, parsePercent } from '@/filters'
 import { marketOrderDeliveryApply } from '@/services/api/trade'
 import { getGoodsUnitName } from '@/constants/unit'
 
@@ -73,7 +69,7 @@ const qtyStepList = computed(() => {
 })
 
 // 表单验证规则
-const formRules:{ OrderQty?: FieldRule[] } = {
+const formRules: { OrderQty?: FieldRule[] } = {
     OrderQty: [{
         message: '请输入交收重量',
         validator: (val) => {

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

@@ -3,83 +3,89 @@
         <template #header>
             <app-navbar title="我的订单" />
         </template>
-        <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.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '买料订单:' : '卖料订单:' }}{{ item.tHDetailEx.tradeID
-                        }} </h5>
+        <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">
+                            <h4>
+                                {{ item.tHDetailEx.buyOrSell === BuyOrSell.Buy ? '买料:' : '卖料:' }}
+                                {{ item.goodsCode + '/' + item.goodsName }}
+                            </h4>
+                        </div>
+                        <div class="right">
+                            <span :class="item.tHDetailEx.depositRate >= 0.4 ? 'g-price-up' : ''">
+                                {{ parsePercent(item.tHDetailEx.depositRate) }}
+                            </span>
+                        </div>
                     </div>
-                    <div class="right">
-                        <span :class="item.tHDetailEx.depositRate >= 0.4 ? 'g-price-up' : ''">{{
-                            parsePercent(item.tHDetailEx.depositRate) }}</span>
+                    <div class="g-order-list__content">
+                        <ul>
+                            <li>
+                                <span>订单重量</span>
+                                <span>
+                                    {{ item.tHDetailEx.holderQty * item.agreeUnit }}
+                                    {{ getGoodsUnitName(item.goodsUnitID) }}
+                                </span>
+                            </li>
+                            <li>
+                                <span>可用重量</span>
+                                <span>
+                                    {{ (item.tHDetailEx.holderQty - item.tHDetailEx.freezeQty) * item.agreeUnit }}
+                                    {{ getGoodsUnitName(item.goodsUnitID) }}
+                                </span>
+                            </li>
+                            <li>
+                                <span>订单金额</span>
+                                <span>{{ item.tHDetailEx.holderAmount }}</span>
+                            </li>
+                            <li>
+                                <span>订单价格</span>
+                                <span>{{ formatDecimal(item.tHDetailEx.holderPrice) }}</span>
+                            </li>
+                            <li>
+                                <span>已付定金</span>
+                                <span>{{ item.tHDetailEx.payedDeposit }}</span>
+                            </li>
+                            <li>
+                                <span>已补定金</span>
+                                <span>{{ handleNumberValue(item.tHDetailEx.restockDeposit) }}</span>
+                            </li>
+                            <li>
+                                <span>订单天数</span>
+                                <span>{{ item.tHDetailEx.holdDays }}天</span>
+                            </li>
+                            <li>
+                                <span>滞纳金</span>
+                                <span>{{ handleNumberValue(item.tHDetailEx.callAteFee) }}</span>
+                            </li>
+                        </ul>
+                    </div>
+                    <div class="g-order-list__btnbar">
+                        <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
+                        <Button size="small" @click="showComponent('supplement', item)" round>补充</Button>
+                        <Button size="small" @click="showComponent('delivery', item)" round>交收</Button>
+                        <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
                     </div>
-                </div>
-                <div class="g-order-list__content">
-                    <ul>
-                        <li>
-                            <span>订单重量:</span>
-                            <span>{{ item.tHDetailEx.holderQty * item.agreeUnit }}{{ getGoodsUnitName(item.goodsUnitID)
-                            }}</span>
-                        </li>
-                        <li>
-                            <span>可用重量:</span>
-                            <span>{{ (item.tHDetailEx.holderQty - item.tHDetailEx.freezeQty) * item.agreeUnit }}{{
-                                getGoodsUnitName(item.goodsUnitID) }}</span>
-                        </li>
-                        <li>
-                            <span>订单金额:</span>
-                            <span>{{ item.tHDetailEx.holderAmount }}</span>
-                        </li>
-                        <li>
-                            <span>订单价格:</span>
-                            <span>{{ formatDecimal(item.tHDetailEx.holderPrice) }}</span>
-                        </li>
-                        <li>
-                            <span>已付定金:</span>
-                            <span>{{ item.tHDetailEx.payedDeposit }}</span>
-                        </li>
-                        <li>
-                            <span>已补定金:</span>
-                            <span>{{ handleNumberValue(item.tHDetailEx.restockDeposit) }}</span>
-                        </li>
-                        <li>
-                            <span>订单天数:</span>
-                            <span>{{ item.tHDetailEx.holdDays }}天</span>
-                        </li>
-                        <li>
-                            <span>滞纳金:</span>
-                            <span>{{ handleNumberValue(item.tHDetailEx.callAteFee) }}</span>
-                        </li>
-                    </ul>
-                </div>
-                <div class="g-order-list__btnbar">
-                    <Button size="small" @click="showComponent('detail', item)" round>详情</Button>
-                    <Button size="small" @click="showComponent('supplement', item)" round>补充</Button>
-                    <Button size="small" @click="showComponent('delivery', item)" round>交收</Button>
-                    <Button size="small" @click="showComponent('closeholder', item)" round>转让</Button>
                 </div>
             </div>
-        </div>
+        </app-pull-refresh>
         <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)" @closed="closeComponent"
             v-if="componentId" />
     </app-view>
 </template>
 
 <script lang="ts" setup>
-
-import { shallowRef, onMounted, onUnmounted, computed, defineAsyncComponent } from 'vue'
+import { shallowRef, defineAsyncComponent } from 'vue'
 import { BuyOrSell } from '@/constants/order'
-import { formatDate, formatDecimal, parsePercent, handleNumberValue } from '@/filters'
+import { formatDecimal, parsePercent, handleNumberValue } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'
 import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { querySBYJMyOrders } from '@/services/api/order'
 import { Button } from 'vant'
-
-const dataList = shallowRef<Model.SBYJMyOrderRsp[]>([])
-const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
-const error = shallowRef(false)
+import AppPullRefresh from '../../../components/base/pull-refresh/index.vue'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/index.vue'))], // 详情
@@ -87,15 +93,13 @@ const componentMap = new Map<string, unknown>([
     ['delivery', defineAsyncComponent(() => import('./components/market-order-delivery/index.vue'))], // 交收
     ['closeholder', defineAsyncComponent(() => import('./components/close-holder/index.vue'))], // 转让
 ])
+
+const error = shallowRef(false)
+const selectedRow = shallowRef<Model.SBYJMyOrderRsp>()
+
 const { componentRef, componentId, openComponent, closeComponent } = useComponent()
 
-const { loading, pageIndex, pageCount, run } = useRequest(querySBYJMyOrders, {
-    onSuccess: (res) => {
-        if (pageIndex.value === 1) {
-            dataList.value = []
-        }
-        dataList.value.push(...res.data)
-    },
+const { dataList, loading, pageIndex, pageCount, run } = useRequest(querySBYJMyOrders, {
     onError: () => {
         error.value = true
     }
@@ -105,5 +109,4 @@ const showComponent = (componentName: string, row: Model.SBYJMyOrderRsp) => {
     selectedRow.value = row
     openComponent(componentName)
 }
-
 </script>

+ 3 - 7
src/services/websocket/trade.ts

@@ -1,6 +1,6 @@
 import { timerInterceptor } from '@/utils/timer'
 import { FunCode } from '@/constants/funcode'
-import { useLoginStore, useErrorInfoStore } from '@/stores'
+import { useLoginStore } from '@/stores'
 import service from '@/services'
 import eventBus from '@/services/bus'
 import { MTP2WebSocket } from './build'
@@ -14,17 +14,13 @@ export default new (class {
 
     constructor() {
         this.socket.onPush = (p) => {
-            const { funCode, content } = p
+            const { funCode } = p
             const delay = 1000 // 延迟推送消息,防止短时间内重复请求
 
             switch (funCode) {
                 case FunCode.LogoutRsp: {
-                    const { getErrorInfoByCode } = useErrorInfoStore()
-                    const decryptedData = new TextDecoder().decode(content)
-                    const res: Proto.LogoutRsp = JSON.parse(decryptedData)
-
                     // 用户登出通知
-                    eventBus.$emit('LogoutNotify', getErrorInfoByCode(res.RetCode))
+                    eventBus.$emit('LogoutNotify', '网络错误')
                     break;
                 }
                 case FunCode.MoneyChangedNotify: {

+ 10 - 0
src/stores/modules/setting.ts

@@ -0,0 +1,10 @@
+import { defineStore } from '../store'
+
+/**
+ * 系统设置存储对象
+ */
+export const useSettingStore = defineStore(() => {
+
+    return {
+    }
+})

+ 8 - 0
src/stores/storage.ts

@@ -8,6 +8,14 @@ function createLocalData() {
         appTheme: AppTheme.Default,
         loginInfo: <Model.LoginRsp | undefined>undefined,
         autoLoginEncryptedData: '', // 自动登录加密数据
+        // setting: [
+        //     {
+        //         loginId: 0,
+        //         showOrderDialog: true, // 挂/摘牌时弹出提示确认对话框
+        //         showOrderSuccessDialog: false, // 挂/摘牌成功使用对话框提示
+        //         showOrderFailDialog: false, // 挂/摘牌失败使用对话框提示
+        //     }
+        // ]
     }
 }
 

+ 30 - 28
src/utils/h5plus/index.ts

@@ -232,37 +232,39 @@ export default new (class {
      */
     createDownload(url: string) {
         this.onPlusReady((plus) => {
-            plus.downloader.enumerate((downloads: any) => {
-                if (downloads.length) {
-                    plus.nativeUI.toast('正在下载')
-                } else {
-                    const task = plus.downloader.createDownload(url, {
-                        filename: '_downloads/', // 非系统 Download 目录
-                        retry: 1,
-                    }, (d: any, status: number) => {
-                        if (status !== 200) {
-                            plus.nativeUI.toast('下载失败')
-                        }
-                    })
-                    // 监听下载状态
-                    task.addEventListener('statechanged', (task: any) => {
-                        switch (task.state) {
-                            case 3:
-                                const progress = task.downloadedSize / task.totalSize * 100
-                                for (const fn of this.downloadTask.values()) {
-                                    fn(task.filename, progress) // 推送下载进度
-                                }
-                                break
-                            case 4:
-                                console.log('下载完成', task.filename)
-                                this.downloadTask.clear()
-                                break
+            // plus.downloader.enumerate((downloads: any) => {
+            //     if (downloads.length) {
+            //         plus.nativeUI.toast('正在下载')
+            //     } else {
+
+            //     }
+            // })
+            const task = plus.downloader.createDownload(url, {
+                filename: '_downloads/', // 非系统 Download 目录
+                retry: 1,
+            }, (d: any, status: number) => {
+                if (status !== 200) {
+                    plus.nativeUI.toast('下载失败')
+                }
+            })
+            // 监听下载状态
+            task.addEventListener('statechanged', (task: any) => {
+                console.log(task.state, task.downloadedSize / task.totalSize * 100)
+                switch (task.state) {
+                    case 3:
+                        const progress = task.downloadedSize / task.totalSize * 100
+                        for (const fn of this.downloadTask.values()) {
+                            fn(task.filename, progress) // 推送下载进度
                         }
-                    })
-                    // 开始下载
-                    task.start()
+                        break
+                    case 4:
+                        console.log('下载完成', task.filename)
+                        this.downloadTask.clear()
+                        break
                 }
             })
+            // 开始下载
+            task.start()
         })
     }