li.shaoyi 2 lat temu
rodzic
commit
7931871151
32 zmienionych plików z 325 dodań i 628 usunięć
  1. 2 1
      src/business/contract/index.ts
  2. 2 1
      src/business/goods/index.ts
  3. 5 0
      src/packages/mobile/assets/themes/default/default.less
  4. 26 19
      src/packages/mobile/assets/themes/global/global.less
  5. 7 4
      src/packages/mobile/components/base/html-panel/index.less
  6. 3 1
      src/packages/mobile/components/base/html-panel/index.vue
  7. 8 1
      src/packages/mobile/components/layouts/navbar/index.less
  8. 3 1
      src/packages/mobile/views/bank/statement/index.vue
  9. 0 138
      src/packages/mobile/views/contract/details/index.backup.vue
  10. 35 12
      src/packages/mobile/views/contract/list/index.less
  11. 22 12
      src/packages/mobile/views/contract/list/index.vue
  12. 0 2
      src/packages/mobile/views/credit/signin/index.less
  13. 1 1
      src/packages/mobile/views/credit/signin/index.vue
  14. 0 2
      src/packages/mobile/views/home/components/main/index.less
  15. 1 1
      src/packages/mobile/views/home/components/main/index.vue
  16. 2 1
      src/packages/mobile/views/mine/main/index.less
  17. 1 1
      src/packages/mobile/views/mine/main/index.vue
  18. 1 1
      src/packages/mobile/views/mine/order/list/index.less
  19. 35 36
      src/packages/mobile/views/product/detail/index.less
  20. 8 8
      src/packages/mobile/views/product/detail/index.vue
  21. 34 18
      src/packages/mobile/views/product/list/index.less
  22. 11 9
      src/packages/mobile/views/product/list/index.vue
  23. 0 276
      src/packages/mobile/views/purchase/detail/index.backup.vue
  24. 24 26
      src/packages/mobile/views/purchase/detail/index.less
  25. 11 15
      src/packages/mobile/views/purchase/detail/index.vue
  26. 35 12
      src/packages/mobile/views/purchase/list/index.less
  27. 23 12
      src/packages/mobile/views/purchase/list/index.vue
  28. 5 3
      src/packages/mobile/views/rules/ccwl/index.vue
  29. 5 3
      src/packages/mobile/views/rules/cght/index.vue
  30. 9 7
      src/packages/mobile/views/rules/xhht/index.vue
  31. 5 3
      src/packages/mobile/views/rules/zrht/index.vue
  32. 1 1
      src/types/model/contract.d.ts

+ 2 - 1
src/business/contract/index.ts

@@ -9,12 +9,13 @@ export function useContractList() {
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJPurchaseTransferRsp>()
     const loading = shallowRef(false)
 
-    const getWrstandardList = async () => {
+    const getWrstandardList = async (params: Partial<Model.THJPurchaseTransferReq> = {}) => {
         loading.value = true
         await queryTHJPurchaseTransfer({
             data: {
                 page: pageIndex.value,
                 pagesize: pageSize.value,
+                wrstandardname: params.wrstandardname,
             },
             success: (res) => {
                 total.value = res.total

+ 2 - 1
src/business/goods/index.ts

@@ -10,12 +10,13 @@ export function useWrstandardList() {
     const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.THJWrstandardRsp>()
     const loading = shallowRef(false)
 
-    const getWrstandardList = async () => {
+    const getWrstandardList = async (params: Partial<Model.THJWrstandardReq> = {}) => {
         loading.value = true
         await queryTHJWrstandard({
             data: {
                 page: pageIndex.value,
                 pagesize: pageSize.value,
+                wrstandardname: params.wrstandardname
             },
             success: (res) => {
                 total.value = res.total

+ 5 - 0
src/packages/mobile/assets/themes/default/default.less

@@ -36,6 +36,11 @@
     /* Vant-Checkbox */
     --van-checkbox-checked-icon-color: #DD364A !important;
 
+    /* Vant-Tabs */
+    --van-tabs-bottom-bar-color: #DD364A;
+
+    --van-dialog-confirm-button-text-color: #DD364A;
+
     .app-tabs {
         .tabs {
             flex-wrap: wrap;

+ 26 - 19
src/packages/mobile/assets/themes/global/global.less

@@ -1,23 +1,23 @@
 [class*='g-image'] {
-    position  : relative;
+    position: relative;
     object-fit: cover;
-    overflow  : hidden;
+    overflow: hidden;
 
     &:before {
-        content        : '';
-        position       : absolute;
-        left           : 0;
-        top            : 0;
-        width          : 100%;
-        height         : 100%;
-        background     : #fff url("~@mobile/assets/images/avatar.png") no-repeat center;
+        content: '';
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        background: #fff url("~@mobile/assets/images/avatar.png") no-repeat center;
         background-size: cover;
     }
 }
 
 .g-form {
     &__container {
-        display       : flex;
+        display: flex;
         flex-direction: column;
         padding-bottom: .32rem;
 
@@ -33,10 +33,10 @@
     }
 
     &__footer {
-        display    : flex;
+        display: flex;
         align-items: center;
-        gap        : .2rem;
-        padding    : .2rem .32rem;
+        gap: .2rem;
+        padding: .2rem .32rem;
 
         &:empty {
             display: none;
@@ -45,17 +45,17 @@
 }
 
 .g-flex {
-    display       : flex;
+    display: flex;
     flex-direction: column;
-    height        : 100%;
+    height: 100%;
 
     &--row {
         flex-direction: row;
     }
 
     &__body {
-        flex                      : 1;
-        overflow-y                : auto;
+        flex: 1;
+        overflow-y: auto;
         -webkit-overflow-scrolling: touch;
     }
 
@@ -74,13 +74,20 @@
     }
 }
 
+.g-block {
+    &--bg {
+        background: #fff url('../../images/block-bg.png') no-repeat center bottom;
+        background-size: 100%;
+    }
+}
+
 /* 导航列表 */
 .g-navmenu {
     .app-iconfont {
         height: 100%;
 
         &__icon {
-            font-size   : .32rem;
+            font-size: .32rem;
             margin-right: .24rem;
         }
     }
@@ -89,7 +96,7 @@
 .van {
     &-dialog {
         &__message {
-            font-size  : .28rem;
+            font-size: .28rem;
             line-height: .44rem;
         }
     }

+ 7 - 4
src/packages/mobile/components/base/html-panel/index.less

@@ -1,6 +1,9 @@
 .app-html {
-    //min-height      : 100%;
-    background-color: #fff;
-    padding         : .32rem;
-    overflow-x      : auto;
+    padding: .2rem;
+
+    p {
+        padding: .32rem;
+        overflow-x: auto;
+        background-color: #fff;
+    }
 }

+ 3 - 1
src/packages/mobile/components/base/html-panel/index.vue

@@ -1,5 +1,7 @@
 <template>
-    <div class="app-html" v-html="html"></div>
+    <div class="app-html">
+        <p v-html="html"></p>
+    </div>
 </template>
 
 <script lang="ts" setup>

+ 8 - 1
src/packages/mobile/components/layouts/navbar/index.less

@@ -31,7 +31,7 @@
         display: flex;
         align-items: center;
 
-        >.column {
+        .column {
             flex: 1;
             display: inline-flex;
             justify-content: center;
@@ -39,6 +39,13 @@
             height: var(--navbar-height);
             white-space: nowrap;
 
+            &-block {
+                display: flex;
+                justify-content: center;
+                align-items: center;
+                height: 100%;
+            }
+
             &--left>.column-block {
                 margin-right: auto;
             }

+ 3 - 1
src/packages/mobile/views/bank/statement/index.vue

@@ -3,7 +3,9 @@
         <template #header>
             <app-navbar title="资金流水">
                 <template #right>
-                    <Button @click="routerTo('bank-hisstatement')">更多</Button>
+                    <div class="button-more" @click="routerTo('bank-hisstatement')" style="padding:.2rem;">
+                        <span>更多</span>
+                    </div>
                 </template>
             </app-navbar>
         </template>

+ 0 - 138
src/packages/mobile/views/contract/details/index.backup.vue

@@ -1,138 +0,0 @@
-<template>
-    <app-view class="goods-details">
-        <template #header>
-            <app-navbar title="转让详情" />
-        </template>
-        <Form ref="formRef" class="goods-details__form" @submit="onSubmit">
-            <CellGroup>
-                <Field name="TransferID" label="交收月份" :rules="formRules.TransferID" is-link>
-                    <template #input>
-                        <app-select :options="deliveryDate" @confirm="onDateChange" />
-                    </template>
-                </Field>
-                <Field label="到期日期" v-if="selectedDate?.enddate">
-                    <template #input>
-                        <span>{{ formatDate(selectedDate.enddate, 'YYYY-MM-DD') }}</span>
-                    </template>
-                </Field>
-                <Field label="原定金价" v-if="selectedDate?.tradeprice">
-                    <template #input>
-                        <span>{{ selectedDate.tradeprice }}</span>
-                    </template>
-                </Field>
-                <Field label="数量" v-if="selectedDate?.tradeqty">
-                    <template #input>
-                        <span>{{ selectedDate.tradeqty }}</span>
-                    </template>
-                </Field>
-                <Field label="转让价格" v-if="selectedDate?.transferprice">
-                    <template #input>
-                        <span>{{ selectedDate.transferprice }}</span>
-                    </template>
-                </Field>
-                <Field label="转让金额" v-if="selectedDate?.transferamount">
-                    <template #input>
-                        <span>{{ selectedDate.transferamount }}</span>
-                    </template>
-                </Field>
-            </CellGroup>
-        </Form>
-        <div class="goods-details__content">
-            <div class="submitbar">
-                <Button type="primary" @click="formRef?.submit" round block>摘牌</Button>
-            </div>
-            <template v-if="chartData.price.length">
-                <Divider>历史价格走势</Divider>
-                <div class="chart">
-                    <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
-                </div>
-            </template>
-            <Divider>商品详情</Divider>
-            <div class="gallery">
-                <template v-for="(url, index) in goodsImages" :key="index">
-                    <img :src="url" alt="" />
-                </template>
-            </div>
-        </div>
-    </app-view>
-</template>
-
-<script lang="ts" setup>
-import { shallowRef, computed, defineAsyncComponent } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance,showSuccessToast, showFailToast, FieldRule, Divider } from 'vant'
-import { fullloading } from '@/utils/vant'
-import { getImageUrl, formatDate, parsePercent } from '@/filters'
-import { useNavigation } from '@/hooks/navigation'
-import { useContractDetails } from '@/business/contract'
-import { useSpotPresaleTransferDesting } from '@/business/trade'
-import AppSelect from '@mobile/components/base/select/index.vue'
-import Long from 'long'
-
-const componentMap = new Map<string, unknown>([
-    ['chart', defineAsyncComponent(() => import('@mobile/components/modules/echarts-line/index.vue'))],
-])
-
-const { router, getQueryStringToNumber } = useNavigation()
-
-const wrstandardid = getQueryStringToNumber('wrstandardid')
-const formRef = shallowRef<FormInstance>()
-
-const { loading, details, chartData, getContractDetails } = useContractDetails(wrstandardid)
-const { formData, destingSubmit } = useSpotPresaleTransferDesting()
-
-// 当前选中的交割日期
-const selectedDate = shallowRef<Model.THJPurchaseTransferDetailRsp['deliverydate'][number]>()
-// 商品信息
-const goodsinfo = computed<Partial<Model.THJPurchaseTransferDetailRsp['goodsinfo']>>(() => details.value.goodsinfo ?? {})
-
-// 商品图片列表
-const goodsImages = computed(() => {
-    const pictureurls = goodsinfo.value.pictureurls ?? ''
-    return pictureurls.split(',').map((path) => getImageUrl(path))
-})
-
-// 表单验证规则
-const formRules: { [key in keyof Proto.SpotPresaleTransferDestingReq]?: FieldRule[] } = {
-    TransferID: [{
-        message: '请选择到期日期',
-        validator: () => {
-            return !formData.TransferID?.equals(0)
-        }
-    }],
-}
-
-// 交割日期列表
-const deliveryDate = computed(() => {
-    const list = details.value.deliverydate ?? []
-    return list.map((e) => ({
-        label: `${formatDate(e.enddate, 'YYYY-MM')} ${parsePercent(e.depositrate)}`,
-        value: e.transferid,
-    }))
-})
-
-// 切换交割日期
-const onDateChange = (value: string) => {
-    const list = details.value.deliverydate ?? []
-    selectedDate.value = list.find((e) => e.transferid === value)
-
-    formData.TransferID = Long.fromString(value)
-    formRef.value?.validate('TransferID')
-}
-
-const onSubmit = () => {
-    fullloading(() => {
-        destingSubmit().then(() => {
-            showSuccessToast('摘牌成功')
-            router.replace({ name: 'my-order' })
-        }).catch((err) => {
-            showFailToast(err)
-        })
-    })
-}
-
-getContractDetails()
-</script>
-
-<style lang="less">
-@import './index.less';
-</style>

+ 35 - 12
src/packages/mobile/views/contract/list/index.less

@@ -2,24 +2,47 @@
     &__header {
         .van-search {
             padding-top: 0;
+            background-color: transparent;
         }
     }
 
     &__container {
-        .van-cell__title {
-            display    : flex;
-            align-items: center;
+        .list {
+            padding: .2rem .2rem 0 .2rem;
 
-            img {
-                width        : 1.8rem;
-                height       : 1.8rem;
-                object-fit   : cover;
-                border-radius: .16rem;
-                margin-right : .4rem;
-            }
+            &-item {
+                display: flex;
+                align-items: center;
+                border-radius: .1rem;
+                overflow: hidden;
+                padding: .2rem;
+
+                &:not(:last-child) {
+                    margin-bottom: .2rem;
+                }
+
+                .block {
+                    &:first-child {
+                        flex: 1;
+                        display: flex;
+                        align-items: center;
+
+                        img {
+                            width: 1.8rem;
+                            height: 1.8rem;
+                            object-fit: cover;
+                            border-radius: .16rem;
+                            margin-right: .4rem;
+                        }
+                    }
 
-            span {
-                flex: 1;
+                    &:last-child {
+                        .van-button {
+                            width: 1.6rem;
+                            height: .5rem;
+                        }
+                    }
+                }
             }
         }
     }

+ 22 - 12
src/packages/mobile/views/contract/list/index.vue

@@ -3,27 +3,31 @@
         <template #header>
             <app-navbar class="contract__header" title="合同转让">
                 <template #footer>
-                    <Search shape="round" placeholder="商品搜索" disabled />
+                    <Search shape="round" placeholder="商品搜索" v-model="keyword" @search="pullRefreshRef.refresh()" />
                 </template>
             </app-navbar>
         </template>
-        <app-pull-refresh class="contract__container" v-model:error="error" v-model:pageIndex="pageIndex"
-            :page-count="pageCount" @refresh="onRefresh">
-            <template v-for="(item, index) in dataList" :key="index">
-                <Cell @click="$router.push({ name: 'contract-details', query: { wrstandardid: item.wrstandardid } })">
-                    <template #title>
+        <app-pull-refresh ref="pullRefreshRef" class="contract__container" v-model:error="error"
+            v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
+            <ul class="list">
+                <li class="list-item g-block--bg" v-for="(item, index) in dataList" :key="index">
+                    <div class="block">
                         <img :src="getFirstImage(item.thumurls)" />
                         <span>{{ item.wrstandardname }}</span>
-                    </template>
-                </Cell>
-            </template>
+                    </div>
+                    <div class="block">
+                        <Button type="primary" size="small" round
+                            @click="$router.push({ name: 'contract-details', query: { wrstandardid: item.wrstandardid } })">查看详情</Button>
+                    </div>
+                </li>
+            </ul>
         </app-pull-refresh>
     </app-view>
 </template>
   
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { Cell, Search } from 'vant'
+import { shallowRef, onActivated } from 'vue'
+import { Search, Button } from 'vant'
 import { getImageUrl } from '@/filters'
 import { useContractList } from '@/business/contract'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
@@ -31,6 +35,8 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 const { pageIndex, pageCount, getWrstandardList } = useContractList()
 const dataList = shallowRef<Model.THJPurchaseTransferRsp[]>([])
 const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const keyword = shallowRef('')
 
 // 获取产品首图
 const getFirstImage = (url: string) => {
@@ -39,7 +45,7 @@ const getFirstImage = (url: string) => {
 }
 
 const onRefresh = (finish: () => void) => {
-    getWrstandardList().then((res) => {
+    getWrstandardList({ wrstandardname: keyword.value }).then((res) => {
         if (pageIndex.value === 1) {
             dataList.value = []
         }
@@ -50,6 +56,10 @@ const onRefresh = (finish: () => void) => {
         finish()
     })
 }
+
+onActivated(() => {
+    pullRefreshRef.value?.refresh()
+})
 </script>
   
 <style lang="less">

+ 0 - 2
src/packages/mobile/views/credit/signin/index.less

@@ -21,8 +21,6 @@
         padding-bottom: 0;
 
         &-wrapper {
-            background: #fff url('@mobile/assets/images/block-bg.png') no-repeat center bottom;
-            background-size: 100%;
             border-top-left-radius: .1rem;
             border-top-right-radius: .1rem;
         }

+ 1 - 1
src/packages/mobile/views/credit/signin/index.vue

@@ -4,7 +4,7 @@
             <app-navbar title="我的任务" @ready="onReady" />
         </template>
         <div ref="headerRef" class="credit-signin__header">
-            <div class="credit-signin__header-wrapper">
+            <div class="credit-signin__header-wrapper g-block--bg">
                 <div class="integral">
                     <div class="integral-balance">
                         {{ userAccount.curscore ?? 0 }}

+ 0 - 2
src/packages/mobile/views/home/components/main/index.less

@@ -54,8 +54,6 @@
     }
 
     &__iconbar {
-        background: #fff url('@mobile/assets/images/block-bg.png') no-repeat center bottom;
-        background-size: 100%;
         border-radius: .1rem;
         overflow: hidden;
         padding-bottom: .24rem;

+ 1 - 1
src/packages/mobile/views/home/components/main/index.vue

@@ -13,7 +13,7 @@
       </div>
     </app-statusbar>
     <PullRefresh class="home-main__container" v-model="refreshing" @refresh="onRefresh">
-      <div class="home-main__iconbar">
+      <div class="home-main__iconbar g-block--bg">
         <ul>
           <li @click="routerTo('product')">
             <img src="@mobile/assets/icons/cpjs.png" />

+ 2 - 1
src/packages/mobile/views/mine/main/index.less

@@ -149,10 +149,11 @@
     }
 
     &-footer {
+        text-align: center;
         padding: .2rem 0;
 
         .button-logout {
-            width: 100%;
+            width: 50%;
             border: 0;
         }
     }

+ 1 - 1
src/packages/mobile/views/mine/main/index.vue

@@ -107,7 +107,7 @@
       </CellGroup>
     </div>
     <div class="mine-footer">
-      <Button class="button-logout" @click="userLogout">退出登录</Button>
+      <Button class="button-logout" type="primary" size="small" round @click="userLogout">退出登录</Button>
     </div>
   </app-view>
 </template>

+ 1 - 1
src/packages/mobile/views/mine/order/list/index.less

@@ -16,7 +16,7 @@
 
     &__navbar {
         .button-more {
-            height: 100%;
+            padding: .2rem;
         }
     }
 

+ 35 - 36
src/packages/mobile/views/product/detail/index.less

@@ -1,43 +1,35 @@
 .product-details {
-    &__content {
-        .van-divider {
-            font-size  : .32rem;
-            font-weight: bold;
-            color      : #333;
-            padding    : var(--van-divider-margin);
-            margin     : 0;
-        }
-
-        .banner {
-            .van-swipe {
-                background-color: #999;
-                min-height      : 3rem;
+    &__banner {
+        background-color: #ddd;
+        min-height: 3rem;
 
-                &-item {
-                    height   : 3rem;
-                    font-size: 0;
+        .van-swipe-item {
+            height: 3rem;
+            font-size: 0;
 
-                    img {
-                        width     : 100%;
-                        height    : 100%;
-                        object-fit: cover;
-                    }
-                }
+            img {
+                width: 100%;
+                height: 100%;
+                object-fit: cover;
             }
         }
+    }
+
+    &__content {
+        padding: .2rem;
 
         .goods {
-            position        : relative;
-            display         : flex;
-            flex-direction  : column;
-            align-items     : center;
+            position: relative;
+            display: flex;
+            flex-direction: column;
+            align-items: center;
             background-color: #fff;
-            padding         : .32rem;
-            margin-bottom   : .2rem;
+            padding: .32rem;
+            margin-bottom: .2rem;
 
             &-title {
                 line-height: 1;
-                font-size  : .36rem;
+                font-size: .36rem;
                 font-weight: bold;
             }
 
@@ -46,18 +38,18 @@
 
                 span {
                     &.red {
-                        font-size  : .48rem;
+                        font-size: .48rem;
                         font-weight: bold;
-                        color      : #E84F42;
-                        margin     : 0 .12rem;
+                        color: #E84F42;
+                        margin: 0 .12rem;
                     }
                 }
             }
 
             &-favorite {
-                position : absolute;
-                right    : .32rem;
-                top      : 50%;
+                position: absolute;
+                right: .32rem;
+                top: 50%;
                 font-size: .48rem;
                 transform: translateY(-50%);
             }
@@ -65,11 +57,18 @@
 
         .chart {
             background-color: #fff;
-            margin-bottom   : .2rem;
+            margin-bottom: .2rem;
         }
 
         .gallery {
             background-color: #fff;
+
+            h2 {
+                font-size: .3rem;
+                font-weight: bold;
+                text-align: center;
+                padding: .28rem 0;
+            }
         }
     }
 }

+ 8 - 8
src/packages/mobile/views/product/detail/index.vue

@@ -3,13 +3,13 @@
         <template #header>
             <app-navbar title="商品详情" />
         </template>
+        <Swipe class="product-details__banner" :autoplay="5000" indicator-color="white" lazy-render>
+            <SwipeItem v-for="(url, index) in topBanners" :key="index">
+                <img :src="url" />
+            </SwipeItem>
+        </Swipe>
         <div class="product-details__content">
-            <Swipe class="banner" :autoplay="5000" indicator-color="white" lazy-render>
-                <SwipeItem v-for="(url, index) in topBanners" :key="index">
-                    <img :src="url" />
-                </SwipeItem>
-            </Swipe>
-            <div class="goods">
+            <div class="goods g-block--bg">
                 <h1 class="goods-title">{{ goodsinfo.wrstandardname }}</h1>
                 <div class="goods-price">
                     <span>参考价</span>
@@ -22,7 +22,7 @@
                 <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
             </div>
             <div class="gallery">
-                <Divider>商品详情</Divider>
+                <h2>商品详情</h2>
                 <template v-for="(url, index) in goodsImages" :key="index">
                     <img :src="url" alt="" />
                 </template>
@@ -34,7 +34,7 @@
 <script lang="ts" setup>
 import { defineAsyncComponent, computed } from 'vue'
 import { useNavigation } from '@/hooks/navigation'
-import { Divider, Swipe, SwipeItem } from 'vant'
+import { Swipe, SwipeItem } from 'vant'
 import { getImageUrl } from "@/filters";
 import { useWrstandardDetails } from '@/business/goods'
 import { getGoodsUnitName } from '@/constants/unit'

+ 34 - 18
src/packages/mobile/views/product/list/index.less

@@ -1,25 +1,41 @@
 .product {
-    &__header {
-        .van-search {
-            padding-top: 0;
-        }
-    }
-
     &__container {
-        .van-cell__title {
-            display    : flex;
-            align-items: center;
+        .list {
+            padding: .2rem .2rem 0 .2rem;
 
-            img {
-                width        : 1.8rem;
-                height       : 1.8rem;
-                object-fit   : cover;
-                border-radius: .16rem;
-                margin-right : .4rem;
-            }
+            &-item {
+                display: flex;
+                align-items: center;
+                border-radius: .1rem;
+                overflow: hidden;
+                padding: .2rem;
+
+                &:not(:last-child) {
+                    margin-bottom: .2rem;
+                }
+
+                .block {
+                    &:first-child {
+                        flex: 1;
+                        display: flex;
+                        align-items: center;
+
+                        img {
+                            width: 1.8rem;
+                            height: 1.8rem;
+                            object-fit: cover;
+                            border-radius: .16rem;
+                            margin-right: .4rem;
+                        }
+                    }
 
-            span {
-                flex: 1;
+                    &:last-child {
+                        .van-button {
+                            width: 1.6rem;
+                            height: .5rem;
+                        }
+                    }
+                }
             }
         }
     }

+ 11 - 9
src/packages/mobile/views/product/list/index.vue

@@ -5,22 +5,25 @@
     </template>
     <app-pull-refresh class="product__container" v-model:error="error" v-model:pageIndex="pageIndex"
       :page-count="pageCount" @refresh="onRefresh">
-      <template v-for="(item, index) in dataList" :key="index">
-        <Cell
-          @click="$router.push({ name: 'product-detail', query: { favorite: active, wrstandardid: item.wrstandardid } })">
-          <template #title>
+      <ul class="list">
+        <li class="list-item g-block--bg" v-for="(item, index) in dataList" :key="index">
+          <div class="block">
             <img :src="getFirstImage(item.thumurls)" />
             <span>{{ item.wrstandardname }}</span>
-          </template>
-        </Cell>
-      </template>
+          </div>
+          <div class="block">
+            <Button type="primary" size="small" round
+              @click="$router.push({ name: 'product-detail', query: { favorite: active, wrstandardid: item.wrstandardid } })">查看详情</Button>
+          </div>
+        </li>
+      </ul>
     </app-pull-refresh>
   </app-view>
 </template>
   
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
-import { Cell } from 'vant'
+import { Button } from 'vant'
 import { getImageUrl } from '@/filters'
 import { useQueryTHJProductLists } from '@/business/goods'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
@@ -48,7 +51,6 @@ const onRefresh = (finish: () => void) => {
     finish()
   })
 }
-
 </script>
 
 <style lang="less">

+ 0 - 276
src/packages/mobile/views/purchase/detail/index.backup.vue

@@ -1,276 +0,0 @@
-<template>
-    <app-view class="goods-details">
-        <template #header>
-            <app-navbar title="采购详情" />
-        </template>
-        <Form ref="formRef" class="goods-details__form" @submit="onSubmit">
-            <CellGroup>
-                <Field name="THJDeliveryMode" label="交收方式" :rules="formRules.THJDeliveryMode" is-link>
-                    <template #input>
-                        <app-select v-model="formData.THJDeliveryMode" placeholder="请选择"
-                            :options="details.deliverymodes"
-                            :optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
-                    </template>
-                </Field>
-                <Field label="交收月份" name="PresaleApplyID" :rules="formRules.PresaleApplyID">
-                    <template #input>
-                        <app-select placeholder="开始月份" :options="deliveryMonths" @confirm="onMonthChange" />
-                        <app-select placeholder="结束日期" :options="deliveryDays"
-                            :optionProps="{ label: 'enddate', value: 'presaleapplyid' }" @confirm="onDayChange" />
-                    </template>
-                </Field>
-                <Field name="DepositID" label="支付方式" :rules="formRules.DepositID" is-link
-                    v-if="selectedDate?.presaleapplyid">
-                    <template #input>
-                        <app-select placeholder="请选择" :options="presaleApplyDeposits" @confirm="onDepositChange" />
-                    </template>
-                </Field>
-                <Field v-model="formData.Qty" name="Qty" type="digit" label="采购数量" :rules="formRules.Qty">
-                    <template #input>
-                        <div class="form-qty">
-                            <div class="form-qty__input">
-                                <input type="number" v-model="formData.Qty" placeholder="必填" />
-                                <span v-if="selectedDate">≤{{ selectedDate.remainqty }}{{
-                                        getGoodsUnitName(goodsinfo.unitid)
-                                }}</span>
-                            </div>
-                            <div class="form-qty__label">
-                                <span>定金{{ deposit }}元</span>
-                            </div>
-                        </div>
-                    </template>
-                </Field>
-                <Field label="收货信息" :rules="formRules.addressInfo" @click="openComponent('address')" is-link
-                    v-if="showAddressInfo">
-                    <template #input>
-                        <div class="form-address">
-                            <template v-if="validatorAddressInfo">
-                                <span>联系人:{{ formData.ContactName }}</span>
-                                <span>联系方式:{{ formData.ContactInfo }}</span>
-                                <span v-if="formData.THJDeliveryMode === 3">目的地:{{ formData.DesAddress }}</span>
-                                <span v-if="formData.ReceiptInfo">发票信息:{{ formData.ReceiptInfo }}</span>
-                            </template>
-                            <template v-else>
-                                <span class="form-address__placeholder">必填</span>
-                            </template>
-                        </div>
-                    </template>
-                </Field>
-            </CellGroup>
-        </Form>
-        <div class="goods-details__content">
-            <div class="submitbar">
-                <Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
-            </div>
-            <div class="titlebar" v-if="selectedDate">
-                <span>参考价(元/{{ getGoodsUnitName(goodsinfo.unitid) }})</span>
-                <span>{{ selectedDate.unitprice ?? 0.00 }}</span>
-            </div>
-            <template v-if="chartData.price.length">
-                <Divider>历史价格走势</Divider>
-                <div class="chart">
-                    <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
-                </div>
-            </template>
-            <Divider>商品详情</Divider>
-            <div class="gallery">
-                <template v-for="(url, index) in goodsImages" :key="index">
-                    <img :src="url" alt="" />
-                </template>
-            </div>
-        </div>
-        <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ formData }" @updated="updateForm"
-            @closed="closeComponent" v-if="componentId" />
-    </app-view>
-</template>
-
-<script lang="ts" setup>
-import { shallowRef, computed, defineAsyncComponent } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance, showSuccessToast, showFailToast, FieldRule, Divider } from 'vant'
-import { fullloading } from '@/utils/vant'
-import { getImageUrl, parsePercent } from '@/filters'
-import { getGoodsUnitName } from '@/constants/unit'
-import { useComponent } from '@/hooks/component'
-import { useNavigation } from '@/hooks/navigation'
-import { useWrstandardDetails } from '@/business/goods'
-import { usePurchaseOrderDesting } from '@/business/trade'
-import AppSelect from '@mobile/components/base/select/index.vue'
-import Long from 'long'
-
-const componentMap = new Map<string, unknown>([
-    ['address', defineAsyncComponent(() => import('./components/address/index.vue'))],
-    ['chart', defineAsyncComponent(() => import('@mobile/components/modules/echarts-line/index.vue'))],
-])
-
-const { componentRef, componentId, openComponent, closeComponent } = useComponent()
-const { router, getQueryStringToNumber } = useNavigation()
-
-const wrstandardid = getQueryStringToNumber('wrstandardid')
-const formRef = shallowRef<FormInstance>()
-
-const { loading, details, chartData, getWrstandardDetails } = useWrstandardDetails(wrstandardid)
-const { formData, formSubmit } = usePurchaseOrderDesting()
-
-// 交割日期列表
-const deliveryDays = shallowRef<Model.THJWrstandardDetailRsp['deliverymonth']>([])
-// 当前选中的交割日期
-const selectedDate = shallowRef<Model.THJWrstandardDetailRsp['deliverymonth'][number]>()
-// 商品信息
-const goodsinfo = computed<Partial<Model.THJWrstandardDetailRsp['goodsinfo']>>(() => details.value.goodsinfo ?? {})
-
-// 商品图片列表
-const goodsImages = computed(() => {
-    const pictureurls = goodsinfo.value.pictureurls ?? ''
-    return pictureurls.split(',').map((path) => getImageUrl(path))
-})
-
-// 交割月份列表
-const deliveryMonths = computed(() => {
-    const months = details.value.deliverymonth ?? []
-    const monthMap = new Map<string, { label: string, value: string; }>()
-    months.forEach(({ endmonth }) => {
-        if (!monthMap.has(endmonth)) {
-            monthMap.set(endmonth, {
-                label: endmonth,
-                value: endmonth,
-            })
-        }
-    })
-    return [...monthMap.values()]
-})
-
-// 预售申请列表
-const presaleApplyDeposits = computed(() => {
-    const deposits = details.value.presaleapplydeposits ?? []
-    const presaleApplyId = selectedDate.value?.presaleapplyid
-
-    return deposits.filter((e) => e.presaleapplyid === presaleApplyId).map(({ depositid, depositrate }) => ({
-        label: parsePercent(depositrate),
-        value: depositid
-    }))
-})
-
-// 计算定价
-const deposit = computed(() => {
-    const { Qty = 0, DepositID } = formData.value
-    const { presaleapplydeposits } = details.value
-    const { unitprice = 0 } = selectedDate.value ?? {}
-    const apply = presaleapplydeposits?.find((e) => e.depositid === DepositID?.toString()) // 选中的支付方式
-
-    if (apply) {
-        return (unitprice * apply.depositrate * Qty).toFixed(2)
-    }
-    return '0.00'
-})
-
-// 是否显示收货信息
-const showAddressInfo = computed(() => {
-    const { THJDeliveryMode } = formData.value
-    return THJDeliveryMode === 2 || THJDeliveryMode === 3
-})
-
-// 验证收货信息
-const validatorAddressInfo = computed(() => {
-    const { THJDeliveryMode, ContactName, ContactInfo, DesAddress } = formData.value
-    switch (THJDeliveryMode) {
-        case 2: {
-            if (ContactName && ContactInfo) return true
-            return false
-        }
-        case 3: {
-            if (ContactName && ContactInfo && DesAddress) return true
-            return false
-        }
-    }
-    return true
-})
-
-// 表单验证规则
-const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq | 'addressInfo']?: FieldRule[] } = {
-    THJDeliveryMode: [{
-        message: '请选择交收方式',
-        validator: () => {
-            return !!formData.value.THJDeliveryMode
-        }
-    }],
-    PresaleApplyID: [
-        {
-            message: '请选择到期日期',
-            validator: () => {
-                return !!formData.value.PresaleApplyID
-            }
-        }
-    ],
-    DepositID: [{
-        message: '请选择支付方式',
-        validator: () => {
-            return !!formData.value.DepositID
-        }
-    }],
-    Qty: [{
-        message: '请输入采购数量',
-        validator: (val) => {
-            if (val) {
-                const qty = Number(val)
-                const { remainqty = 0 } = selectedDate.value ?? {}
-                if (qty > 0 && qty <= remainqty) {
-                    return true
-                }
-                return '采购数量不正确'
-            }
-            return false
-        }
-    }],
-    addressInfo: [{
-        message: '请输入收货信息',
-        validator: () => {
-            return validatorAddressInfo.value
-        }
-    }],
-}
-
-// 切换交割月份
-const onMonthChange = (value: string) => {
-    const months = details.value.deliverymonth ?? []
-    deliveryDays.value = months.filter((e) => e.endmonth === value) // 重新过滤交割日期列表
-    selectedDate.value = undefined // 清除选中的交割日期
-    formData.value.PresaleApplyID = undefined
-}
-
-// 切换交割日期
-const onDayChange = (value: string) => {
-    const months = details.value.deliverymonth ?? []
-    selectedDate.value = months.find((e) => e.presaleapplyid === value)
-    formData.value.PresaleApplyID = Long.fromString(value)
-    formData.value.DepositID = undefined
-    formRef.value?.validate('PresaleApplyID')
-}
-
-// 切换支付方式
-const onDepositChange = (value: string) => {
-    formData.value.DepositID = Long.fromString(value)
-    formRef.value?.validate('DepositID')
-}
-
-// 更新表单数据
-const updateForm = (formValue: Proto.SpotPresaleDestingOrderReq) => {
-    formData.value = formValue
-}
-
-const onSubmit = () => {
-    fullloading(() => {
-        formSubmit().then(() => {
-            showSuccessToast('下单成功')
-            router.replace({ name: 'my-order' })
-        }).catch((err) => {
-            showFailToast(err)
-        })
-    })
-}
-
-getWrstandardDetails()
-</script>
-
-<style lang="less">
-@import './index.less';
-</style>

+ 24 - 26
src/packages/mobile/views/purchase/detail/index.less

@@ -1,5 +1,13 @@
 .goods-details {
+    .app-view__body {
+        padding: .2rem;
+    }
+
     &__form {
+        border-radius: .1rem;
+        overflow: hidden;
+        margin-top: .2rem;
+
         .form {
             &-qty {
                 width: 100%;
@@ -36,36 +44,26 @@
         }
     }
 
-    &__content {
-        background-color: #fff;
-
-        .van-divider {
-            font-size: .36rem;
-            font-weight: bold;
-            color: #333;
-        }
+    &__btnbar {
+        text-align: center;
+        margin: .32rem 0;
 
-        .submitbar {
-            padding: .32rem;
+        .van-button {
+            width: 50%;
         }
+    }
 
-        .titlebar {
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            gap: .16rem;
-
-            span {
-                &:first-child {
-                    font-size: .32rem;
-                }
+    &__content {
+        background-color: #fff;
+        border-radius: .1rem;
+        overflow: hidden;
+        margin-top: .2rem;
 
-                &:last-child {
-                    font-size: .4rem;
-                    font-weight: bold;
-                    color: #E84F42;
-                }
-            }
+        h2 {
+            font-size: .3rem;
+            font-weight: bold;
+            text-align: center;
+            padding: .28rem 0;
         }
     }
 }

+ 11 - 15
src/packages/mobile/views/purchase/detail/index.vue

@@ -71,22 +71,18 @@
                 </Field>
             </CellGroup>
         </Form>
+        <div class="goods-details__btnbar">
+            <Button type="primary" size="small" @click="formRef?.submit" round>采购下单</Button>
+        </div>
+        <div class="goods-details__content" v-if="chartData.price.length">
+            <h2>历史价格走势</h2>
+            <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
+        </div>
         <div class="goods-details__content">
-            <div class="submitbar">
-                <Button type="primary" @click="formRef?.submit" round block>采购下单</Button>
-            </div>
-            <template v-if="chartData.price.length">
-                <Divider>历史价格走势</Divider>
-                <div class="chart">
-                    <component :is="componentMap.get('chart')" :loading="loading" :data-list="chartData" />
-                </div>
+            <h2>商品详情</h2>
+            <template v-for="(url, index) in goodsImages" :key="index">
+                <img :src="url" alt="" />
             </template>
-            <Divider>商品详情</Divider>
-            <div class="gallery">
-                <template v-for="(url, index) in goodsImages" :key="index">
-                    <img :src="url" alt="" />
-                </template>
-            </div>
         </div>
         <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ formData }" @updated="updateForm"
             @closed="closeComponent" v-if="componentId" />
@@ -95,7 +91,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, computed, defineAsyncComponent } from 'vue'
-import { CellGroup, Button, Field, Form, FormInstance, showSuccessToast, showFailToast, FieldRule, Divider } from 'vant'
+import { CellGroup, Button, Field, Form, FormInstance, showSuccessToast, showFailToast, FieldRule } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { getImageUrl, parsePercent } from '@/filters'
 import { getGoodsUnitName } from '@/constants/unit'

+ 35 - 12
src/packages/mobile/views/purchase/list/index.less

@@ -2,24 +2,47 @@
     &__header {
         .van-search {
             padding-top: 0;
+            background-color: transparent;
         }
     }
 
     &__container {
-        .van-cell__title {
-            display: flex;
-            align-items: center;
+        .list {
+            padding: .2rem .2rem 0 .2rem;
 
-            img {
-                width: 1.8rem;
-                height: 1.8rem;
-                object-fit: cover;
-                border-radius: .16rem;
-                margin-right: .4rem;
-            }
+            &-item {
+                display: flex;
+                align-items: center;
+                border-radius: .1rem;
+                overflow: hidden;
+                padding: .2rem;
+
+                &:not(:last-child) {
+                    margin-bottom: .2rem;
+                }
+
+                .block {
+                    &:first-child {
+                        flex: 1;
+                        display: flex;
+                        align-items: center;
+
+                        img {
+                            width: 1.8rem;
+                            height: 1.8rem;
+                            object-fit: cover;
+                            border-radius: .16rem;
+                            margin-right: .4rem;
+                        }
+                    }
 
-            span {
-                flex: 1;
+                    &:last-child {
+                        .van-button {
+                            width: 1.3rem;
+                            height: .5rem;
+                        }
+                    }
+                }
             }
         }
     }

+ 23 - 12
src/packages/mobile/views/purchase/list/index.vue

@@ -3,27 +3,31 @@
     <template #header>
       <app-navbar class="purchase__header" title="采购" :show-back-button="false">
         <template #footer>
-          <Search shape="round" placeholder="商品搜索" />
+          <Search shape="round" placeholder="商品搜索" v-model="keyword" @search="pullRefreshRef.refresh()" />
         </template>
       </app-navbar>
     </template>
-    <app-pull-refresh class="purchase__container" v-model:error="error" v-model:pageIndex="pageIndex"
-      :page-count="pageCount" @refresh="onRefresh">
-      <template v-for="(item, index) in dataList" :key="index">
-        <Cell @click="$router.push({ name: 'PurchaseDetail', query: { wrstandardid: item.wrstandardid } })">
-          <template #title>
+    <app-pull-refresh ref="pullRefreshRef" class="purchase__container" v-model:error="error"
+      v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
+      <ul class="list">
+        <li class="list-item g-block--bg" v-for="(item, index) in dataList" :key="index">
+          <div class="block">
             <img :src="getFirstImage(item.thumurls)" />
             <span>{{ item.wrstandardname }}</span>
-          </template>
-        </Cell>
-      </template>
+          </div>
+          <div class="block">
+            <Button type="primary" size="small" round
+              @click="$router.push({ name: 'PurchaseDetail', query: { wrstandardid: item.wrstandardid } })">去采购</Button>
+          </div>
+        </li>
+      </ul>
     </app-pull-refresh>
   </app-view>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef } from 'vue'
-import { Cell, Search } from 'vant'
+import { shallowRef, onActivated } from 'vue'
+import { Search, Button } from 'vant'
 import { getImageUrl } from '@/filters'
 import { useWrstandardList } from '@/business/goods'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
@@ -31,6 +35,8 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 const { pageIndex, pageCount, getWrstandardList } = useWrstandardList()
 const dataList = shallowRef<Model.THJWrstandardRsp[]>([])
 const error = shallowRef(false)
+const pullRefreshRef = shallowRef()
+const keyword = shallowRef('')
 
 // 获取产品首图
 const getFirstImage = (url: string) => {
@@ -39,7 +45,7 @@ const getFirstImage = (url: string) => {
 }
 
 const onRefresh = (finish: () => void) => {
-  getWrstandardList().then((res) => {
+  getWrstandardList({ wrstandardname: keyword.value }).then((res) => {
     if (pageIndex.value === 1) {
       dataList.value = []
     }
@@ -50,6 +56,11 @@ const onRefresh = (finish: () => void) => {
     finish()
   })
 }
+
+onActivated(() => {
+  keyword.value = ''
+  pullRefreshRef.value?.refresh()
+})
 </script>
 
 <style lang="less">

+ 5 - 3
src/packages/mobile/views/rules/ccwl/index.vue

@@ -5,9 +5,11 @@
         </template>
         <Tabs>
             <Tab title="运输委托">
-                <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
-                    <h4 style="margin-bottom: .32rem;">运输委托模版.docx</h4>
-                    <Button type="primary" style="width: 50%;" round @click="download">下载文档</Button>
+                <div style="padding: .2rem;">
+                    <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
+                        <h4 style="margin-bottom: .32rem;">运输委托模版.docx</h4>
+                        <Button type="primary" style="width: 50%;" round @click="download">下载文档</Button>
+                    </div>
                 </div>
             </Tab>
             <Tab title="仓储服务">

+ 5 - 3
src/packages/mobile/views/rules/cght/index.vue

@@ -11,9 +11,11 @@
     <template #header>
       <app-navbar title="采购合同" />
     </template>
-    <div style="text-align: center; background-color: #fff; padding: 1rem 0">
-      <h4 style="margin-bottom: 0.32rem">产能预售合同.docx</h4>
-      <Button type="primary" style="width: 50%" round @click="download">下载文档</Button>
+    <div style="padding: .2rem;">
+      <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
+        <h4 style="margin-bottom: .32rem;">产能预售合同.docx</h4>
+        <Button type="primary" style="width: 50%;" round @click="download">下载文档</Button>
+      </div>
     </div>
   </app-view>
 </template>

+ 9 - 7
src/packages/mobile/views/rules/xhht/index.vue

@@ -11,13 +11,15 @@
     <template #header>
       <app-navbar title="现货合同" />
     </template>
-    <div style="text-align: center; background-color: #fff; padding: 1rem 0">
-      <h4 style="margin-bottom: 0.32rem">现货贸易合同(买方).docx</h4>
-      <Button type="primary" style="width: 50%" round @click="downloadbuy">下载文档</Button>
-    </div>
-    <div style="text-align: center; background-color: #fff; padding: 1rem 0">
-      <h4 style="margin-bottom: 0.32rem">现货贸易合同(卖方).docx</h4>
-      <Button type="primary" style="width: 50%" round @click="downloadsell">下载文档</Button>
+    <div style="padding: .2rem;">
+      <div style="text-align: center;background-color: #fff;padding: 1rem 0;margin-bottom: .2rem;">
+        <h4 style="margin-bottom: .32rem;">现货贸易合同(买方).docx</h4>
+        <Button type="primary" style="width: 50%;" round @click="downloadbuy">下载文档</Button>
+      </div>
+      <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
+        <h4 style="margin-bottom: .32rem;">现货贸易合同(卖方).docx</h4>
+        <Button type="primary" style="width: 50%;" round @click="downloadsell">下载文档</Button>
+      </div>
     </div>
   </app-view>
 </template>

+ 5 - 3
src/packages/mobile/views/rules/zrht/index.vue

@@ -11,9 +11,11 @@
     <template #header>
       <app-navbar title="合同转让" />
     </template>
-    <div style="text-align: center; background-color: #fff; padding: 1rem 0">
-      <h4 style="margin-bottom: 0.32rem">协议转让合同.docx</h4>
-      <Button type="primary" style="width: 50%" round @click="download">下载文档</Button>
+    <div style="padding: .2rem;">
+      <div style="text-align: center;background-color: #fff;padding: 1rem 0;">
+        <h4 style="margin-bottom: .32rem;">协议转让合同.docx</h4>
+        <Button type="primary" style="width: 50%;" round @click="download">下载文档</Button>
+      </div>
     </div>
   </app-view>
 </template>

+ 1 - 1
src/types/model/contract.d.ts

@@ -3,7 +3,7 @@ declare namespace Model {
     interface THJPurchaseTransferReq {
         page?: number; // 页码
         pagesize?: number; // 每页条数
-        wrstandardname?: number; // 现货商品名称(模糊查询)
+        wrstandardname?: string; // 现货商品名称(模糊查询)
     }
 
     /** 查询合同转让列表 响应 */