Handy_Cao 2 年之前
父節點
當前提交
8698c06af8

+ 7 - 1
GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts

@@ -5,6 +5,7 @@ import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { formatDateString } from "../../../../utils/util"
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
+import services from "../../../../services/index"
 
 Page({
 
@@ -106,7 +107,12 @@ Page({
   onLoad(options: any) {
     const obj = JSON.parse(options.item)
     /// 解析数据
-    this.setData({ item: obj })
+    this.setData({ 
+      item: obj,
+      banners: String(obj.pictureurls).split(',').map(itm => {
+        return (services.config.openApiUrl+itm).replace('./uploadFile', '/uploadFile')
+      })
+     })
     /// 查询履约模板
     this.queryPermancePlanTmp(obj.performancetemplateid)
   },

+ 16 - 16
GuangZuan/miniprogram/mHome/pages/presell/detail/index.wxml

@@ -7,9 +7,9 @@
 
   <!-- banner轮播图 -->
   <swiper class="banner" wx:if="{{ banners.count != 0 }}" indicator-active-color="orange" indicator-dots autoplay interval="5000" circular>
-    <swiper-item class="banner_item" wx:for="4" wx:key="index" id="{{ item }}">
+    <swiper-item class="banner_item" wx:for="{{ banners }}" wx:for-item="itm" wx:key="index" id="{{ item }}">
       <view class="swiper-item">
-        <image src='https://img.yzcdn.cn/vant/cat.jpeg' mode="widthFix" />
+        <image src='{{ itm }}' mode="widthFix" />
       </view>
     </swiper-item>
   </swiper>
@@ -20,33 +20,33 @@
     <view class="container__top__row">
       <text selectable="false">钻石1001</text>
       <text selectable="false">2000克拉</text>
-      <text selectable="false">¥8000</text>
+      <text selectable="false">{{ item.price }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">预售总量:10000克拉</text>
+      <text selectable="false">预售总量:{{ item.presaleqty }}</text>
       <text selectable="false">已认购数量:10000克拉</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">最小采购单位:100</text>
-      <text selectable="false">最大采购单位:10000</text>
+      <text selectable="false">最小采购单位:{{ item.minbuyqty }}</text>
+      <text selectable="false">最大采购单位:{{ item.maxbuyqty }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">最低成团量:4000</text>
-      <text selectable="false">采购保证金比例:20%</text>
+      <text selectable="false">最低成团量:{{ item.minsuccessqty }}</text>
+      <text selectable="false">采购保证金比例:{{ item.buymarginvalue }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">开始日期:2022-03-08</text>
-      <text selectable="false">结束日期:2022-03-08</text>
+      <text selectable="false">开始日期:{{ item.startdate }}</text>
+      <text selectable="false">结束日期:{{ item.enddate }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">状态:进行中</text>
+      <text selectable="false">状态:{{ item.status }}</text>
       <text selectable="false">已认购数量:2000</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">备注:进行中</text>
+      <text selectable="false">备注:{{ item.remark }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">单号:1809748484948848484</text>
+      <text selectable="false">单号:{{ item.presaleapplyid }}</text>
     </view>
   </view>
 
@@ -54,9 +54,9 @@
 
   <view class="container__diamondinfo">
     <text selectable="false">【钻石参考信息】</text>
-    <text selectable="false">颜色:{{  }} </text>
-    <text selectable="false">净度:{{  }} </text>
-    <text selectable="false">尺寸:{{  }} </text>
+    <text selectable="false">颜色:{{ item.zscolortypestr }} </text>
+    <text selectable="false">净度:{{ item.zsclaritytypestr }} </text>
+    <text selectable="false">尺寸:{{ item.sizestr }} </text>
     <text selectable="false">成品率:{{  }} </text>
     <text selectable="false">重量:{{  }} </text>
     <text selectable="false">数量:{{  }} </text>

+ 18 - 1
GuangZuan/miniprogram/mHome/pages/presell/list/index.less

@@ -51,12 +51,29 @@
         padding: 5px 15px;
 
         text {
-          text-align: left;
           color: #333;
           font-size: 14px;
           width: 100%;
         }
       }
+
+      &__row {
+        text {
+          text-align: left;
+        }
+      }
+
+      &__top {
+        text {
+          text-align: center;
+        }
+        :nth-child(1) {
+          text-align: left;
+        }
+        :nth-last-child(1) {
+          text-align: right;
+        }
+      }
     }
   }
 }

+ 33 - 28
GuangZuan/miniprogram/mHome/pages/presell/list/index.ts

@@ -20,7 +20,7 @@ Page({
       /// tabs
       tabs: [{id: 1, name: '预售大厅'}, {id: 2, name: '我的预售'}, {id: 3, name: '我参与的预售'}],
       /// subtabs
-      subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}],
+      subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}],
       /// 类别
       active: 0,
       /// 状态
@@ -32,7 +32,7 @@ Page({
       /// 我参与的预售(预售中\执行中)\我参与的集采(集采中\执行中) 列表查询
       myTradingPreSells: <GuangZuan.GZMyTradingPreSell[]>[],
       /// 显示数据信息
-      values: <{}>[]
+      values: [{}]
   },
 
   /**
@@ -83,14 +83,16 @@ Page({
                   presalestatus: obj.presalestatus,
                   ysproductionmode: obj.ysproductionmode,
                   yszscategory: obj.yszscategory,
-                  yieldrate: obj.yieldrate,
-                  zsclaritytypestr: obj.zsclaritytypestr,
-                  zscolortypestr: obj.zscolortypestr,
-                  zscuttypestr: obj.zscuttypestr,
-                  zsfluorescencetypestr: obj.zsfluorescencetypestr,
-                  zspolishtypestr: obj.zspolishtypestr,
-                  zsshapetypestr: obj.zsshapetypestr,
-                  zssymmetrytypestr: obj.zssymmetrytypestr,
+                  yieldrate: isnullstr(obj.yieldrate),
+                  zsclaritytypestr: isnullstr(obj.zsclaritytypestr),
+                  zscolortypestr: isnullstr(obj.zscolortypestr),
+                  zscuttypestr: isnullstr(obj.zscuttypestr),
+                  zsfluorescencetypestr: isnullstr(obj.zsfluorescencetypestr),
+                  zspolishtypestr: isnullstr(obj.zspolishtypestr),
+                  zsshapetypestr: isnullstr(obj.zsshapetypestr),
+                  zssymmetrytypestr: isnullstr(obj.zssymmetrytypestr),
+                  sizestr: isnullstr(obj.sizestr),
+                  remark: isnullstr(obj.remark)
                 }
               })
             })
@@ -153,14 +155,16 @@ Page({
                   orderqty: obj.orderqty.toFixed(2),
                   ysproductionmode: obj.ysproductionmode,
                   yszscategory: obj.yszscategory,
-                  yieldrate: obj.yieldrate,
-                  zsclaritytypestr: obj.zsclaritytypestr,
-                  zscolortypestr: obj.zscolortypestr,
-                  zscuttypestr: obj.zscuttypestr,
-                  zsfluorescencetypestr: obj.zsfluorescencetypestr,
-                  zspolishtypestr: obj.zspolishtypestr,
-                  zsshapetypestr: obj.zsshapetypestr,
-                  zssymmetrytypestr: obj.zssymmetrytypestr,
+                  yieldrate: isnullstr(obj.yieldrate),
+                  zsclaritytypestr: isnullstr(obj.zsclaritytypestr),
+                  zscolortypestr: isnullstr(obj.zscolortypestr),
+                  zscuttypestr: isnullstr(obj.zscuttypestr),
+                  zsfluorescencetypestr: isnullstr(obj.zsfluorescencetypestr),
+                  zspolishtypestr: isnullstr(obj.zspolishtypestr),
+                  zsshapetypestr: isnullstr(obj.zsshapetypestr),
+                  zssymmetrytypestr: isnullstr(obj.zssymmetrytypestr),
+                  sizestr: isnullstr(obj.sizestr),
+                  remark: isnullstr(obj.remark)
                 }
               })
             })
@@ -207,30 +211,31 @@ Page({
   onTabChange(e: any) {
     if (e.target.id === "category") {
         /// 重置状态
-      this.setData({ status: 1, active: e.detail.index })
+      this.setData({ status: 1, active: e.detail.name })
       /// 数据重置
-      switch (e.detail.index) {
-        case 0: /// 预售大厅
-          this.setData({ subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}] })
+      switch (e.detail.name) {
+        case 1: /// 预售大厅
+          this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}] })
           break;
-        case 1: /// 我的预售
-          this.setData({ subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}, {id: 3, name: '已结束'}] })
+        case 2: /// 我的预售
+          this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}, {id: 3, name: '已结束'}] })
           break;
         default: /// 我参与的预售
           this.setData({ subtabs: [{id: 1, name: '预售中'}, {id: 2, name: '执行中'}, {id: 3, name: '已完成'}] })
           break;
       }
     } else {
-      this.setData({ status: e.detail.index+1 })
+      console.log(e)
+      this.setData({ status: e.detail.name })
     }
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**
@@ -265,7 +270,7 @@ Page({
    * 页面相关事件处理函数--监听用户下拉动作
    */
   onPullDownRefresh() {
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**

+ 6 - 6
GuangZuan/miniprogram/mHome/pages/presell/list/index.wxml

@@ -8,12 +8,12 @@
 
     <!-- tabs -->
     <van-tabs id="category" active="{{ active }}" swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#407DB8">
-      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
+      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" name="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs> 
 
     <view class="filter-view">
-      <van-tabs id="subCategory" active="{{ status-1 }}" bind:change="onTabChange" line-height="0px"	title-inactive-color="#333" title-active-color="#DC203D">
-        <van-tab wx:for="{{ subtabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
+      <van-tabs id="subCategory" active="{{ status }}" bind:change="onTabChange" line-height="0px" title-inactive-color="#333" title-active-color="#DC203D">
+        <van-tab wx:for="{{ subtabs }}" wx:for-item="itm" wx:key="id" name="{{ itm.id }}" title="{{ itm.name }}"/>
       </van-tabs>
       <van-icon name="add-o" size="25px" color="#387BDC" bind:click="addPreSell"/>
     </view>
@@ -21,7 +21,7 @@
 
   <!-- 数据内容 -->
   <view class="container__list">
-    <view wx:if="{{ active != 2 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" id="{{ idx }}" bindtap="onItemClick">
+    <view wx:if="{{ active != 3 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" id="{{ idx }}" bindtap="onItemClick">
       <view class="container__list__item__top">
         <text>{{ itm.wrstandardname }}</text>
         <text>{{ itm.surplusqty }}</text>
@@ -33,7 +33,7 @@
         <text>预售数量:{{ itm.presaleqty }}</text>
       </view>
       <view class="container__list__item__row">
-        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>采购保证金:{{ itm.buymarginvalue }}</text>
         <text>最小采购单位:{{ itm.minbuyqty }}</text>
       </view>
       <view class="container__list__item__row">
@@ -46,7 +46,7 @@
       </view>
     </view>
 
-    <view wx:if="{{ active === 2 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" bindtap="onItemClick">
+    <view wx:if="{{ active === 3 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" bindtap="onItemClick">
       <view class="container__list__item__top">
         <text>{{ itm.wrstandardname }}</text>
         <text>{{ itm.orderqty }}</text>

+ 7 - 1
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts

@@ -5,6 +5,7 @@ import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { formatDateString } from "../../../../utils/util"
 import { queryGZMyPresell, queryPermancePlanTmp } from "../../../../services/api/orders/index"
+import services from "../../../../services/index"
 
 Page({
 
@@ -127,8 +128,13 @@ Page({
    */
   onLoad(options: any) {
     const obj = JSON.parse(options.item)
+    console.log(options.item)
     /// 解析数据
-    this.setData({ item: obj })
+    this.setData({ 
+      item: obj,
+      banners: String(obj.pictureurls).split(',').map(itm => {
+        return (services.config.openApiUrl+itm).replace('./uploadFile', '/uploadFile')
+      }) })
     // 查询履约模板
     this.queryPermancePlanTmp(obj.performancetemplateid)
     /// 我的预售认购列表查询

+ 22 - 22
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.wxml

@@ -7,9 +7,9 @@
 
   <!-- banner轮播图 -->
   <swiper class="banner" wx:if="{{ banners.count != 0 }}" indicator-active-color="orange" indicator-dots autoplay interval="5000" circular>
-    <swiper-item class="banner_item" wx:for="4" wx:key="index" id="{{ item }}">
+    <swiper-item class="banner_item" wx:for="{{ banners }}" wx:key="index" wx:for-item="itm" id="{{ item }}">
       <view class="swiper-item">
-        <image src='https://img.yzcdn.cn/vant/cat.jpeg' mode="widthFix" />
+        <image src='{{ itm }}' mode="widthFix" />
       </view>
     </swiper-item>
   </swiper>
@@ -18,35 +18,35 @@
 
   <view class="container__top">
     <view class="container__top__row">
-      <text selectable="false">钻石1001</text>
+      <text selectable="false">{{ item.wrstandardname }}</text>
       <text selectable="false">2000克拉</text>
-      <text selectable="false">¥8000</text>
+      <text selectable="false">{{ item.price }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">预售总量:10000克拉</text>
+      <text selectable="false">预售总量:{{ item.presaleqty }}</text>
       <text selectable="false">已认购数量:10000克拉</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">最小采购单位:100</text>
-      <text selectable="false">最大采购单位:10000</text>
+      <text selectable="false">最小采购单位:{{ item.minbuyqty }}</text>
+      <text selectable="false">最大采购单位:{{ item.maxbuyqty }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">最低成团量:4000</text>
-      <text selectable="false">采购保证金比例:20%</text>
+      <text selectable="false">最低成团量:{{ item.minsuccessqty }}</text>
+      <text selectable="false">采购保证金比例:{{ item.buymarginvalue }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">开始日期:2022-03-08</text>
-      <text selectable="false">结束日期:2022-03-08</text>
+      <text selectable="false">开始日期:{{ item.startdate }}</text>
+      <text selectable="false">结束日期:{{ item.enddate }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">状态:进行中</text>
+      <text selectable="false">状态:{{ item.status }}</text>
       <text selectable="false">已认购数量:2000</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">备注:进行中</text>
+      <text selectable="false">备注:{{ item.remark }}</text>
     </view>
     <view class="container__top__row">
-      <text selectable="false">单号:1809748484948848484</text>
+      <text selectable="false">单号:{{ item.presaleapplyid }}</text>
     </view>
   </view>
 
@@ -54,14 +54,14 @@
 
    <view class="container__diamondinfo">
      <text selectable="false">【钻石参考信息】</text>
-     <text selectable="false">形状:{{  }} </text>
-     <text selectable="false">颜色:{{  }} </text>
-     <text selectable="false">净度:{{  }} </text>
-     <text selectable="false">尺寸:{{  }} </text>
-     <text selectable="false">抛光:{{  }} </text>
-     <text selectable="false">对称:{{  }} </text>
-     <text selectable="false">切工:{{  }} </text>
-     <text selectable="false">荧光:{{  }} </text>
+     <text selectable="false">形状:{{ item.zsshapetypestr }} </text>
+     <text selectable="false">颜色:{{ item.zscolortypestr }} </text>
+     <text selectable="false">净度:{{ item.zsclaritytypestr }} </text>
+     <text selectable="false">尺寸:{{ item.sizestr }} </text>
+     <text selectable="false">抛光:{{ item.zspolishtypestr }} </text>
+     <text selectable="false">对称:{{ item.zssymmetrytypestr }} </text>
+     <text selectable="false">切工:{{ item.zscuttypestr }} </text>
+     <text selectable="false">荧光:{{ item.zsfluorescencetypestr }} </text>
    </view>
 
    <view class="button-view">

+ 18 - 1
GuangZuan/miniprogram/mHome/pages/purchase/list/index.less

@@ -49,12 +49,29 @@
         padding: 5px 15px;
 
         text {
-          text-align: left;
           color: #333;
           font-size: 14px;
           width: 100%;
         }
       }
+
+      &__row {
+        text {
+          text-align: left;
+        }
+      }
+
+      &__top {
+        text {
+          text-align: center;
+        }
+        :nth-child(1) {
+          text-align: left;
+        }
+        :nth-last-child(1) {
+          text-align: right;
+        }
+      }
     }
   }
 }

+ 45 - 14
GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts

@@ -20,7 +20,7 @@ Page({
       /// tabs
       tabs: [{id: 1, name: '集采大厅'}, {id: 2, name: '我的集采'}, {id: 3, name: '我参与的集采'}],
       /// subtabs
-      subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}],
+      subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}],
       /// 类别
       active: 0,
       /// 状态
@@ -32,7 +32,7 @@ Page({
       /// 我参与的预售(预售中\执行中)\我参与的集采(集采中\执行中) 列表查询
       myTradingPreSells: <GuangZuan.GZMyTradingPreSell[]>[{}],
       /// 显示数据信息
-      values: <{}>[]
+      values: [{}]
   },
 
   /**
@@ -64,6 +64,9 @@ Page({
               isEmpty: res.data.length === 0,
               values: res.data.map(obj => {
                 return {
+                  pictureurls: obj.pictureurls,
+                  bannerpicurl: obj.bannerpicurl,
+                  performancetemplateid: obj.performancetemplateid,
                   presaleapplyid: obj.presaleapplyid,
                   wrstandardname: isnullstr(obj.wrstandardname),
                   customername: isnullstr(obj.customername),
@@ -77,7 +80,19 @@ Page({
                   buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
                   surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0)+'克拉',
                   price: '¥'+obj.unitprice.toFixed(2)+'(元/克拉)',
-                  presalestatus: obj.presalestatus
+                  presalestatus: obj.presalestatus,
+                  ysproductionmode: obj.ysproductionmode,
+                  yszscategory: obj.yszscategory,
+                  yieldrate: isnullstr(obj.yieldrate),
+                  zsclaritytypestr: isnullstr(obj.zsclaritytypestr),
+                  zscolortypestr: isnullstr(obj.zscolortypestr),
+                  zscuttypestr: isnullstr(obj.zscuttypestr),
+                  zsfluorescencetypestr: isnullstr(obj.zsfluorescencetypestr),
+                  zspolishtypestr: isnullstr(obj.zspolishtypestr),
+                  zsshapetypestr: isnullstr(obj.zsshapetypestr),
+                  zssymmetrytypestr: isnullstr(obj.zssymmetrytypestr),
+                  sizestr: isnullstr(obj.sizestr),
+                  remark: isnullstr(obj.remark)
                 }
               })
             })
@@ -125,6 +140,9 @@ Page({
               /// 显示数据
               values: res.data.map(obj => {
                 return {
+                  pictureurls: obj.pictureurls,
+                  bannerpicurl: obj.bannerpicurl,
+                  performancetemplateid: obj.performancetemplateid,
                   presaleapplyid: obj.presaleapplyid,
                   wrstandardname: isnullstr(obj.wrstandardname),
                   customername: isnullstr(obj.customername),
@@ -135,6 +153,18 @@ Page({
                   marginvalue: (obj.marginvalue*100).toFixed(2)+'%',
                   tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)',
                   orderqty: obj.orderqty.toFixed(2),
+                  ysproductionmode: obj.ysproductionmode,
+                  yszscategory: obj.yszscategory,
+                  yieldrate: isnullstr(obj.yieldrate),
+                  zsclaritytypestr: isnullstr(obj.zsclaritytypestr),
+                  zscolortypestr: isnullstr(obj.zscolortypestr),
+                  zscuttypestr: isnullstr(obj.zscuttypestr),
+                  zsfluorescencetypestr: isnullstr(obj.zsfluorescencetypestr),
+                  zspolishtypestr: isnullstr(obj.zspolishtypestr),
+                  zsshapetypestr: isnullstr(obj.zsshapetypestr),
+                  zssymmetrytypestr: isnullstr(obj.zssymmetrytypestr),
+                  sizestr: isnullstr(obj.sizestr),
+                  remark: isnullstr(obj.remark)
                 }
               })
             })
@@ -161,8 +191,9 @@ Page({
 
   /// 点击
   onItemClick(e: any) {
+    console.log(e)
     wx.navigateTo({
-      url: '/mHome/pages/purchase/detail/index?item='+JSON.stringify(this.data.values[Number(e.currentTarget.id)])+'&index='+this.data.active
+      url: '/mHome/pages/purchase/detail/index?item='+JSON.stringify(this.data.values[e.currentTarget.id])+'&index='+this.data.active
     })
   },
 
@@ -181,30 +212,30 @@ Page({
   onTabChange(e: any) {
     if (e.target.id === "category") {
       /// 重置状态
-      this.setData({ status: 1, active: e.detail.index })
+      this.setData({ status: 1, active: e.detail.name })
       /// 数据重置
-      switch (e.detail.index) {
-        case 0: /// 预售大厅
-          this.setData({ subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}] })
+      switch (e.detail.name) {
+        case 1: /// 预售大厅
+          this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}] })
           break;
-        case 1: /// 我的预售
-          this.setData({ subtabs: [{id: 1, name: '执行中'}, {id: 2, name: '未开始'}, {id: 3, name: '已结束'}] })
+        case 2: /// 我的预售
+          this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}, {id: 3, name: '已结束'}] })
           break;
         default: /// 我参与的预售
           this.setData({ subtabs: [{id: 1, name: '预售中'}, {id: 2, name: '执行中'}, {id: 3, name: '已完成'}] })
           break;
       }
     } else {
-      this.setData({ status: e.detail.index+1 })
+      this.setData({ status: e.detail.name })
     }
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**
@@ -239,7 +270,7 @@ Page({
    * 页面相关事件处理函数--监听用户下拉动作
    */
   onPullDownRefresh() {
-    this.data.active != 2 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**

+ 6 - 6
GuangZuan/miniprogram/mHome/pages/purchase/list/index.wxml

@@ -9,12 +9,12 @@
 
     <!-- tabs -->
     <van-tabs id="category" active="{{ active }}" swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#407DB8">
-      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
+      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" name="{{ itm.id }}" title="{{ itm.name }}"/>
     </van-tabs> 
 
     <view class="filter-view">
-      <van-tabs id="subCategory" active="{{ status-1 }}" bind:change="onTabChange" line-height="0px"	title-inactive-color="#333" title-active-color="#DC203D">
-        <van-tab wx:for="{{ subtabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
+      <van-tabs id="subCategory" bind:change="onTabChange" line-height="0px"	title-inactive-color="#333" title-active-color="#DC203D">
+        <van-tab wx:for="{{ subtabs }}" wx:for-item="itm" wx:key="id" name="{{ itm.id }}" title="{{ itm.name }}"/>
       </van-tabs>
       <van-icon name="add-o" size="25px" color="#387BDC" bind:click="addPurchase"/>
     </view>
@@ -22,7 +22,7 @@
 
   <!-- 数据内容 -->
   <view class="container__list">
-    <view wx:if="{{ active != 2 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" bindtap="onItemClick">
+    <view wx:if="{{ active != 3 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" id="{{ idx }}" bindtap="onItemClick">
       <view class="container__list__item__top">
         <text>{{ itm.wrstandardname }}</text>
         <text>{{ itm.surplusqty }}</text>
@@ -34,7 +34,7 @@
         <text>预售数量:{{ itm.presaleqty }}</text>
       </view>
       <view class="container__list__item__row">
-        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>采购保证金:{{ itm.buymarginvalue }}</text>
         <text>最小采购单位:{{ itm.minbuyqty }}</text>
       </view>
       <view class="container__list__item__row">
@@ -47,7 +47,7 @@
       </view>
     </view>
 
-    <view wx:if="{{ active === 2 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" bindtap="onItemClick">
+    <view wx:if="{{ active === 3 }}" class="container__list__item" wx:for="{{ values }}" wx:key="presaleapplyid" wx:for-item="itm" wx:for-index="idx" bindtap="onItemClick">
       <view class="container__list__item__top">
         <text>{{ itm.wrstandardname }}</text>
         <text>{{ itm.orderqty }}</text>

+ 1 - 1
GuangZuan/miniprogram/pages/mine/index.ts

@@ -98,7 +98,7 @@ Page({
   /**
    * 获取用户信息
    */
-  getUserInfo(e: any) {
+  getUserInfo() {
     /// 如果不为空
     if (this.data.avatarUrl != '') {
       return

+ 1 - 1
GuangZuan/miniprogram/pages/trade/index.ts

@@ -2,7 +2,7 @@ import { queryBuyOrder, queryDiamond } from "../../services/api/orders/index"
 import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getEnumList, getErrorMsg } from "../../services/utils";
 import { FunCode } from "../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../services/api/common/index";
-import { hideLoading, showLoading, showToast } from "../../utils/message/index";
+import { hideLoading, showLoading } from "../../utils/message/index";
 import { encryptBody } from "../../utils/websocket/crypto";
 import { appConfig } from "../../config/index";
 import { isnullstr } from "../../utils/util";