Browse Source

x x x x x

Handy_Cao 2 years ago
parent
commit
a1443c654c
71 changed files with 915 additions and 527 deletions
  1. 10 7
      GuangZuan/miniprogram/components/num-range/num-range.ts
  2. 19 19
      GuangZuan/miniprogram/constants/enum/funcode.ts
  3. 9 6
      GuangZuan/miniprogram/custom-tab-bar/index.ts
  4. 1 3
      GuangZuan/miniprogram/custom-tab-bar/index.wxml
  5. 16 6
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.less
  6. 5 6
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts
  7. 4 3
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.wxml
  8. 2 2
      GuangZuan/miniprogram/mHome/pages/members/index.less
  9. 1 1
      GuangZuan/miniprogram/mHome/pages/members/index.wxml
  10. 8 10
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.less
  11. 6 0
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts
  12. 6 4
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.wxml
  13. 1 1
      GuangZuan/miniprogram/mHome/pages/presell/list/index.less
  14. 1 1
      GuangZuan/miniprogram/mHome/pages/presell/list/index.ts
  15. 2 1
      GuangZuan/miniprogram/mHome/pages/presell/new/index.less
  16. 26 13
      GuangZuan/miniprogram/mHome/pages/presell/new/index.ts
  17. 4 4
      GuangZuan/miniprogram/mHome/pages/presell/new/index.wxml
  18. 7 9
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.less
  19. 7 1
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts
  20. 7 5
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.wxml
  21. 0 1
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts
  22. 3 3
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.less
  23. 38 25
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.ts
  24. 9 7
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.wxml
  25. 5 5
      GuangZuan/miniprogram/mHome/pages/search/index.ts
  26. 2 2
      GuangZuan/miniprogram/mHome/pages/settle/list/index.less
  27. 5 4
      GuangZuan/miniprogram/mHome/pages/settle/list/index.ts
  28. 1 1
      GuangZuan/miniprogram/mHome/pages/settle/list/index.wxml
  29. 16 8
      GuangZuan/miniprogram/mMine/pages/address/list/index.ts
  30. 3 7
      GuangZuan/miniprogram/mMine/pages/inoutgold/index.ts
  31. 16 8
      GuangZuan/miniprogram/mMine/pages/invoice/list/index.ts
  32. 1 1
      GuangZuan/miniprogram/mMine/pages/invoice/operate/index.ts
  33. 2 1
      GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts
  34. 4 8
      GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.ts
  35. 0 1
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts
  36. 2 2
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml
  37. 1 1
      GuangZuan/miniprogram/mMine/pages/myperformance/list/index.less
  38. 40 2
      GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.ts
  39. 2 2
      GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.wxml
  40. 3 3
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.less
  41. 2 2
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.ts
  42. 2 2
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.wxml
  43. 14 13
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.less
  44. 7 5
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts
  45. 5 5
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml
  46. 4 27
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.less
  47. 2 1
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts
  48. 2 2
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml
  49. 5 4
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.less
  50. 3 1
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts
  51. 2 2
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.wxml
  52. 2 0
      GuangZuan/miniprogram/pages/circle/index.ts
  53. 2 2
      GuangZuan/miniprogram/pages/home/index.less
  54. 2 2
      GuangZuan/miniprogram/pages/home/index.wxml
  55. 24 3
      GuangZuan/miniprogram/pages/login/index.ts
  56. 2 2
      GuangZuan/miniprogram/pages/mine/index.ts
  57. 22 17
      GuangZuan/miniprogram/pages/trade/index.ts
  58. 2 2
      GuangZuan/miniprogram/pages/trade/index.wxml
  59. 5 0
      GuangZuan/miniprogram/services/api/account/index.ts
  60. 0 1
      GuangZuan/miniprogram/services/index.ts
  61. 36 2
      GuangZuan/miniprogram/services/utils.ts
  62. 3 3
      GuangZuan/node_modules/.package-lock.json
  63. 4 0
      GuangZuan/node_modules/miniprogram-api-typings/CHANGELOG.md
  64. 1 1
      GuangZuan/node_modules/miniprogram-api-typings/package.json
  65. 2 2
      GuangZuan/node_modules/miniprogram-api-typings/types/wx/index.d.ts
  66. 422 223
      GuangZuan/node_modules/miniprogram-api-typings/types/wx/lib.wx.api.d.ts
  67. 10 1
      GuangZuan/node_modules/miniprogram-api-typings/types/wx/lib.wx.page.d.ts
  68. 7 7
      GuangZuan/package-lock.json
  69. 1 1
      GuangZuan/package.json
  70. 15 0
      GuangZuan/typings/types/model/common.d.ts
  71. 10 0
      GuangZuan/typings/types/model/order.d.ts

+ 10 - 7
GuangZuan/miniprogram/components/num-range/num-range.ts

@@ -1,3 +1,5 @@
+import { getDecimalNum } from "../../utils/util";
+
 // components/num-range/num-range.ts
 Component({
   /**
@@ -10,12 +12,12 @@ Component({
       value: 'CT'
     },
     min: {
-      type: Number,
-      value: 0.00
+      type: String,
+      value: '0.00'
     },
     max: {
-      type: Number,
-      value: 0.00
+      type: String,
+      value: '0.00'
     }
   },
 
@@ -33,13 +35,14 @@ Component({
     * 输入框变化
     */
     valueInput(e: any) {
-      console.log(e)
+      /// 截取2位小数位
+      let num = getDecimalNum(e.detail.value)
       switch (e.target.id) {
         case 'min':
-          this.setData({ min: e.detail.value })
+          this.setData({ min: num })
           break;
         default:
-          this.setData({ max: e.detail.value })
+          this.setData({ max: num })
           break;
       } 
       this.triggerEvent('sync', { value: [this.properties.min, this.properties.max] })

+ 19 - 19
GuangZuan/miniprogram/constants/enum/funcode.ts

@@ -73,23 +73,23 @@ export enum FunCode {
     WRListingCancelOrderRsp             = 1441797, // 挂牌撤单应答
     ReceiptZSOutApplyReq                = 1376463, // 钻石出库申请接口请求
     ReceiptZSOutApplyRsp                = 1376464, // 钻石出库申请接口响应
-    CJJCMemberOperateReq                = 1114117, // 出境检测会员操作请求(1114117)
-    CJJCMemberOperateRsp                = 1114118, // 出境检测会员操作响应(1114118)
-    BSFWMemberOperateReq                = 1114119, // 保税服务会员操作请求(1114119)
-    BSFWMemberOperateRsp                = 1114120, // 保税服务会员操作响应(1114120)
-    GZPresaleApplyReq                   = 1441879, /// 广钻预售申请请求(0, 22, 87)
-    GZPresaleApplyRsp                   = 1441880, /// 广钻预售申请响应(0, 22, 88)
-    GZPresaleApplyAuditReq              = 1441881, /// 广钻预售申请审核通过请求(0, 22, 89)
-    GZPresaleApplyAuditRsp              = 1441882, /// 广钻预售申请审核通过响应(0, 22, 90)
-    GZPresaleOrderReq                   = 1441883, // 广钻预售认购下单请求(0, 22, 91)
-    GZPresaleOrderRsp                   = 1441884, /// 广钻预售认购下单响应(0, 22, 92)
-    GZCenterPurchasePriceList           = 1441885, /// 广钻集采价格列表(0, 22, 93)
-    GZCenterPurchaseApplyReq            = 1441887, /// 广钻集采申请请求(0, 22, 95)
-    GZCenterPurchaseApplyRsp            = 1441888, /// 广钻集采申请响应(0, 22, 96)
-    GZCenterPurchaseApplyAuditReq       = 1441889, /// 广钻集采申请审核通过请求(0, 22, 97)
-    GZCenterPurchaseApplyAuditRsp       = 1441890, /// 广钻集采申请审核通过响应(0, 22, 98)
-    GZCenterPurchaseOrderReq            = 1441891, /// 广钻集采认购下单请求(0, 22, 99)
-    GZCenterPurchaseOrderRsp            = 1441892, /// 广钻集采认购下单响应(0, 22, 100)
-    BSWMSReckonPayReq                   = 1114135, /// WMS结算单支付接口请求(1114135) MAKE_FID(0, 17, 23) 
-    BSWMSReckonPayRsp                   = 1114136 ///  WMS结算单支付接口响应(1114136) MAKE_FID(0, 17, 24)
+    CJJCMemberOperateReq                = 1114117, // 出境检测会员操作请求
+    CJJCMemberOperateRsp                = 1114118, // 出境检测会员操作响应
+    BSFWMemberOperateReq                = 1114119, // 保税服务会员操作请求
+    BSFWMemberOperateRsp                = 1114120, // 保税服务会员操作响应
+    GZPresaleApplyReq                   = 1441879, /// 广钻预售申请请求
+    GZPresaleApplyRsp                   = 1441880, /// 广钻预售申请响应
+    GZPresaleApplyAuditReq              = 1441881, /// 广钻预售申请审核通过请求
+    GZPresaleApplyAuditRsp              = 1441882, /// 广钻预售申请审核通过响应
+    GZPresaleOrderReq                   = 1441883, // 广钻预售认购下单请求
+    GZPresaleOrderRsp                   = 1441884, /// 广钻预售认购下单响应
+    GZCenterPurchasePriceList           = 1441885, /// 广钻集采价格列表
+    GZCenterPurchaseApplyReq            = 1441887, /// 广钻集采申请请求
+    GZCenterPurchaseApplyRsp            = 1441888, /// 广钻集采申请响应
+    GZCenterPurchaseApplyAuditReq       = 1441889, /// 广钻集采申请审核通过请求
+    GZCenterPurchaseApplyAuditRsp       = 1441890, /// 广钻集采申请审核通过响应
+    GZCenterPurchaseOrderReq            = 1441891, /// 广钻集采认购下单请求
+    GZCenterPurchaseOrderRsp            = 1441892, /// 广钻集采认购下单响应
+    BSWMSReckonPayReq                   = 1114135, /// WMS结算单支付接口请求 
+    BSWMSReckonPayRsp                   = 1114136 ///  WMS结算单支付接口响应
 }

+ 9 - 6
GuangZuan/miniprogram/custom-tab-bar/index.ts

@@ -1,4 +1,5 @@
 import { appConfig } from "../config/index";
+import { saveTradeActive } from "../services/utils";
 
 Component({
   /**
@@ -52,17 +53,19 @@ Component({
    */
   methods: {
     onChange(e: any) {
-			wx.switchTab({
-				url: this.data.list[e.detail].url
-      });
-      this.setData({ active: e.detail });
+			/// 设置激活项
+      this.setData({ active: e.detail })
+      /// 页面跳转
+      wx.switchTab({ url: this.data.list[e.detail].url })
+      /// 防止抖动
+      saveTradeActive(0)
 		},
 
 		init() {
-			const page = getCurrentPages().pop();
+			const page = getCurrentPages().pop()
 			this.setData({
 				active: this.data.list.findIndex(item => item.url === `/${page.route}`)
-			});
+			})
 		}
   }
 })

+ 1 - 3
GuangZuan/miniprogram/custom-tab-bar/index.wxml

@@ -1,5 +1,3 @@
 <van-tabbar active="{{ active }}" active-color="{{ activeColor }}" inactive-color="{{ color }}" bind:change="onChange">
-  <van-tabbar-item wx:for="{{ list }}" wx:key="index" icon="{{ active === index ? item.aicon : item.icon }}.png">{{
-    item.text
-  }}</van-tabbar-item>
+  <van-tabbar-item wx:for="{{ list }}" wx:key="index" icon="{{ active === index ? item.aicon : item.icon }}.png">{{ item.text }}</van-tabbar-item>
 </van-tabbar>

+ 16 - 6
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.less

@@ -34,7 +34,7 @@
     margin-bottom: 10px;
 
     .title {
-      padding: 10px 5px;
+      padding: 5px;
       width: 100%;
       color: #333;
       font-size: 20px;
@@ -70,7 +70,7 @@
       width: 95%;
       background-color: #f0f0f0;
       border-radius: 10px;
-      padding: 10px 0px;
+      padding: 5px 0px;
       
       &__item {
         padding-left: 5px;
@@ -82,18 +82,18 @@
           align-items: center;
           align-content: center;
           padding: 0px 2.5px;
+          white-space: nowrap;
+          width: 98%;
     
           &__item {
-            display: flex;
+            display: inline-flex;
             flex-direction: column;
             align-items: center;
             align-content: center;
-            padding-top: 10px;
-            margin-bottom: 5px;
     
             text {
               font-size: 12px;
-              padding: 2.5px 5px;
+              padding: 2.5px;
               text-align: center;
             }
           }
@@ -113,6 +113,16 @@
     }
   }
 
+  .seller-info {
+    .content {
+      &__item {
+        .title {
+          width: 50px;
+        }
+      }
+    }
+  }
+
   .price-info {
     width: 100%;
     display: flex;

+ 5 - 6
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts

@@ -6,7 +6,7 @@ import { getGoods, queryPermancePlanTmp } from "../../../services/api/orders/ind
 import { accountid, clientType, getErrorMsg, isEncrypted, loginid, protoHeader, timetample, userid, loginQuery, isMyFavorite, marketID } from "../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
 import { encryptBody } from "../../../utils/websocket/crypto"
-import { isnullstr } from "../../../utils/util"
+import { formatDateString, isnullstr } from "../../../utils/util"
 
 Page({
 
@@ -121,13 +121,14 @@ Page({
           Header: protoHeader(FunCode.ZSBuyOrderDestingReq, marketID(67)),
           UserID: userid(),
           AccountID: accountid(),
-          RelatedWRTradeOrderID: this.data.order.wrtradeorderid,
-          OrderQty: this.data.order.remainqty,
+          RelatedWRTradeOrderID: this.data.order.wrtradeorderid ? this.data.order.wrtradeorderid : this.data.goods.wrtradeorderid,
+          OrderQty: this.data.order.remainqty ? this.data.order.remainqty: this.data.goods.remainqty,
           OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
           ClientSerialNo: timetample().toString(),
           ClientType: clientType(),
           OperatorID: loginid(),
-          MarketID: marketID(67)
+          MarketID: marketID(67),
+          ClientOrderTime: formatDateString(new Date().toString())
         })
 
         /// 发送请求
@@ -216,8 +217,6 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options: any) {
-    console.log(options)
-    
     /// 商品编号
     this.setData({ goodsno: options.goodsno, ordertime: options.ordertime, operator: isMyFavorite(options.goodsno) ? 1 : 2 })
     /// 是否显示交易

+ 4 - 3
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.wxml

@@ -11,7 +11,7 @@
   <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="1" wx:key="index" id="{{ item }}">
       <view class="swiper-item">
-        <image src='{{ goods.imagepath }}' mode="aspectFill" bindtap="previewImage"/>
+        <image src='{{ goods.imagepath }}' mode="scaleToFill" bindtap="previewImage"/>
       </view>
     </swiper-item>
   </swiper>
@@ -61,14 +61,15 @@
       </view>
       <view class="content__item">
         <text class="title">履约:</text>
+        <text class="value">{{ tmp.templatename }}</text>
       </view>
       <view class="content__item">
-        <view class="content__item__step">
+        <scroll-view class="content__item__step" scroll-left="true" scroll-x="true">
           <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
             <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
             <text>{{ itm.stepdate }}</text>
           </view>
-        </view>
+        </scroll-view>
       </view>
     </view>
   </view>

+ 2 - 2
GuangZuan/miniprogram/mHome/pages/members/index.less

@@ -16,9 +16,9 @@
         align-content: center;
         align-items: center;
         justify-content: space-around;
-        width: 95%;
+        width: 96%;
         border-bottom: 1px solid #f0f0f0;
-        padding: 10px 0px;
+        padding: 5px 0px;
   
         &__right {
           display: flex;

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/members/index.wxml

@@ -9,7 +9,7 @@
   <view class="memberinfo" style="background-color: white;">
     <view class="memberinfo__list">
       <view class="memberinfo__list__item" wx:for="{{ members }}" wx:for-index="idx" wx:for-item="itm" wx:key="idx">
-        <van-image width="70" height="70" radius="10" fit="cover" use-loading-slot src="{{ itm.imageurl }}" />
+        <van-image width="60" height="60" radius="10" fit="cover" use-loading-slot src="{{ itm.imageurl }}" />
         <view class="memberinfo__list__item__right">
           <view class="memberinfo__list__item__right__top">
             <text class="goodsname">{{ itm.membername }}</text>

+ 8 - 10
GuangZuan/miniprogram/mHome/pages/presell/detail/index.less

@@ -40,13 +40,10 @@
       }
     }
 
-    :first-child {
+    .price, :first-child {
       text {
         font-size: 16px;
-      }
-
-      text:nth-child(3) {
-        color: #f00;
+        font-weight: bold;
       }
     }
 
@@ -56,19 +53,20 @@
       justify-content: start;
       align-items: center;
       align-content: center;
+      white-space: nowrap;
       margin: 0px 10px;
+      width: 96%;
 
       &__item {
-        display: flex;
+        display: inline-flex;
         flex-direction: column;
         align-items: center;
         align-content: center;
-        padding-top: 10px;
-        margin-bottom: 5px;
+        padding-top: 5px;
 
         .value {
-          font-size: 12px;
-          padding: 2.5px 5px;
+          font-size: 13px;
+          padding: 5px 5px;
           text-align: center;
         }
       }

+ 6 - 0
GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts

@@ -136,6 +136,12 @@ Page({
       showToast('请输入认购数量。')
       return false
     }
+
+    const { maxbuyqty, minbuyqty } = this.data.item
+    if (Number(this.data.orderQty)>maxbuyqty || Number(this.data.orderQty)<minbuyqty) {
+      showToast('认购数量不能大于'+`${maxbuyqty}`+'不能小于'+`${minbuyqty}`)
+      return false
+    }
     return true
   },
 

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

@@ -19,8 +19,10 @@
   <view class="container__top">
     <view class="container__top__row">
       <text selectable="false">{{ item.wrstandardname }}</text>
-      <text class="qty" selectable="false">{{ item.surplusqty }}</text>
-      <text selectable="false">{{ item.price }}</text>
+    </view>
+    <view class="container__top__row price">
+      <text selectable="false">剩余数量:{{ item.surplusqty }}</text>
+      <text selectable="false">克拉单价:{{ item.price }}</text>
     </view>
     <view class="container__top__row">
       <text selectable="false">卖方:{{ item.customername }}</text>
@@ -45,12 +47,12 @@
     <view class="container__top__row">
       <text selectable="false">履约方式:</text>
     </view>
-    <view class="container__top__row__step" scroll-x="true">
+    <scroll-view class="container__top__row__step" scroll-x="true" scroll-left="true">
       <view class="container__top__row__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
         <text class="value" style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
         <text class="value">{{ itm.stepdate }}</text>
       </view>
-    </view>
+    </scroll-view>
     <view class="container__top__row">
       <text selectable="false">备注:{{ item.remark }}</text>
     </view>

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

@@ -52,7 +52,7 @@
 
         text {
           color: #333;
-          font-size: 13px;
+          font-size: 14px;
           width: 100%;
         }
       }

+ 1 - 1
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: 2, name: '行中'}, {id: 1, name: '未开始'}],
+      subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}],
       /// 类别
       active: 1,
       /// 状态

+ 2 - 1
GuangZuan/miniprogram/mHome/pages/presell/new/index.less

@@ -39,9 +39,10 @@
       justify-content: start;
       align-items: center;
       align-content: center;
+      white-space: nowrap;
 
       &__item {
-        display: flex;
+        display: inline-flex;
         flex-direction: column;
         align-items: center;
         align-content: center;

+ 26 - 13
GuangZuan/miniprogram/mHome/pages/presell/new/index.ts

@@ -32,9 +32,7 @@ Page({
     /// 结束日期
     enddate: formatDate(new Date()),
     /// 文件上传列表
-    fileList: [],
-    /// 上传的文件路径
-    filePath: '',
+    fileList: <GuangZuan.UploadRsp[]>[],
     /// 显示信息
     actions: [''],
     /// 生产方式条件
@@ -156,6 +154,12 @@ Page({
       showToast('请输入采购保证金比例')
       return false
     }
+
+    /// 请上传附件
+    if (this.data.fileList.length === 0) {
+      showToast('请上传附件')
+      return false
+    }
     return true
   },
 
@@ -182,7 +186,7 @@ Page({
 
   /// 删除图片
   deleteImage(e: any) {
-    const {index} = e.detail.index
+    const { index } = e.detail.index
     // 上传完成需要更新 fileList
     const { fileList = [] } = this.data;
     fileList.splice(index, 1)
@@ -236,11 +240,9 @@ Page({
           return
         }
         // 上传完成需要更新 fileList
-        const { fileList = [] } = this.data;
-        fileList.push({ ...file, url: res.data });
-        this.setData({ fileList });
-        /// 设置文件路径
-        this.setData({ filePath: JSON.parse(res.data)[0].filePath })
+        const { fileList = [] } = this.data
+        fileList.push({ ...file, url: JSON.parse(res.data) })
+        this.setData({ fileList })
       },
     });
   },
@@ -249,8 +251,19 @@ Page({
   doSubmit() {
     /// 校验不合规
     if (!this.check()) { return }
-     /// showModel
-     showModel(() => {
+
+    /// 地址拼接
+    var fileUrl = ''
+    for (let i = 0; i < this.data.fileList.length; i++) {
+      const obj = this.data.fileList[i];
+      if (i === this.data.fileList.length-1) {
+        fileUrl = fileUrl+obj.url[0].filePath
+      } else {
+        fileUrl = fileUrl+obj.url[0].filePath+","
+      }
+    }
+    /// showModel
+    showModel(() => {
       /// showLoading
       showLoading(() => {
         /// 请求参数
@@ -275,7 +288,7 @@ Page({
           QtyDesc: this.data.qtydesc,
           WeightDesc: this.data.weightdesc,
           YSProductionMode: this.data.way,
-          PictureUrls: this.data.filePath,
+          PictureUrls: fileUrl,
           Remark: this.data.remark,
           PerformanceTemplateID: this.data.tmp.autoid,
           MarketID: marketID(63),
@@ -307,7 +320,7 @@ Page({
           }
         })
       }, '提交申请请求中....')
-      }, '提示', '确认要提交申请吗?')
+    }, '提示', '确认要提交申请吗?')
   },
 
   /// 获取履约模板信息

+ 4 - 4
GuangZuan/miniprogram/mHome/pages/presell/new/index.wxml

@@ -47,14 +47,14 @@
       <van-field value="" title-width="8em" label="履约方式:" size="large" required readonly clearable value="{{ tmp.templatename }}" bind:click-input="showPlanTmps" />
       <view class="unit"><van-icon name="arrow"></van-icon></view>
     </view>
-    <scroll-view class="content prestyle" scroll-x>
-      <view class="content__item__step">
+    <view class="content prestyle" scroll-x>
+      <scroll-view class="content__item__step" scroll-x="true" scroll-left="true">
         <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
           <text style="background-color: {{ tcolors[idx] }}; color: white;">{{ itm.stepinfo }}</text>
           <text>{{ itm.stepdate }}</text>
         </view>
-      </view>
-    </scroll-view>
+      </scroll-view>
+    </view>
   </van-cell-group>
 
   <van-cell-group>

+ 7 - 9
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.less

@@ -40,35 +40,33 @@
       }
     }
 
-    :first-child {
+    .price, :first-child {
       text {
         font-size: 16px;
-      }
-
-      text:nth-child(3) {
-        color: #f00;
+        font-weight: bold;
       }
     }
 
     .container__top__row__step {
       display: flex;
+      white-space: nowrap;
       flex-direction: row;
       justify-content: start;
       align-items: center;
       align-content: center;
       margin: 0px 10px;
+      width: 96%;
 
       &__item {
-        display: flex;
+        display: inline-flex;
         flex-direction: column;
         align-items: center;
         align-content: center;
-        padding-top: 10px;
-        margin-bottom: 5px;
+        padding-top: 5px;
 
         .value {
           font-size: 12px;
-          padding: 2.5px 5px;
+          padding: 5px 5px;
           text-align: center;
         }
       }

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

@@ -155,7 +155,13 @@ Page({
   /// 合规性校验
   check(): Boolean {
     if (Number(this.data.orderQty) === 0.0 || this.data.orderQty === '') {
-      showToast('请输入认购数量。')
+      showToast('请输入采购数量。')
+      return false
+    }
+
+    const { maxbuyqty, minbuyqty } = this.data.item
+    if (Number(this.data.orderQty)>maxbuyqty || Number(this.data.orderQty)<minbuyqty) {
+      showToast('采购数量不能大于'+`${maxbuyqty}`+'不能小于'+`${minbuyqty}`)
       return false
     }
     return true

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

@@ -19,8 +19,10 @@
   <view class="container__top">
     <view class="container__top__row">
       <text selectable="false">{{ item.wrstandardname }}</text>
-      <text class="qty" selectable="false">{{ item.surplusqty }}</text>
-      <text selectable="false">{{ item.price }}</text>
+    </view>
+    <view class="container__top__row price">
+      <text selectable="false">剩余数量:{{ item.surplusqty }}</text>
+      <text selectable="false">克拉单价:{{ item.price }}</text>
     </view>
     <view class="container__top__row">
       <text selectable="false">卖方:{{ item.customername }}</text>
@@ -45,12 +47,12 @@
     <view class="container__top__row">
       <text selectable="false">履约方式:</text>
     </view>
-    <view class="container__top__row__step">
+    <scroll-view class="container__top__row__step" scroll-x="true" scroll-left="true">
       <view class="container__top__row__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
         <text class="value" style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
         <text class="value">{{ itm.stepdate }}</text>
       </view>
-    </view>
+    </scroll-view>
     <view class="container__top__row">
       <text selectable="false">备注:{{ item.remark }}</text>
     </view>
@@ -82,7 +84,7 @@
   <view class="popup-view"> 
     <text class="title">提示</text>
     <text class="message">确认要立即购买申请吗?</text>
-    <van-field label="采购数量:" model:value="{{ orderQty }}" placeholder="请输入购数量" required clearable border="{{ false }}" bind:input="getInputNum" ></van-field>
+    <van-field label="采购数量:" model:value="{{ orderQty }}" placeholder="请输入购数量" required clearable border="{{ false }}" bind:input="getInputNum" ></van-field>
     <view class="button-view" style="padding-bottom: {{ safeBottom }}px;">
       <van-button bind:click="onClose" color="#999" round block>取消</van-button>
       <van-button bind:click="doSubmit" color="#407DB8" round block>确定</van-button>

+ 0 - 1
GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts

@@ -202,7 +202,6 @@ Page({
 
   /// 点击
   onItemClick(e: any) {
-    console.log(e)
     wx.navigateTo({
       url: '/mHome/pages/purchase/detail/index?item='+JSON.stringify(this.data.values[e.currentTarget.id])+'&index='+this.data.active
     })

+ 3 - 3
GuangZuan/miniprogram/mHome/pages/purchase/new/index.less

@@ -75,7 +75,6 @@
     align-content: center;
     justify-content: center;
     width: 100%;
-    padding-left: 10px;
 
     .content__item__step {
       display: flex;
@@ -83,10 +82,11 @@
       justify-content: start;
       align-items: center;
       align-content: center;
-      width: 100%;
+      width: 96%;
+      white-space: nowrap;
 
       &__item {
-        display: flex;
+        display: inline-flex;
         flex-direction: column;
         align-items: center;
         align-content: center;

+ 38 - 25
GuangZuan/miniprogram/mHome/pages/purchase/new/index.ts

@@ -1,5 +1,5 @@
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, marketID, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../../utils/message/index"
 import services from "../../../../services/index"
 import { formatDate, getDecimalNum } from "../../../../utils/util"
@@ -32,9 +32,7 @@ Page({
     /// 结束日期
     enddate: formatDate(new Date()),
     /// 文件上传列表
-    fileList: [],
-    /// 上传的文件路径
-    filePath: '',
+    fileList: <GuangZuan.UploadRsp[]>[],
     /// 商品名称
     wrstandname: '',
     /// 预售总量
@@ -83,7 +81,7 @@ Page({
     /// 显示信息
     actions: [''],
     /// 数据信息
-    datas: [{ price: '', qty: '0.0', step: 1 }]
+    datas: [{ price: '', qty: '0.01' }]
   },
 
    /**
@@ -149,6 +147,12 @@ Page({
       showToast('请输入采购保证金比例')
       return false
     }
+
+    /// 请上传附件
+    if (this.data.fileList.length === 0) {
+      showToast('请上传附件')
+      return false
+    }
     return true
   },
 
@@ -216,11 +220,9 @@ Page({
           return
         }
         // 上传完成需要更新 fileList
-        const { fileList = [] } = this.data;
-        fileList.push({ ...file, url: res.data});
-        this.setData({ fileList });
-        /// 设置文件路径
-        this.setData({ filePath: JSON.parse(res.data)[0].filePath })
+        const { fileList = [] } = this.data
+        fileList.push({ ...file, url: JSON.parse(res.data) })
+        this.setData({ fileList })
       },
     });
   },
@@ -254,19 +256,28 @@ Page({
   doSubmit() {
     /// 校验不合规
     if (!this.check()) { return }
+    /// 地址拼接
+    var fileUrl = ''
+    for (let i = 0; i < this.data.fileList.length; i++) {
+      const obj = this.data.fileList[i];
+      fileUrl = fileUrl+obj.url[0].filePath
+      if (i != this.data.fileList.length-1) { fileUrl = fileUrl+"," } 
+    }
 
     /// showModel
     showModel(() => {
       /// showLoading
       showLoading(() => {
         /// 钻石属性
-        var list = this.data.datas.map(obj => {
-          return {
-            StepIndex: obj.step,
+        var list: { Price: number, Qty: number, StepIndex: number }[] = []
+        for (let i = 0; i < this.data.datas.length; i++) {
+          const obj = this.data.datas[i]
+          list.push({
+            StepIndex: i+1,
             Qty: Number(obj.qty),
             Price: Number(obj.price)
-          }
-        })
+          })
+        }
   
         /// 请求参数
         const info = JSON.stringify({
@@ -281,7 +292,7 @@ Page({
           StartDate: this.data.startdate,
           EndDate: this.data.enddate,
           BuyMarginAlgorithm: 1,
-          BuyMarginValue: this.data.buymarginvalue,
+          BuyMarginValue: Number(this.data.buymarginvalue)/100.0,
           PerformanceTemplateID: this.data.tmp.autoid,
           YSZSCategory: this.data.category,
           ZSShapeTypeStr: this.data.zsshape,
@@ -292,7 +303,7 @@ Page({
           ZSPolishTypeStr: this.data.zspolish,
           ZSFluorescenceTypeStr: this.data.zsfluorescence,
           SizeStr: this.data.zssize,
-          PictureUrls: this.data.filePath,
+          PictureUrls: fileUrl,
           Remark: this.data.remark,
           GZCenterPurchasePriceLists: list,
           YieldRate: this.data.zsyield,
@@ -360,7 +371,7 @@ Page({
    */
   addPrice() {
     this.setData({
-      datas: this.data.datas.concat([{ price: '', qty: '', step: this.data.datas.length+1 }]) 
+      datas: this.data.datas.concat([{ price: '', qty: '' }]) 
     })
   },
 
@@ -369,14 +380,16 @@ Page({
    */
   deleteRow(e: any) {
     const row = e.target.id
-    var obj = this.data.datas[row-1]
-    if ( Number(obj.qty) === 0 && row === '1') {
+    
+    var obj = this.data.datas[row]
+    console.log(e, obj)
+    if ( Number(obj.qty) === 0.01 && row === '0') {
       showToast('第一条数据信息不能删除')
       return
     }
     /// 删除数据
-    this.data.datas.splice(row-1, 1)
-    this.setData({ datas: this.data.datas  })
+    this.data.datas.splice(row, 1)
+    this.setData({ datas: this.data.datas})
   },
 
   /**
@@ -387,14 +400,14 @@ Page({
     const ids = (<string> e.target.id).split(' ')
     const row = <number><unknown>ids[0]
     const id = ids[1]
-    var obj = this.data.datas[row-1]
+    var obj = this.data.datas[row]
     /// 截取两位小数
     let num = getDecimalNum(e.detail)
     /// 数据赋值
     if (id === "qty") { obj.qty = num } else { obj.price = num }
     /// 删除数据
-    this.data.datas.splice(row-1, 1)
-    this.data.datas.splice(row-1, 0, obj)
+    this.data.datas.splice(row, 1)
+    this.data.datas.splice(row, 0, obj)
     this.setData({ datas: this.data.datas  })
   },
 

+ 9 - 7
GuangZuan/miniprogram/mHome/pages/purchase/new/index.wxml

@@ -44,21 +44,23 @@
     </view>
     <view class="cell-item">
       <van-field id="startdate" label="开始日期:" title-width="8em" size="large" required readonly clearable value="{{ startdate }}" placeholder="请选择开始日期" bind:click-input	="onButtonClick" />
+      <view class="unit"><van-icon name="arrow" /></view>
     </view>
     <view class="cell-item">
       <van-field id="enddate" label="结束日期:" title-width="8em" size="large" required readonly clearable value="{{ enddate }}" placeholder="请选择结束日期" bind:click-input	="onButtonClick" />
+      <view class="unit"><van-icon name="arrow" /></view>
     </view>
     <view class="cell-item">
       <van-field label="履约方式:" title-width="8em" size="large" required readonly clearable value="{{ tmp.templatename }}" bind:click-input="showPlanTmps" />
-      <view class="unit"><van-icon name="arrow"></van-icon></view>
+      <view class="unit"><van-icon name="arrow" /></view>
     </view>
     <view class="content prestyle">
-      <view class="content__item__step">
+      <scroll-view class="content__item__step" scroll-left="true" scroll-x="true">
         <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
           <text style="background-color: {{ tcolors[idx] }}; color: white;">{{ itm.stepinfo }}</text>
           <text>{{ itm.stepdate }}</text>
         </view>
-      </view>
+      </scroll-view>
     </view>
   </van-cell-group>
 
@@ -71,14 +73,14 @@
      <view class="column-title__item" wx:for="{{ columns }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">{{ itm }}</view>
     </view>
     <view class="row" wx:for="{{ datas }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx">
-      <view class="row__item">{{ itm.step }}</view> 
+      <view class="row__item">{{ idx }}</view> 
       <view class="row__item">
-        <van-field id="{{ itm.step }} qty" value="{{ itm.qty }}" input-align="center" clearable type="digit" readonly="{{ idx === 0 }}" bind:input="onRowChanged" ></van-field>
+        <van-field id="{{ idx }} qty" value="{{ itm.qty }}" input-align="center" clearable type="digit" readonly="{{ idx === 0 }}" bind:input="onRowChanged" />
       </view> 
       <view class="row__item">
-        <van-field id="{{ itm.step }} price" value="{{ itm.price }}" input-align="center" clearable type="digit" bind:input="onRowChanged"	></van-field>
+        <van-field id="{{ idx }} price" value="{{ itm.price }}" input-align="center" clearable type="digit" bind:input="onRowChanged"	/>
       </view> 
-      <view class="row__item"><van-icon name="delete-o" size="15px" bind:click="deleteRow" id="{{ itm.step }}"></van-icon></view>
+      <view class="row__item"><van-icon name="delete-o" size="15px" bind:click="deleteRow" id="{{ idx }}" /></view>
     </view>
   </van-cell-group>
 

+ 5 - 5
GuangZuan/miniprogram/mHome/pages/search/index.ts

@@ -47,9 +47,9 @@ Page({
                 {id: 2, name: '美元($)', isCheck: false}],
     currency: 1,
     /// 最小重量
-    minweight: 0.00,
+    minweight: '0.00',
     /// 最大重量
-    maxweight: 0.00
+    maxweight: '0.00'
   },
 
   /**
@@ -188,7 +188,7 @@ Page({
   },
 
   /// 重量范围值更改
-  syncNumRange(e: any) {
+  syncNumRange(e: any) {1234
     this.setData({
       minweight: e.detail.value[0],
       maxweight: e.detail.value[1],
@@ -209,8 +209,8 @@ Page({
       zscurrencytype: this.data.currency,
       zscerttype: this.data.certificate,
       zscolortype: this.data.color,
-      weight1: this.data.minweight,
-      weight2: this.data.maxweight
+      weight1: Number(this.data.minweight),
+      weight2: Number(this.data.maxweight)
     }
     /// 页面跳转
     wx.switchTab({ 

+ 2 - 2
GuangZuan/miniprogram/mHome/pages/settle/list/index.less

@@ -12,7 +12,7 @@
     &__item {
       display: flex;
       flex-direction: column;
-      width: 96%;
+      width: 95%;
       background-color: #fff;
       margin: 5px 0px;
       border-radius: 10px;
@@ -24,7 +24,7 @@
         justify-content: space-between;
         align-items: center;
         align-content: center;
-        margin: 5px 10px;
+        margin: 2.5px 10px;
 
         text {
           text-align: left;

+ 5 - 4
GuangZuan/miniprogram/mHome/pages/settle/list/index.ts

@@ -1,7 +1,7 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGzbscReckonOrder } from "../../../../services/api/orders/index"
-import { getEnumdicValue, getErrorMsg, isEncrypted, marketid, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
+import { getEnumdicValue, getErrorMsg, isEncrypted, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { isnullstr } from "../../../../utils/util"
 import { encryptBody } from "../../../../utils/websocket/crypto"
@@ -49,7 +49,7 @@ Page({
       showLoading(() => {
         /// 请求参数
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.BSWMSReckonPayReq, marketID(67)),
+          Header: protoHeader(FunCode.BSWMSReckonPayReq, 66201),
           UserID: userid(),
           OrderID: e.target.id.toString(),
           ClientSerialNo: timetample().toString()
@@ -71,7 +71,8 @@ Page({
             }
             /// 求购发布请求成功
             hideLoading(() => {
-              wx.navigateBack()
+              /// 保税仓结算单表查询
+              this.queryGzbscReckonOrder()
             }, '提交支付申请成功', 'success')
           },
           fail: (emsg) => {
@@ -101,7 +102,7 @@ Page({
                 servicefee: obj.servicefee,
                 paystatusdesc: getEnumdicValue('GZBSCPayStatus', obj.paystatus),
                 reckonmonth: isnullstr(obj.reckonmonth),
-                totalfee: obj.totalfee,
+                totalfee: obj.totalfee.toFixed(2),
                 storagefee: obj.storagefee,
                 powerfee: obj.powerfee,
                 premium: obj.premium,

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/settle/list/index.wxml

@@ -28,7 +28,7 @@
       <view class="list-view__item__row">
         <text selectable="false">报关费:{{ itm.customsfee }}</text>
         <text selectable="false" wx:if="{{ itm.paystatus === 3 }}">支付时间:{{ itm.paytime }}</text>
-        <van-button id="{{ itm.orderid }}" wx:if="{{ itm.paystatus === 2 }}" type="info" bind:click="doPayment" size="small" round>支付</van-button>
+        <van-button id="{{ itm.orderid }}" wx:if="{{ itm.paystatus === 2 }}" type="info" bind:click="doPayment" size="mini" round>支付</van-button>
       </view>
     </view>
   </view>

+ 16 - 8
GuangZuan/miniprogram/mMine/pages/address/list/index.ts

@@ -1,5 +1,5 @@
 import { queryUserReceiveInfo } from "../../../../services/api/common/index"
-import { userid } from "../../../../services/utils"
+import { setRUserecevieInfo, userid } from "../../../../services/utils"
 import { hideLoading, showLoading } from "../../../../utils/message/index"
 
 Page({
@@ -13,7 +13,9 @@ Page({
     /// 是否空数据
     isEmpty: true,
     /// 数据信息
-    infos: <Array<GuangZuan.UserReceiveInfo>>[]
+    infos: <Array<GuangZuan.UserReceiveInfo>>[],
+    /// 是否从我的页面过来
+    isMine: 'true'
   },
 
   /**
@@ -56,16 +58,22 @@ Page({
    * 按钮点击响应事件
    */
   onButtonPressed(e: any) {
-    switch (e.target.id) {
+    const id = e.target.id
+    switch (id) {
       case "new":  /// 新增
         wx.navigateTo({
           url: "/mMine/pages/address/operate/index"
         })
         break;
       default:     /// 修改
-        wx.navigateTo({
-          url: "/mMine/pages/address/operate/index?id="+JSON.stringify(this.data.infos[e.currentTarget.id])
-        })
+        if (this.data.isMine === 'true') {
+          wx.navigateTo({
+            url: "/mMine/pages/address/operate/index?id="+JSON.stringify(this.data.infos[e.currentTarget.id])
+          })
+        } else {
+          setRUserecevieInfo(this.data.infos[Number(id)])
+          wx.navigateBack()
+        }
         break;
     }
     
@@ -82,8 +90,8 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
-    
+  onLoad(options: any) {
+    this.setData({ isMine: options.isMine })
   },
 
   /**

+ 3 - 7
GuangZuan/miniprogram/mMine/pages/inoutgold/index.ts

@@ -29,9 +29,7 @@ Page({
     /// 出入金时间
     time: '',
     /// 文件上传列表
-    fileList: [],
-    /// 上传的文件路径
-    filePath: '',
+    fileList: <GuangZuan.UploadRsp[]>[],
     /// 显示信息
     sign: {}
   },
@@ -90,10 +88,8 @@ Page({
         }
         // 上传完成需要更新 fileList
         const { fileList = [] } = this.data;
-        fileList.push({ ...file, url: res.data});
+        fileList.push({ ...file, url: JSON.parse(res.data) });
         this.setData({ fileList });
-        /// 设置文件路径
-        this.setData({ filePath: JSON.parse(res.data)[0].filePath })
       },
     });
   },
@@ -215,7 +211,7 @@ Page({
         /// 资金账户
         AccountCode: this.data.bankAccountSign.accountcode,
         /// 扩展信息(JSON串,参考配置要求进行填充)
-        extend_info: JSON.stringify({"sex": 1, "certificate_photo_url": this.data.filePath}),
+        extend_info: JSON.stringify({"sex": 1, "certificate_photo_url": this.data.fileList[0].url[0].filePath }),
       })
       /// 发送请求
       sendMsgToMQ({

+ 16 - 8
GuangZuan/miniprogram/mMine/pages/invoice/list/index.ts

@@ -1,5 +1,5 @@
 import { queryWrUserReceiptInfo } from "../../../../services/api/common/index"
-import { userid } from "../../../../services/utils"
+import { setWrUserReceiptInfo, userid } from "../../../../services/utils"
 import { hideLoading, showLoading } from "../../../../utils/message/index"
 
 Page({
@@ -13,7 +13,9 @@ Page({
     /// 是否空数据
     isEmpty: true,
     /// 数据信息
-    infos: <Array<GuangZuan.WrUserReceiptInfo>>[]
+    infos: <Array<GuangZuan.WrUserReceiptInfo>>[],
+    /// 是否从我的页面过来
+    isMine: 'true'
   },
 
   /**
@@ -28,16 +30,22 @@ Page({
    * 按钮点击响应事件
    */
   onButtonPressed(e: any) {
-    switch (e.target.id) {
+    const id = e.currentTarget.id
+    switch (id) {
       case "new":  /// 新增
         wx.navigateTo({
           url: "/mMine/pages/invoice/operate/index"
         })
         break;
       default:    /// 修改
-        wx.navigateTo({
-          url: "/mMine/pages/invoice/operate/index?id="+JSON.stringify(this.data.infos[e.currentTarget.id])
-        })
+        if (this.data.isMine === 'true') {
+          wx.navigateTo({
+            url: "/mMine/pages/invoice/operate/index?id="+JSON.stringify(this.data.infos[e.currentTarget.id])
+          })
+        } else {
+          setWrUserReceiptInfo(this.data.infos[Number(id)])
+          wx.navigateBack()
+        }
         break;
     }
   },
@@ -79,8 +87,8 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
-    
+  onLoad(options: any) {
+    this.setData({ isMine: options.isMine })
   },
 
   /**

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/invoice/operate/index.ts

@@ -90,7 +90,7 @@ Page({
         data: {
         data: encryptBody(info),
         funCodeReq: FunCode.UserReceiptInfoReq,
-        funCodeRsp: FunCode.UserReceiptInfoReq,
+        funCodeRsp: FunCode.UserReceiptInfoRsp,
         isEncrypted: isEncrypted()
       },
       success: (res) => {

+ 2 - 1
GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts

@@ -151,8 +151,9 @@ Page({
             })
             break;
           case 1:  /// 求购挂牌
+            const { ordertime } = this.data.buyorders[index]
             wx.navigateTo({
-              url: '/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.buyorders[index])
+              url: '/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.buyorders[index])+'&ordertime='+formatDateString(ordertime, 'YYYY/MM/DD')
             })
             break;
           case 0:  /// 出售挂牌

+ 4 - 8
GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.ts

@@ -16,9 +16,7 @@ Page({
     /// 备注信息
     remark: '',
     /// 文件上传列表
-    fileList: [],
-    /// 上传的文件路径
-    filePath: ''
+    fileList: <GuangZuan.UploadRsp[]>[],
   },
 
   /// 照片上传
@@ -37,10 +35,8 @@ Page({
         }
         // 上传完成需要更新 fileList
         const { fileList = [] } = this.data;
-        fileList.push({ ...file, url: res.data});
+        fileList.push({ ...file, url: JSON.parse(res.data) });
         this.setData({ fileList });
-        /// 设置文件路径
-        this.setData({ filePath: JSON.parse(res.data)[0].filePath })
       },
     });
   },
@@ -67,7 +63,7 @@ Page({
         PerformancePlanID: this.data.order.performanceplanid,
         BreachType: this.data.order.buyaccountid === accountid() ? 2 : 1,
         ApplyRemark: this.data.remark,
-        Attachment: this.data.filePath,
+        Attachment: this.data.fileList[0].url[0].filePath,
         Applicant: userid(),
         Header: protoHeader(FunCode.PerformanceContractedApplyReq)
       })
@@ -106,7 +102,7 @@ Page({
       return false
     }
 
-    if (this.data.filePath === '') {
+    if (this.data.fileList.length === 0) {
       showToast('请上传附件!')
       return false
     }

+ 0 - 1
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts

@@ -230,7 +230,6 @@ Page({
       /// 买方信息
       if (item.buyerinfo != '') {
         const { ContactInfo, ReceiveInfo, ReceiptInfo } = JSON.parse(item.buyerinfo)
-        console.log(ReceiptInfo)
         if ( ContactInfo != '' ) {
           buyer = buyer+'联络信息:'+ContactInfo+'  '
         }

+ 2 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml

@@ -80,8 +80,8 @@
 
   <!-- 按钮 -->
   <view class="button-view">
-    <van-button wx:if="{{ (order.buyorsell === 0 && order.executeside === 0) || (order.buyorsell === 1 && order.executeside === 1)}}" custom-class="delay" id="delay" round color="linear-gradient(to right, #4bb0ff, #6149f6)" block bind:click="onShowDelay">延期申请</van-button>
-    <van-button wx:if="{{ (order.buyorsell === 0 && order.executeside === 0) || (order.buyorsell === 1 && order.executeside === 1)}}" custom-class="excute" id="excute" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="onShowExculate">立即执行</van-button>
+    <van-button wx:if="{{ order.buyorsell === order.executeside-1 }}" custom-class="delay" id="delay" round color="linear-gradient(to right, #4bb0ff, #6149f6)" block bind:click="onShowDelay">延期申请</van-button>
+    <van-button wx:if="{{ order.buyorsell === order.executeside-1 }}" custom-class="excute" id="excute" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="onShowExculate">立即执行</van-button>
   </view>
 </view>
 

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myperformance/list/index.less

@@ -89,7 +89,7 @@
     }
 
     :last-child {
-      width: 30%;
+      width: 35%;
       text-align: right;
     }
   }

+ 40 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.ts

@@ -1,6 +1,6 @@
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { FunCode } from "../../../../constants/enum/funcode"
-import { accountid, getErrorMsg, isEncrypted, protoHeader } from "../../../../services/utils";
+import { accountid, deleteUserRecevieInfo, deleteWrUserReceiptInfo, getErrorMsg, getUserRecevieInfo, getWrUserReceiptInfo, isEncrypted, protoHeader } from "../../../../services/utils";
 import { hideLoading, showLoading, showToast } from "../../../../utils/message/index";
 import { encryptBody } from "../../../../utils/websocket/crypto";
 
@@ -28,6 +28,22 @@ Page({
     wx.navigateBack()
   },
 
+  onIconClick(e: any) {
+    switch (e.target.id) {
+      case "address":
+        wx.navigateTo({
+          url: '/mMine/pages/address/list/index?isMine=false'
+        })
+        break;
+      default:
+        wx.navigateTo({
+          url: '/mMine/pages/invoice/list/index?isMine=false'
+        })
+        break;
+    }
+  },
+
+
   /**
    * 修改申请
    */
@@ -38,7 +54,9 @@ Page({
     showLoading(()=>{
       /// json
       const json = {
-        ContactInfo: `ContactInfo:${this.data.contract}`+`ReceiveInfo:${this.data.address}`+`ReceiptInfo:${this.data.invoice}`
+        ContactInfo: `${this.data.contract}`,
+        ReceiveInfo: `${this.data.address}`,
+        ReceiptInfo: `${this.data.invoice}`
       }
       /// 参数信息
       const info = JSON.stringify({
@@ -126,7 +144,27 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
+    const receipt = getWrUserReceiptInfo()
+    const receive = getUserRecevieInfo()
+    if (receipt) {
+      const {receipttype, username, taxpayerid, receiptbank, receiptaccount, address, contactinfo} = receipt
+      if (receipttype === 1) {
+        this.setData({ invoice: `发票抬头:${ username }` })
+      } else {
+        this.setData({ 
+          invoice: `发票抬头:${ username }\n税号:${ taxpayerid }\n开户银行:${ receiptbank }\n银行账号:${ receiptaccount }\n企业地址:${ address }\n企业电话:${ contactinfo }` 
+        }) 
+      }
+      deleteWrUserReceiptInfo()
+    }
 
+    if (receive) {
+      const { receivername, phonenum, provincename, cityname, districtname, address } = receive
+      this.setData({
+        address: `姓名:${receivername}\n电话:${phonenum}\n地址:${provincename+cityname+districtname+address}`
+      })
+      deleteUserRecevieInfo()
+    }
   },
 
   /**

+ 2 - 2
GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.wxml

@@ -16,13 +16,13 @@
   <view class="address-info" wx:if="{{ order.buyorsell === 0 }}">
     <text>收货地址:</text>
     <textarea class="text-area" model:value="{{ address }}" placeholder="请输入收货地址"></textarea>
-    <van-icon id="address" name="plus" size="20" />
+    <van-icon id="address" name="plus" size="20" bind:click="onIconClick" />
   </view>
 
   <view class="invoice-info" wx:if="{{ order.buyorsell === 0 }}">
     <text>发票信息:</text>
     <textarea class="text-area" model:value="{{ invoice }}" placeholder="请输入发票信息"></textarea>
-    <van-icon id="invoice" name="plus" size="20" />
+    <van-icon id="invoice" name="plus" size="20" bind:click="onIconClick" />
   </view>
 
   <!-- 按钮 -->

+ 3 - 3
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.less

@@ -71,17 +71,17 @@
         align-items: center;
         align-content: center;
         width: 100%;
-        margin: 5px 0px;
+        white-space: nowrap;
   
         &__item {
-          display: flex;
+          display: inline-flex;
           flex-direction: column;
           align-items: center;
           align-content: center;
           padding: 5px 0px;
   
           text {
-            font-size: 12px;
+            font-size: 13px;
             padding: 2.5px 5px;
             text-align: center;
           }

+ 2 - 2
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.ts

@@ -73,6 +73,7 @@ Page({
 
   /// 获取履约模板信息
   queryPermancePlanTmp() {
+    const { performancetemplateid } = this.data.order
     /// showLoading
     showLoading(() => {
       queryPermancePlanTmp({
@@ -80,8 +81,7 @@ Page({
           /// 获取数据
           this.setData({ 
             tmps: res.data,
-            tmp: res.data[0],
-            actions: res.data.map(obj => { return obj.templatename })
+            tmp: res.data.filter(obj => { return obj.autoid === performancetemplateid })[0],
            })
         },
         complete: () => {

+ 2 - 2
GuangZuan/miniprogram/mTrade/pages/delistingsell/index.wxml

@@ -16,12 +16,12 @@
         <view class="item-view-dwn">
           <text wx:for="{{ orderValue.dwn }}" wx:for-item="data" wx:for-index="idx" wx:key="idx">{{ data }}</text>
         </view>
-        <view class="item-view__step">
+        <scroll-view class="item-view__step" scroll-x="true" scroll-left="true">
           <view class="item-view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
             <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
             <text>{{ itm.stepdate }}</text>
           </view>
-        </view>
+        </scroll-view>
       </view>
     </van-swipe-cell>
 

+ 14 - 13
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.less

@@ -7,7 +7,7 @@
     display: flex;
     border-bottom: 1px solid #f0f0f0;
     align-items: center;
-    margin: 5px;
+    margin: 0px 5px;
   
     .title {
       width: 90px;
@@ -27,7 +27,7 @@
 
       .van-dropdown-menu {
         width: 300px;
-        margin: 5px 0px;
+        margin: 2.5px 0px;
       }
   
       .item {
@@ -63,7 +63,14 @@
       flex-direction: row;
       align-items: center;
       align-content: center;
-      justify-content: center;
+      justify-content: space-between;
+      width: 76%;
+
+      .plantmp {
+        color: #333;
+        font-size: 14px;
+        height: 25px;
+      }
 
       .content__item__step {
         display: flex;
@@ -72,28 +79,22 @@
         align-items: center;
         align-content: center;
         width: 100%;
+        white-space: nowrap;
   
         &__item {
-          display: flex;
+          display: inline-flex;
           flex-direction: column;
           align-items: center;
           align-content: center;
           margin-bottom: 5px;
-
+  
           text {
-            font-size: 12px;
+            font-size: 13px;
             padding: 2.5px 5px;
             text-align: center;
           }
         }
       }
-
-      .plantmp {
-        color: #333;
-        font-size: 14px;
-        width: 100%;
-        height: 30px;
-      }
     }
 
     .size-num {

+ 7 - 5
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts

@@ -1,7 +1,7 @@
 import { EOrderSrc } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, getEnumList, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getEnumList, getErrorMsg, isEncrypted, marketID, protoHeader, saveTradeActive, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index";
 import { queryPermancePlanTmp } from "../../../services/api/orders/index";
 import { encryptBody } from "../../../utils/websocket/crypto";
@@ -79,9 +79,9 @@ Page({
     /// 显示信息
     actions: [''],
     /// 最小尺寸
-    minSize: 0.0,
+    minSize: '0.0',
     /// 最大尺寸
-    maxSize: 0.0
+    maxSize: '0.0'
   },
 
   /**
@@ -196,7 +196,7 @@ Page({
         ZSSymmetryType: [this.data.duicheng1, this.data.duicheng2],
         ZSPolishType: [this.data.paoguang1, this.data.paoguang2],
         ZSFluorescenceType: [this.data.yingguang1, this.data.yingguang2],
-        Size: [this.data.minSize, this.data.maxSize],
+        Size: [Number(this.data.minSize), Number(this.data.maxSize)],
       } : {
         UserID: userid(),
         AccountID: accountid(),
@@ -207,7 +207,7 @@ Page({
         ZSSymmetryType: [this.data.duicheng1, this.data.duicheng2],
         ZSPolishType: [this.data.paoguang1, this.data.paoguang2],
         ZSFluorescenceType: [this.data.yingguang1, this.data.yingguang2],
-        Size: [this.data.minSize, this.data.maxSize],
+        Size: [Number(this.data.minSize), Number(this.data.maxSize)],
         ZSCZColor3Type: [this.data.zscolor1, this.data.zscolor2],
       }
 
@@ -240,6 +240,8 @@ Page({
           }
           /// 求购发布请求成功
           hideLoading(() => {
+            /// 默认选中1
+            saveTradeActive(1)
             wx.navigateBack()
           }, '求购发布请求成功', 'success')
         },

+ 5 - 5
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml

@@ -25,17 +25,17 @@
 
   <!-- 履约方式 -->
   <view class="cell-view prestyle"> 
-    <text class="title">履约方式</text>
+    <text class="title" >履约方式</text>
     <view class="content prestyle">
-      <view class="plantmp" id="plantmp" bindtap="showPlanTmps">{{ tmp.templatename }}</view>
-      <view class="content__item__step" id="plantmp" bindtap="showPlanTmps">
+      <text class="plantmp" id="plantmp" bindtap="showPlanTmps">{{ tmp.templatename }}</text>
+      <scroll-view class="content__item__step" id="plantmp" bindtap="showPlanTmps" scroll-left="true" scroll-x="true">
         <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx" id="plantmp" bindtap="showPlanTmps"> 
           <text style="background-color: {{ tcolors[idx] }}; color: white;">{{ itm.stepinfo }}</text>
           <text>{{ itm.stepdate }}</text>
         </view>
-      </view>
+      </scroll-view>
     </view>
-    <van-icon name="arrow" />
+    <view style="width: 20px;"><van-icon name="arrow"/></view>
   </view>
 
   <!-- 货币 -->

+ 4 - 27
GuangZuan/miniprogram/mTrade/pages/listingsell/index.less

@@ -12,31 +12,8 @@
     z-index: 999;
 
     .tmp_view {
-      &__step {
-        display: flex;
-        flex-direction: row;
-        justify-content: start;
-        align-items: center;
-        align-content: center;
-        margin-left: 10px;
-  
-        &__item {
-          display: flex;
-          flex-direction: column;
-          align-items: center;
-          align-content: center;
-          padding-top: 10px;
-  
-          text {
-            font-size: 12px;
-            padding: 2.5px 5px;
-            text-align: center;
-          }
-        }
-      }
-    }
-
-    .tmp_view {
+      padding: 0px 10px;
+      
       &__step {
         display: flex;
         flex-direction: row;
@@ -44,10 +21,10 @@
         align-items: center;
         align-content: center;
         width: 100%;
-        margin-left: 15px;
+        white-space: nowrap;
   
         &__item {
-          display: flex;
+          display: inline-flex;
           flex-direction: column;
           align-items: center;
           align-content: center;

+ 2 - 1
GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts

@@ -1,7 +1,7 @@
 import { EOrderSrc, EValidType } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, saveTradeActive, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel } from "../../../utils/message/index";
 import { isnullstr } from "../../../utils/util";
 import { queryMyWRPosition, queryPermancePlanTmp } from "../../../services/api/orders/index";
@@ -232,6 +232,7 @@ Page({
             }
             /// 求购发布请求成功
             hideLoading(() => {
+              saveTradeActive(0)
               wx.navigateBack()
             }, '出售发布请求成功', 'success')
           },

+ 2 - 2
GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml

@@ -19,12 +19,12 @@
       <van-cell-group>
         <van-field label="履约模板:" value="{{ tmp.templatename }}" readonly is-link bind:click-input="showPlanTmps" />
       </van-cell-group>
-      <view class="tmp_view__step">
+      <scroll-view class="tmp_view__step" scroll-left="true" scroll-x="true">
         <view class="tmp_view__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
           <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
           <text>{{ itm.stepdate }}</text>
         </view>
-      </view>
+      </scroll-view>
     </view>
 
     <!-- 列头 --> 

+ 5 - 4
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.less

@@ -38,15 +38,16 @@
         justify-content: start;
         align-items: center;
         align-content: center;
-        width: 100%;
+        width: 97%;
         margin: 5px 0px;
+        white-space: nowrap;
   
         &__item {
-          display: flex;
+          display: inline-flex;
           flex-direction: column;
           align-items: center;
           align-content: center;
-          padding-top: 10px;
+          padding-top: 5px;
           margin-bottom: 5px;
   
           text {
@@ -73,7 +74,7 @@
       width: 95%;
       background-color: #f0f0f0;
       border-radius: 10px;
-      padding: 10px 0px;
+      padding: 2.5px 0px;
       
       &__item {
         height: 30px;

+ 3 - 1
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts

@@ -2,7 +2,7 @@ import { EOrderSrc } from "../../../constants/enum/index"
 import { FunCode } from "../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../services/api/common/index"
 import { queryPermancePlanTmp } from "../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketID, protoHeader, timetample, userid } from "../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketID, protoHeader, saveTradeActive, timetample, userid } from "../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../utils/message/index"
 import { encryptBody } from "../../../utils/websocket/crypto"
 import { formatDateString } from "../../../utils/util"
@@ -29,6 +29,8 @@ Page({
   backToParent() {
     /// 返回上层视图
     wx.navigateBack()
+    /// 默认选中1
+    saveTradeActive(1)
   },
 
   /// 进行摘卖

+ 2 - 2
GuangZuan/miniprogram/mTrade/pages/orderdetail/index.wxml

@@ -21,12 +21,12 @@
         <text class="title">履约规则:</text>
       </view>
       <view class="content__item">
-        <view class="content__item__step">
+        <scroll-view class="content__item__step" scroll-x="true" scroll-left="true">
           <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
             <text style="background-color: {{ colors[idx] }}; color: white;">{{ itm.stepinfo }}</text>
             <text>{{ itm.stepdate }}</text>
           </view>
-        </view>
+        </scroll-view>
       </view>
     </view>
   </view>

+ 2 - 0
GuangZuan/miniprogram/pages/circle/index.ts

@@ -210,6 +210,8 @@ Page({
   onShow() {
     /// 查询数据
     this.queryMyFavorite()
+    /// 初始化tabbar
+    this.getTabBar().init()
   },
 
   /**

+ 2 - 2
GuangZuan/miniprogram/pages/home/index.less

@@ -146,9 +146,9 @@ van-grid-item {
       align-content: center;
       align-items: center;
       justify-content: space-around;
-      width: 95%;
+      width: 96%;
       border-bottom: 1px solid #f0f0f0;
-      padding: 10px 0px;
+      padding: 5px 0px;
 
       &__right {
         display: flex;

+ 2 - 2
GuangZuan/miniprogram/pages/home/index.wxml

@@ -35,7 +35,7 @@
 
   <view style="background-color: #fff;">
     <!-- 功能菜单 -->
-    <van-grid column-num="5" border="{{ false }}" clickable="{{ true }}" icon-size="{{ 35 }}">
+    <van-grid column-num="5" border="{{ false }}" clickable="{{ true }}" icon-size="{{ 40 }}">
       <van-grid-item content-class ="van-grid-item" wx:for="{{ menus }}" wx:key="id" wx:for-index="idx" wx:for-item="itm" id="{{ itm.id }}" url="{{ itm.path }}" text="{{ itm.title }}" icon="{{ imgUrl+itm.icon }}.png" link-type="{{ itm.id === 1 ? 'switchTab' : 'navigateTo' }}"/>
     </van-grid>
   </view>
@@ -55,7 +55,7 @@
     </view>
     <view class="memberinfo__list">
       <view class="memberinfo__list__item" wx:for="{{ members }}" wx:for-index="idx" wx:for-item="itm" wx:key="idx">
-        <van-image width="70" height="70" radius="10" fit="cover" use-loading-slot src="{{ itm.imageurl }}" />
+        <van-image width="60" height="60" radius="10" fit="cover" use-loading-slot src="{{ itm.imageurl }}" />
         <view class="memberinfo__list__item__right">
           <view class="memberinfo__list__item__right__top">
             <text class="goodsname">{{ itm.membername }}</text>

+ 24 - 3
GuangZuan/miniprogram/pages/login/index.ts

@@ -1,6 +1,6 @@
-import { login, loginQuery } from '../../services/api/account/index'
+import { login, loginQuery, tokenCheck } from '../../services/api/account/index'
 import { appConfig } from '../../config/index'
-import { getDivisions, getLoginCode, loginid, saveAuthorization, saveLoginID, saveLoginQuery, saveMarketID, saveTradeActive, saveUserId, setAllEnums, setAllErrors, setLoginCode, taAccounts } from '../../services/utils'
+import { getDivisions, getLoginCode, loginid, saveAuthorization, saveLoginID, saveLoginQuery, saveMarketID, saveTradeActive, saveUserId, xtoken, setAllEnums, setAllErrors, setLoginCode, taAccounts } from '../../services/utils'
 import { getAllEnums, queryErrorInfos } from '../../services/api/common/index'
 import { hideLoading, showLoading, showToast } from '../../utils/message/index'
 import { encryptBody } from '../../utils/websocket/crypto'
@@ -42,6 +42,26 @@ Page({
     }
     return true
   },
+
+  /// Token校验
+  tokenCheck() {
+    /// 如果为空
+    if (xtoken() === '') {
+      return
+    }
+
+    /// 登出
+    setTimeout(function () {
+      /// tokenCheck
+      tokenCheck({
+        success: () => {
+          /// 跳转到首页
+          wx.reLaunch({ url: '/pages/home/index' })  
+        },
+        fail: () => {}
+      })
+    }, 10)
+  },
   
   /**
    * 用户登录请求方法
@@ -174,7 +194,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-    
+    /// tokenCheck()
+    this.tokenCheck()
   },
 
   /**

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

@@ -21,8 +21,8 @@ Page({
 
     // 列表菜单项
     tablelists: [{id: 1, title: '签约账户', iconfont: 'mine-qyzh', path: '/mMine/pages/bank/index'}, 
-                 {id: 2, title: '收货地址', iconfont: 'mine-shdz', path: '/mMine/pages/address/list/index'}, 
-                 {id: 3, title: '发票信息', iconfont: 'mine-fpxx', path: '/mMine/pages/invoice/list/index'}, 
+                 {id: 2, title: '收货地址', iconfont: 'mine-shdz', path: '/mMine/pages/address/list/index?isMine=true'}, 
+                 {id: 3, title: '发票信息', iconfont: 'mine-fpxx', path: '/mMine/pages/invoice/list/index?isMine=true'}, 
                  {id: 4, title: '账户安全', iconfont: 'mine-mmxg', path: '/mMine/pages/modifypwd/index'}, 
                  {id: 5, title: '关于我们', iconfont: 'mine-gywm', path: '/mMine/pages/about/about/index'}],
     /// 微信头像 

+ 22 - 17
GuangZuan/miniprogram/pages/trade/index.ts

@@ -1,5 +1,5 @@
 import { queryBuyOrder, queryDiamond } from "../../services/api/orders/index"
-import { clientType, isEncrypted, protoHeader, userid, timetample, getEnumList, getErrorMsg, isMyFavorite, accountid, marketID, addMyFavotite, removeMyFavorite } from "../../services/utils";
+import { clientType, isEncrypted, protoHeader, userid, timetample, getEnumList, getErrorMsg, isMyFavorite, accountid, marketID, addMyFavotite, removeMyFavorite, getTradeActive } from "../../services/utils";
 import { FunCode } from "../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../services/api/common/index";
 import { hideLoading, showLoading } from "../../utils/message/index";
@@ -96,24 +96,23 @@ Page({
         this.onAddFavorite(index)
         break
       case 'detail':      /// 商品详情
-        const { ordertime, accountid, goodsno } = this.data.sellOrders[index]
+        const { ordertime, accountid } = this.data.active === 0 ? this.data.sellOrders[index] : this.data.askOrders[index]
         const show = accountid === this.data.taaccountid ? 0 : 1
-        wx.navigateTo({ 
-          url: this.data.active === 0 ? '/mHome/pages/goodsdetail/index?goodsno='+goodsno+'&ordertime='+formatDateString(ordertime, 'YYYY/MM/DD')+'&showTrade='+`${ show }` : ('/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.askOrders[index]))
-        })
+        /// 商品详情
+        if (this.data.active === 0) {
+          const { goodsno } = this.data.sellOrders[index]
+          wx.navigateTo({ 
+            url: '/mHome/pages/goodsdetail/index?goodsno='+goodsno+'&ordertime='+formatDateString(ordertime, 'YYYY/MM/DD')+'&showTrade='+`${ show }` 
+          })
+        } else {
+          wx.navigateTo({ 
+            url: ('/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.askOrders[index]))
+          })
+        }
         break;
       case 'delisting':     /// 摘牌
         wx.navigateTo({ url: '/mTrade/pages/delistingsell/index?item='+JSON.stringify(this.data.askOrders[index])})
         break;
-      case 'listing-buy':  /// 我要求购
-        wx.navigateTo({ url: '/mTrade/pages/listingbuy/index' })
-        break;
-      case 'listing-sell': /// 我要出售
-        wx.navigateTo({ url: '/mTrade/pages/listingsell/index' })
-        break; 
-      case 'ask-buy':      /// 求购信息
-        wx.navigateTo({ url: '/mTrade/pages/orderdetail/index' })
-        break;
       default:
         break;
     }
@@ -121,10 +120,10 @@ Page({
 
   onIconClick(e: any) {
     switch (e.currentTarget.id) {
-      case 'listing-buy':   /// 挂买
+      case 'listing-buy':   /// 我要求购
         wx.navigateTo({ url: '/mTrade/pages/listingbuy/index' })
         break;
-      case 'listing-sell':  /// 挂卖
+      case 'listing-sell':  /// 我要出售
         wx.navigateTo({ url: '/mTrade/pages/listingsell/index' })
         break;
       case 'search':        /// 搜索
@@ -171,6 +170,10 @@ Page({
           isMyFavorite(wrtradeorderid) ? removeMyFavorite(wrtradeorderid) : addMyFavotite(wrtradeorderid)
           /// 操作成功
           hideLoading(()=>{
+            setTimeout(function () {
+              /// 更新数据
+              this.queryDiamond()
+            }, 30)
             /// 更新数据
             wx.startPullDownRefresh()
           }, '请求成功'+res.msg, 'success')
@@ -366,7 +369,9 @@ Page({
     //     }
     //   } catch (error) {}
     // }
-    this.setData({ active: Number(wx.getStorageSync('trade_active')) })
+    this.setData({ active: getTradeActive() })
+    /// 初始化Tabbar
+    this.getTabBar().init()
   },
 
   /**

+ 2 - 2
GuangZuan/miniprogram/pages/trade/index.wxml

@@ -57,11 +57,11 @@
           <text wx:if="{{ active === 0 }}">证书:{{ itm.zscerttypedisplay }}</text>
           <text wx:if="{{ active === 1 }}" style="height: 20px;"></text>
         </view>
-        <view class="vanSwipeCell-item__mid__right" wx:if="{{ itm.accountid != accountid }}" id="favorite {{ idx }}" wx:if="{{ active === 0 }}" bindtap="onButtonPressed">
+        <view class="vanSwipeCell-item__mid__right" id="favorite {{ idx }}" wx:if="{{ active === 0 && itm.accountid != taaccountid }}" bindtap="onButtonPressed">
           <van-icon name="{{ itm.favorite ? 'star' : 'star-o'}}" color="#407DB8" />
           <text bindtap="onButtonPressed">{{ itm.favorite ? '已收藏' : '去收藏' }}</text>
         </view>
-        <view class="vanSwipeCell-item__mid__right" wx:if="{{ itm.accountid != accountid }}" id="delisting {{ idx }}" wx:if="{{ active === 1 }}" bindtap="onButtonPressed">
+        <view class="vanSwipeCell-item__mid__right" wx:if="{{ itm.accountid != taaccountid && active === 1 }}" id="delisting {{ idx }}" bindtap="onButtonPressed">
           <van-icon id="delisting {{ idx }}" name="fire-o" color="#407DB8" bind:click="onButtonPressed" />
           <text id="delisting {{ idx }}" bindtap="onButtonPressed">去摘牌</text>
         </view>

+ 5 - 0
GuangZuan/miniprogram/services/api/account/index.ts

@@ -10,6 +10,11 @@ export function login(params: HttpRequest<{req: GuangZuan.LoginReq, rsp: GuangZu
   return httpRequest(service.config.goAccess+'/Account/Login', 'POST', params)
 }
 
+/// Token校验
+export function tokenCheck(params: HttpRequest<{req: GuangZuan.TokenCheckReq, rsp: GuangZuan.TokenCheckRsp}>) {
+  return httpRequest(service.config.goAccess+'/Account/TokenCheck', 'GET', params)
+}
+
 /**
  * 账户登录后信息查询
  * 

+ 0 - 1
GuangZuan/miniprogram/services/index.ts

@@ -42,7 +42,6 @@ export default new (class {
           this.config = res.data as any;
           this.isReady = true;
           resolve();
-
           // 连接交易服务
           // socket.connectTrade();
         },

+ 36 - 2
GuangZuan/miniprogram/services/utils.ts

@@ -3,6 +3,7 @@ import { getTaAccounts } from './api/account/index';
 import { v4 } from "../utils/uuid/index";
 import { IMessageHead } from './../services/socket/trade/protobuf/proto';
 import Toast from "../miniprogram_npm/@vant/weapp/toast/toast";
+import { Mode } from "fs";
 
 /// 获取履约步骤类型ID
 export function getSteptype(typeid: number): string {
@@ -310,7 +311,6 @@ export function isMyFavorite(goodsno: string): boolean {
 
 /// 移除我的收藏
 export function removeMyFavorite(goodsno: string) {
-  console.log('removeMyFavorite')
   const objs = getMyFavorites()
   /// 移除数据
   if (objs.some(obj => { return obj === goodsno })) {
@@ -322,7 +322,6 @@ export function removeMyFavorite(goodsno: string) {
 
 /// 添加我的收藏
 export function addMyFavotite(goodsno: String) {
-  console.log('addMyFavotite')
   var objs = getMyFavorites()
   /// 移除数据
   if (!(objs.some(obj => { return obj === goodsno }))) {
@@ -348,6 +347,11 @@ export function saveTradeActive(active: number) {
   wx.setStorageSync('trade_active', active)
 }
 
+/// getTradeActive
+export function getTradeActive() {
+  return Number(wx.getStorageSync('trade_active'))
+}
+
 /// 存储token
 export function saveAuthorization(token: string) {
   wx.setStorageSync('Authorization', token)
@@ -371,4 +375,34 @@ export function saveAvatarUrl(avatarUrl: string) {
 /// 获取微信头像
 export function getAvatarUrl(): string {
   return wx.getStorageSync('avatarUrl')
+}
+
+export function setRUserecevieInfo(obj: GuangZuan.UserReceiveInfo) {
+  wx.setStorageSync('UserReceiveInfo', obj)
+}
+
+export function getUserRecevieInfo(): GuangZuan.UserReceiveInfo {
+  return wx.getStorageSync('UserReceiveInfo')
+}
+
+export function deleteUserRecevieInfo() {
+  const obj = getWrUserReceiptInfo()
+  if (obj) {
+    wx.removeStorageSync('UserReceiveInfo')
+  }
+}
+
+export function setWrUserReceiptInfo(obj: GuangZuan.WrUserReceiptInfo) {
+  wx.setStorageSync('WrUserReceiptInfo', obj)
+}
+
+export function getWrUserReceiptInfo(): GuangZuan.WrUserReceiptInfo {
+  return wx.getStorageSync('WrUserReceiptInfo')
+}
+
+export function deleteWrUserReceiptInfo() {
+  const obj = getWrUserReceiptInfo()
+  if (obj) {
+    wx.removeStorageSync('WrUserReceiptInfo')
+  }
 }

+ 3 - 3
GuangZuan/node_modules/.package-lock.json

@@ -2286,9 +2286,9 @@
       }
     },
     "node_modules/miniprogram-api-typings": {
-      "version": "3.9.0",
-      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.0.tgz",
-      "integrity": "sha512-QCXHHW9H4XYazb8J9EMiFyaOWHXhBG4oehkQqi+76FJpKKIlpgL0ZkXxzJ2L+6T/c5OxKm7iegovKIQGVkZDLQ==",
+      "version": "3.9.1",
+      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.1.tgz",
+      "integrity": "sha512-oyratzOWyuFhBzONp06l0FBPu03ltCd1sRWoy2v38SnAKxtpZ8ySLTSEw//hIsBdocMda7fFZEjOG57L57mcUw==",
       "dev": true
     },
     "node_modules/mixin-deep": {

+ 4 - 0
GuangZuan/node_modules/miniprogram-api-typings/CHANGELOG.md

@@ -1,3 +1,7 @@
+## 2023-04-10 v2.9.1
+- 更新 API 定义到 2.30.4
+- 修复页面 `onShareAppMessage` 异步形式的定义错误
+
 ## 2023-01-12 v3.9.0
 - 更新 API 定义到 2.29.1
 - 将 xr-frame 的命名空间由 `WechatXrFrame` 改为 `XrFrame`。这是一个 **破坏性改动**

+ 1 - 1
GuangZuan/node_modules/miniprogram-api-typings/package.json

@@ -1,6 +1,6 @@
 {
   "name": "miniprogram-api-typings",
-  "version": "3.9.0",
+  "version": "3.9.1",
   "description": "Type definitions for APIs of Wechat Mini Program in TypeScript",
   "main": "./index.d.ts",
   "types": "./index.d.ts",

+ 2 - 2
GuangZuan/node_modules/miniprogram-api-typings/types/wx/index.d.ts

@@ -71,8 +71,8 @@ declare namespace WechatMiniprogram {
     // TODO: fill worklet type
     type WorkletFunction = (...args: any) => any
     type AnimationObject = any
-    type SharedValue = any
-    type DerivedValue = any
+    type SharedValue<T = any> = T
+    type DerivedValue<T = any> = T
 }
 
 declare let console: WechatMiniprogram.Console

File diff suppressed because it is too large
+ 422 - 223
GuangZuan/node_modules/miniprogram-api-typings/types/wx/lib.wx.api.d.ts


+ 10 - 1
GuangZuan/node_modules/miniprogram-api-typings/types/wx/lib.wx.page.d.ts

@@ -102,7 +102,12 @@ declare namespace WechatMiniprogram.Page {
         onShareAppMessage(
             /** 分享发起来源参数 */
             options: IShareAppMessageOption
-        ): ICustomShareContent | void
+        ):
+            | ICustomShareContent
+            | IAsyncCustomShareContent
+            | Promise<ICustomShareContent>
+            | void
+            | Promise<void>
         /**
          * 监听右上角菜单“分享到朋友圈”按钮的行为,并自定义分享内容
          *
@@ -176,6 +181,10 @@ declare namespace WechatMiniprogram.Page {
         imageUrl?: string
     }
 
+    interface IAsyncCustomShareContent extends ICustomShareContent {
+        promise: Promise<ICustomShareContent>
+    }
+
     interface ICustomTimelineContent {
         /** 自定义标题,即朋友圈列表页上显示的标题。默认值:当前小程序名称 */
         title?: string

+ 7 - 7
GuangZuan/package-lock.json

@@ -22,7 +22,7 @@
         "@types/crypto-js": "^4.1.1",
         "@types/node": "^18.7.2",
         "gulp": "^4.0.2",
-        "miniprogram-api-typings": "^3.9.0"
+        "miniprogram-api-typings": "^3.9.1"
       }
     },
     "node_modules/@miniprogram-i18n/compile": {
@@ -2307,9 +2307,9 @@
       }
     },
     "node_modules/miniprogram-api-typings": {
-      "version": "3.9.0",
-      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.0.tgz",
-      "integrity": "sha512-QCXHHW9H4XYazb8J9EMiFyaOWHXhBG4oehkQqi+76FJpKKIlpgL0ZkXxzJ2L+6T/c5OxKm7iegovKIQGVkZDLQ==",
+      "version": "3.9.1",
+      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.1.tgz",
+      "integrity": "sha512-oyratzOWyuFhBzONp06l0FBPu03ltCd1sRWoy2v38SnAKxtpZ8ySLTSEw//hIsBdocMda7fFZEjOG57L57mcUw==",
       "dev": true
     },
     "node_modules/mixin-deep": {
@@ -6147,9 +6147,9 @@
       }
     },
     "miniprogram-api-typings": {
-      "version": "3.9.0",
-      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.0.tgz",
-      "integrity": "sha512-QCXHHW9H4XYazb8J9EMiFyaOWHXhBG4oehkQqi+76FJpKKIlpgL0ZkXxzJ2L+6T/c5OxKm7iegovKIQGVkZDLQ==",
+      "version": "3.9.1",
+      "resolved": "https://registry.npmmirror.com/miniprogram-api-typings/-/miniprogram-api-typings-3.9.1.tgz",
+      "integrity": "sha512-oyratzOWyuFhBzONp06l0FBPu03ltCd1sRWoy2v38SnAKxtpZ8ySLTSEw//hIsBdocMda7fFZEjOG57L57mcUw==",
       "dev": true
     },
     "mixin-deep": {

+ 1 - 1
GuangZuan/package.json

@@ -21,6 +21,6 @@
     "@types/crypto-js": "^4.1.1",
     "@types/node": "^18.7.2",
     "gulp": "^4.0.2",
-    "miniprogram-api-typings": "^3.9.0"
+    "miniprogram-api-typings": "^3.9.1"
   }
 }

+ 15 - 0
GuangZuan/typings/types/model/common.d.ts

@@ -304,4 +304,19 @@ declare namespace GuangZuan {
     /// 单价
     unitprice: number
   }
+
+  /// 文件上传回应
+  interface UploadRsp {
+    size: number,
+    thumb: string,
+    type: string,
+    url: [{
+      originalName: string,
+      fileName: string,
+      fileSize: string,
+      fileType: string,
+      filePath: string,
+      submitName: string
+    }]
+  }
 }

+ 10 - 0
GuangZuan/typings/types/model/order.d.ts

@@ -21,6 +21,16 @@ declare namespace GuangZuan {
     userId: number
   }
 
+  /// Token校验
+  interface TokenCheckReq {}
+
+  /// Token校验回应
+  interface TokenCheckRsp {
+    code: number
+    data: {}
+    msg: string
+  }
+
   /// 获取钻石详情
   interface GetGoodsReq {
     /// 商品编号

Some files were not shown because too many files changed in this diff