|
|
@@ -9,8 +9,8 @@ |
|
|
|
</view> |
|
|
|
<view class="line-normal"> |
|
|
|
<view class="padding-r" v-show="!loading">已签订合同 |
|
|
|
<text class="text-red">{{ goodsNum }}</text>个商品</view> |
|
|
|
<view class="padding-r" v-show="loading">已经获取 |
|
|
|
<text class="text-red">{{ contractNum }}</text>个商品</view> |
|
|
|
<view class="padding-r" v-show="loading">已获取 |
|
|
|
<text class="text-red">{{ showList.length }}</text>个商品</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@@ -177,7 +177,7 @@ |
|
|
|
maxIndex:50,//最小请求量 |
|
|
|
pageindex:0, |
|
|
|
tempList:[],//商品缓存数据 |
|
|
|
|
|
|
|
contractNum:0, |
|
|
|
|
|
|
|
catName:[], |
|
|
|
brandName:[], |
|
|
@@ -248,14 +248,32 @@ |
|
|
|
uni.showToast({title:'没有更多了',icon:'none'}) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//获取合同商品总数 |
|
|
|
getContractNum() { |
|
|
|
var param = { |
|
|
|
interface: "Order/GetGoodsSum", //业务接口:获取商品总数 |
|
|
|
sn: "1234567890qwertyuiop", |
|
|
|
groupid:this.tempValue.groupid |
|
|
|
} |
|
|
|
console.log('总数',this.reparam(param)); |
|
|
|
var num = new Promise((resolve,reject)=>{ |
|
|
|
this.$webSockRe(this.reparam(param),2000,false).then(res=>{ |
|
|
|
this.contractNum = res.data.data[0].count; |
|
|
|
resolve(this.contractNum) |
|
|
|
}).catch(err => { |
|
|
|
console.log('没有接收到数据:', err); |
|
|
|
}) |
|
|
|
}) |
|
|
|
return num |
|
|
|
}, |
|
|
|
// 数据分步请求 |
|
|
|
viewInfo(){ |
|
|
|
this.getOrder().then(res=>{ |
|
|
|
this.getContractNum().then(res=>{ |
|
|
|
return this.getOrder() |
|
|
|
}).then(res=>{ |
|
|
|
console.log('商品回调',res); |
|
|
|
return this.GetGoodsInfo() |
|
|
|
}) |
|
|
|
.then(res=>{ |
|
|
|
}).then(res=>{ |
|
|
|
console.log('订单回调',res); |
|
|
|
}) |
|
|
|
.catch(err=>{ |
|
|
@@ -459,6 +477,7 @@ |
|
|
|
|
|
|
|
//主切换卡 |
|
|
|
selectSide(e){ |
|
|
|
if(this.loading){return} |
|
|
|
// 每点一次展示条数清零 |
|
|
|
this.showIndex = this.showStep |
|
|
|
this.slideBarCur = e |
|
|
@@ -508,6 +527,7 @@ |
|
|
|
watchInput(e) { |
|
|
|
var val = e.detail.value |
|
|
|
console.log('搜索的值',val); |
|
|
|
if(this.loading){return} |
|
|
|
this.searchGoods(val) |
|
|
|
}, |
|
|
|
searchGoods(val){ |