Handy_Cao 3 years ago
parent
commit
a613480b01
25 changed files with 266 additions and 100 deletions
  1. 1 2
      GuangZuan/miniprogram/app.json
  2. 4 8
      GuangZuan/miniprogram/mHome/pages/calculator/index.ts
  3. 1 1
      GuangZuan/miniprogram/mHome/pages/calculator/index.wxml
  4. 28 2
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.less
  5. 81 2
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts
  6. 10 5
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.wxml
  7. 0 1
      GuangZuan/miniprogram/mHome/pages/jewelry/list/index.less
  8. 2 2
      GuangZuan/miniprogram/mHome/pages/jewelry/list/index.wxml
  9. 8 8
      GuangZuan/miniprogram/mHome/pages/search/index.ts
  10. 3 3
      GuangZuan/miniprogram/mMine/pages/invoice/operate/index.wxml
  11. 12 13
      GuangZuan/miniprogram/mMine/pages/modifypwd/index.ts
  12. 1 1
      GuangZuan/miniprogram/mMine/pages/myorders/dlistingsdetail/index.wxml
  13. 9 9
      GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts
  14. 3 3
      GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.wxml
  15. 3 3
      GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.wxml
  16. 3 3
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml
  17. 3 3
      GuangZuan/miniprogram/mMine/pages/myperformance/modify/index.wxml
  18. 4 4
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.wxml
  19. 2 2
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts
  20. 19 15
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml
  21. 3 2
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts
  22. 4 3
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml
  23. 59 3
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts
  24. 2 1
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.wxml
  25. 1 1
      GuangZuan/typings/types/model/order.d.ts

+ 1 - 2
GuangZuan/miniprogram/app.json

@@ -76,8 +76,7 @@
         "pages/myperformance/breach/index",
         "pages/modifypwd/index",
         "pages/inoutgold/index",
-        "pages/myorders/mydelistingapplydetail/index",
-        "pages/myorders/dlistingsdetail/index"
+        "pages/myorders/mydelistingapplydetail/index"
       ]
     },
     {

+ 4 - 8
GuangZuan/miniprogram/mHome/pages/calculator/index.ts

@@ -14,12 +14,10 @@ Page({
     /// 窗口高度
     windowHeight: getApp().globalData.windowHeight,
     /// 形状
-    zsshapes: [{id: 1, name: '圆形', isCheck: true}, 
-               {id: 2, name: '异性', isCheck: false}],
+    zsshapes: [{ id: 1, name: '圆形', isCheck: true }, 
+               { id: 2, name: '异性', isCheck: false }],
     /// 选中形状         
     zsshape: 1,
-    /// 当前日期
-    date: Date(),
     /// 颜色
     zscolors: [ {id: 1, name: 'D', isCheck: true} ],
     /// 选中形状
@@ -42,8 +40,6 @@ Page({
     disdoller: '0.0',
     /// 人民币
     disrmb: '0.0',
-    /// 克拉单价
-    unitPrice: 0.0,
     /// 选项
     options: [
       { text: '-', value: 0 },
@@ -168,11 +164,11 @@ Page({
     this.setData({
       /// 颜色
       zscolors: getEnumList('ZSColorType').map(obj => {
-        return { id: obj.enumitemname, name: obj.enumdicname, isCheck: false }
+        return { id: obj.enumitemname, name: obj.enumdicname, isCheck: obj.enumdicname === this.data.zscolor }
       }),
       /// 净度
       zsclaritys: getEnumList('ZSClarityType').map(obj => {
-        return { id: obj.enumitemname, name: obj.enumdicname, isCheck: false }
+        return { id: obj.enumitemname, name: obj.enumdicname, isCheck: obj.enumdicname === this.data.zsclarity }
       }),
     })
   },

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

@@ -59,7 +59,7 @@
   </view>
 
   <!-- result -->
-  <view class="result">
+  <view class="result" wx:if="{{  }}">
     <view class="result__top">
       <text class="value">国际报价:${{ doller }}/ct </text>
       <text class="value">¥{{ rmb }}/ct</text>

+ 28 - 2
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.less

@@ -70,13 +70,39 @@
       padding: 10px 0px;
       
       &__item {
-        height: 30px;
+        height: 35px;
         padding-left: 5px;
+
+        &__step {
+          display: flex;
+          flex-direction: row;
+          justify-content: start;
+          align-items: center;
+          align-content: center;
+          width: 100%;
+          margin: 5px 0px;
+    
+          &__item {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            align-content: center;
+            padding-top: 10px;
+            margin-bottom: 5px;
+    
+            text {
+              font-size: 13px;
+              padding: 2.5px;
+              width: 100px;
+              text-align: center;
+            }
+          }
+        }
       }
 
       .title {
         font-size: 14px;
-        width: 50px;
+        width: 80px;
         color: #666;
       }
 

+ 81 - 2
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts

@@ -1,7 +1,7 @@
 import { FunCode } from "../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../constants/enum/index"
 import { sendMsgToMQ } from "../../../services/api/common/index"
-import { getGoods } from "../../../services/api/orders/index"
+import { getGoods, queryPermancePlanTmp } from "../../../services/api/orders/index"
 import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
 import { encryptBody } from "../../../utils/websocket/crypto"
@@ -18,8 +18,14 @@ Page({
     goods: <GuangZuan.GetGoods>({}),
     /// 商品编号
     goodsno: '',
+    /// 选中履约模板
+    tmp: <GuangZuan.PermancePlanTmp>({}),
     /// 卖单信息
-    order: <GuangZuan.SellOrder>({})
+    order: <GuangZuan.SellOrder>({}),
+    /// 颜色
+    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod'],
+    /// 操作
+    operator: 1
   },
 
   /**
@@ -53,6 +59,30 @@ Page({
     
   },
 
+   /// 获取履约模板信息
+   queryPermancePlanTmp() {
+    /// showLoading
+    showLoading(() => {
+      queryPermancePlanTmp({
+        data: {
+          marketid: marketid()
+        },
+        success: (res) => {
+          /// 获取数据
+          this.setData({ 
+            tmps: res.data,
+            tmp: res.data[0],
+            actions: res.data.map(obj => { return obj.templatename })
+           })
+        },
+        complete: () => {
+          /// hideLoading
+          hideLoading()
+        }
+      })
+    })
+  },
+
   /// 钻石买摘牌接口
   doZSBuyOrderDesting() {
     /// showModel
@@ -109,6 +139,53 @@ Page({
   },
 
   /**
+   * 添加收藏
+   */
+  onFavoriteOperator() {
+    /// loding.....
+    showLoading(()=>{
+      /// 委托单号
+      const wrtradeorderid = this.data.goods.wrtradeorderid
+      /// 参数信息
+      const info = JSON.stringify({ 
+        UserID: userid(),
+        OperateType: this.data.operator === 1 ? 2 : 1,
+        ClientType: clientType(),
+        MarketID: marketid(),
+        ClientSerialNo: timetample().toString(),
+        WRTradeOrderID: wrtradeorderid,
+        Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
+      })
+      /// 发送请求
+      sendMsgToMQ({
+        data: {
+          data: encryptBody(info),
+          funCodeReq: FunCode.GoodsFavoriteOperateReq,
+          funCodeRsp: FunCode.GoodsFavoriteOperateRsp,
+          isEncrypted: isEncrypted()
+        },
+        success: (res) => {
+          /// 解析对象
+          const data = JSON.parse(res.data.data)
+          if (data.RetCode != 0) {
+            hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+            return
+          }
+          /// 操作成功
+          hideLoading(()=>{
+            /// 是否收藏
+            this.setData({ operator: this.data.operator === 1 ? 2 : 1 })
+          }, '请求成功', 'success')
+        },
+        fail: (emsg) => {
+          /// 操作失败
+          hideLoading(()=>{}, emsg, 'error')
+        }
+      })
+    })
+  },
+
+  /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options: any) {
@@ -121,6 +198,8 @@ Page({
     this.setData({ goodsno: options.goodsno })
     /// 获取商品数据
     this.getGoods()
+    /// 查询履约模板信息
+    this.queryPermancePlanTmp()
   },
 
   /**

+ 10 - 5
GuangZuan/miniprogram/mHome/pages/goodsdetail/index.wxml

@@ -47,12 +47,17 @@
         <text class="value">{{ goods.mobile }}</text>
       </view>
       <view class="content__item">
-        <text class="title">仓库:</text>
-        <text class="value">{{ goods.warehousenamedisplay }}</text>
+        <text class="title">仓库地址:</text>
+        <text class="value">{{ goods.provincename+goods.cityname+goods.districtname+goods.address }}</text>
       </view>
       <view class="content__item">
         <text class="title">履约:</text>
-        <text class="value">中国-广东省-广州市-南沙XXXxxxxX仓库</text>
+        <view class="content__item__step">
+          <view class="content__item__step__item" wx:for="{{ tmp.LstStep }}" wx:for-item="itm" wx:for-index="idx" wx:key="idx"> 
+            <text style="color: white; background-color: {{ colors[idx] }};">{{ itm.stepinfo }}</text>
+            <text>{{ itm.stepdate }}</text>
+          </view>
+        </view>
       </view>
     </view>
   </view>
@@ -107,8 +112,8 @@
   </view>
 
    <!-- 按钮 -->
-   <view class="button-view">
-    <van-icon name="star-o" size="20"/>
+   <view class="button-view" style="padding-bottom: {{ safeBottom }}px;">
+    <van-icon name="{{ operator === 1 ? 'star' : 'star-o' }}" color="red" size="25" bind:click="onFavoriteOperator"/>
     <van-button custom-class="excute" id="excute" round color="linear-gradient(to right, #4bb0ff, #F7A657)" block bind:click="doZSBuyOrderDesting">立即购买</van-button>
   </view>
 </view>

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

@@ -30,7 +30,6 @@ Page {
 
     .goods-icon {
       width: 100%;
-      height: 600px;
       border-radius: 10px 10px 0px 0px;
     }
 

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

@@ -7,8 +7,8 @@
   </van-nav-bar>
 
   <!-- 搜索视图 -->
-  <van-search model:value="{{result}}" use-action-slot background="#999" shape="round" placeholder="搜索首饰" bind:change="onChange">
-    <view slot="action" bind:tap="onSearch" style="color: white;">搜索</view>
+  <van-search model:value="{{result}}" use-action-slot background="#E6F1FF" shape="round" placeholder="搜索首饰" bind:change="onChange">
+    <view slot="action" bind:tap="onSearch" style="color: #333;">搜索</view>
   </van-search> 
 </view>
 

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

@@ -242,7 +242,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname.toString() === this.data.shape[0]
         }
       }),
       /// 颜色
@@ -250,7 +250,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.color[0]
         }
       }),
       /// 净度
@@ -258,7 +258,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.neatnes
         }
       }),
       /// 切工
@@ -266,7 +266,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.qiegong
         }
       }),
       /// 对称
@@ -274,7 +274,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.duicheng
         }
       }),
       /// 抛光
@@ -282,7 +282,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.paoguang
         }
       }),
       /// 荧光
@@ -290,7 +290,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.yingguang
         }
       }),
       /// 证书
@@ -298,7 +298,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.certificate
         }
       }),
     })

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

@@ -1,7 +1,7 @@
 <!-- 导航栏 -->
-<van-nav-bar custom-style="background-color: #E92020">
-  <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-  <text slot="title" style="color: white;">发票操作</text>
+<van-nav-bar custom-style="background-color: #fff">
+  <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+  <text slot="title" style="color: #333;">发票操作</text>
 </van-nav-bar>
 
 <van-cell-group>

+ 12 - 13
GuangZuan/miniprogram/mMine/pages/modifypwd/index.ts

@@ -3,6 +3,7 @@ import { sendMsgToMQ } from "../../../services/api/common/index"
 import { getErrorMsg, isEncrypted, loginid, protoHeader } from "../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
 import { encryptBody } from "../../../utils/websocket/crypto"
+import CryptoJS from 'crypto-js';
 
 Page({
 
@@ -31,20 +32,20 @@ Page({
    */
   doModifyPwd() {
     /// 合规性校验
-    if (!this.check()) {
-      return
-    }
-    // /// showModel
-    // showModel(() => {
-    //   /// showLoading
-    //   showLoading(() => {
+    if (!this.check()) { return }
+    /// showModel
+    showModel(() => {
+      /// showLoading
+      showLoading(() => {
+        const OldPwd = loginid()+this.data.oldpwd
+        const NewPwd = loginid()+this.data.newpwd
         /// 参数信息
         const info = JSON.stringify({
           Header: protoHeader(FunCode.ModifyPwdReq),
           ModifyPwdType: 1,
           ModifyPwdID: loginid(),
-          OldPwd: encryptBody(this.data.oldpwd, true),
-          NewPwd: encryptBody(this.data.newpwd, true)
+          OldPwd: CryptoJS.SHA256(OldPwd).toString(),
+          NewPwd: CryptoJS.SHA256(NewPwd).toString()
         })
         /// 发送请求
         sendMsgToMQ({
@@ -75,16 +76,14 @@ Page({
             hideLoading(() => {}, emsg, 'error')
           }
         })
-  //     }, '修改中')
-  //   }, '提示', '确定要修改密码吗?')
+      }, '修改中')
+    }, '提示', '确定要修改密码吗?')
   },
 
    /**
    * 系统登出响应
    */
   onLoginOut() {
-    /// 清楚所有的缓存数据
-    wx.clearStorage()
     /// loding....
     showLoading(()=>{
       /// 登出

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

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

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

@@ -4,7 +4,7 @@ import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryMyBuyOrder, queryMyDeListing, queryMyDelistingApply, queryMySellOrder } from "../../../../services/api/orders/index"
 import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
-import { isnullstr } from "../../../../utils/util"
+import { formatDateString, isnullstr } from "../../../../utils/util"
 import { encryptBody } from "../../../../utils/websocket/crypto"
 
 Page({
@@ -128,7 +128,7 @@ Page({
     let id = (<string> e.target.id).split(' ')[0]
     const index = <number> <unknown>ids[1]
     switch (id) {
-      case 'his':  /// 历史订单
+      case 'his':      /// 历史订单
         wx.navigateTo({
           url: '/mMine/pages/myorders/his/index'
         })
@@ -147,12 +147,12 @@ Page({
             break;
           case 2:  /// 我的摘牌
             wx.navigateTo({
-              url: '/mHome/pages/goodsdetail/index?item='+JSON.stringify(this.data.buyorders[index].wrtradeorderid)
+              url: '/mHome/pages/goodsdetail/index?item='+JSON.stringify(this.data.dlistings[index].goodsno)
             })
             break;
           case 1:  /// 求购挂牌
             wx.navigateTo({
-              url: '/mMine/pages/myorders/dlistingsdetail/index?item='+JSON.stringify(this.data.dlistings[index])
+              url: '/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.buyorders[index])
             })
             break;
           case 0:  /// 出售挂牌
@@ -169,7 +169,7 @@ Page({
           case 1:  /// 求购挂牌
             showModel(()=>{
               const { wrtradeorderid } = this.data.buyorders[index]
-              this.doWRListingCancelOrder(wrtradeorderid, 1)
+              this.doWRListingCancelOrder(wrtradeorderid)
             }, '提示', '确定要撤销吗?')
             break;
           default:
@@ -183,7 +183,7 @@ Page({
       case 'shelves':  /// 下架
         showModel(()=>{
           const { wrtradeorderid } = this.data.sellorders[index]
-          this.doWRListingCancelOrder(wrtradeorderid, 0)
+          this.doWRListingCancelOrder(wrtradeorderid)
         }, '提示', '确定要下架吗?')
         break;
       default:
@@ -200,7 +200,7 @@ Page({
         break;
       case 1:  /// 求购挂牌
       /// 查询求购挂牌
-      this.queryMyBuyOrder()
+        this.queryMyBuyOrder()
         break;
       case 2:  /// 我的摘牌
         this.queryMyDeListing()
@@ -444,7 +444,7 @@ Page({
   },
 
   /// 出售挂牌-求购挂牌撤单请求(下架)
-  doWRListingCancelOrder(wrtradeorderid: string, buyorsell: number) {
+  doWRListingCancelOrder(wrtradeorderid: string) {
     /// loading
     showLoading(()=>{
       /// 参数信息
@@ -456,7 +456,7 @@ Page({
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
         ClientType: clientType(),
         OperatorID: loginid(),
-        BuyOrSell: buyorsell,
+        ClientOrderTime: formatDateString(new Date().toString()),
         Header: protoHeader(FunCode.WRListingCancelOrderReq)
       })
       /// 发送请求

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

@@ -2,9 +2,9 @@
 <view class="container" style="padding-bottom: {{safeBottom}}px;">
   <view class="topView">
     <!-- 导航栏 -->
-    <van-nav-bar custom-style="background-color: #E92020">
-      <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-      <text slot="title" style="color: white;">{{ type === 1 ? '询价详情' : '询价消息' }}</text>
+    <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">{{ type === 1 ? '询价详情' : '询价消息' }}</text>
     </van-nav-bar>
   </view>
 

+ 3 - 3
GuangZuan/miniprogram/mMine/pages/myperformance/breach/index.wxml

@@ -1,9 +1,9 @@
 <view class="container">
   <view class="topView">
     <!-- 导航栏 -->
-    <van-nav-bar custom-style="background-color: #E92020">
-      <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-      <text slot="title" style="color: white;">违约申请</text>
+    <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">违约申请</text>
     </van-nav-bar>
   </view>
 

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

@@ -1,9 +1,9 @@
 <view class="container">
   <view class="topView">
     <!-- 导航栏 -->
-    <van-nav-bar custom-style="background-color: #E92020">
-      <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-      <text slot="title" style="color: white;">履约详情</text>
+    <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">履约详情</text>
     </van-nav-bar>
   </view>
 

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

@@ -1,9 +1,9 @@
 <view class="container">
   <!-- 导航栏 -->
   <view class="topView">
-    <van-nav-bar custom-style="background-color: #E92020">
-      <van-icon slot="left" name="arrow-left" size="25px" color="white" bind:click="backToParent"/>
-      <text slot="title" style="color: white;">修改信息</text>
+    <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">修改信息</text>
     </van-nav-bar>
   </view>
 

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

@@ -47,6 +47,9 @@
         </view>
       </view>
     </van-swipe-cell>
+
+    <!-- empty -->
+    <van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
   </view>
 
   <!-- 操作视图 -->
@@ -62,7 +65,4 @@
   <view class="button-view" style="padding-bottom: {{ safeBottom}}px;">
     <van-button id="close" block round color="#7232dd" bind:click="doDelistingBuy">确认摘牌</van-button>
   </view>
-</view>
-
-<!-- empty -->
-<van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
+</view>

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

@@ -25,7 +25,7 @@ Page({
     /// 形状
     shapes: [{ id: 1, name: '圆形', isCheck: true }],
     /// 选中形状         
-    shape: 0,
+    shape: 1,
     /// 颜色
     colors: [{ value: 1, text: 'D' }],
     /// 选中颜色1
@@ -254,7 +254,7 @@ Page({
         return {
           id: obj.enumitemname,
           name: obj.enumdicname,
-          isCheck: false
+          isCheck: obj.enumitemname === this.data.shape
         }
       }),
       shape: getEnumList('ZSShapeType')[0].enumitemname,

+ 19 - 15
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml

@@ -1,16 +1,18 @@
 <!-- 内容 -->
-<view class="container" style="padding-bottom: {{ safeBottom+44 }}px;">
-  <!-- 导航栏 -->
-  <van-nav-bar custom-style="background-color: #fff">
-    <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
-    <text slot="title" style="color: #333;">我要求购</text>
-  </van-nav-bar>
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
+  <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
+    <!-- 导航栏 -->
+    <van-nav-bar custom-style="background-color: #fff">
+      <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
+      <text slot="title" style="color: #333;">我要求购</text>
+    </van-nav-bar>
 
-  <!-- tabs -->
-  <view class="tab-view">
-    <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
-      <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
-    </van-tabs>  
+    <!-- tabs -->
+    <view class="tab-view">
+      <van-tabs swipeable bind:change="onTabChange" color="#2270D9" line-width="20px" title-inactive-color="#333" title-active-color="#2270D9">
+        <van-tab wx:for="{{ tabs }}" wx:for-item="itm" wx:key="id" id="{{ itm.id }}" title="{{ itm.name }}"/>
+      </van-tabs>  
+    </view>
   </view>
 
   <!-- 形状 -->
@@ -112,13 +114,15 @@
       </van-dropdown-menu>
     </view>
   </view>
-</view>
 
-<!-- 提交按钮视图 -->
-<view class="button-view" style="width: 100%; position: sticky; bottom: {{ safeBottom }}px; z-index: 999;">
-  <van-button id="close" block round color="#7232dd" bind:click="doListingBuy">发布求购</van-button>
+  <!-- 提交按钮视图 -->
+  <view class="button-view" style="width: 100%;">
+    <van-button id="close" block round color="#7232dd" bind:click="doListingBuy">发布求购</van-button>
+  </view>
 </view>
 
+
+
 <!-- toast -->
 <van-toast id="van-toast"/>
 <!-- 履约模板 -->

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

@@ -90,6 +90,8 @@ Page({
   onTabChange(e: any) {
     /// 设置激活项
     this.setData({ active: e.detail.index })
+    /// 查询单据信息
+    this.queryMySellOrder()
   },
 
   /// 获取履约模板信息
@@ -124,8 +126,7 @@ Page({
       queryMySellOrder({
         data: {
           userid: userid(),
-          page: this.data.page,
-          pagesize: 20,
+          zscategorys: this.data.tabs[this.data.active].id.toString()
         },
         success: (res) => {
           /// 请求失败

+ 4 - 3
GuangZuan/miniprogram/mTrade/pages/listingsell/index.wxml

@@ -1,6 +1,6 @@
 <view class="container">
   <!-- top-view --> 
-  <view class="top-view">
+  <view class="top-view" style="position: sticky; top: 0; z-index: 999;">
    <!-- 导航栏 -->
    <van-nav-bar custom-style="background-color: #fff">
       <van-icon slot="left" name="arrow-left" size="25px" color="#333" bind:click="backToParent"/>
@@ -49,14 +49,15 @@
     </view>
   </van-swipe-cell>
 
+  <!-- empty -->
+  <van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
+
   <!-- 提交按钮视图 -->
   <view class="button-view" style="padding-bottom: {{ safeBottom }}px;">
     <van-button id="close" block round color="#7232dd" bind:click="doListingSell">确认出售</van-button>
   </view>
 </view>
 
-<!-- empty -->
-<van-empty wx:if="{{ isEmpty }}" class="custom-image" description="无数据"/>
 <!-- 履约模板 -->
 <van-popup show="{{ show }}" position="bottom" custom-style="height: 30%"  bind:click-overlay="onClose">
   <van-picker show-toolbar bind:confirm="onSelect" bind:cancel="onClose" columns="{{ actions }}" title="请选择履约模板" />

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

@@ -1,6 +1,11 @@
+import { EOrderSrc } from "../../../constants/enum/index"
+import { FunCode } from "../../../constants/enum/funcode"
+import { sendMsgToMQ } from "../../../services/api/common/index"
 import { queryPermancePlanTmp } from "../../../services/api/orders/index"
-import { marketid } from "../../../services/utils"
-import { hideLoading, showLoading } from "../../../utils/message/index"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid } from "../../../services/utils"
+import { hideLoading, showLoading, showModel } from "../../../utils/message/index"
+import { encryptBody } from "../../../utils/websocket/crypto"
+import { formatDateString } from "../../../utils/util"
 
 Page({
 
@@ -13,7 +18,9 @@ Page({
     /// 选中履约模板
     tmp: <GuangZuan.PermancePlanTmp>({}),
     /// 颜色
-    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod']
+    colors: ['rebeccapurple', 'green', 'yellow', 'orange', 'darkgoldenrod'],
+    /// 资金账户ID
+    accountid: accountid()
   },
 
   /**
@@ -31,6 +38,7 @@ Page({
       url: '/mTrade/pages/delistingsell/index?item='+JSON.stringify(this.data.order)
     })
   },
+  
 
   /// 获取履约模板信息
   queryPermancePlanTmp() {
@@ -56,6 +64,54 @@ Page({
     })
   },
 
+  /// 出售挂牌-求购挂牌撤单请求(下架)
+  doWRListingCancelOrder() {
+    /// showModel
+    showModel(() => {
+      /// loading
+      showLoading(()=>{
+        /// 参数信息
+        const info = JSON.stringify({
+          ClientSerialNo: timetample().toString(),
+          UserID: userid(),
+          AccountID: accountid(),
+          OldWRTradeOrderID: this.data.order.wrtradeorderid,
+          OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
+          ClientType: clientType(),
+          OperatorID: loginid(),
+          ClientOrderTime: formatDateString(new Date().toString()),
+          Header: protoHeader(FunCode.WRListingCancelOrderReq)
+        })
+        /// 发送请求
+        sendMsgToMQ({
+          data: {
+            funCodeReq: FunCode.WRListingCancelOrderReq,
+            funCodeRsp: FunCode.WRListingCancelOrderRsp,
+            isEncrypted: isEncrypted(),
+            data: encryptBody(info)
+          },
+          success: (res) => {
+            /// 解析对象
+            const data = JSON.parse(res.data.data)
+            if (data.RetCode != 0) {
+              hideLoading(() => {}, getErrorMsg(data.RetCode), 'error')
+              return
+            }
+            /// 操作成功
+            hideLoading(()=>{
+              /// 重新获取数据
+              wx.navigateBack()
+            }, '操作成功', 'success')
+          },
+          fail: (emsg) => {
+            /// 操作失败
+            hideLoading(()=>{}, emsg, 'error')
+          }
+        })
+      }, '请求中....')
+    }, '提示', '确定要撤销吗?')
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */

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

@@ -64,6 +64,7 @@
 
   <!-- 询价信息 -->
   <view class="button-view">
-    <van-button id="close" block round color="#7232dd" bind:click="goToDelistingSell">摘牌申请</van-button>
+    <van-button wx:if="{{ order.accountid != accountid }}" id="close" block round color="#7232dd" bind:click="goToDelistingSell">摘牌申请</van-button>
+    <van-button wx:if="{{ order.accountid === accountid && order.wrtradeorderstatus === 3 }}" id="close" block round color="#7232dd" bind:click="doWRListingCancelOrder">撤销</van-button>
   </view>
 </view>

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

@@ -1066,7 +1066,7 @@ declare namespace GuangZuan {
     /// 商品(查询字段-模糊查询)
     zsallproperties?: string 
     /// 钻石分类枚举ID
-    zscategory?: string 
+    zscategorys?: string 
     /// 委托单号
     wrtradeorderid?: string 
     /// 买方(查询字段-模糊查询)