Handy_Cao 2 vuotta sitten
vanhempi
commit
d08d48b42b

+ 3 - 1
GuangZuan/miniprogram/mHome/pages/presell/detail/index.json

@@ -1,3 +1,5 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "van-popup": "@vant/weapp/popup/index"
+  }
 }

+ 41 - 0
GuangZuan/miniprogram/mHome/pages/presell/detail/index.less

@@ -111,4 +111,45 @@
       padding-left: 2.5%;
     }
   }
+}
+
+.popup-view {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  align-content: center;
+
+  .title {
+    font-size: 18px;
+    font-weight: bold;
+    color: #333;
+    text-align: center;
+    padding: 15px 0px;
+  }
+
+  .message {
+    font-size: 13px;
+    color: #333;
+    text-align: center;
+    padding-bottom: 15px;
+  }
+
+  van-field {
+    width: 80%;
+  }
+
+  .button-view {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    align-content: center;
+    padding-top: 15px;
+    width: 80%;
+
+    van-button {
+      width: 45%;
+    }
+  }
+
 }

+ 74 - 46
GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts

@@ -1,11 +1,12 @@
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
-import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
+import { hideLoading, showLoading } 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 { formatDateString, getDecimalNum } from "../../../../utils/util"
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
 import services from "../../../../services/index"
+import Long from "long"
 
 Page({
 
@@ -18,12 +19,16 @@ Page({
     safeBottom: getApp().globalData.safeBottom,
     /// 数据信息
     item: {},
+    /// 认购数量
+    orderQty: '',
     /// 选中履约模板
     tmp: <GuangZuan.PermancePlanTmp>({}),
     /// 颜色
     colors: ['rebeccapurple', 'green', 'hotpink', 'orange', 'darkgoldenrod', 'firebrick', 'forestgreen', 'darksalmon', 'goldenrod', 'khaki', 'rosybrown', 'sandybrown'],
     /// banner图
-    banners: ['']
+    banners: [''],
+    /// 是否显示弹出层
+    show: false
   },
 
    /**
@@ -34,52 +39,75 @@ Page({
     wx.navigateBack()
   },
 
+  onClose() {
+    if (!this.data.show) {
+      return
+    }
+    /// 关闭弹出层
+    this.setData({ show: false })
+  },
+
+  /// 显示弹出层
+  showPopup() {
+    if (this.data.show) {
+      return
+    }
+    /// 关闭弹出层
+    this.setData({ show: true })
+  },
+
+  // input输入中
+  getInputNum (e: any) {
+    /// 截取2位小数位
+    let num = getDecimalNum(e.detail)
+    this.setData({ orderQty: num})
+  },
+
   /**
    * 立即购买
    */
-  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)
+  doSubmit() {
+    /// 关闭弹出窗
+    this.onClose()
+    /// showLoading
+    showLoading(() => {
+      /// 请求参数
+      const info = JSON.stringify({
+        Header: protoHeader(FunCode.GZPresaleOrderReq),
+        UserID: userid(),
+        AccountID: accountid(),
+        WRTradeOrderID: Long.fromNumber(this.data.item.sellwrtradeorderid),
+        OrderQty: Number(this.data.orderQty),
+        MarketID: marketID(63),
+        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)
+        }
+      })
+    }, '提交申请中....')
   },
 
   /// 获取履约模板信息

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

@@ -73,7 +73,18 @@
   </view>
 
    <view class="button-view" wx:if="{{ item.presalestatus != 1 }}">
-    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="doSubmit" round>立即购买</van-button>
+    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="showPopup" round>立即购买</van-button>
   </view>
+</view>
 
-</view>
+<van-popup show="{{ show }}" round position="bottom" custom-style="height: 30%;" bind:close="onClose">
+  <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>
+    <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>
+    </view>
+  </view>
+</van-popup>

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

@@ -95,7 +95,8 @@ Page({
                   remark: isnullstr(obj.remark),
                   placeqty: obj.placeqty,
                   qtydesc: isnullstr(obj.qtydesc),
-                  weightdesc: isnullstr(obj.weightdesc)
+                  weightdesc: isnullstr(obj.weightdesc),
+                  sellwrtradeorderid: obj.sellwrtradeorderid
                 }
               })
             })

+ 3 - 1
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.json

@@ -1,3 +1,5 @@
 {
-  "usingComponents": {}
+  "usingComponents": {
+    "van-popup": "@vant/weapp/popup/index"
+  }
 }

+ 40 - 0
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.less

@@ -112,4 +112,44 @@
       padding-left: 2.5%;
     }
   }
+}
+
+.popup-view {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  align-content: center;
+
+  .title {
+    font-size: 18px;
+    font-weight: bold;
+    color: #333;
+    text-align: center;
+    padding: 15px 0px;
+  }
+
+  .message {
+    font-size: 13px;
+    color: #333;
+    text-align: center;
+    padding-bottom: 15px;
+  }
+
+  van-field {
+    width: 80%;
+  }
+
+  .button-view {
+    display: flex;
+    flex-direction: row;
+    justify-content: space-between;
+    align-items: center;
+    align-content: center;
+    padding-top: 15px;
+    width: 80%;
+
+    van-button {
+      width: 45%;
+    }
+  }
 }

+ 73 - 46
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts

@@ -1,9 +1,9 @@
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
-import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
+import { hideLoading, showLoading } 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 { formatDateString, getDecimalNum } from "../../../../utils/util"
 import { queryGZMyPresell, queryPermancePlanTmp } from "../../../../services/api/orders/index"
 import services from "../../../../services/index"
 
@@ -18,6 +18,8 @@ Page({
     safeBottom: getApp().globalData.safeBottom,
     /// 数据信息
     item: {},
+    /// 认购数量
+    orderQty: '',
     /// 选中履约模板
     tmp: <GuangZuan.PermancePlanTmp>({}),
     /// 颜色
@@ -25,7 +27,9 @@ Page({
     /// banner图
     banners: [''],
     /// 预售认购列表查询
-    sells: <GuangZuan.GZMyPreSell[]>[]
+    sells: <GuangZuan.GZMyPreSell[]>[],
+    /// 是否显示弹出层
+    show: false
   },
 
    /**
@@ -56,52 +60,75 @@ Page({
     })
   },
 
+  onClose() {
+    if (!this.data.show) {
+      return
+    }
+    /// 关闭弹出层
+    this.setData({ show: false })
+  },
+
+  /// 显示弹出层
+  showPopup() {
+    if (this.data.show) {
+      return
+    }
+    /// 关闭弹出层
+    this.setData({ show: true })
+  },
+
+  // input输入中
+  getInputNum (e: any) {
+    /// 截取2位小数位
+    let num = getDecimalNum(e.detail)
+    this.setData({ orderQty: num})
+  },
+
    /**
    * 立即购买
    */
-  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)
+  doSubmit() {
+    /// 关闭弹出窗
+    this.onClose()
+    /// showLoading
+    showLoading(() => {
+      /// 请求参数
+      const info = JSON.stringify({
+        Header: protoHeader(FunCode.GZCenterPurchaseOrderReq),
+        UserID: userid(),
+        AccountID: accountid(),
+        WRTradeOrderID: Number(this.data.item.sellwrtradeorderid),
+        OrderQty: Number(this.data.orderQty),
+        MarketID: marketID(62),
+        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)
+        }
+      })
+    }, '提交申请请求中....')
   },
 
   /// 获取履约模板信息

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

@@ -74,6 +74,18 @@
    </view>
 
    <view class="button-view" wx:if="{{ item.presalestatus != 1 }}">
-    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="doSubmit" round>立即购买</van-button>
+    <van-button block color="linear-gradient(to right, #4bb0ff, #666)" bind:click="showPopup" round>立即购买</van-button>
   </view>
-</view>
+</view>
+
+<van-popup show="{{ show }}" round position="bottom" custom-style="height: 30%;" bind:close="onClose">
+  <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>
+    <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>
+    </view>
+  </view>
+</van-popup>

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

@@ -93,7 +93,8 @@ Page({
                   zssymmetrytypestr: isnullstr(obj.zssymmetrytypestr),
                   sizestr: isnullstr(obj.sizestr),
                   remark: isnullstr(obj.remark),
-                  placeqty: obj.placeqty
+                  placeqty: obj.placeqty,
+                  sellwrtradeorderid: isnullstr(obj.sellwrtradeorderid)
                 }
               })
             })

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

@@ -20,6 +20,8 @@ Page({
       active: 0,
       /// 是否空数据
       isEmpty: false,
+      /// 数据信息
+      data: <GuangZuan.GzbscReckonOrder[]>[],
       /// 显示数据信息
       values: <{}>[]
   },
@@ -93,11 +95,12 @@ Page({
           /// 获取数据
           this.setData({ 
             isEmpty: res.data.length === 0,
+            data: res.data,
             values: res.data.map(obj => { 
               return { 
                 servicefee: obj.servicefee,
                 paystatusdesc: getEnumdicValue('GZBSCPayStatus', obj.paystatus),
-                paytradedate: isnullstr(obj.paytradedate),
+                reckonmonth: isnullstr(obj.reckonmonth),
                 totalfee: obj.totalfee,
                 storagefee: obj.storagefee,
                 powerfee: obj.powerfee,

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

@@ -14,7 +14,7 @@
   <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.reckonmonth }}</text>
         <text selectable="false">总费用:{{ itm.totalfee }}</text>
       </view>
       <view class="list-view__item__row">
@@ -26,7 +26,7 @@
         <text selectable="false">分拣室电费:{{ itm.powerfee }}</text>
       </view>
       <view class="list-view__item__row">
-        <text selectable="false">报送费{{ itm.customsfee }}</text>
+        <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>
       </view>

+ 0 - 3
GuangZuan/miniprogram/mMine/pages/myorders/dlistingsdetail/index.json

@@ -1,3 +0,0 @@
-{
-  "usingComponents": {}
-}

+ 0 - 1
GuangZuan/miniprogram/mMine/pages/myorders/dlistingsdetail/index.less

@@ -1 +0,0 @@
-/* mMine/pages/myorders/dlistingsdetail/index.wxss */

+ 0 - 65
GuangZuan/miniprogram/mMine/pages/myorders/dlistingsdetail/index.ts

@@ -1,65 +0,0 @@
-Page({
-
-  /**
-   * 页面的初始数据
-   */
-  data: {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
-  },
-
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
-   */
-  onPullDownRefresh() {
-
-  },
-
-  /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
-  },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
-})

+ 0 - 2
GuangZuan/miniprogram/mMine/pages/myorders/dlistingsdetail/index.wxml

@@ -1,2 +0,0 @@
-<!--mMine/pages/myorders/dlistingsdetail/index.wxml-->
-

+ 2 - 2
GuangZuan/typings/types/model/order.d.ts

@@ -2947,7 +2947,7 @@ declare namespace GuangZuan {
     /// 发行方用户ID
     selluserid: number
     /// 发行方卖委托单ID
-    sellwrtradeorderid: number
+    sellwrtradeorderid: string
     /// 尺寸 [1:成品裸钻 \ 2:毛坯钻石]
     sizestr: string
     /// 预售开始日期
@@ -3053,6 +3053,6 @@ declare namespace GuangZuan {
     /// 用户唯一标识
     userkey: string
     /// WMS结算单流水号
-    wmsorderid: string
+    wmsorderid: string,
   }
 }