Handy_Cao 2 năm trước cách đây
mục cha
commit
5416bd6a37
41 tập tin đã thay đổi với 304 bổ sung173 xóa
  1. 0 1
      GuangZuan/miniprogram/config/index.ts
  2. 21 0
      GuangZuan/miniprogram/config/proto/mtp.proto
  3. 1 1
      GuangZuan/miniprogram/mHome/pages/bond/detail/index.ts
  4. 12 6
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.ts
  5. 3 3
      GuangZuan/miniprogram/mHome/pages/goodsdetail/index.wxml
  6. 1 1
      GuangZuan/miniprogram/mHome/pages/inspection/detail/index.wxml
  7. 6 2
      GuangZuan/miniprogram/mHome/pages/jewelry/list/index.ts
  8. 14 4
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.ts
  9. 3 3
      GuangZuan/miniprogram/mHome/pages/presell/detail/index.wxml
  10. 9 10
      GuangZuan/miniprogram/mHome/pages/presell/list/index.ts
  11. 0 1
      GuangZuan/miniprogram/mHome/pages/presell/list/index.wxml
  12. 3 3
      GuangZuan/miniprogram/mHome/pages/presell/new/index.ts
  13. 14 3
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts
  14. 1 1
      GuangZuan/miniprogram/mHome/pages/purchase/detail/index.wxml
  15. 11 9
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts
  16. 0 1
      GuangZuan/miniprogram/mHome/pages/purchase/list/index.wxml
  17. 4 0
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.less
  18. 3 3
      GuangZuan/miniprogram/mHome/pages/purchase/new/index.ts
  19. 4 4
      GuangZuan/miniprogram/mHome/pages/settle/list/index.ts
  20. 10 5
      GuangZuan/miniprogram/mMine/pages/bank/index.ts
  21. 2 2
      GuangZuan/miniprogram/mMine/pages/bank/index.wxml
  22. 2 2
      GuangZuan/miniprogram/mMine/pages/inoutgold/index.wxml
  23. 0 4
      GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.less
  24. 2 2
      GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.ts
  25. 6 6
      GuangZuan/miniprogram/mMine/pages/myorders/list/index.ts
  26. 3 3
      GuangZuan/miniprogram/mMine/pages/myorders/mydelistingapplydetail/index.ts
  27. 2 1
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.json
  28. 25 22
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts
  29. 2 2
      GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.wxml
  30. 1 1
      GuangZuan/miniprogram/mMine/pages/myperformance/his/index.ts
  31. 3 3
      GuangZuan/miniprogram/mMine/pages/myperformance/list/index.ts
  32. 3 3
      GuangZuan/miniprogram/mTrade/pages/delistingsell/index.ts
  33. 33 6
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts
  34. 12 1
      GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml
  35. 25 23
      GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts
  36. 2 2
      GuangZuan/miniprogram/mTrade/pages/orderdetail/index.ts
  37. 11 10
      GuangZuan/miniprogram/pages/circle/index.ts
  38. 1 1
      GuangZuan/miniprogram/pages/home/index.ts
  39. 17 10
      GuangZuan/miniprogram/pages/trade/index.ts
  40. 2 2
      GuangZuan/miniprogram/pages/trade/index.wxml
  41. 30 6
      GuangZuan/miniprogram/services/utils.ts

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

@@ -1,6 +1,5 @@
 export const appConfig = {
   version: '1.0.01',
   apiUrl: 'http://218.17.158.45:23015/cfg?key=test_gzzs',
-  // apiUrl: 'http://192.168.31.104:8080/cfg?key=test_104',
   imgUrl: 'http://218.17.158.45:23012/mtp2-onlineopen/uploadFile/gz/'
 }

+ 21 - 0
GuangZuan/miniprogram/config/proto/mtp.proto

@@ -2497,6 +2497,27 @@ message AccountFundInfoRsp {
   optional int32 IsCleanAccount = 8; // 是否是干净账户,查询位掩码:4
 }
 
+// 商品收藏操作接口请求
+message GoodsFavoriteOperateReq {
+	optional MessageHead Header = 1;
+  optional uint32 UserID = 2; // 用户ID,必填
+  optional uint64 WRTradeOrderID = 3; // 委托单ID,必填
+  optional uint32 OperateType = 4; // 操作类型,1:添加2:删除,必填
+  optional uint32 ClientType = 5; // 终端类型
+  optional uint32 MarketID = 6; // 市场ID,必填
+  optional string ClientSerialNo = 7; // 客户端流水号
+}
+
+// 商品收藏操作接口应答
+message GoodsFavoriteOperateRsp {
+	optional MessageHead Header = 1; // 消息头
+	optional int32 RetCode = 2; // 返回码
+	optional string RetDesc = 3; // 描述信息
+  optional uint32 UserID = 4; // 用户ID
+  optional uint64 WRTradeOrderID = 5; // 委托单ID
+  optional string ClientSerialNo = 6; // 客户端流水号
+}
+
 // 广钻预售申请请求
 message GZPresaleApplyReq {
 	optional MessageHead Header = 1;

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

@@ -12,7 +12,7 @@ Page({
     /// 底部安全区域
     safeBottom: getApp().globalData.safeBottom,
     /// 列头
-    titles: [['净重(ct)| 净重(g)| 毛重(g)| 总值(USD)| 单价(USD/ct)'], 
+    titles: [['净重(ct) | 净重(g) | 毛重(g) | 总值(USD) | 单价(USD/ct)'], 
              ['内容 | 备注 | 彩钻颜色']],
     /// 是否空数据
     isEmpty: true,

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

@@ -3,7 +3,7 @@ import { EOrderSrc } from "../../../constants/enum/index"
 import services from "../../../services/index"
 import { sendMsgToMQ } from "../../../services/api/common/index"
 import { getGoods, queryPermancePlanTmp } from "../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketid, protoHeader, timetample, userid, loginQuery, isMyFavorite } from "../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, loginid, protoHeader, timetample, userid, loginQuery, isMyFavorite, marketID } from "../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index"
 import { encryptBody } from "../../../utils/websocket/crypto"
 import { isnullstr } from "../../../utils/util"
@@ -39,7 +39,9 @@ Page({
     /// 显示单位
     unit: '',
     /// 资金账号信息
-    accountid: accountid()
+    accountid: accountid(),
+    /// 是否显示交易
+    showTrade: Number(1)
   },
 
   /**
@@ -116,7 +118,7 @@ Page({
       showLoading(() => {
         /// 构建参数信息
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.ZSBuyOrderDestingReq),
+          Header: protoHeader(FunCode.ZSBuyOrderDestingReq, marketID(67)),
           UserID: userid(),
           AccountID: accountid(),
           RelatedWRTradeOrderID: this.data.order.wrtradeorderid,
@@ -125,7 +127,7 @@ Page({
           ClientSerialNo: timetample().toString(),
           ClientType: clientType(),
           OperatorID: loginid(),
-          MarketID: marketid()
+          MarketID: marketID(67)
         })
 
         /// 发送请求
@@ -176,10 +178,10 @@ Page({
         UserID: userid(),
         OperateType: this.data.operator === 1 ? 2 : 1,
         ClientType: clientType(),
-        MarketID: marketid(),
+        MarketID: marketID(67),
         ClientSerialNo: timetample().toString(),
         WRTradeOrderID: wrtradeorderid,
-        Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
+        Header: protoHeader(FunCode.GoodsFavoriteOperateReq, marketID(67))
       })
       /// 发送请求
       sendMsgToMQ({
@@ -214,8 +216,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad(options: any) {
+    console.log(options)
+    
     /// 商品编号
     this.setData({ goodsno: options.goodsno, ordertime: options.ordertime, operator: isMyFavorite(options.goodsno) ? 1 : 2 })
+    /// 是否显示交易
+    if (options.showTrade) { this.setData({ showTrade: Number(options.showTrade)}) }
     /// 获取商品数据
     this.getGoods()
     /// 单据信息

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

@@ -1,4 +1,4 @@
-<view class="container">
+<view class="container" style="padding-bottom: {{ safeBottom }}px;">
   <view class="topView">
     <!-- 导航栏 -->
     <van-nav-bar custom-style="background-color: #407DB8">
@@ -39,7 +39,7 @@
       </view>
       <view class="content__item" wx:if="{{ goods.zscategory !== 4 }}">
         <text class="content__item__price">市场价:{{ unit+goods.marketprice }}</text>
-        <text class="content__item__price" wx:if="{{ ordertime != '-' }}">挂牌时间:{{ ordertime }}</text>
+        <text class="content__item__price" wx:if="{{ ordertime != '-' }}">挂牌日期:{{ ordertime }}</text>
       </view>
   </view>
 
@@ -133,7 +133,7 @@
   </view>
 
    <!-- 按钮 -->
-   <view class="button-view" style="padding-bottom: {{ safeBottom }}px;">
+   <view class="button-view" wx:if="{{ showTrade === 1 }}">
     <van-icon name="{{ operator === 1 ? 'star' : 'star-o' }}" color="#407DB8" 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>

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

@@ -12,7 +12,7 @@
   <view class="orderinfo" style="padding-bottom: {{ safeBottom }}px;">
     <view class="title_item" style="margin-left: -10px;">
       <text class="ordertitle" style="font-size: 18px;">【单据信息】</text>
-      <text>{{ order.orderid }}</text>
+      <text>{{ order.orderno }}</text>
       <text>{{ order.gzcjstatusdisplay }}</text>
     </view>
     <view class="orderinfo_item">

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

@@ -1,6 +1,6 @@
 import services from "../../../../services/index";
 import { querySellOrder } from "../../../../services/api/orders/index";
-import { userid } from "../../../../services/utils";
+import { accountid, userid } from "../../../../services/utils";
 import { hideLoading, showLoading } from "../../../../utils/message/index";
 import { formatDateString } from "../../../../utils/util";
 
@@ -22,6 +22,8 @@ Page({
     page: 1,
     /// 每页条数
     pagesize: 20,
+    /// 当前资金账号
+    taaccountid: accountid()
   },
 
   /**
@@ -37,8 +39,10 @@ Page({
    */
   onItemClick(e: any) {
     const { num } = e.currentTarget.dataset
+    const { goodsno, ordertime, accountid } = this.data.sellOrders[num]
+    const show = accountid === this.data.taaccountid ? 0 : 1
     wx.navigateTo({
-      url: "/mHome/pages/goodsdetail/index?goodsno="+this.data.sellOrders[num].goodsno+'&item='+`${JSON.stringify(this.data.sellOrders[num])}`+'&ordertime='+formatDateString(this.data.sellOrders[num].ordertime, 'YYYY/MM/DD')
+      url: "/mHome/pages/goodsdetail/index?goodsno="+goodsno+'&item='+`${JSON.stringify(this.data.sellOrders[num])}`+'&ordertime='+formatDateString(ordertime, 'YYYY/MM/DD')+'&showTrade='+`${ show }`
     })
   },
 

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

@@ -1,12 +1,11 @@
 import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
-import { hideLoading, showLoading } from "../../../../utils/message/index"
+import { hideLoading, showLoading, showToast } 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, getDecimalNum } from "../../../../utils/util"
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
 import services from "../../../../services/index"
-import Long from "long"
 
 Page({
 
@@ -69,14 +68,16 @@ Page({
   doSubmit() {
     /// 关闭弹出窗
     this.onClose()
+    /// 合规性校验
+    if (!this.check()) { return }
     /// showLoading
     showLoading(() => {
       /// 请求参数
       const info = JSON.stringify({
-        Header: protoHeader(FunCode.GZPresaleOrderReq),
+        Header: protoHeader(FunCode.GZPresaleOrderReq, marketID(63)),
         UserID: userid(),
         AccountID: accountid(),
-        WRTradeOrderID: Long.fromNumber(this.data.item.sellwrtradeorderid),
+        WRTradeOrderID: this.data.item.sellwrtradeorderid.toString(),
         OrderQty: Number(this.data.orderQty),
         MarketID: marketID(63),
         ClientType: clientType(),
@@ -129,6 +130,15 @@ Page({
     })
   },
 
+  /// 合规性校验
+  check(): Boolean {
+    if (Number(this.data.orderQty) === 0.0 || this.data.orderQty === '') {
+      showToast('请输入认购数量。')
+      return false
+    }
+    return true
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */

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

@@ -24,7 +24,7 @@
     </view>
     <view class="container__top__row">
       <text selectable="false">卖方:{{ item.customername }}</text>
-      <text selectable="false">已认购数量:{{ item.presaleqty }}</text>
+      <text selectable="false">预售总量:{{ item.presaleqty }}</text>
     </view>
     <view class="container__top__row">
       <text selectable="false">最小采购单位:{{ item.minbuyqty }}</text>
@@ -40,7 +40,7 @@
     </view>
     <view class="container__top__row">
       <text selectable="false">状态:{{ item.status }}</text>
-      <text selectable="false">已认购数量:{{ item.placeqty }}</text>
+      <text selectable="false">已认购数量:{{ item.tradeqty }}</text>
     </view>
     <view class="container__top__row">
       <text selectable="false">履约方式:</text>
@@ -80,7 +80,7 @@
 <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>
+    <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>

+ 9 - 10
GuangZuan/miniprogram/mHome/pages/presell/list/index.ts

@@ -22,7 +22,7 @@ Page({
       /// subtabs
       subtabs: [{id: 2, name: '执行中'}, {id: 1, name: '未开始'}],
       /// 类别
-      active: 0,
+      active: 1,
       /// 状态
       status: 2,
       /// 是否空数据
@@ -43,7 +43,7 @@ Page({
     /// loding
     showLoading(()=>{
       /// 参数过滤
-      const params = this.data.active === 0 ? {
+      const params = this.data.active === 1 ? {
         presalestatus: presalestatus,
         marketid: marketID(63)
       } : {
@@ -84,7 +84,7 @@ Page({
                   maxbuyqty: obj.maxbuyqty.toFixed(2),
                   presaleqty: obj.presaleqty.toFixed(2)+'克拉',
                   buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
-                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(2)+'克拉',
+                  surplusqty: (obj.presaleqty-obj.tradeqty).toFixed(2)+'克拉',
                   price: obj.unitprice.toFixed(2)+'(元/克拉)',
                   presalestatus: obj.presalestatus,
                   ysproductionmode: obj.ysproductionmode,
@@ -102,7 +102,8 @@ Page({
                   placeqty: obj.placeqty,
                   qtydesc: isnullstr(obj.qtydesc),
                   weightdesc: isnullstr(obj.weightdesc),
-                  sellwrtradeorderid: obj.sellwrtradeorderid
+                  sellwrtradeorderid: obj.sellwrtradeorderid,
+                  tradeqty: obj.tradeqty.toFixed(2)
                 }
               })
             })
@@ -228,10 +229,10 @@ Page({
       /// 数据重置
       switch (e.detail.name) {
         case 1: /// 预售大厅
-          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}], status: 2 })
+          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}], status: 2 })
           break;
         case 2: /// 我的预售
-          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}, {id: 3, name: '已结束'}], status: 2 })
+          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}, {id: 3, name: '已结束'}], status: 2 })
           break;
         default: /// 我参与的预售
           this.setData({ subtabs: [{id: 1, name: '预售中'}, {id: 2, name: '执行中'}, {id: 3, name: '已完成'}], status: 1 })
@@ -246,9 +247,7 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad() {
-    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
-  },
+  onLoad() {},
 
   /**
    * 生命周期函数--监听页面初次渲染完成
@@ -261,7 +260,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**

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

@@ -50,7 +50,6 @@
         <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>

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

@@ -1,5 +1,5 @@
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../../utils/message/index"
 import services from "../../../../services/index"
 import { formatDate, getDecimalNum } from "../../../../utils/util"
@@ -255,7 +255,7 @@ Page({
       showLoading(() => {
         /// 请求参数
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.GZPresaleApplyReq),
+          Header: protoHeader(FunCode.GZPresaleApplyReq, marketID(63)),
           SellUserID: userid(),
           SellAccountID: accountid(),
           WRStandardName: this.data.wrstandname,
@@ -278,7 +278,7 @@ Page({
           PictureUrls: this.data.filePath,
           Remark: this.data.remark,
           PerformanceTemplateID: this.data.tmp.autoid,
-          MarketID: marketid(),
+          MarketID: marketID(63),
           ClientType: clientType(),
           ClientSerialNo: timetample().toString()
         })

+ 14 - 3
GuangZuan/miniprogram/mHome/pages/purchase/detail/index.ts

@@ -1,5 +1,5 @@
 import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
-import { hideLoading, showLoading } from "../../../../utils/message/index"
+import { hideLoading, showLoading, showToast } from "../../../../utils/message/index"
 import { encryptBody } from "../../../../utils/websocket/crypto"
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
@@ -90,14 +90,16 @@ Page({
   doSubmit() {
     /// 关闭弹出窗
     this.onClose()
+    /// 合规性校验
+    if (!this.check()) { return }
     /// showLoading
     showLoading(() => {
       /// 请求参数
       const info = JSON.stringify({
-        Header: protoHeader(FunCode.GZCenterPurchaseOrderReq),
+        Header: protoHeader(FunCode.GZCenterPurchaseOrderReq, marketID(62)),
         UserID: userid(),
         AccountID: accountid(),
-        WRTradeOrderID: Number(this.data.item.sellwrtradeorderid),
+        WRTradeOrderID: this.data.item.sellwrtradeorderid.toString(),
         OrderQty: Number(this.data.orderQty),
         MarketID: marketID(62),
         ClientType: clientType(),
@@ -150,6 +152,15 @@ Page({
     })
   },
 
+  /// 合规性校验
+  check(): Boolean {
+    if (Number(this.data.orderQty) === 0.0 || this.data.orderQty === '') {
+      showToast('请输入认购数量。')
+      return false
+    }
+    return true
+  },
+
   /**
    * 生命周期函数--监听页面加载
    */

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

@@ -24,7 +24,7 @@
     </view>
     <view class="container__top__row">
       <text selectable="false">卖方:{{ item.customername }}</text>
-      <text selectable="false">已认购数量:{{ item.presaleqty }}</text>
+      <text selectable="false">已认购数量:{{ item.tradeqty }}</text>
     </view>
     <view class="container__top__row">
       <text selectable="false">最小采购单位:{{ item.minbuyqty }}</text>

+ 11 - 9
GuangZuan/miniprogram/mHome/pages/purchase/list/index.ts

@@ -20,9 +20,9 @@ Page({
       /// tabs
       tabs: [{id: 1, name: '集采大厅'}, {id: 2, name: '我的集采'}, {id: 3, name: '我参与的集采'}],
       /// subtabs
-      subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}],
+      subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}],
       /// 类别
-      active: 0,
+      active: 1,
       /// 状态
       status: 2,
       /// 是否空数据
@@ -43,7 +43,7 @@ Page({
     /// loding
     showLoading(()=>{
       /// 参数过滤
-      const params = this.data.active === 0 ? {
+      const params = this.data.active === 1 ? {
         presalestatus: presalestatus,
         marketid: marketID(62)
       } : {
@@ -84,7 +84,8 @@ Page({
                   maxbuyqty: obj.maxbuyqty.toFixed(2),
                   presaleqty: obj.presaleqty.toFixed(2)+'克拉',
                   buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
-                  surplusqty: (obj.presaleqty-obj.placeqty).toFixed(2)+'克拉',
+                  surplusqty: (obj.presaleqty-obj.tradeqty).toFixed(2)+'克拉',
+
                   price: obj.unitprice.toFixed(2)+'(元/克拉)',
                   presalestatus: obj.presalestatus,
                   ysproductionmode: obj.ysproductionmode,
@@ -100,7 +101,8 @@ Page({
                   sizestr: isnullstr(obj.sizestr),
                   remark: isnullstr(obj.remark),
                   placeqty: obj.placeqty,
-                  sellwrtradeorderid: isnullstr(obj.sellwrtradeorderid)
+                  sellwrtradeorderid: isnullstr(obj.sellwrtradeorderid),
+                  tradeqty: obj.tradeqty.toFixed(2)
                 }
               })
             })
@@ -223,12 +225,12 @@ Page({
       /// 数据重置
       switch (e.detail.name) {
         case 1: /// 预售大厅
-          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}] })
+          this.setData({ subtabs: [{id: 2, name: '行中'}, {id: 1, name: '未开始'}] })
           /// 重置状态
           this.setData({ status: 2, active: e.detail.name })
           break;
         case 2: /// 我的预售
-          this.setData({ subtabs: [ {id: 2, name: '行中'}, {id: 1, name: '未开始'}, {id: 3, name: '已结束'}] })
+          this.setData({ subtabs: [ {id: 2, name: '行中'}, {id: 1, name: '未开始'}, {id: 3, name: '已结束'}] })
           /// 重置状态
           this.setData({ status: 2, active: e.detail.name })
           break;
@@ -248,7 +250,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
+    
   },
 
   /**
@@ -262,7 +264,7 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-
+    this.data.active != 3 ?  this.queryGZPreSell(this.data.status) : this.queryGZMyTradingPreSell(this.data.status)
   },
 
   /**

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

@@ -51,7 +51,6 @@
         <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>

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

@@ -21,6 +21,10 @@
       width: 60px;
       text-align: right;
     }
+
+    .van-radio {
+      font-size: 14px;
+    }
   }
 
   .column-title, .row {

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

@@ -1,5 +1,5 @@
 import { queryPermancePlanTmp } from "../../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel, showToast } from "../../../../utils/message/index"
 import services from "../../../../services/index"
 import { formatDate, getDecimalNum } from "../../../../utils/util"
@@ -270,7 +270,7 @@ Page({
   
         /// 请求参数
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.GZCenterPurchaseApplyReq),
+          Header: protoHeader(FunCode.GZCenterPurchaseApplyReq, marketID(62)),
           SellUserID: userid(),
           SellAccountID: accountid(),
           WRStandardName: this.data.wrstandname,
@@ -299,7 +299,7 @@ Page({
           QtyDesc: this.data.qtydesc,
           WeightDesc: this.data.weightdesc,
           YSProductionMode: this.data.way,
-          MarketID: marketid(),
+          MarketID: marketID(62),
           ClientType: clientType(),
           ClientSerialNo: timetample().toString()
         })

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

@@ -1,7 +1,7 @@
 import { FunCode } from "../../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryGzbscReckonOrder } from "../../../../services/api/orders/index"
-import { getEnumdicValue, getErrorMsg, isEncrypted, protoHeader, timetample, userid } from "../../../../services/utils"
+import { getEnumdicValue, getErrorMsg, isEncrypted, marketid, marketID, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { isnullstr } from "../../../../utils/util"
 import { encryptBody } from "../../../../utils/websocket/crypto"
@@ -42,16 +42,16 @@ Page({
   },
 
   /// 申请支付提交
-  doPayment(orderID: string) {
+  doPayment(e: any) {
      /// showModel
      showModel(() => {
       /// showLoading
       showLoading(() => {
         /// 请求参数
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.BSWMSReckonPayReq),
+          Header: protoHeader(FunCode.BSWMSReckonPayReq, marketID(67)),
           UserID: userid(),
-          OrderID: orderID,
+          OrderID: e.target.id.toString(),
           ClientSerialNo: timetample().toString()
         })
         /// 发送请求

+ 10 - 5
GuangZuan/miniprogram/mMine/pages/bank/index.ts

@@ -33,7 +33,9 @@ Page({
     /// 签约账户信息
     bankAccountSign: <GuangZuan.BankAccountSign>{},
     /// 签约状态
-    signStatus: ''
+    signStatus: '',
+    /// 签约状态
+    status: 0
   },
 
    /**
@@ -73,9 +75,7 @@ Page({
         this.doBankAccountSign()
         break;
       case 'cancel':  /// 解约请求
-        showModel(() => {
-          this.doCancelBankAccountSign()
-        }, '提示', '确定要申请解约吗?')
+        this.doCancelBankAccountSign()
         break
       default:
         break;
@@ -86,6 +86,10 @@ Page({
    * showBankInfos
    */
   showBankInfos() {
+    /// 签约待审核或者签约中 不能修改
+    if (this.data.status === 2 || this.data.status === 4) {
+      return
+    }
     this.setData({ showBank: true })
   },
 
@@ -151,6 +155,7 @@ Page({
               accountName: sign.bankaccountname,
               branchBankName: sign.branchbankname,
               signStatus: getEnumdicValue('signstatus', sign.signstatus),
+              status: sign.signstatus,
               bankInfo: this.data.bankInfos.filter(obj => {
                 return obj.bankid === sign.bankid
               })[0],
@@ -316,7 +321,7 @@ Page({
           }
         })
       }, '解约请求中.....')
-    }, '确定要解约吗?')
+    }, '提示', '确定要解约吗?')
   },
 
   /**

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

@@ -12,9 +12,9 @@
   <van-field model:value="{{ bankName }}" adjust-position is-link label="开户银行" required clearable readonly placeholder="请选择开户银行" bind:click-input="showBankInfos">
   </van-field>
   <!-- 银行卡号 -->
-  <van-field model:value="{{ bankNo }}" adjust-position type="number" label="银行卡号" required clearable placeholder="请输入银行卡号"/>
+  <van-field model:value="{{ bankNo }}" readonly="{{ status === 2 || status === 4 }}" adjust-position type="number" label="银行卡号" required clearable placeholder="请输入银行卡号"/>
   <!-- 姓名 -->
-  <van-field model:value="{{ accountName }}" adjust-position label="姓名" readonly placeholder="请输入姓名"/>
+  <van-field model:value="{{ accountName }}" readonly="{{ status === 2 || status === 4 }}"  adjust-position label="姓名" readonly placeholder="请输入姓名"/>
   <!-- 支行名称 -->
   <!-- <van-field model:value="{{ branchBankName }}" adjust-position label="支行名称" required clearable placeholder="请填写开户支行名称"/> -->
   <!-- 支行名称 -->

+ 2 - 2
GuangZuan/miniprogram/mMine/pages/inoutgold/index.wxml

@@ -70,10 +70,10 @@
     </view>
 
     <!-- 支行名称 -->
-    <view class="item branchBankName">
+    <!-- <view class="item branchBankName">
       <text class="title">支行名称</text>
       <text class="value">{{ sign.branchbankname }}</text>
-    </view>
+    </view> -->
   </view>
 
   <!-- 提现时间 -->

+ 0 - 4
GuangZuan/miniprogram/mMine/pages/myinventorys/list/index.less

@@ -96,10 +96,6 @@
   .item-view-up {
     border-bottom: 1px solid #ddd;
     padding-bottom: 5px;
-
-    text {
-      width: 100%;
-    }
   }
 }
 

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

@@ -45,7 +45,7 @@ Page({
     switch (id) {
       case 'detail':     /// 详情
         wx.navigateTo({
-          url: "/mHome/pages/goodsdetail/index?goodsno="+this.data.datas[index].goodsno+'&'+'ordertime'+'='+'-'
+          url: "/mHome/pages/goodsdetail/index?goodsno="+this.data.datas[index].goodsno+'&ordertime=-'+'&showTrade='+0
         })
         break;
       default:
@@ -124,7 +124,7 @@ Page({
               }) : res.data.map(obj => {
                 return {  up: [obj.weight+'ct'+' | '+isnullstr(obj.zsshapetypedisplay)+' | '+isnullstr(obj.sizedisplay), 
                             isnullstr(obj.goodsno)], 
-                          dwn: [isnullstr(obj.zscolortype1display)+' | '+
+                          dwn: [isnullstr(obj.zsczcolor3typedisplay)+' | '+
                               isnullstr(obj.zsclaritytype1display)+' | '+
                               isnullstr(obj.zspolishtype1display)+' | '+
                               isnullstr(obj.zssymmetrytype1display)+' | '+

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

@@ -2,7 +2,7 @@ import { FunCode } from "../../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../../constants/enum/index"
 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 { accountid, clientType, getErrorMsg, isEncrypted, loginid, marketID, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { formatDateString, isnullstr } from "../../../../utils/util"
 import { encryptBody } from "../../../../utils/websocket/crypto"
@@ -147,7 +147,7 @@ Page({
             break;
           case 2:  /// 我的摘牌
             wx.navigateTo({
-              url: '/mHome/pages/goodsdetail/index?item='+JSON.stringify(this.data.dlistings[index].goodsno)
+              url: '/mHome/pages/goodsdetail/index?item='+JSON.stringify(this.data.dlistings[index].goodsno)+'&showTrade='+true
             })
             break;
           case 1:  /// 求购挂牌
@@ -157,7 +157,7 @@ Page({
             break;
           case 0:  /// 出售挂牌
             wx.navigateTo({
-              url: '/mHome/pages/goodsdetail/index?goodsno='+this.data.sellorders[index].goodsno+'&ordertime='+formatDateString(this.data.sellorders[index].ordertime, 'YYYY/MM/DD')
+              url: '/mHome/pages/goodsdetail/index?goodsno='+this.data.sellorders[index].goodsno+'&ordertime='+formatDateString(this.data.sellorders[index].ordertime, 'YYYY/MM/DD')+'&showTrade='+1
             })
             break;
           default:
@@ -456,7 +456,7 @@ Page({
         ClientType: clientType(),
         OperatorID: loginid(),
         ClientOrderTime: formatDateString(new Date().toString()),
-        Header: protoHeader(FunCode.WRListingCancelOrderReq)
+        Header: protoHeader(FunCode.WRListingCancelOrderReq, marketID(67))
       })
       /// 发送请求
       sendMsgToMQ({
@@ -502,14 +502,14 @@ Page({
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
         ClientType: clientType,
         ClientSerialNo: timetample().toString(),
-        Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq)
+        Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq, marketID(67))
       })
 
       /// 发送请求
       sendMsgToMQ({
         data: {
           funCodeReq: FunCode.ZSSellOrderDestingApplyOperateReq,
-          funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateReq,
+          funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateRsp,
           isEncrypted: isEncrypted(),
           data: encryptBody(info)
         },

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

@@ -2,7 +2,7 @@ import { FunCode } from "../../../../constants/enum/funcode"
 import { EOrderSrc } from "../../../../constants/enum/index"
 import { sendMsgToMQ } from "../../../../services/api/common/index"
 import { queryWrPerformancePlanStep } from "../../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, marketid, protoHeader, timetample, userid } from "../../../../services/utils"
 import { hideLoading, showLoading, showModel } from "../../../../utils/message/index"
 import { encryptBody } from "../../../../utils/websocket/crypto"
 
@@ -64,13 +64,13 @@ Page({
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
         ClientType: clientType,
         ClientSerialNo: timetample().toString(),
-        Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq)
+        Header: protoHeader(FunCode.ZSSellOrderDestingApplyOperateReq, marketID(67))
       })
       /// 发送请求
       sendMsgToMQ({
         data: {
           funCodeReq: FunCode.ZSSellOrderDestingApplyOperateReq,
-          funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateReq,
+          funCodeRsp: FunCode.ZSSellOrderDestingApplyOperateRsp,
           isEncrypted: isEncrypted(),
           data: encryptBody(info)
         },

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

@@ -1,5 +1,6 @@
 {
   "usingComponents": {},
   "navigationStyle": "custom",
-  "navigationBarTitleText": "履约详情"
+  "navigationBarTitleText": "履约详情",
+  "enablePullDownRefresh": false
 }

+ 25 - 22
GuangZuan/miniprogram/mMine/pages/myperformance/detail/index.ts

@@ -37,7 +37,9 @@ Page({
     /// 状态
     status: '',
     /// 当前执行步骤
-    step: ''
+    step: '',
+    /// 资金账号
+    accountid: accountid()
   },
 
   /**
@@ -220,48 +222,49 @@ Page({
    */
   onLoad(options: any) {
     /// 数据处理
-    var obj: GuangZuan.MyPerformanc = JSON.parse(options.id ?? '')
-  
-    if (obj) {
+    var item: GuangZuan.MyPerformanc = JSON.parse(options.item)
+    
+    if (item) {
       var buyer = ''
       var seller = ''
       /// 买方信息
-      if (obj.buyerinfo != '') {
-        const { ContactInfo, ReceiptInfo, ReceiveInfo } = JSON.parse(obj.buyerinfo)
+      if (item.buyerinfo != '') {
+        const { ContactInfo, ReceiveInfo, ReceiptInfo } = JSON.parse(item.buyerinfo)
+        console.log(ReceiptInfo)
         if ( ContactInfo != '' ) {
-          buyer += '联络信息:'+ContactInfo
+          buyer = buyer+'联络信息:'+ContactInfo+'  '
         }
         if ( ReceiveInfo != '' ) {
-          buyer += +' '+'收货地址:'+ReceiveInfo
+          buyer = buyer+'收货地址:'+ReceiveInfo+'  '
         }
         if ( ReceiptInfo != '' ) {
-          buyer += +' '+'发票信息:'+ReceiptInfo
+          buyer = buyer+'发票信息:'+ReceiptInfo
         }
       }
       
       /// 卖方信息
-      if (obj.sellerinfo != '') {
-        const { ContactInfo, ReceiptInfo, ReceiveInfo } = JSON.parse(obj.sellerinfo)
+      if (item.sellerinfo != '') {
+        const { ContactInfo, ReceiptInfo, ReceiveInfo } = JSON.parse(item.sellerinfo)
         if ( ContactInfo != '' ) {
-          seller += '联络信息:'+ContactInfo
+          seller = seller+ContactInfo+'  '
         }
         if ( ReceiveInfo != '' ) {
-          seller += +' '+'收货地址:'+ReceiveInfo
+          seller = seller+'收货地址:'+ReceiveInfo+'  '
         }
         if ( ReceiptInfo != '' ) {
-          seller += +' '+'发票信息:'+ReceiptInfo
+          seller = seller+'发票信息:'+ReceiptInfo
         }
       }
-      obj.sellerinfo = isnullstr(seller.replace('\n', ' '))
-      obj.buyerinfo = isnullstr(buyer.replace('\n', ' '))
+      item.sellerinfo = isnullstr(seller)
+      item.buyerinfo = isnullstr(buyer)
 
       this.setData({
-        order: obj,
-        values: [{up: [`${isnullstr(obj.weight.toFixed(2))} | ${isnullstr(obj.zsshapetypedisplay)} | ${isnullstr(obj.zsstyletypedisplay)} | ${isnullstr(obj.sizedisplay)}`, `${isnullstr(obj.goodsno)}`], 
-                  dwn: [`${isnullstr(obj.zscolortype1display)} | ${isnullstr(obj.zscuttype1display)}| ${isnullstr(obj.zssymmetrytype1display)} | ${isnullstr(obj.zspolishtype1display)}| ${isnullstr(obj.zsfluorescencetype1display)} | ${isnullstr(obj.zscerttypedisplay)}`, 
-                  obj.price.toFixed(2)]}],
-        status: getPerformancestatus(obj.performancestatus),
-        step: getSteptype(obj.steptypeid)
+        order: item,
+        values: [{up: [`${ item.weight === 0.0 ? '--' : isnullstr(item.weight.toFixed(2))} | ${isnullstr(item.zsshapetypedisplay)} | ${isnullstr(item.zsstyletypedisplay)} | ${isnullstr(item.sizedisplay)}`, `${isnullstr(item.goodsno)}`], 
+                  dwn: [`${isnullstr(item.zscolortype1display)} | ${isnullstr(item.zscuttype1display)}| ${isnullstr(item.zssymmetrytype1display)} | ${isnullstr(item.zspolishtype1display)}| ${isnullstr(item.zsfluorescencetype1display)} | ${isnullstr(item.zscerttypedisplay)}`, 
+                  item.price.toFixed(2)]}],
+        status: getPerformancestatus(item.performancestatus),
+        step: getSteptype(item.steptypeid)
       })
     }
     /// 查询履约信息

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

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

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

@@ -107,7 +107,7 @@ Page({
     switch (id) {
       case "detail":  /// 详情
         wx.navigateTo({
-          url: '/mMine/pages/myperformance/detail/index?id='+JSON.stringify(this.data.datas[index])
+          url: '/mMine/pages/myperformance/detail/index?item='+JSON.stringify(this.data.datas[index])
         })
         break;
       default:

+ 3 - 3
GuangZuan/miniprogram/mMine/pages/myperformance/list/index.ts

@@ -62,7 +62,8 @@ Page({
                               isnullstr(obj.zscolortype1display)+' | '+
                               (obj.weight === 0 ? '--' : obj.weight.toFixed(2))+' | '+
                               isnullstr(obj.accountname),
-                            getPerformancestatus(obj.performancestatus)], isChecked: false}
+                            getPerformancestatus(obj.performancestatus)], 
+                        isChecked: false }
               })
             })
           })
@@ -94,7 +95,6 @@ Page({
    * tabbar点击事件
    */
   onTabChange(e: any) {
-    console.log(e)
     /// 设置激活项
     this.setData({ active: Number(e.detail.index) })
     /// 查询履约数据
@@ -118,7 +118,7 @@ Page({
         break;
       case "detail":  /// 履约详情
         wx.navigateTo({
-          url: '/mMine/pages/myperformance/detail/index?id='+JSON.stringify(this.data.datas[index])
+          url: '/mMine/pages/myperformance/detail/index?item='+JSON.stringify(this.data.datas[index])
         })
         break;
       case "modify":  /// 修改信息

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

@@ -1,7 +1,7 @@
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
 import { queryMyWRPosition, queryPermancePlanTmp } from "../../../services/api/orders/index";
-import { accountid, clientType, getErrorMsg, isEncrypted, loginQuery, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getErrorMsg, isEncrypted, loginQuery, marketID, protoHeader, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index";
 import { getDecimalNum, isnullstr } from "../../../utils/util";
 import { encryptBody } from "../../../utils/websocket/crypto";
@@ -101,7 +101,7 @@ Page({
       showLoading(() => {
         /// 参数信息
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.ZSSellOrderDestingApplyReq),
+          Header: protoHeader(FunCode.ZSSellOrderDestingApplyReq, marketID(67)),
           UserID: userid(),
           AccountID: accountid(),
           BuyWRTradeOrderID: this.data.order.wrtradeorderid,
@@ -114,7 +114,7 @@ Page({
           ApplyRemark: this.data.remark,
           ClientType: clientType(),
           ClientSerialNo: timetample().toString(),
-          MarketID: marketid()
+          MarketID: marketID(67)
         })
         
         /// 发送请求

+ 33 - 6
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.ts

@@ -1,7 +1,7 @@
 import { EOrderSrc } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, getEnumList, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getEnumList, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel, showToast } from "../../../utils/message/index";
 import { queryPermancePlanTmp } from "../../../services/api/orders/index";
 import { encryptBody } from "../../../utils/websocket/crypto";
@@ -34,6 +34,12 @@ Page({
     color1: 1,
     /// 选中颜色2
     color2: 1,
+    /// 彩钻颜色
+    zscolors: [{value: 1, text: 'D'}],
+    /// 选中彩钻颜色1
+    zscolor1: 1,
+    /// 选中彩钻颜色2
+    zscolor2: 1,
     /// 切工 
     qiegongs: [{ value: 1, text: 'EX' }],
     /// 选中切工1
@@ -178,12 +184,12 @@ Page({
     /// showLoading
     showLoading(() => {
       /// 钻石属性
-      const exinfo = {
+      const exinfo = this.data.tabs[this.data.active].id === 2 ? {
         UserID: userid(),
         AccountID: accountid(),
         ZSCategory: this.data.tabs[this.data.active].id,
         ZSCurrencyType: [this.data.currency],
-        ZSShapeType: [this.data.shape],
+        ZSShapeType: this.data.shapes.filter(obj => { return obj.isCheck }).map(obj => { return obj.id }),
         ZSColorType: [this.data.color1, this.data.color2],
         ZSClarityType: [this.data.neatnes1, this.data.neatnes2],
         ZSCutType: [this.data.qiegong1, this.data.qiegong2],
@@ -191,16 +197,28 @@ Page({
         ZSPolishType: [this.data.paoguang1, this.data.paoguang2],
         ZSFluorescenceType: [this.data.yingguang1, this.data.yingguang2],
         Size: [this.data.minSize, this.data.maxSize],
-        ZSCZColor1Type: [this.data.color1, this.data.color2],
+      } : {
+        UserID: userid(),
+        AccountID: accountid(),
+        ZSCategory: this.data.tabs[this.data.active].id,
+        ZSCurrencyType: [this.data.currency],
+        ZSShapeType: this.data.shapes.filter(obj => { return obj.isCheck }).map(obj => { return obj.id }),
+        ZSClarityType: [this.data.neatnes1, this.data.neatnes2],
+        ZSSymmetryType: [this.data.duicheng1, this.data.duicheng2],
+        ZSPolishType: [this.data.paoguang1, this.data.paoguang2],
+        ZSFluorescenceType: [this.data.yingguang1, this.data.yingguang2],
+        Size: [this.data.minSize, this.data.maxSize],
+        ZSCZColor3Type: [this.data.zscolor1, this.data.zscolor2],
       }
+
       /// 请求参数
       const info = JSON.stringify({
-        Header: protoHeader(FunCode.ZSBuyOrderListingReq),
+        Header: protoHeader(FunCode.ZSBuyOrderListingReq, marketID(67)),
         UserID: userid(),
         AccountID: accountid(),
         GZ_BuyOrderDetailExInfo: exinfo,
         PerformanceTemplateID: this.data.tmp.autoid,
-        MarketID: marketid(),
+        MarketID: marketID(67),
         OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
         ClientType: clientType(),
         ClientSerialNo: timetample().toString()
@@ -266,6 +284,15 @@ Page({
       }),
       color1: getEnumList('ZSColorType')[0].enumitemname,
       color2: getEnumList('ZSColorType')[0].enumitemname,
+      /// 颜色
+      czcolors: getEnumList('ZSCZColor3Type').map(obj => {
+        return {
+          value: obj.enumitemname,
+          text: obj.enumdicname
+        }
+      }),
+      czcolor1: getEnumList('ZSCZColor3Type')[0].enumitemname,
+      czcolor2: getEnumList('ZSCZColor3Type')[0].enumitemname,
       /// 净度
       neatness: getEnumList('ZSClarityType').map(obj => {
         return {

+ 12 - 1
GuangZuan/miniprogram/mTrade/pages/listingbuy/index.wxml

@@ -57,7 +57,7 @@
   </view>
 
    <!-- 颜色 -->
-   <view class="cell-view color"> 
+   <view class="cell-view color" wx:if="{{ active === 0 }}"> 
     <text class="title">颜色</text>
     <view class="content color">
       <van-dropdown-menu custom-class="menu color">
@@ -66,6 +66,17 @@
       </van-dropdown-menu>
     </view>
   </view>
+  
+  <!-- 彩钻颜色 -->
+  <view class="cell-view color" wx:if="{{ active === 1 }}"> 
+    <text class="title">颜色</text>
+    <view class="content color">
+      <van-dropdown-menu custom-class="menu color">
+        <van-dropdown-item model:value="{{ czcolor1 }}" options="{{ czcolors }}" />
+        <van-dropdown-item model:value="{{ czcolor2 }}" options="{{ czcolors }}" />
+      </van-dropdown-menu>
+    </view>
+  </view>
 
   <!-- 净度 -->
   <view class="cell-view neatness"> 

+ 25 - 23
GuangZuan/miniprogram/mTrade/pages/listingsell/index.ts

@@ -1,10 +1,10 @@
 import { EOrderSrc, EValidType } from "../../../constants/enum/index";
 import { FunCode } from "../../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../../services/api/common/index";
-import { accountid, clientType, getErrorMsg, isEncrypted, marketid, protoHeader, timetample, userid } from "../../../services/utils";
+import { accountid, clientType, getErrorMsg, isEncrypted, marketID, protoHeader, timetample, userid } from "../../../services/utils";
 import { hideLoading, showLoading, showModel } from "../../../utils/message/index";
 import { isnullstr } from "../../../utils/util";
-import { queryMySellOrder, queryPermancePlanTmp } from "../../../services/api/orders/index";
+import { queryMyWRPosition, queryPermancePlanTmp } from "../../../services/api/orders/index";
 import { encryptBody } from "../../../utils/websocket/crypto";
 
 Page({
@@ -20,9 +20,9 @@ Page({
     /// tab索引
     active: 0,
     /// 出售挂牌
-    sellorders: <GuangZuan.MySellOrder[]>[],
+    dataList: <GuangZuan.MyWRPosition[]>[],
     /// 选中的单据
-    sellorder: <GuangZuan.MySellOrder>({}),
+    postion: <GuangZuan.MyWRPosition>({}),
     /// 列头
     titles: [['重量', '形状', '尺寸', '编号'], 
              ['颜色 | 净度 | 切工 | 抛光 | 对称 | 荧光 | 证书', '价格']],
@@ -80,7 +80,7 @@ Page({
     /// 数据赋值
     this.setData({ 
       values: objs,
-      sellorder: this.data.sellorders[e.currentTarget.id]
+      sellorder: this.data.dataList[e.currentTarget.id]
     })
   },
 
@@ -97,7 +97,7 @@ Page({
       ['颜色 | 净度 | 抛光 | 对称 | 荧光 | 证书', '价格']],
     })
     /// 查询单据信息
-    this.queryMySellOrder()
+    this.queryMyWRPosition()
   },
 
   /// 获取履约模板信息
@@ -123,15 +123,15 @@ Page({
     })
   },
 
-  /// 查询出售挂牌
-  queryMySellOrder() {
+  /// 查询我的库存
+  queryMyWRPosition() {
     /// loding
     showLoading(()=>{
       /// 数据查询请求
-      queryMySellOrder({
+      queryMyWRPosition({
         data: {
-          userid: userid(),
-          zscategorys: this.data.tabs[this.data.active].id.toString()
+          wruserid: userid(),
+          zscategorys: this.data.tabs[this.data.active].id.toString(),
         },
         success: (res) => {
           /// 请求失败
@@ -144,12 +144,12 @@ Page({
             /// 设置数据
             this.setData({
               /// 设置列头
-              sellorders: res.data,
+              dataList: res.data.filter(e => { return e.marketflag != 1 }),
               isEmpty: res.data.length === 0,
               active: 0,
               /// 显示的值
-              values: res.data.map(obj => {
-                return this.data.tabs[this.data.active].id === 2 ? { up: [obj.totalqty+'ct', 
+              values: res.data.filter(e => { return e.marketflag != 1 }).map(obj => {
+                return this.data.tabs[this.data.active].id === 2 ? { up: [obj.ftotalqty+'ct', 
                             isnullstr(obj.zsshapetypedisplay), 
                             isnullstr(obj.sizedisplay),
                             obj.goodsno], 
@@ -161,11 +161,11 @@ Page({
                               isnullstr(obj.zsfluorescencetype1display)+' | '+
                               isnullstr(obj.zscerttypedisplay),
                             obj.zscurrencytypedisplayunit+obj.price.toFixed(2)], 
-                          isChecked: false } : { up: [obj.totalqty+'ct', 
+                          isChecked: false } : { up: [obj.ftotalqty+'ct', 
                           isnullstr(obj.zsshapetypedisplay), 
                           isnullstr(obj.sizedisplay),
                           obj.goodsno], 
-                        dwn: [isnullstr(obj.zsczcolor1typedisplay)+' | '+
+                        dwn: [isnullstr(obj.zsczcolor3typedisplay)+' | '+
                             isnullstr(obj.zsclaritytype1display)+' | '+
                             isnullstr(obj.zspolishtype1display)+' | '+
                             isnullstr(obj.zssymmetrytype1display)+' | '+
@@ -195,22 +195,24 @@ Page({
     showModel(() => {
       /// showLoading
       showLoading(() => {
-        const { wrstandardid, wrfactortypeid, totalqty } = this.data.sellorder
+        const { wrstandardid, ftotalqty, ladingbillid, subnum } = this.data.postion
         const { autoid } = this.data.tmp
         /// 请求参数
         const info = JSON.stringify({
-          Header: protoHeader(FunCode.ZSSellOrderListingReq),
+          Header: protoHeader(FunCode.ZSSellOrderListingReq, marketID(67)),
           UserID: userid(),
           AccountID: accountid(),
           WRStandardID: wrstandardid,
-          WRFactorTypeID: wrfactortypeid,
-          OrderQty: totalqty,
+          // WRFactorTypeID: wrfactortypeid,
+          LadingBillID: ladingbillid,
+          SubNum: subnum,
+          OrderQty: ftotalqty,
           PerformanceTemplateID: autoid,
           TimevalidType: EValidType.VALIDTYPE_YZ,
           OrderSrc: EOrderSrc.ORDERSRC_CLIENT,
           ClientSerialNo: timetample().toString(),
           ClientType: clientType(),
-          MarketID: marketid(),
+          MarketID: marketID(67),
         })
 
         /// 发送请求
@@ -246,7 +248,7 @@ Page({
    */
   onLoad() {
     /// 查询我的出售
-    this.queryMySellOrder()
+    this.queryMyWRPosition()
     /// 获取履约模板信息
     this.queryPermancePlanTmp()
   },
@@ -284,7 +286,7 @@ Page({
    */
   onPullDownRefresh() {
     /// 查询我的出售
-    this.queryMySellOrder()
+    this.queryMyWRPosition()
     /// 获取履约模板信息
     this.queryPermancePlanTmp()
   },

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

@@ -2,7 +2,7 @@ import { EOrderSrc } from "../../../constants/enum/index"
 import { FunCode } from "../../../constants/enum/funcode"
 import { sendMsgToMQ } from "../../../services/api/common/index"
 import { queryPermancePlanTmp } from "../../../services/api/orders/index"
-import { accountid, clientType, getErrorMsg, isEncrypted, loginid, protoHeader, timetample, userid } from "../../../services/utils"
+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"
@@ -77,7 +77,7 @@ Page({
           ClientType: clientType(),
           OperatorID: loginid(),
           ClientOrderTime: formatDateString(new Date().toString()),
-          Header: protoHeader(FunCode.WRListingCancelOrderReq)
+          Header: protoHeader(FunCode.WRListingCancelOrderReq, marketID(67))
         })
         /// 发送请求
         sendMsgToMQ({

+ 11 - 10
GuangZuan/miniprogram/pages/circle/index.ts

@@ -1,5 +1,5 @@
 import { queryMyFavorite } from "../../services/api/orders/index"
-import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getErrorMsg, saveMyFavorites } from "../../services/utils";
+import { clientType, isEncrypted, protoHeader, userid, timetample, getErrorMsg, marketID, removeMyFavorite } from "../../services/utils";
 import { sendMsgToMQ } from "../../services/api/common/index";
 import { FunCode } from "../../constants/enum/funcode";
 import { isnullstr } from "../../utils/util";
@@ -86,17 +86,17 @@ Page({
       /// 获取对应的id
       const ids = (<string> e.target.id).split(' ')
       const index = <number> <unknown>ids[1]
-      const wrtradeorderid = this.data.favorites[index].wrtradeorderid
+      const { wrtradeorderid } = this.data.favorites[index]
 
       /// 参数信息
       const info = JSON.stringify({ 
         UserID: userid(),
         OperateType: 2,
         ClientType: clientType(),
-        MarketID: marketid(),
+        MarketID: marketID(67),
         ClientSerialNo: timetample().toString(),
         WRTradeOrderID: wrtradeorderid,
-        Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
+        Header: protoHeader(FunCode.GoodsFavoriteOperateReq, marketID(67))
       })
 
       /// 发送请求
@@ -114,10 +114,12 @@ Page({
             hideLoading(() => {}, getErrorMsg(data.RetCode))
             return
           }
+          /// 移除我的记录
+          removeMyFavorite(wrtradeorderid)
           /// 操作成功
           hideLoading(()=>{
             /// 更新数据
-            this.queryMyFavorite()
+            wx.startPullDownRefresh()
           }, '请求成功', 'success')
         },
         fail: (emsg) => {
@@ -148,8 +150,6 @@ Page({
             hideLoading(()=>{}, '请求失败,原因:'+res.msg)
             return
           }
-          /// 保存我的收藏
-          saveMyFavorites(res.data)
           /// hideLoading
           hideLoading(()=>{
             /// 数据赋值
@@ -193,8 +193,8 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad() {
-    /// 查询数据
-    this.queryMyFavorite()
+    ///  初始化Tabbar
+    this.getTabBar().init()
   },
 
   /**
@@ -208,7 +208,8 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow() {
-    this.getTabBar().init()
+    /// 查询数据
+    this.queryMyFavorite()
   },
 
   /**

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

@@ -153,7 +153,7 @@ Page({
       },
       success: (res) => {
         /// 保存我的收藏
-        saveMyFavorites(res.data)
+        saveMyFavorites(res.data.map(obj => { return obj.wrtradeorderid}))
       }
     })
   },

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

@@ -1,5 +1,5 @@
 import { queryBuyOrder, queryDiamond } from "../../services/api/orders/index"
-import { clientType, isEncrypted, marketid, protoHeader, userid, timetample, getEnumList, getErrorMsg, isMyFavorite, accountid } from "../../services/utils";
+import { clientType, isEncrypted, protoHeader, userid, timetample, getEnumList, getErrorMsg, isMyFavorite, accountid, marketID, addMyFavotite, removeMyFavorite } from "../../services/utils";
 import { FunCode } from "../../constants/enum/funcode";
 import { sendMsgToMQ } from "../../services/api/common/index";
 import { hideLoading, showLoading } from "../../utils/message/index";
@@ -56,7 +56,7 @@ Page({
     /// 数据缓存
     storge: {},
     /// 当前资金账号
-    accountid: accountid()
+    taaccountid: accountid()
   },
 
   /**
@@ -96,8 +96,10 @@ Page({
         this.onAddFavorite(index)
         break
       case 'detail':      /// 商品详情
+        const { ordertime, accountid, goodsno } = this.data.sellOrders[index]
+        const show = accountid === this.data.taaccountid ? 0 : 1
         wx.navigateTo({ 
-          url: this.data.active === 0 ? '/mHome/pages/goodsdetail/index?goodsno='+this.data.sellOrders[index].goodsno+'&ordertime='+formatDateString(this.data.sellOrders[index].ordertime, 'YYYY/MM/DD') : ('/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.askOrders[index]))
+          url: this.data.active === 0 ? '/mHome/pages/goodsdetail/index?goodsno='+goodsno+'&ordertime='+formatDateString(ordertime, 'YYYY/MM/DD')+'&showTrade='+`${ show }` : ('/mTrade/pages/orderdetail/index?item='+JSON.stringify(this.data.askOrders[index]))
         })
         break;
       case 'delisting':     /// 摘牌
@@ -139,16 +141,16 @@ Page({
     /// loding.....
     showLoading(()=>{
       /// 委托单号
-      const wrtradeorderid = this.data.sellOrders[index].wrtradeorderid
+      const { wrtradeorderid, favorite } = this.data.sellOrders[index]
       /// 参数信息
       const info = JSON.stringify({ 
         UserID: userid(),
-        OperateType: this.data.sellOrders[index].favorite ? 2 : 1,
+        OperateType: favorite ? 2 : 1,
         ClientType: clientType(),
-        MarketID: marketid(),
+        MarketID: marketID(67),
         ClientSerialNo: timetample().toString(),
         WRTradeOrderID: wrtradeorderid,
-        Header: protoHeader(FunCode.GoodsFavoriteOperateReq)
+        Header: protoHeader(FunCode.GoodsFavoriteOperateReq, marketID(67))
       })
       /// 发送请求
       sendMsgToMQ({
@@ -165,8 +167,13 @@ Page({
             hideLoading(() => {}, getErrorMsg(data.RetCode))
             return
           }
+          /// 对其进行操作
+          isMyFavorite(wrtradeorderid) ? removeMyFavorite(wrtradeorderid) : addMyFavotite(wrtradeorderid)
           /// 操作成功
-          hideLoading(()=>{}, '请求成功'+res.msg, 'success')
+          hideLoading(()=>{
+            /// 更新数据
+            wx.startPullDownRefresh()
+          }, '请求成功'+res.msg, 'success')
         },
         fail: (emsg) => {
           /// 操作失败
@@ -234,9 +241,9 @@ Page({
                 obj.zspolishtype1display = isnullstr(itm.zspolishtype1display)
                 obj.zsfluorescencetype1display = isnullstr(itm.zsfluorescencetype1display)
                 obj.zssymmetrytype1display = isnullstr(itm.zssymmetrytype1display)
-                obj.favorite = isMyFavorite(obj.goodsno)
+                obj.favorite = isMyFavorite(obj.wrtradeorderid)
                 return obj
-              }) 
+              })
             })
           })
         },

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

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

+ 30 - 6
GuangZuan/miniprogram/services/utils.ts

@@ -170,8 +170,8 @@ export function userid() {
 }
 
 /// 获取资金用户ID
-export function accountid() {
-  return wx.getStorageSync('AccountID')
+export function accountid(): number {
+  return wx.getStorageSync('AccountID') ?? 0
 }
 
 /// 获取用户Token
@@ -293,19 +293,43 @@ export function getLoginCode(): string {
 }
 
 /// 设置我的收藏
-export function saveMyFavorites(data: GuangZuan.MyFavorite[]) {
+export function saveMyFavorites(data: String[]) {
   wx.setStorageSync('Favorites', data)
 }
 
 /// 获取我的收藏
-export function getMyFavorites(): GuangZuan.MyFavorite[] {
-  return <GuangZuan.MyFavorite[]>wx.getStorageSync('Favorites')
+export function getMyFavorites(): String[] {
+  return <String[]>wx.getStorageSync('Favorites')
 }
 
 /// 判断是否为我的收藏
 export function isMyFavorite(goodsno: string): boolean {
   const objs = getMyFavorites()
-  return objs.some(obj => { return obj.goodsno === goodsno })
+  return objs.some(obj => { return obj === goodsno })
+}
+
+/// 移除我的收藏
+export function removeMyFavorite(goodsno: string) {
+  console.log('removeMyFavorite')
+  const objs = getMyFavorites()
+  /// 移除数据
+  if (objs.some(obj => { return obj === goodsno })) {
+    const news = objs.filter(obj => { return obj != goodsno  })
+    /// 更新数据
+    saveMyFavorites(news)
+  }
+}
+
+/// 添加我的收藏
+export function addMyFavotite(goodsno: String) {
+  console.log('addMyFavotite')
+  var objs = getMyFavorites()
+  /// 移除数据
+  if (!(objs.some(obj => { return obj === goodsno }))) {
+    objs.push(goodsno)
+    /// 更新数据
+    saveMyFavorites(objs)
+  }
 }
 
 /// 登录查询