|
|
@@ -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()
|
|
|
},
|