|
|
@@ -1,5 +1,5 @@
|
|
|
import { queryGZMyTradingPreSell, queryGZPreSell } from "../../../../services/api/orders/index"
|
|
|
-import { getEnumdicValue, marketid, userid } from "../../../../services/utils"
|
|
|
+import { getEnumdicValue, marketID, userid } from "../../../../services/utils"
|
|
|
import { hideLoading, showLoading } from "../../../../utils/message/index"
|
|
|
import { isnullstr } from "../../../../utils/util"
|
|
|
|
|
|
@@ -20,11 +20,11 @@ Page({
|
|
|
/// tabs
|
|
|
tabs: [{id: 1, name: '预售大厅'}, {id: 2, name: '我的预售'}, {id: 3, name: '我参与的预售'}],
|
|
|
/// subtabs
|
|
|
- subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}],
|
|
|
+ subtabs: [{id: 2, name: '执行中'}, {id: 1, name: '未开始'}],
|
|
|
/// 类别
|
|
|
active: 0,
|
|
|
/// 状态
|
|
|
- status: 1,
|
|
|
+ status: 2,
|
|
|
/// 是否空数据
|
|
|
isEmpty: false,
|
|
|
/// 预售大厅/我的预售/集采大厅/我的集采 列表查询
|
|
|
@@ -46,7 +46,7 @@ Page({
|
|
|
queryGZPreSell({
|
|
|
data: {
|
|
|
presalestatus: presalestatus,
|
|
|
- marketid: marketid()
|
|
|
+ marketid: marketID(63)
|
|
|
},
|
|
|
success: (res) => {
|
|
|
/// 请求失败
|
|
|
@@ -73,13 +73,13 @@ Page({
|
|
|
status: getEnumdicValue('WRPresaleStatus', obj.presalestatus),
|
|
|
startdate: isnullstr(obj.startdate),
|
|
|
enddate: isnullstr(obj.enddate),
|
|
|
- minsuccessqty: obj.minsuccessqty.toFixed(0),
|
|
|
- minbuyqty: obj.minbuyqty.toFixed(0),
|
|
|
- maxbuyqty: obj.maxbuyqty.toFixed(0),
|
|
|
- presaleqty: obj.presaleqty.toFixed(0)+'克拉',
|
|
|
+ minsuccessqty: obj.minsuccessqty.toFixed(2),
|
|
|
+ minbuyqty: obj.minbuyqty.toFixed(2),
|
|
|
+ maxbuyqty: obj.maxbuyqty.toFixed(2),
|
|
|
+ presaleqty: obj.presaleqty.toFixed(2)+'克拉',
|
|
|
buymarginvalue: (obj.buymarginvalue*100).toFixed(2)+'%',
|
|
|
- surplusqty: (obj.presaleqty-obj.placeqty).toFixed(0)+'克拉',
|
|
|
- price: '¥'+obj.unitprice.toFixed(2)+'(元/克拉)',
|
|
|
+ surplusqty: (obj.presaleqty-obj.placeqty).toFixed(2)+'克拉',
|
|
|
+ price: obj.unitprice.toFixed(2)+'(元/克拉)',
|
|
|
presalestatus: obj.presalestatus,
|
|
|
ysproductionmode: obj.ysproductionmode,
|
|
|
yszscategory: obj.yszscategory,
|
|
|
@@ -123,7 +123,7 @@ Page({
|
|
|
queryGZMyTradingPreSell({
|
|
|
data: {
|
|
|
userid: userid(),
|
|
|
- marketid: marketid(),
|
|
|
+ marketid: marketID(63),
|
|
|
status: status
|
|
|
},
|
|
|
success: (res) => {
|
|
|
@@ -150,11 +150,11 @@ Page({
|
|
|
wrstandardname: isnullstr(obj.wrstandardname),
|
|
|
customername: isnullstr(obj.customername),
|
|
|
tradeamount: obj.tradeamount.toFixed(2),
|
|
|
- status: obj.status,
|
|
|
+ status: this.data.subtabs.filter(itm => { return itm.id === status })[0].name,
|
|
|
ordertime: isnullstr(obj.ordertime),
|
|
|
freezemargin: obj.freezemargin.toFixed(2),
|
|
|
marginvalue: (obj.marginvalue*100).toFixed(2)+'%',
|
|
|
- tradeprice: '¥'+obj.tradeprice.toFixed(2)+'(元/克拉)',
|
|
|
+ tradeprice: obj.tradeprice.toFixed(2)+'(元/克拉)',
|
|
|
orderqty: obj.orderqty.toFixed(2),
|
|
|
ysproductionmode: obj.ysproductionmode,
|
|
|
yszscategory: obj.yszscategory,
|
|
|
@@ -216,18 +216,18 @@ Page({
|
|
|
*/
|
|
|
onTabChange(e: any) {
|
|
|
if (e.target.id === "category") {
|
|
|
- /// 重置状态
|
|
|
- this.setData({ status: 1, active: e.detail.name })
|
|
|
+ /// 重置状态
|
|
|
+ this.setData({ active: e.detail.name })
|
|
|
/// 数据重置
|
|
|
switch (e.detail.name) {
|
|
|
case 1: /// 预售大厅
|
|
|
- this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}] })
|
|
|
+ this.setData({ subtabs: [{id: 2, name: '执行中'}, {id: 1, name: '未开始'}], status: 2 })
|
|
|
break;
|
|
|
case 2: /// 我的预售
|
|
|
- this.setData({ subtabs: [{id: 1, name: '未开始'}, {id: 2, name: '执行中'}, {id: 3, name: '已结束'}] })
|
|
|
+ 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: '已完成'}] })
|
|
|
+ this.setData({ subtabs: [{id: 1, name: '预售中'}, {id: 2, name: '执行中'}, {id: 3, name: '已完成'}], status: 1 })
|
|
|
break;
|
|
|
}
|
|
|
} else {
|