|
@@ -42,7 +42,7 @@ Page({
|
|
|
{ text: '雷迪恩形', value: '11' },
|
|
{ text: '雷迪恩形', value: '11' },
|
|
|
{ text: '阿斯切形', value: '12' },
|
|
{ text: '阿斯切形', value: '12' },
|
|
|
{ text: '其他', value: '13' }],
|
|
{ text: '其他', value: '13' }],
|
|
|
- shape: '1',
|
|
|
|
|
|
|
+ shape: ['1'],
|
|
|
/// 净度
|
|
/// 净度
|
|
|
claritys: [{ text: 'FL', value: 1 },
|
|
claritys: [{ text: 'FL', value: 1 },
|
|
|
{ text: 'IF', value: 2 },
|
|
{ text: 'IF', value: 2 },
|
|
@@ -78,7 +78,9 @@ Page({
|
|
|
/// 数据是否为空
|
|
/// 数据是否为空
|
|
|
isEmpty: true,
|
|
isEmpty: true,
|
|
|
/// 商品(查询字段-模糊查询)
|
|
/// 商品(查询字段-模糊查询)
|
|
|
- zsallproperties: ''
|
|
|
|
|
|
|
+ zsallproperties: '',
|
|
|
|
|
+ /// 数据缓存
|
|
|
|
|
+ storge: {}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -111,7 +113,7 @@ Page({
|
|
|
break;
|
|
break;
|
|
|
case "shapes": /// 形状
|
|
case "shapes": /// 形状
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- shape: e.detail
|
|
|
|
|
|
|
+ shape: [e.detail.toString()]
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
case "claritys": /// 钻石净度
|
|
case "claritys": /// 钻石净度
|
|
@@ -223,35 +225,39 @@ Page({
|
|
|
queryDiamond() {
|
|
queryDiamond() {
|
|
|
/// loding.....
|
|
/// loding.....
|
|
|
Toast.loading({message: '加载中...'});
|
|
Toast.loading({message: '加载中...'});
|
|
|
|
|
+ /// 获取参数
|
|
|
|
|
+ const storge = wx.getStorageSync('TradeParams')
|
|
|
/// 数据存储
|
|
/// 数据存储
|
|
|
- // const info = JSON.parse(wx.getStorageSync('TradeParams'))
|
|
|
|
|
|
|
+ var info
|
|
|
|
|
+ if (this.data.storge) { info = JSON.parse(storge) }
|
|
|
|
|
+
|
|
|
/// 钻石查询
|
|
/// 钻石查询
|
|
|
queryDiamond({
|
|
queryDiamond({
|
|
|
data: {
|
|
data: {
|
|
|
/// 钻石分类
|
|
/// 钻石分类
|
|
|
zscategory: this.data.category,
|
|
zscategory: this.data.category,
|
|
|
- // /// 形状
|
|
|
|
|
- // zsshapetype: [this.data.shape.toString()],
|
|
|
|
|
- // /// 净度
|
|
|
|
|
- // zsclaritytype: [this.data.clarity],
|
|
|
|
|
- // /// 切工
|
|
|
|
|
- // zscuttype: [this.data.cut],
|
|
|
|
|
- // /// 荧光
|
|
|
|
|
- // zsfluorescencetype: [this.data.fluorescence],
|
|
|
|
|
- // /// 颜色
|
|
|
|
|
- // zscolortype: info ? [info.zscolortype] : [null],
|
|
|
|
|
- // /// 货币类型
|
|
|
|
|
- // zscurrencytype: info ? [info.zscurrencytype.toString()] : [null],
|
|
|
|
|
- // /// 证书类型
|
|
|
|
|
- // zscerttype: info ? [info.zscerttype.toString()] : [null],
|
|
|
|
|
- // /// 抛光
|
|
|
|
|
- // zspolishtype: info ? [info.zspolishtype] : [null],
|
|
|
|
|
- // /// 对称
|
|
|
|
|
- // zssymmetrytype: info ? [info.zssymmetrytype] : [null],
|
|
|
|
|
- // /// 总重量(克拉重量)-从
|
|
|
|
|
- // weight1: info ? info.weight1 : null,
|
|
|
|
|
- // /// 总重量(克拉重量)-至
|
|
|
|
|
- // weight2: info ? info.weight2 : null
|
|
|
|
|
|
|
+ /// 形状
|
|
|
|
|
+ zsshapetype: this.data.shape,
|
|
|
|
|
+ /// 净度
|
|
|
|
|
+ zsclaritytype: [this.data.clarity],
|
|
|
|
|
+ /// 切工
|
|
|
|
|
+ zscuttype: [this.data.cut],
|
|
|
|
|
+ /// 荧光
|
|
|
|
|
+ zsfluorescencetype: [this.data.fluorescence],
|
|
|
|
|
+ /// 颜色
|
|
|
|
|
+ zscolortype: info ? info.zscolortype : [null],
|
|
|
|
|
+ /// 货币类型
|
|
|
|
|
+ zscurrencytype: info ? [info.zscurrencytype.toString()] : [null],
|
|
|
|
|
+ /// 证书类型
|
|
|
|
|
+ zscerttype: info ? [info.zscerttype.toString()] : [null],
|
|
|
|
|
+ /// 抛光
|
|
|
|
|
+ zspolishtype: info ? [info.zspolishtype] : [null],
|
|
|
|
|
+ /// 对称
|
|
|
|
|
+ zssymmetrytype: info ? [info.zssymmetrytype] : [null],
|
|
|
|
|
+ /// 总重量(克拉重量)-从
|
|
|
|
|
+ weight1: info ? info.weight1 : null,
|
|
|
|
|
+ /// 总重量(克拉重量)-至
|
|
|
|
|
+ weight2: info ? info.weight2 : null
|
|
|
},
|
|
},
|
|
|
/// 加载成功
|
|
/// 加载成功
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
@@ -311,19 +317,26 @@ Page({
|
|
|
onLoad() {},
|
|
onLoad() {},
|
|
|
|
|
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- try {
|
|
|
|
|
- /// 数据存储
|
|
|
|
|
- const info = JSON.parse(wx.getStorageSync('TradeParams'))
|
|
|
|
|
- if (info) {
|
|
|
|
|
- this.setData({
|
|
|
|
|
- category: info.category,
|
|
|
|
|
- cut: info.zscuttype,
|
|
|
|
|
- shape: info.zsshapetype,
|
|
|
|
|
- clarity: info.zsclaritytype,
|
|
|
|
|
- fluorescence: info.zsfluorescencetype
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- } catch (error) {}
|
|
|
|
|
|
|
+ /// 获取参数
|
|
|
|
|
+ const storge = wx.getStorageSync('TradeParams')
|
|
|
|
|
+ if (storge) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ /// 数据存储
|
|
|
|
|
+ const info = JSON.parse(storge)
|
|
|
|
|
+ /// 数据缓存
|
|
|
|
|
+ this.setData({ storge: info })
|
|
|
|
|
+ /// 数据赋值
|
|
|
|
|
+ if (info) {
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ category: info.category,
|
|
|
|
|
+ cut: info.zscuttype,
|
|
|
|
|
+ shape: info.zsshapetype,
|
|
|
|
|
+ clarity: info.zsclaritytype,
|
|
|
|
|
+ fluorescence: info.zsfluorescencetype
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/// 查询出售大厅委托单
|
|
/// 查询出售大厅委托单
|
|
|
this.data.active == 0 ? this.queryDiamond() : this.queryBuyOrder()
|
|
this.data.active == 0 ? this.queryDiamond() : this.queryBuyOrder()
|