Handy_Cao 2 years ago
parent
commit
92ce8da3e4
39 changed files with 1313 additions and 135 deletions
  1. 2 1
      GuangZuan/miniprogram/app.json
  2. 26 9
      GuangZuan/miniprogram/config/proto/mtp.proto
  3. 2 0
      GuangZuan/miniprogram/constants/enum/funcode.ts
  4. 1 1
      GuangZuan/miniprogram/mHome/pages/bond/payment/index.wxml
  5. 1 1
      GuangZuan/miniprogram/mHome/pages/bond/prepayment/index.wxml
  6. 1 1
      GuangZuan/miniprogram/mHome/pages/cerserach/index.wxml
  7. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/payment/index.wxml
  8. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/prepayment/index.wxml
  9. 87 1
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.less
  10. 95 4
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts
  11. 63 2
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.wxml
  12. 55 11
      GuangZuan/miniprogram/mHome/pages/presell/list/index.less
  13. 43 6
      GuangZuan/miniprogram/mHome/pages/presell/list/index.ts
  14. 55 6
      GuangZuan/miniprogram/mHome/pages/presell/list/index.wxml
  15. 47 0
      GuangZuan/miniprogram/mHome/pages/presell/new/index.ts
  16. 14 14
      GuangZuan/miniprogram/mHome/pages/presell/new/index.wxml
  17. 87 1
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.less
  18. 119 4
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts
  19. 68 3
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.wxml
  20. 41 2
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.less
  21. 15 3
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts
  22. 55 7
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.wxml
  23. 44 0
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.ts
  24. 15 15
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.wxml
  25. 7 11
      GuangZuan/miniprogram/mHome/pages/search/index.less
  26. 2 2
      GuangZuan/miniprogram/mHome/pages/search/index.wxml
  27. 4 0
      GuangZuan/miniprogram/mHome/pages/settle/list/index.json
  28. 34 0
      GuangZuan/miniprogram/mHome/pages/settle/list/index.less
  29. 177 0
      GuangZuan/miniprogram/mHome/pages/settle/list/index.ts
  30. 38 0
      GuangZuan/miniprogram/mHome/pages/settle/list/index.wxml
  31. 1 1
      GuangZuan/miniprogram/mMine/pages/address/operate/index.wxml
  32. 1 1
      GuangZuan/miniprogram/mMine/pages/bank/index.wxml
  33. 1 1
      GuangZuan/miniprogram/mMine/pages/invoice/operate/index.wxml
  34. 1 1
      GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.wxml
  35. 1 3
      GuangZuan/miniprogram/pages/home/index.ts
  36. 4 4
      GuangZuan/miniprogram/pages/home/index.wxml
  37. 22 15
      GuangZuan/miniprogram/services/api/orders/index.ts
  38. 16 2
      GuangZuan/project.private.config.json
  39. 66 0
      GuangZuan/typings/types/model/order.d.ts

+ 2 - 1
GuangZuan/miniprogram/app.json

@@ -58,7 +58,8 @@
         "pages/presell/new/index",
         "pages/purchase/list/index",
         "pages/purchase/detail/index",
-        "pages/purchase/new/index"
+        "pages/purchase/new/index",
+        "pages/settle/list/index"
       ]
     },
     {

+ 26 - 9
GuangZuan/miniprogram/config/proto/mtp.proto

@@ -2503,10 +2503,10 @@ message GZPresaleApplyReq {
   optional uint32 SellUserID = 2; // 发行方用户,必填
   optional uint64 SellAccountID = 3; // 发行方资金账户ID,必填
   optional string WRStandardName = 4; // 现货商品名称,必填
-  optional uint64 PresaleQty = 5; // 预售总量,必填
-  optional uint64 MinBuyQty = 6; // 单人最小申购量,必填
-  optional uint64 MaxBuyQty = 7; // 单人最大申购量,必填
-  optional uint64 MinSuccessQty = 8; // 最低成团量,必填
+  optional double PresaleQty = 5; // 预售总量,必填,小数,两位
+  optional double MinBuyQty = 6; // 单人最小申购量,必填,小数,两位
+  optional double MaxBuyQty = 7; // 单人最大申购量,必填,小数,两位
+  optional double MinSuccessQty = 8; // 最低成团量,必填,小数,两位
   optional double UnitPrice = 9; // 预售价格,小数,两位,必填
   optional string StartDate = 10; // 预售开始日期,必填
   optional string EndDate = 11; // 预售结束日期,必填
@@ -2542,10 +2542,10 @@ message GZCenterPurchaseApplyReq {
   optional uint32 SellUserID = 2; // 发行方用户,必填
   optional uint64 SellAccountID = 3; // 发行方资金账户ID,必填
   optional string WRStandardName = 4; // 现货商品名称,必填
-  optional uint64 PresaleQty = 5; // 预售总量,必填
-  optional uint64 MinBuyQty = 6; // 单人最小申购量,必填
-  optional uint64 MaxBuyQty = 7; // 单人最大申购量,必填
-  optional uint64 MinSuccessQty = 8; // 最低成团量,必填
+  optional double PresaleQty = 5; // 预售总量,必填,小数,两位
+  optional double MinBuyQty = 6; // 单人最小申购量,必填,小数,两位
+  optional double MaxBuyQty = 7; // 单人最大申购量,必填,小数,两位
+  optional double MinSuccessQty = 8; // 最低成团量,必填,小数,两位
   optional string StartDate = 9; // 预售开始日期,必填
   optional string EndDate = 10; // 预售结束日期,必填
   optional uint32 BuyMarginAlgorithm = 11; // 买方保证金方式,必填
@@ -2585,7 +2585,7 @@ message GZCenterPurchaseApplyRsp {
 // 广钻集采价格列表
 message GZCenterPurchasePriceList {
   optional uint32 StepIndex = 1; // 档位序号,必填
-  optional uint64 Qty = 2; // 档位数量,必填
+  optional double Qty = 2; // 档位数量,必填,小数,两位
   optional double Price = 3; // 档位价格,小数,两位,必填
 }
 
@@ -2633,4 +2633,21 @@ message GZPresaleOrderRsp {
   optional uint64 AccountID = 5; // 资金账户ID
   optional uint64 WRTradeOrderID = 6; // 仓单贸易委托单ID
   optional string ClientSerialNo = 7; // 客户端流水号
+}
+
+// WMS结算单支付接口请求 0 17 23
+message BSWMSReckonPayReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional uint32 UserID = 2; // uint32 用户ID,必填
+	optional uint64 OrderID = 3; // uint64 单据ID,必填
+  optional string ClientSerialNo = 4; // string 客户端流水号
+}
+// WMS结算单支付接口响应 0 17 24
+message BSWMSReckonPayRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint32 UserID = 4; // uint32 用户ID
+	optional uint64 OrderID = 5; // uint64 单据ID
+  optional string ClientSerialNo = 6; // string 客户端流水号
 }

+ 2 - 0
GuangZuan/miniprogram/constants/enum/funcode.ts

@@ -90,4 +90,6 @@ export enum FunCode {
     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)
 }

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/bond/payment/index.wxml

@@ -28,6 +28,6 @@
   <!-- 按钮 -->
   <view class="container__button-view">
     <van-button custom-class="confirm" id="confirm" round color="linear-gradient(to right, #4bb0ff, #666)" block bind:click="doBSFWOperator">确认</van-button>
-    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="backToParent">取消</van-button>
+    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" block bind:click="backToParent">取消</van-button>
   </view>
 </view>

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/bond/prepayment/index.wxml

@@ -26,6 +26,6 @@
   <!-- 按钮 -->
   <view class="container__button-view">
     <van-button custom-class="confirm" id="confirm" round color="linear-gradient(to right, #4bb0ff, #666)" block bind:click="doBSFWOperator">确认</van-button>
-    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="backToParent">取消</van-button>
+    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" block bind:click="backToParent">取消</van-button>
   </view>
 </view>

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

@@ -37,7 +37,7 @@
 <!-- 查询按钮 -->
 <view class="button-view">
   <van-button custom-class="search" round bind:click="certSearch" block color="linear-gradient(to right, #4bb0ff, #D91D34)">查询</van-button>
-  <van-button custom-class="clear" round bind:click="clear" block color="linear-gradient(to right, #4bb0ff, #6149f6)">清空</van-button>
+  <van-button custom-class="clear" round bind:click="clear" block color="linear-gradient(to right, #999, #aaa)">清空</van-button>
 </view>
 
 <!-- toast --> 

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/inspection/payment/index.wxml

@@ -29,7 +29,7 @@
   <!-- 按钮 -->
   <view class="container__button-view">
     <van-button custom-class="confirm" id="confirm" round color="linear-gradient(to right, #4bb0ff, #666)" block bind:click="doCJJCOperator">确认</van-button>
-    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="backToParent">取消</van-button>
+    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" block bind:click="backToParent">取消</van-button>
   </view>
 </view>
 

+ 1 - 1
GuangZuan/miniprogram/mHome/pages/inspection/prepayment/index.wxml

@@ -28,7 +28,7 @@
   <!-- 按钮 -->
   <view class="container__button-view">
     <van-button custom-class="confirm" id="confirm" round color="linear-gradient(to right, #4bb0ff, #666)" block bind:click="doCJJCOperator">确认</van-button>
-    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="backToParent">取消</van-button>
+    <van-button custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" block bind:click="backToParent">取消</van-button>
   </view>
 </view>
 

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

@@ -1 +1,87 @@
-/* mHome/pages/presell/detail/index.wxss */
+.container {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  align-content: center;
+
+  .banner {
+    height: 210px;
+    width: 100%;
+
+    .swiper-item, image {
+      width: 100%;
+    }
+  }
+
+  &__top {
+    display: flex;
+    flex-direction: column;
+    align-content: center;
+    width: 100%;
+    padding: 10px 0px;
+
+    &__row {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      align-content: center;
+      justify-content: space-between;
+      padding: 2.5px 10px;
+
+      text {
+        font-size: 14px;
+        color: #333;
+        text-align: left;
+        width: 100%;
+      }
+    }
+
+    :first-child {
+      text {
+        font-size: 18px;
+      }
+
+      text:nth-child(3) {
+        color: #f00;
+      }
+    }
+  }
+
+
+  &__diamondinfo {
+    display: flex;
+    flex-direction: column;
+    align-content: center;
+    margin-top: 10px;
+
+    text {
+      padding: 10px 15px;
+      font-size: 14px;
+      text-align: left;
+      width: 100%;
+      border-bottom: 1px solid #f0f0f0;
+    }
+
+    :first-child {
+      padding: 10px 5px;
+      font-size: 20px;
+      font-weight: bold;
+    }
+  }
+
+  .button-view {
+    border-radius: 10px;
+    width: 100%;
+    padding: 15px 0px;
+    display: flex;
+    flex-direction: row;
+    align-content: center;
+    align-items: center;
+    justify-content: space-between;
+  
+    van-button {
+      width: 95%;
+      padding-left: 2.5%;
+    }
+  }
+}

+ 95 - 4
GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts

@@ -1,11 +1,28 @@
-// mHome/pages/presell/detail/index.ts
+import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
+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"
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    navTitle: '预售详情'
+    navTitle: '预售详情',
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
+    /// 数据信息
+    item: {},
+    /// 选中履约模板
+    tmp: <GuangZuan.PermancePlanTmp>({}),
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'hotpink', 'orange', 'darkgoldenrod'],
+    /// banner图
+    banners: ['']
   },
 
    /**
@@ -17,10 +34,84 @@ Page({
   },
 
   /**
-   * 生命周期函数--监听页面加载
+   * 立即购买
    */
-  onLoad() {
+  doSubmit(orderID: string, qty: string) {
+    /// showModel
+    showModel(() => {
+      /// showLoading
+      showLoading(() => {
+        /// 请求参数
+        const info = JSON.stringify({
+          Header: protoHeader(FunCode.GZPresaleOrderReq),
+          UserID: userid(),
+          AccountID: accountid(),
+          WRTradeOrderID: Number(orderID),
+          OrderQty: Number(qty),
+          MarketID: marketid(),
+          ClientType: clientType(),
+          ClientOrderTime: formatDateString(new Date().toString()),
+          ClientSerialNo: timetample().toString()
+        })
+        /// 发送请求
+        sendMsgToMQ({
+          data: {
+            data: encryptBody(info),
+            funCodeReq: FunCode.GZPresaleOrderReq,
+            funCodeRsp: FunCode.GZPresaleOrderRsp,
+            isEncrypted: isEncrypted()
+          },
+          success: (res) => {
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode))
+              return
+            }
+            /// 求购发布请求成功
+            hideLoading(() => {
+              wx.navigateBack()
+            }, '立即购买申请成功', 'success')
+          },
+          fail: (emsg) => {
+            hideLoading(()=>{}, emsg)
+          }
+        })
+      }, '提交申请请求中....')
+      }, '提示', '确认要立即购买申请吗?')
+  },
+
+  /// 获取履约模板信息
+  queryPermancePlanTmp(performancetemplateid: number) {
+    /// showLoading
+    showLoading(() => {
+      queryPermancePlanTmp({
+        data: {
+          marketid: marketid()
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ 
+            tmp: res.data.filter(obj => { return obj.autoid === performancetemplateid })[0]
+           })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options: any) {
+    const obj = JSON.parse(options.item)
+    /// 解析数据
+    this.setData({ item: obj })
+    /// 查询履约模板
+    this.queryPermancePlanTmp(obj.performancetemplateid)
   },
 
   /**

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

@@ -1,9 +1,70 @@
-<!--mHome/pages/presell/detail/index.wxml-->
-<view class="container">
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
   <!-- 导航栏 -->
   <van-nav-bar custom-style="background-color: #407DB8">
     <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
     <text slot="title" style="color: #fff;">{{ navTitle }}</text>
   </van-nav-bar>
 
+  <!-- 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 }}">
+      <view class="swiper-item">
+        <image src='https://img.yzcdn.cn/vant/cat.jpeg' mode="widthFix" />
+      </view>
+    </swiper-item>
+  </swiper>
+
+  <view style="background-color: #f0f0f0; height: 10px; width: 100%;"></view>
+
+  <view class="container__top">
+    <view class="container__top__row">
+      <text selectable="false">钻石1001</text>
+      <text selectable="false">2000克拉</text>
+      <text selectable="false">¥8000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">预售总量:10000克拉</text>
+      <text selectable="false">已认购数量:10000克拉</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">最小采购单位:100</text>
+      <text selectable="false">最大采购单位:10000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">最低成团量:4000</text>
+      <text selectable="false">采购保证金比例:20%</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">开始日期:2022-03-08</text>
+      <text selectable="false">结束日期:2022-03-08</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">状态:进行中</text>
+      <text selectable="false">已认购数量:2000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">备注:进行中</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">单号:1809748484948848484</text>
+    </view>
+  </view>
+
+  <view style="background-color: #f0f0f0; height: 10px; width: 100%;"></view>
+
+  <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>
+  </view>
+
+   <view class="button-view">
+    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="doSubmit" round>立即购买</van-button>
+  </view>
+
 </view>

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

@@ -1,18 +1,62 @@
 /* mHome/pages/presell/list/index.wxss */
-.tab-view {
-  display: flex;
-  flex-direction: column;
-
-  .filter-view {
+.container {
+  
+  .tab-view {
     display: flex;
-    flex-direction: row;
-    justify-content: space-between;
-    align-items: center;
+    flex-direction: column;
+  
+    .filter-view {
+      display: flex;
+      flex-direction: row;
+      justify-content: space-between;
+      align-items: center;
+      align-content: center;
+      padding: 0px 10px;
+      border-top: 1px solid #f0f0f0;
+  
+      van-tabs {
+        width: 100%;
+      }
+    }
+  }
+  
+  &__list {
+    margin-top: 5px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    background-color: #f0f0f0;
+    width: 100%;
     align-content: center;
-    padding: 0px 10px;
+    align-items: center;
+    padding: 5px 0px;
+  
+    &__item {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      background-color: #fff;
+      margin-bottom: 10px;
+      width: 96%;
+      border-radius: 10px;
+      margin: 5px 0px;
+      padding-bottom: 10px;
+  
+      &__top, &__row {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
+        padding: 5px 15px;
 
-    van-tabs {
-      width: 100%;
+        text {
+          text-align: left;
+          color: #333;
+          font-size: 14px;
+          width: 100%;
+        }
+      }
     }
   }
 }

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

@@ -64,6 +64,10 @@ 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),
                   status: getEnumdicValue('WRPresaleStatus', obj.presalestatus),
@@ -74,8 +78,19 @@ Page({
                   maxbuyqty: obj.maxbuyqty.toFixed(0),
                   presaleqty: obj.presaleqty.toFixed(0)+'克拉',
                   buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
-                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0),
-                  price: '¥'+obj.lastprice.toFixed(2)+'(元/克拉)'
+                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0)+'克拉',
+                  price: '¥'+obj.unitprice.toFixed(2)+'(元/克拉)',
+                  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,
                 }
               })
             })
@@ -123,13 +138,29 @@ 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),
                   tradeamount: obj.tradeamount.toFixed(2),
                   status: obj.status,
                   ordertime: isnullstr(obj.ordertime),
                   freezemargin: obj.freezemargin.toFixed(2),
                   marginvalue: (obj.marginvalue*100).toFixed(2)+'%',
-                  tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)'
+                  tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)',
+                  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,
                 }
               })
             })
@@ -154,6 +185,13 @@ Page({
     wx.navigateBack()
   },
 
+  /// 点击
+  onItemClick(e: any) {
+    wx.navigateTo({
+      url: '/mHome/pages/presell/detail/index?item='+JSON.stringify(this.data.values[Number(e.currentTarget.id)])+'&index='+this.data.active
+    })
+  },
+
   /**
    * 预售申请
    */ 
@@ -167,9 +205,9 @@ Page({
    * 预售申请
    */
   onTabChange(e: any) {
-    /// 重置状态
-    this.setData({ status: 1, active: e.detail.index })
     if (e.target.id === "category") {
+        /// 重置状态
+      this.setData({ status: 1, active: e.detail.index })
       /// 数据重置
       switch (e.detail.index) {
         case 0: /// 预售大厅
@@ -182,7 +220,6 @@ Page({
           this.setData({ subtabs: [{id: 1, name: '预售中'}, {id: 2, name: '执行中'}, {id: 3, name: '已完成'}] })
           break;
       }
-      
     } else {
       this.setData({ status: e.detail.index+1 })
     }

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

@@ -1,12 +1,13 @@
 <!--mHome/pages/presell/list/index.wxml-->
-<view class="container">
-  <!-- 导航栏 -->
-  <van-nav-bar custom-style="background-color: #407DB8">
-    <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
-    <text slot="title" style="color: #fff;">预售大厅</text>
-  </van-nav-bar>
+<view class="container"  style="padding-bottom: {{ safeBottom }}px;">
 
   <view class="tab-view" style="position: sticky; top: 0; z-index: 999;">
+    <!-- 导航栏 -->
+    <van-nav-bar custom-style="background-color: #407DB8">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
+      <text slot="title" style="color: #fff;">预售大厅</text>
+    </van-nav-bar>
+
     <!-- 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 }}"/>
@@ -19,6 +20,54 @@
       <van-icon name="add-o" size="25px" color="#387BDC" bind:click="addPreSell"/>
     </view>
   </view> 
+
+  <!-- 数据内容 -->
+  <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 class="container__list__item__top">
+        <text>{{ itm.wrstandardname }}</text>
+        <text>{{ itm.surplusqty }}</text>
+        <text>{{ itm.price }}</text>
+        <text>{{ itm.status }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>卖方:{{ itm.customername }}</text>
+        <text>预售数量:{{ itm.presaleqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>最小采购单位:{{ itm.minbuyqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>开始日期:{{ itm.startdate }}</text>
+        <text>最大采购单位:{{ itm.maxbuyqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>结束日期:{{ itm.enddate }}</text>
+        <text>最低成团量:{{ itm.minsuccessqty }}</text>
+      </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 class="container__list__item__top">
+        <text>{{ itm.wrstandardname }}</text>
+        <text>{{ itm.orderqty }}</text>
+        <text>{{ itm.tradeprice }}</text>
+        <text>{{ itm.status }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>卖方:{{ itm.customername }}</text>
+        <text>货款:{{ itm.tradeamount }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>已付保证金:{{ itm.freezemargin }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>{{ itm.ordertime }}</text>
+      </view>
+    </view>
+  </view>
 </view>
 
 <!-- empty -->

+ 47 - 0
GuangZuan/miniprogram/mHome/pages/presell/new/index.ts

@@ -193,6 +193,53 @@ Page({
     this.setData({ way: e.detail });
   },
 
+  // input输入中
+  getInputNum (e: any) {
+    console.log(e)
+    let amount = e.detail
+      let num = null
+      // 小数点后最多只能输入两位
+      num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1')
+      // 小数点开头得话,让前面加个0   eg: 0.xx
+      const startPoint = /^\./g
+      if (startPoint.test(num)) { num = amount.replace(startPoint, '0.') }
+
+      // 若没有小数点,前面输入多个0,去掉0取整
+      // if(num有值 && 没有小数点 && 不等于'0')
+      if (num && !num.includes('.') && num !== '0') { num = +num }
+      // 若出现多个小数点,则替换为1个
+      const morePoint = /\.+(\d*|\.+)\./g
+      if (morePoint.test(num)) {
+        num = amount
+          .replace(/\.{2,}/g, ".")
+          .replace(".", "$#$")
+          .replace(/\./g, "")
+          .replace("$#$", ".")
+      }
+      switch (e.target.id) {
+        case 'maxbuyqty':   /// 最大采购单位
+          this.setData({ maxbuyqty: num})
+          break;
+        case 'pretotalqty':  /// 预售总量
+          this.setData({ pretotalqty: num})
+          break;
+        case 'preprice':       /// 预售价格
+          this.setData({ preprice: num})
+          break;
+        case 'buymarginvalue': /// 采购保证金 
+          this.setData({ buymarginvalue: num})
+          break;
+        case 'minbuyqty':      /// 最小采购单位
+          this.setData({ minbuyqty: num})
+          break;
+        case 'minsuccessqty':  /// 最低成团量
+          this.setData({ minsuccessqty: num})
+          break;
+        default:
+          break;
+      }
+  },
+
   /// 照片上传
   afterRead(e: any) {
     const { file } = e.detail;

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

@@ -11,30 +11,30 @@
   <van-cell-group>
     <van-cell><view solt="title" class="sub-title">预售信息</view></van-cell>
     <view class="cell-item">
-      <van-field label="商品名称:" title-width="8em" size="large" required clearable model:value="{{ wrstandname }}" placeholder="请输入商品名称" border="{{ false }}" bind:change="onChange" />
+      <van-field id="wrstandname" label="商品名称:" title-width="8em" size="large" required clearable model:value="{{ wrstandname }}" placeholder="请输入商品名称" border="{{ false }}" />
     </view>
     <view class="cell-item">
-      <van-field label="预售总量:" title-width="8em" type="digit" size="large" required clearable model:value="{{ pretotalqty }}" placeholder="请输入预售总量" border="{{ false }}" bind:change="onChange" />
+      <van-field id="pretotalqty" label="预售总量:" title-width="8em" type="digit" size="large" required clearable model:value="{{ pretotalqty }}" placeholder="请输入预售总量" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="预售价格:" title-width="8em" type="digit" size="large" required clearable model:value="{{ preprice }}" placeholder="请输入预售价格" border="{{ false }}" bind:change="onChange" />
+      <van-field id="preprice" label="预售价格:" title-width="8em" type="digit" size="large" required clearable model:value="{{ preprice }}" placeholder="请输入预售价格" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(元/克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最小采购单位:" title-width="8em" type="digit" size="large" required clearable model:value="{{ minbuyqty }}" placeholder="请输入最小采购单位" border="{{ false }}" bind:change="onChange" />
+      <van-field id="minbuyqty" label="最小采购单位:" title-width="8em" type="digit" size="large" required clearable model:value="{{ minbuyqty }}" placeholder="请输入最小采购单位" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最大采购单位:" title-width="8em" type="digit" size="large" required clearable model:value="{{ maxbuyqty }}" placeholder="请输入最大采购单位" border="{{ false }}" bind:change="onChange" />
+      <van-field id="maxbuyqty" label="最大采购单位:" title-width="8em" type="digit" size="large" required clearable model:value="{{ maxbuyqty }}" placeholder="请输入最大采购单位" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最低成团量:" title-width="8em" type="digit" size="large" required clearable model:value="{{ minsuccessqty }}" placeholder="请输入最低成团量" border="{{ false }}" bind:change="onChange" />
+      <van-field id="minsuccessqty" label="最低成团量:" title-width="8em" type="digit" size="large" required clearable model:value="{{ minsuccessqty }}" placeholder="请输入最低成团量" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="采购保证金比例:" title-width="8em" type="digit" size="large" required clearable model:value="{{ buymarginvalue }}" placeholder="请输入采购保证金比例" border="{{ false }}" bind:change="onChange" />
+      <van-field id="buymarginvalue" label="采购保证金比例:" title-width="8em" type="digit" size="large" required clearable model:value="{{ buymarginvalue }}" placeholder="请输入采购保证金比例" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">%</view>
     </view>
     <view class="cell-item">
@@ -59,12 +59,12 @@
 
   <van-cell-group>
     <van-cell><view solt="title" class="sub-title">钻石参考信息</view></van-cell>
-    <van-field label="颜色:" size="large" clearable model:value="{{ zscolor }}" placeholder="请输入颜色" border="{{ false }}" bind:change="onChange" />
-    <van-field label="净度:" size="large" clearable model:value="{{ zsclarity }}" placeholder="请输入净度" border="{{ false }}" bind:change="onChange" />
-    <van-field label="尺寸:" size="large" clearable model:value="{{ zssize }}" placeholder="请输入尺寸" border="{{ false }}" bind:change="onChange" />
-    <van-field label="成品率:" size="large" clearable model:value="{{ zsyield }}" placeholder="请输入成品率" border="{{ false }}" bind:change="onChange" />
-    <van-field label="重量描述:" size="large" clearable model:value="{{ weightdesc }}" placeholder="请输入重量描述" border="{{ false }}" bind:change="onChange" />
-    <van-field label="数量描述:" size="large" clearable model:value="{{ qtydesc }}" placeholder="请输入数量描述" border="{{ false }}" bind:change="onChange" />
+    <van-field id="zscolor" label="颜色:" size="large" clearable model:value="{{ zscolor }}" placeholder="请输入颜色" border="{{ false }}" />
+    <van-field id="zsclarity" label="净度:" size="large" clearable model:value="{{ zsclarity }}" placeholder="请输入净度" border="{{ false }}" />
+    <van-field id="zssize" label="尺寸:" size="large" clearable model:value="{{ zssize }}" placeholder="请输入尺寸" border="{{ false }}" />
+    <van-field id="zsyield" label="成品率:" size="large" clearable model:value="{{ zsyield }}" placeholder="请输入成品率" border="{{ false }}" />
+    <van-field id="weightdesc" label="重量描述:" size="large" clearable model:value="{{ weightdesc }}" placeholder="请输入重量描述" border="{{ false }}" />
+    <van-field id="qtydesc" label="数量描述:" size="large" clearable model:value="{{ qtydesc }}" placeholder="请输入数量描述" border="{{ false }}" />
     <van-field label="生产方式:" size="large" readonly border="{{ false }}">
       <view slot="input">
         <van-radio-group solt="input" value="{{ way }}" bind:change="onChange" direction="horizontal" >
@@ -81,7 +81,7 @@
         <view class="upload"><van-uploader max-count="6" deletable="{{ true }}" file-list="{{ fileList }}" bind:after-read="afterRead" bind:delete="deleteImage" /></view> 
       </view>
     </view>
-    <van-field label="备注:" size="large" type="textarea" autosize maxlength="200" clearable model:value="{{ remark }}" placeholder="请输入备注信息" border="{{ false }}" bind:change="onChange" />
+    <van-field id="remark" label="备注:" size="large" type="textarea" autosize maxlength="200" clearable model:value="{{ remark }}" placeholder="请输入备注信息" border="{{ false }}" bind:change="onChange" />
   </van-cell-group>
 
   <!-- 操作按钮 -->

+ 87 - 1
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.less

@@ -1 +1,87 @@
-/* mHome/pages/purchase/detail/index.wxss */
+.container {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  align-content: center;
+
+  .banner {
+    height: 210px;
+    width: 100%;
+
+    .swiper-item, image {
+      width: 100%;
+    }
+  }
+
+  &__top {
+    display: flex;
+    flex-direction: column;
+    align-content: center;
+    width: 100%;
+    padding: 10px 0px;
+
+    &__row {
+      display: flex;
+      flex-direction: row;
+      align-items: center;
+      align-content: center;
+      justify-content: space-between;
+      padding: 2.5px 10px;
+
+      text {
+        font-size: 14px;
+        color: #333;
+        text-align: left;
+        width: 100%;
+      }
+    }
+
+    :first-child {
+      text {
+        font-size: 18px;
+      }
+
+      text:nth-child(3) {
+        color: #f00;
+      }
+    }
+  }
+
+
+  &__diamondinfo {
+    display: flex;
+    flex-direction: column;
+    align-content: center;
+    margin-top: 10px;
+
+    text {
+      padding: 10px 15px;
+      font-size: 14px;
+      text-align: left;
+      width: 100%;
+      border-bottom: 1px solid #f0f0f0;
+    }
+
+    :first-child {
+      padding: 10px 5px;
+      font-size: 20px;
+      font-weight: bold;
+    }
+  }
+
+  .button-view {
+    border-radius: 10px;
+    width: 100%;
+    padding: 15px 0px;
+    display: flex;
+    flex-direction: row;
+    align-content: center;
+    align-items: center;
+    justify-content: space-between;
+  
+    van-button {
+      width: 95%;
+      padding-left: 2.5%;
+    }
+  }
+}

+ 119 - 4
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts

@@ -1,11 +1,30 @@
-// mHome/pages/purchase/detail/index.ts
+import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
+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"
+
 Page({
 
   /**
    * 页面的初始数据
    */
   data: {
-    navTitle: '集采详情'
+    navTitle: '集采详情',
+    /// 底部安全区域
+    safeBottom: getApp().globalData.safeBottom,
+    /// 数据信息
+    item: {},
+    /// 选中履约模板
+    tmp: <GuangZuan.PermancePlanTmp>({}),
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'hotpink', 'orange', 'darkgoldenrod'],
+    /// banner图
+    banners: [''],
+    /// 预售认购列表查询
+    sells: <GuangZuan.GZMyPreSell[]>[]
   },
 
    /**
@@ -16,11 +35,107 @@ Page({
     wx.navigateBack()
   },
 
+  /// 我的预售认购列表查询
+  queryGZMyPresell(presaleapplyid: number) {
+    /// showLoading
+    showLoading(() => {
+      queryGZMyPresell({
+        data: {
+          presaleapplyid: presaleapplyid
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ sells: res.data })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
+
+   /**
+   * 立即购买
+   */
+  doSubmit(orderID: string, qty: string) {
+    /// showModel
+    showModel(() => {
+      /// showLoading
+      showLoading(() => {
+        /// 请求参数
+        const info = JSON.stringify({
+          Header: protoHeader(FunCode.GZCenterPurchaseOrderReq),
+          UserID: userid(),
+          AccountID: accountid(),
+          WRTradeOrderID: Number(orderID),
+          OrderQty: Number(qty),
+          MarketID: marketid(),
+          ClientType: clientType(),
+          ClientOrderTime: formatDateString(new Date().toString()),
+          ClientSerialNo: timetample().toString()
+        })
+        /// 发送请求
+        sendMsgToMQ({
+          data: {
+            data: encryptBody(info),
+            funCodeReq: FunCode.GZCenterPurchaseOrderReq,
+            funCodeRsp: FunCode.GZCenterPurchaseOrderRsp,
+            isEncrypted: isEncrypted()
+          },
+          success: (res) => {
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode))
+              return
+            }
+            /// 求购发布请求成功
+            hideLoading(() => {
+              wx.navigateBack()
+            }, '立即购买申请成功', 'success')
+          },
+          fail: (emsg) => {
+            hideLoading(()=>{}, emsg)
+          }
+        })
+      }, '提交申请请求中....')
+      }, '提示', '确认要立即购买申请吗?')
+  },
+
+  /// 获取履约模板信息
+  queryPermancePlanTmp(performancetemplateid: number) {
+    /// showLoading
+    showLoading(() => {
+      queryPermancePlanTmp({
+        data: {
+          marketid: marketid()
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ 
+            tmp: res.data.filter(obj => { return obj.autoid === performancetemplateid })[0]
+           })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
-
+  onLoad(options: any) {
+    const obj = JSON.parse(options.item)
+    /// 解析数据
+    this.setData({ item: obj })
+    // 查询履约模板
+    this.queryPermancePlanTmp(obj.performancetemplateid)
+    /// 我的预售认购列表查询
+    this.queryGZMyPresell(obj.presaleapplyid)
   },
 
   /**

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

@@ -1,8 +1,73 @@
-<!--mHome/pages/purchase/detail/index.wxml-->
-<view class="container">
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
   <!-- 导航栏 -->
   <van-nav-bar custom-style="background-color: #407DB8">
     <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
     <text slot="title" style="color: #fff;">{{ navTitle }}</text>
   </van-nav-bar>
-</view>
+
+  <!-- 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 }}">
+      <view class="swiper-item">
+        <image src='https://img.yzcdn.cn/vant/cat.jpeg' mode="widthFix" />
+      </view>
+    </swiper-item>
+  </swiper>
+
+  <view style="background-color: #f0f0f0; height: 10px; width: 100%;"></view>
+
+  <view class="container__top">
+    <view class="container__top__row">
+      <text selectable="false">钻石1001</text>
+      <text selectable="false">2000克拉</text>
+      <text selectable="false">¥8000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">预售总量:10000克拉</text>
+      <text selectable="false">已认购数量:10000克拉</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">最小采购单位:100</text>
+      <text selectable="false">最大采购单位:10000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">最低成团量:4000</text>
+      <text selectable="false">采购保证金比例:20%</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">开始日期:2022-03-08</text>
+      <text selectable="false">结束日期:2022-03-08</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">状态:进行中</text>
+      <text selectable="false">已认购数量:2000</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">备注:进行中</text>
+    </view>
+    <view class="container__top__row">
+      <text selectable="false">单号:1809748484948848484</text>
+    </view>
+  </view>
+
+  <view style="background-color: #f0f0f0; height: 10px; width: 100%;"></view>
+
+   <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>
+   </view>
+
+   <view class="button-view">
+    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="doSubmit" round>立即购买</van-button>
+  </view>
+</view>
+
+
+

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

@@ -1,6 +1,5 @@
-/* mHome/pages/purchase/list/index.wxss */
-
 .container {
+  
   .tab-view {
     display: flex;
     flex-direction: column;
@@ -12,10 +11,50 @@
       align-items: center;
       align-content: center;
       padding: 0px 10px;
+      border-top: 1px solid #f0f0f0;
   
       van-tabs {
         width: 100%;
       }
     }
   }
+  
+  &__list {
+    margin-top: 5px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    background-color: #f0f0f0;
+    width: 100%;
+    align-content: center;
+    align-items: center;
+  
+    &__item {
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      background-color: #fff;
+      margin-bottom: 10px;
+      width: 96%;
+      border-radius: 10px;
+      margin: 5px 0px;
+      padding-bottom: 10px;
+      
+      &__top, &__row {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
+        padding: 5px 15px;
+
+        text {
+          text-align: left;
+          color: #333;
+          font-size: 14px;
+          width: 100%;
+        }
+      }
+    }
+  }
 }

+ 15 - 3
GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts

@@ -64,6 +64,7 @@ Page({
               isEmpty: res.data.length === 0,
               values: res.data.map(obj => {
                 return {
+                  presaleapplyid: obj.presaleapplyid,
                   wrstandardname: isnullstr(obj.wrstandardname),
                   customername: isnullstr(obj.customername),
                   status: getEnumdicValue('WRPresaleStatus', obj.presalestatus),
@@ -74,8 +75,9 @@ Page({
                   maxbuyqty: obj.maxbuyqty.toFixed(0),
                   presaleqty: obj.presaleqty.toFixed(0)+'克拉',
                   buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
-                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0),
-                  price: '¥'+obj.lastprice.toFixed(2)+'(元/克拉)'
+                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0)+'克拉',
+                  price: '¥'+obj.unitprice.toFixed(2)+'(元/克拉)',
+                  presalestatus: obj.presalestatus
                 }
               })
             })
@@ -123,13 +125,16 @@ Page({
               /// 显示数据
               values: res.data.map(obj => {
                 return {
+                  presaleapplyid: obj.presaleapplyid,
+                  wrstandardname: isnullstr(obj.wrstandardname),
                   customername: isnullstr(obj.customername),
                   tradeamount: obj.tradeamount.toFixed(2),
                   status: obj.status,
                   ordertime: isnullstr(obj.ordertime),
                   freezemargin: obj.freezemargin.toFixed(2),
                   marginvalue: (obj.marginvalue*100).toFixed(2)+'%',
-                  tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)'
+                  tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)',
+                  orderqty: obj.orderqty.toFixed(2),
                 }
               })
             })
@@ -154,6 +159,13 @@ Page({
     wx.navigateBack()
   },
 
+  /// 点击
+  onItemClick(e: any) {
+    wx.navigateTo({
+      url: '/mHome/pages/purchase/detail/index?item='+JSON.stringify(this.data.values[Number(e.currentTarget.id)])+'&index='+this.data.active
+    })
+  },
+
   /**
    * 集采申请
    */ 

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

@@ -1,12 +1,12 @@
 <!--mHome/pages/purchase/list/index.wxml-->
-<view class="container">
-  <!-- 导航栏 -->
-  <van-nav-bar custom-style="background-color: #407DB8">
-    <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
-    <text slot="title" style="color: #fff;">集采交易</text>
-  </van-nav-bar>
-
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
   <view class="tab-view" style="position: sticky; top: 0; z-index: 999;">
+    <!-- 导航栏 -->
+    <van-nav-bar custom-style="background-color: #407DB8">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
+      <text slot="title" style="color: #fff;">集采交易</text>
+    </van-nav-bar>
+
     <!-- 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 }}"/>
@@ -19,6 +19,54 @@
       <van-icon name="add-o" size="25px" color="#387BDC" bind:click="addPurchase"/>
     </view>
   </view> 
+
+  <!-- 数据内容 -->
+  <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 class="container__list__item__top">
+        <text>{{ itm.wrstandardname }}</text>
+        <text>{{ itm.surplusqty }}</text>
+        <text>{{ itm.price }}</text>
+        <text>{{ itm.status }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>卖方:{{ itm.customername }}</text>
+        <text>预售数量:{{ itm.presaleqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>最小采购单位:{{ itm.minbuyqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>开始日期:{{ itm.startdate }}</text>
+        <text>最大采购单位:{{ itm.maxbuyqty }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>结束日期:{{ itm.enddate }}</text>
+        <text>最低成团量:{{ itm.minsuccessqty }}</text>
+      </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 class="container__list__item__top">
+        <text>{{ itm.wrstandardname }}</text>
+        <text>{{ itm.orderqty }}</text>
+        <text>{{ itm.tradeprice }}</text>
+        <text>{{ itm.status }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>卖方:{{ itm.customername }}</text>
+        <text>货款:{{ itm.tradeamount }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>采购保证金:{{ itm.buymarginvalue*100.0 }}%</text>
+        <text>已付保证金:{{ itm.freezemargin }}</text>
+      </view>
+      <view class="container__list__item__row">
+        <text>{{ itm.ordertime }}</text>
+      </view>
+    </view>
+  </view>
 </view>
 
 <!-- empty -->

+ 44 - 0
GuangZuan/miniprogram/mHome/pages/purchase/new/index.ts

@@ -215,6 +215,50 @@ Page({
     });
   },
 
+  // input输入中
+  getInputNum (e: any) {
+    let amount = e.detail
+      let num = null
+      // 小数点后最多只能输入两位
+      num = amount.replace(new RegExp('^(\\d+\\.\\d{2}).+'), '$1')
+
+      // 小数点开头得话,让前面加个0   eg: 0.xx
+      const startPoint = /^\./g
+      if (startPoint.test(num)) { num = amount.replace(startPoint, '0.') }
+
+      // 若没有小数点,前面输入多个0,去掉0取整
+      // if(num有值 && 没有小数点 && 不等于'0')
+      if (num && !num.includes('.') && num !== '0') { num = +num }
+      // 若出现多个小数点,则替换为1个
+      const morePoint = /\.+(\d*|\.+)\./g
+      if (morePoint.test(num)) {
+        num = amount
+          .replace(/\.{2,}/g, ".")
+          .replace(".", "$#$")
+          .replace(/\./g, "")
+          .replace("$#$", ".")
+      }
+      switch (e.target.id) {
+        case 'maxbuyqty':   /// 最大采购单位
+          this.setData({ maxbuyqty: num})
+          break;
+        case 'pretotalqty':  /// 预售总量
+          this.setData({ pretotalqty: num})
+          break;
+        case 'buymarginvalue': /// 采购保证金 
+          this.setData({ buymarginvalue: num})
+          break;
+        case 'minbuyqty':      /// 最小采购单位
+          this.setData({ minbuyqty: num})
+          break;
+        case 'minsuccessqty':  /// 最低成团量
+          this.setData({ minsuccessqty: num})
+          break;
+        default:
+          break;
+      }
+  },
+
   /// 申请提交
   doSubmit() {
     /// 校验不合规

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

@@ -11,7 +11,7 @@
   <van-cell-group>
     <van-cell><view solt="title" class="sub-title">集采信息</view></van-cell>
     <view class="cell-item">
-      <van-field label="商品名称:" title-width="8em" size="large" required clearable model:value="{{ wrstandname }}" placeholder="请输入商品名称" border="{{ false }}"/>
+      <van-field id="wrstandname" label="商品名称:" title-width="8em" size="large" required clearable model:value="{{ wrstandname }}" placeholder="请输入商品名称" border="{{ false }}"/>
     </view>
     <view class="cell-item">
       <van-field label="钻石类型:" title-width="8em" size="large" required readonly border="{{ false }}">
@@ -23,23 +23,23 @@
       </van-field>
     </view>
     <view class="cell-item">
-      <van-field label="预售总量:" type="digit" title-width="8em" size="large" required clearable model:value="{{ pretotalqty }}" placeholder="请输入预售总量" border="{{ false }}" bind:change="onChange" />
+      <van-field id="pretotalqty" label="预售总量:" type="digit" title-width="8em" size="large" required clearable model:value="{{ pretotalqty }}" placeholder="请输入预售总量" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最小采购单位:" type="digit" title-width="8em" size="large" required clearable model:value="{{ minbuyqty }}" placeholder="请输入最小采购单位" border="{{ false }}" bind:change="onChange" />
+      <van-field id="minbuyqty" label="最小采购单位:" type="digit" title-width="8em" size="large" required clearable model:value="{{ minbuyqty }}" placeholder="请输入最小采购单位" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最大采购单位:" type="digit" title-width="8em" size="large" required clearable model:value="{{ maxbuyqty }}" placeholder="请输入最大采购单位" border="{{ false }}" bind:change="onChange" />
+      <van-field id="maxbuyqty" label="最大采购单位:" type="digit" title-width="8em" size="large" required clearable model:value="{{ maxbuyqty }}" placeholder="请输入最大采购单位" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="最低成团量:" type="digit" title-width="8em" size="large" required clearable model:value="{{ minsuccessqty }}" placeholder="请输入最低成团量" border="{{ false }}" bind:change="onChange" />
+      <van-field id="minsuccessqty" label="最低成团量:" type="digit" title-width="8em" size="large" required clearable model:value="{{ minsuccessqty }}" placeholder="请输入最低成团量" border="{{ false }}" bind:input="getInputNum" />
       <view class="unit">(克拉)</view>
     </view>
     <view class="cell-item">
-      <van-field label="采购保证金比例:" type="digit" title-width="8em" size="large" required clearable model:value="{{ buymarginvalue }}" placeholder="请输入采购保证金比例" border="{{ false }}" bind:change="onChange" />
+      <van-field id="buymarginvalue" label="采购保证金比例:" type="digit" title-width="8em" size="large" required clearable model:value="{{ buymarginvalue }}" placeholder="请输入采购保证金比例" border="{{ false }}" bind:input="getInputNum"	/>
       <view class="unit">%</view>
     </view>
     <view class="cell-item">
@@ -84,14 +84,14 @@
 
   <van-cell-group>
     <van-cell><view solt="title" class="sub-title">钻石参考信息</view></van-cell>
-    <van-field label="形状:" size="large" clearable model:value="{{ zsshape }}" placeholder="请输入形状" border="{{ false }}" bind:change="onChange" />
-    <van-field label="颜色:" size="large" clearable model:value="{{ zscolor }}" placeholder="请输入颜色" border="{{ false }}" bind:change="onChange" />
-    <van-field label="净度:" size="large" clearable model:value="{{ zsclarity }}" placeholder="请输入净度" border="{{ false }}" bind:change="onChange" />
-    <van-field label="尺寸:" size="large" clearable model:value="{{ zssize }}" placeholder="请输入尺寸" border="{{ false }}" bind:change="onChange" />
-    <van-field label="抛光:" size="large" clearable model:value="{{ zspolish }}" placeholder="请输入抛光" border="{{ false }}" bind:change="onChange" />
-    <van-field label="对称:" size="large" clearable model:value="{{ zssymmetry }}" placeholder="请输入对称" border="{{ false }}" bind:change="onChange" />
-    <van-field label="切工:" size="large" clearable model:value="{{ zscut }}" placeholder="请输入切工" border="{{ false }}" bind:change="onChange" />
-    <van-field label="荧光:" size="large" clearable model:value="{{ zsfluorescence }}" placeholder="请输入荧光" border="{{ false }}" bind:change="onChange" />
+    <van-field id="zsshape" label="形状:" size="large" clearable model:value="{{ zsshape }}" placeholder="请输入形状" border="{{ false }}" />
+    <van-field id="zscolor" label="颜色:" size="large" clearable model:value="{{ zscolor }}" placeholder="请输入颜色" border="{{ false }}" />
+    <van-field id="zsclarity" label="净度:" size="large" clearable model:value="{{ zsclarity }}" placeholder="请输入净度" border="{{ false }}" />
+    <van-field id="zssize" label="尺寸:" size="large" clearable model:value="{{ zssize }}" placeholder="请输入尺寸" border="{{ false }}" />
+    <van-field id="zspolish" label="抛光:" size="large" clearable model:value="{{ zspolish }}" placeholder="请输入抛光" border="{{ false }}" />
+    <van-field id="zssymmetry" label="对称:" size="large" clearable model:value="{{ zssymmetry }}" placeholder="请输入对称" border="{{ false }}" />
+    <van-field id="zscut" label="切工:" size="large" clearable model:value="{{ zscut }}" placeholder="请输入切工" border="{{ false }}" bind:change="onChange" />
+    <van-field id="zsfluorescence" label="荧光:" size="large" clearable model:value="{{ zsfluorescence }}" placeholder="请输入荧光" border="{{ false }}" />
     <!-- 凭证 -->
     <view class="credentials-info" style="padding-top: 10px;">
       <text style="padding-left: 15px; font-size: 15px; width: 130px;">*附件</text>
@@ -101,7 +101,7 @@
         <view class="upload"><van-uploader max-count="6" deletable="{{ true }}" file-list="{{ fileList }}" bind:after-read="afterRead" bind:delete="deleteImage" /></view> 
       </view>
     </view>
-    <van-field label="备注:" size="large" type="textarea" autosize maxlength="200" clearable model:value="{{ remark }}" placeholder="请输入备注信息" border="{{ false }}" bind:change="onChange" />
+    <van-field id="remark" label="备注:" size="large" type="textarea" autosize maxlength="200" clearable model:value="{{ remark }}" placeholder="请输入备注信息" border="{{ false }}" />
   </van-cell-group>
 
   <!-- 操作按钮 -->

+ 7 - 11
GuangZuan/miniprogram/mHome/pages/search/index.less

@@ -89,19 +89,15 @@
     flex-direction: row;
     justify-content: space-between;
     margin-top: 20px;
-  
-    button {
-      width: 45%;
+    width: 90%;
+    align-content: center;
+    align-items: center;
+    padding-left: 5%;
+
+    van-button {
+      width: 48%;
       color: white;
     }
-  
-    button:nth-child(1) {
-      background-color: #F7A657;
-    }
-    
-    button:nth-child(2) {
-      background-color: #407DB8;
-    }
   }
 }
 

+ 2 - 2
GuangZuan/miniprogram/mHome/pages/search/index.wxml

@@ -96,8 +96,8 @@
 
   <!--  底部视图  -->
   <view class="buttom_view">
-    <button bindtap="onButtonPressed" id="clear">清空</button>
-    <button bindtap="onButtonPressed" id="search">搜索</button>
+    <van-button block round bind:click="onButtonPressed" color="linear-gradient(to right, #999, #aaa)" id="clear">清空</van-button>
+    <van-button block round bind:click="onButtonPressed" color="linear-gradient(to right, #4bb0ff, #666)" id="search">搜索</van-button>
   </view>
 </view>
 

+ 4 - 0
GuangZuan/miniprogram/mHome/pages/settle/list/index.json

@@ -0,0 +1,4 @@
+{
+  "usingComponents": {},
+  "navigationBarTitleText": "WMS结算单"
+}

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

@@ -0,0 +1,34 @@
+/* mHome/pages/settle/list/index.wxss */
+
+.container {
+  .list-view {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    background-color: #f0f0f0;
+
+    &__item {
+      display: flex;
+      flex-direction: column;
+      width: 100%;
+      background-color: #fff;
+      margin-bottom: 5px;
+      padding-top: 10px 0px;
+    
+      &__row {
+        display: flex;
+        flex-direction: row;
+        justify-content: space-between;
+        align-items: center;
+        align-content: center;
+        margin: 5px 10px;
+
+        text {
+          text-align: left;
+          color: #333;
+          font-size: 14px;
+        }
+      }
+    }
+  }
+}

+ 177 - 0
GuangZuan/miniprogram/mHome/pages/settle/list/index.ts

@@ -0,0 +1,177 @@
+import { FunCode } from "../../../../constants/enum/funcode"
+import { sendMsgToMQ } from "../../../../services/api/common/index"
+import { queryGzbscReckonOrder } from "../../../../services/api/orders/index"
+import { getEnumdicValue, getErrorMsg, isEncrypted, protoHeader, timetample, userid } from "../../../../services/utils"
+import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { encryptBody } from "../../../../utils/websocket/crypto"
+
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+      /// 底部安全区域
+      safeBottom: getApp().globalData.safeBottom,
+      /// tabs
+      tabs: [{id: 2, name: '待支付'}, {id: 3, name: '已支付'}],
+      /// 类别
+      active: 0,
+      /// 是否空数据
+      isEmpty: false,
+      /// 显示数据信息
+      values: [{}]
+  },
+
+   /**
+   * 返回上层视图
+   */
+  backToParent() {
+    /// 返回上层视图
+    wx.navigateBack()
+  },
+
+  onTabChange(e: any) {
+    // 重置状态
+    this.setData({ active: e.detail.index })
+    /// 查询数据
+    this.queryGzbscReckonOrder()
+  },
+
+  /// 申请支付提交
+  doPayment(orderID: string) {
+     /// showModel
+     showModel(() => {
+      /// showLoading
+      showLoading(() => {
+        /// 请求参数
+        const info = JSON.stringify({
+          Header: protoHeader(FunCode.BSWMSReckonPayReq),
+          UserID: userid(),
+          OrderID: orderID,
+          ClientSerialNo: timetample().toString()
+        })
+        /// 发送请求
+        sendMsgToMQ({
+          data: {
+            data: encryptBody(info),
+            funCodeReq: FunCode.BSWMSReckonPayReq,
+            funCodeRsp: FunCode.BSWMSReckonPayRsp,
+            isEncrypted: isEncrypted()
+          },
+          success: (res) => {
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode))
+              return
+            }
+            /// 求购发布请求成功
+            hideLoading(() => {
+              wx.navigateBack()
+            }, '提交支付申请成功', 'success')
+          },
+          fail: (emsg) => {
+            hideLoading(()=>{}, emsg)
+          }
+        })
+      }, '提交申请请求中....')
+      }, '提示', '确认要提交支付申请吗?')
+  },
+
+  /// 保税仓结算单表查询
+  queryGzbscReckonOrder() {
+    /// showLoading
+    showLoading(() => {
+      queryGzbscReckonOrder({
+        data: {
+          userid: userid(),
+          paystatus: this.data.active+2
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ 
+            isEmpty: res.data.length === 0,
+            values: res.data.map(obj => { 
+              return { 
+                servicefee: obj.servicefee,
+                paystatusdesc: getEnumdicValue('GZBSCPayStatus', obj.paystatus),
+                paytradedate: obj.paytradedate,
+                totalfee: obj.totalfee,
+                storagefee: obj.storagefee,
+                powerfee: obj.powerfee,
+                premium: obj.premium,
+                customsfee: obj.customsfee,
+                paystatus: obj.paystatus,
+                paytime: obj.paytime,
+                orderid: obj.orderid
+              } 
+            })
+           })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad() {
+    /// 保税仓结算单表查询
+    this.queryGzbscReckonOrder()
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+    /// 保税仓结算单表查询
+    this.queryGzbscReckonOrder()
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

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

@@ -0,0 +1,38 @@
+<!--mHome/pages/settle/list/index.wxml-->
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
+  <!-- 导航栏 -->
+  <van-nav-bar custom-style="background-color: #407DB8">
+    <van-icon slot="left" name="arrow-left" size="25px" color="#fff" bind:click="backToParent"/>
+    <text slot="title" style="color: #fff;">WMS结算单</text>
+  </van-nav-bar>
+
+  <!-- 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-tabs> 
+
+  <view class="list-view">
+    <view class="list-view__item" wx:for="{{ values }}" wx:key="orderid" wx:for-item="itm" wx:for-index="idx">
+      <view class="list-view__item__row">
+        <text selectable="false">{{ itm.paytradedate }}</text>
+        <text selectable="false">总费用:{{ itm.totalfee }}</text>
+      </view>
+      <view class="list-view__item__row">
+        <text selectable="false">分拣室服务费:{{ itm.servicefee }}</text>
+        <text selectable="false">仓储费:{{ itm.storagefee }}</text>
+      </view>
+      <view class="list-view__item__row">
+        <text selectable="false">保险费:{{ itm.premium }}</text>
+        <text selectable="false">分拣室电费:{{ itm.powerfee }}</text>
+      </view>
+      <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="primary" bind:click="doPayment" size="mini">支付</van-button>
+      </view>
+    </view>
+  </view>
+</view>
+
+<!-- empty -->
+<van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/address/operate/index.wxml

@@ -28,7 +28,7 @@
 <!--  底部视图  -->
 <view class="buttom_view">
   <van-button round id = "confirm" color="#407DB8" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">确定</van-button>
-  <van-button wx:if="{{ autoid != 0}}" id="delete" round color="linear-gradient(to right, #ed213a, #93291e)" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">删除地址</van-button>
+  <van-button wx:if="{{ autoid != 0}}" id="delete" round color="linear-gradient(to right, #999, #aaa)" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">删除地址</van-button>
 </view>
 
 <!-- 地区选择 -->

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/bank/index.wxml

@@ -24,7 +24,7 @@
 <!-- 按钮 -->
 <view class="button-view">
   <van-button custom-class="submit" id="submit" round color="linear-gradient(to right, #4bb0ff, #6149f6)" bind:click="onButtonPressed">{{ bankAccountSign.cusbankid ? '修改' : '添加'}}</van-button>
-  <van-button wx:if="{{ bankAccountSign.signstatus === 4 }}" custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #D91D34)" bind:click="onButtonPressed">解约</van-button>
+  <van-button wx:if="{{ bankAccountSign.signstatus === 4 }}" custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" bind:click="onButtonPressed">解约</van-button>
 </view>
 
 <!-- 选择开户行 -->

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

@@ -36,7 +36,7 @@
 <!--  底部视图  -->
 <view class="buttom_view">
   <van-button round id = "confirm" color="#407DB8" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">确定</van-button>
-  <van-button wx:if="{{autoid != 0}}" id="delete" round color="linear-gradient(to right, #ed213a, #93291e)" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">删除</van-button>
+  <van-button wx:if="{{autoid != 0}}" id="delete" round color="linear-gradient(to right, #999, #aaa)" block style="width: 90%; padding-top: 5px; padding-top: 10px;" bind:click="onButtonPressed">删除</van-button>
 </view>
 
 <!-- 地区选择 -->

+ 1 - 1
GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.wxml

@@ -118,7 +118,7 @@
    <!-- 按钮 -->
    <view class="button-view">
     <van-button wx:if="{{ type == 2 }}" custom-class="refuse" id="refuse" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="onButtonPressed">拒绝</van-button>
-    <van-button wx:if="{{ type == 1 }}" custom-class="cancel" id="cancel" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="onButtonPressed">撤销申请</van-button>
+    <van-button wx:if="{{ type == 1 }}" custom-class="cancel" id="cancel" round color="linear-gradient(to right, #999, #aaa)" block bind:click="onButtonPressed">撤销申请</van-button>
     <van-button wx:if="{{ type == 2 }}" custom-class="agree" id="agree" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="onButtonPressed">同意</van-button>
   </view>
 </view>

+ 1 - 3
GuangZuan/miniprogram/pages/home/index.ts

@@ -23,14 +23,12 @@ Page({
             {id: 2,  icon: 'home-ss',    title: '钻石首饰',   path: '/mHome/pages/jewelry/list/index'},
             {id: 3,  icon: 'home-cjjc',  title: '出境检测',   path: '/mHome/pages/inspection/list/index'}, 
             {id: 4,  icon: 'home-bsfw',  title: '保税服务',   path: '/mHome/pages/bond/list/index'}, 
-            {id: 5,  icon: 'home-jjjy',  title: '竞价交易',   path: ''}, 
+            {id: 5,  icon: 'home-jjjy',  title: 'WMS结算单',   path: '/mHome/pages/settle/list/index'}, 
             {id: 6, icon: 'home-cnys',  title: '预售大厅',   path: '/mHome/pages/presell/list/index'}, 
             {id: 7, icon: 'home-jcjy',  title: '集采交易',   path: '/mHome/pages/purchase/list/index'}, 
             {id: 8,  icon: 'home-zsss',  title: '钻石搜索',   path: '/mHome/pages/search/index'}, 
             {id: 9,  icon: 'home-jsq',   title: '钻石计算器', path: '/mHome/pages/calculator/index'}, 
             {id: 10,  icon: 'home-zscx',  title: '证书查询',   path: '/mHome/pages/cerserach/index'}],
-            // {id: 9, icon: 'home-cnys',  title: '产能预售',   path: ''}, 
-            // {id: 10,  icon: 'home-bscyw', title: '保税仓业务', path: ''}],
     /// 统计
     statistics: { top: [{id: 1, title: '出售中', value: 0, class: ''}], rate: '' },
     /// tabs

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

@@ -72,14 +72,14 @@
       </view>
     </view>
   </view>
-
+  
+  <!-- 无数据 --> 
+  <van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
 </scroll-view>
 
-
 <!-- toast --> 
 <van-toast id="van-toast" />
-<!-- 无数据 --> 
-<van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
+
 
 
 

+ 22 - 15
GuangZuan/miniprogram/services/api/orders/index.ts

@@ -2,79 +2,81 @@ import { httpRequest } from '../../../services/http/index'
 import { HttpRequest } from '../../../services/http/interface'
 import service from '../../../services/index'
 
+const goCommonSearchUrl = service.config.goCommonSearchUrl
+
 /* 获取钻石详情 */
 export function getGoods(params: HttpRequest<{req: GuangZuan.GetGoodsReq, rsp: GuangZuan.GetGoods}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/GetGoods', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/GetGoods', 'GET', params)
 }
 
 /* Rapaport最新报价表(广钻) */
 export function gzCertAddressConfig(params: HttpRequest<{req: GuangZuan.GzCertAddressConfigReq, rsp: GuangZuan.GzCertAddressConfig[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/GzCertAddressConfig', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/GzCertAddressConfig', 'GET', params)
 }
 
 /* 钻石证书地址参数 */
 export function gzCertAddressParam(params: HttpRequest<{req: GuangZuan.GzCertAddressParamReq, rsp: GuangZuan.GzCertAddressParam[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/GzCertAddressParam', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/GzCertAddressParam', 'GET', params)
 }
 
 /* 首页统计数据 */
 export function homeData(params: HttpRequest<{req: GuangZuan.HomeDataReq, rsp: GuangZuan.HomeData}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/HomeData', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/HomeData', 'GET', params)
 }
 
 /* 钻石价格计算器 */
 export function priceCalc(params: HttpRequest<{req: GuangZuan.PriceCalcReq, rsp: GuangZuan.Gzrapaportprice[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/PriceCalc', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/PriceCalc', 'GET', params)
 }
 
 /* 查询求购大厅委托单 */
 export function queryBuyOrder(params: HttpRequest<{req: GuangZuan.BuyOrderReq, rsp: GuangZuan.BuyOrder[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryBuyOrder', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryBuyOrder', 'GET', params)
 }
 
 /* 钻石搜索 */
 export function queryDiamond(params: HttpRequest<{req: GuangZuan.DiamondReq, rsp: GuangZuan.SellOrder[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryDiamond', 'POST', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryDiamond', 'POST', params)
 }
 
 /* 查询我的询价-求购 */
 export function queryMyBargainApply(params: HttpRequest<{req: GuangZuan.MyBargainApplyReq, rsp: GuangZuan.MyBargainApply[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyBargainApply', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyBargainApply', 'GET', params)
 }
 
 /* 查询我的求购 */
 export function queryMyBuyOrder(params: HttpRequest<{req: GuangZuan.MyBuyOrderReq, rsp: GuangZuan.MyBuyOrder[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyBuyOrder', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyBuyOrder', 'GET', params)
 }
 
 /* 查询我的摘牌 */
 export function queryMyDeListing(params: HttpRequest<{req: GuangZuan.MyDeListingReq, rsp: GuangZuan.MyDeListing[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyDeListing', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyDeListing', 'GET', params)
 }
 
 /* 查询我的询价-出售 */
 export function queryMyDelistingApply(params: HttpRequest<{req: GuangZuan.MyDelistingApplyReq, rsp: GuangZuan.MyDelistingApply[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyDelistingApply', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyDelistingApply', 'GET', params)
 }
 
 /* 查询我的收藏 */
 export function queryMyFavorite(params: HttpRequest<{req: GuangZuan.MyFavoriteReq, rsp: GuangZuan.MyFavorite[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyFavorite', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyFavorite', 'GET', params)
 }
 
 /* 查询我的履约 */
 export function queryMyPerformanc(params: HttpRequest<{req: GuangZuan.MyPerformancReq, rsp: GuangZuan.MyPerformanc[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyPerformanc', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyPerformanc', 'GET', params)
 }
 
 /* 查询我的出售 */
 export function queryMySellOrder(params: HttpRequest<{req: GuangZuan.MySellOrderReq, rsp: GuangZuan.MySellOrder[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMySellOrder', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMySellOrder', 'GET', params)
 }
 
 /* 查询我的库存 */
 export function queryMyWRPosition(params: HttpRequest<{req: GuangZuan.MyWRPositionReq, rsp: GuangZuan.MyWRPosition[]}>) {
-  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryMyWRPosition', 'GET', params)
+  return httpRequest(goCommonSearchUrl+'/Guangzuan/QueryMyWRPosition', 'GET', params)
 }
 
 /* 查询出售大厅委托单 */
@@ -162,6 +164,11 @@ export function queryGZPreSell(params: HttpRequest<{req: GuangZuan.GZPreSellReq,
   return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryGZPreSell', 'GET', params)
 }
 
+/* 保税仓结算单表查询 */
+export function queryGzbscReckonOrder(params: HttpRequest<{req: GuangZuan.GzbscReckonOrderReq, rsp: GuangZuan.GzbscReckonOrder[]}>) {
+  return httpRequest(service.config.goCommonSearchUrl+'/Guangzuan/QueryGzbscreckonorder', 'GET', params)
+}
+
 
 
 

+ 16 - 2
GuangZuan/project.private.config.json

@@ -10,8 +10,22 @@
     "miniprogram": {
       "list": [
         {
-          "name": "集采申请",
-          "pathName": "mHome/pages/purchase/new/index",
+          "name": "预售大厅",
+          "pathName": "mHome/pages/presell/list/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "集采详情",
+          "pathName": "mHome/pages/purchase/detail/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
+        {
+          "name": "预售详情",
+          "pathName": "mHome/pages/presell/detail/index",
           "query": "",
           "launchMode": "default",
           "scene": null

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

@@ -2772,6 +2772,8 @@ declare namespace GuangZuan {
 
   /// 我参与的预售(预售中\执行中)\我参与的集采(集采中\执行中) 列表查询
   interface GZMyTradingPreSell {
+    /// Banner图(逗号分隔)
+    bannerpicurl: string
     /// 企业名称(预售方)
     customername: string
     /// 冻结保证金
@@ -2788,6 +2790,8 @@ declare namespace GuangZuan {
     performanceplanid: number
     /// 履约计划模板ID
     performancetemplateid: number
+    /// 详情图片(逗号分隔)
+    pictureurls: string
     /// 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
     presaleapplyid: string
     /// 数量描述 [2:毛坯钻石]
@@ -2804,6 +2808,8 @@ declare namespace GuangZuan {
     tradeprice: number
     /// 重量描述 [2:毛坯钻石]
     weightdesc: string
+    /// 商品
+    wrstandardname: string
     /// 仓单贸易委托单ID(320+Unix秒时间戳(10位)+xxxxxx)
     wrtradeorderid: number
     /// 成品率 [2:毛坯钻石]
@@ -2983,4 +2989,64 @@ declare namespace GuangZuan {
     /// 对称 [1:成品裸钻]
     zssymmetrytypestr: string
   }
+
+  /// 保税仓结算单表查询
+  interface GzbscReckonOrderReq {
+    /// 支付状态 - 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+    paystatus?: number
+    /// 用户ID
+    userid: number	
+    /// 页码
+    page?: number	
+    /// 每页条数
+    pagesize?: number
+  }
+
+  /// 保税仓结算单表查询
+  interface GzbscReckonOrder {
+    /// 资金账户ID
+    accountid: number
+    /// 申请人
+    applicant: string
+    /// 申请时间
+    applicanttime: string
+    /// 确认时间
+    confirmtime: string
+    /// 合同编号
+    contractno: string
+    /// 报关费
+    customsfee: string
+    /// 处理状态
+    handlestatus: number
+    /// 导入文件名
+    importfile: string
+    /// 导入时间
+    importtime: string
+    /// 单据ID(SEQ_GZ_BSCRECKONORDER)
+    orderid: number
+    /// 支付状态 - 2:待支付 3:已支付(枚举:GZBSCPayStatus)
+    paystatus: number
+    /// 支付时间
+    paytime: string
+    /// 支付交易日(yyyyMMdd)
+    paytradedate: string
+    /// 分拣室电费
+    powerfee: string
+    /// 保险费
+    premium: string
+    /// 结算月份(yyyyMM)
+    reckonmonth: string
+    /// 分拣室服务费
+    servicefee: string
+    /// 仓储费
+    storagefee: string
+    /// 合计费用
+    totalfee: number
+    /// 用户ID
+    userid: number
+    /// 用户唯一标识
+    userkey: string
+    /// WMS结算单流水号
+    wmsorderid: string
+  }
 }