wangfukang 3 years ago
parent
commit
b7c79144e9
  1. 33
      pages/index/downStearmList.vue
  2. 2
      pages/index/orderDetail.vue
  3. 20
      pages/index/peopleList.vue

33
pages/index/downStearmList.vue

@ -26,7 +26,8 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<u-loadmore :status="status" />
<view class="bottom-box"> <view class="bottom-box">
<view class="bottom-left" @tap="toggle('carPopup')"> <view class="bottom-left" @tap="toggle('carPopup')">
<view class="bottom-left-box"> <view class="bottom-left-box">
@ -179,7 +180,8 @@
data() { data() {
return { return {
indexList: [], indexList: [],
pageNum: 1, //分页的页码 pages: 1, //分页的页码
totalPages: 0,
shopList: [], shopList: [],
info: 0, info: 0,
categoryId: '', //分类id categoryId: '', //分类id
@ -212,7 +214,8 @@
city: '', city: '',
area: '', area: '',
id: '' id: ''
}, },
status: 'loadmore',
rules: { rules: {
consigneeName: { consigneeName: {
rules: [{ rules: [{
@ -244,6 +247,12 @@
}, },
}, },
} }
},
onReachBottom() {
if (this.pages >= this.totalPages) return;
this.status = 'loading';
this.pages = ++this.pages;
this.getShareList();
}, },
onLoad(options) { onLoad(options) {
this.khid = options.khid; this.khid = options.khid;
@ -601,17 +610,23 @@
} }
}, },
//点击分类获取商品列表 //点击分类获取商品列表
getShareList(id) { getShareList(id) {
this.status = 'loading';
this.tui.request("/app/productShare/getShareList", "POST", { this.tui.request("/app/productShare/getShareList", "POST", {
searchStr: this.searchName, searchStr: this.searchName,
id: this.khid, id: this.khid,
pageNum: this.pageNum, pageNum: this.pages,
pageSize: '10' pageSize: '10'
}, false, true).then((res) => { }, false, true).then((res) => {
this.status = 'nomore';
if (res.code == 200) { if (res.code == 200) {
this.shopList = res.result.shareList.records
this.priceType = res.result.share.priceType this.priceType = res.result.share.priceType
this.shopId = res.result.shareList.records[0].shopId this.shopId = res.result.shareList.records[0].shopId
if (this.pages == 1) {
this.shopList = res.result.shareList.records
} else {
this.shopList = [...this.shopList, ...res.result.shareList.records]
}
for (var i = 0; i < this.shopList.length; i++) { for (var i = 0; i < this.shopList.length; i++) {
if (res.result.share.priceType == 1) { //批发价 if (res.result.share.priceType == 1) { //批发价
this.shopList[i].discountAmount = this.shopList[i].wholesalePrice this.shopList[i].discountAmount = this.shopList[i].wholesalePrice
@ -619,7 +634,7 @@
this.shopList[i].discountAmount = this.shopList[i].price this.shopList[i].discountAmount = this.shopList[i].price
} }
} }
this.totalPages = res.result.shareList.pages
} else { } else {
this.tui.toast(res.message) this.tui.toast(res.message)
} }

2
pages/index/orderDetail.vue

@ -594,7 +594,7 @@
strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:' + this.shopData.shopAddress) strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:' + this.shopData.shopAddress)
strCmd += blesdk.addCPCLLocation(0); strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint(); strCmd += blesdk.addCPCLPrint();
this.bufferData = strCmd; this.bufferData.push(strCmd);
}, },
//计算打印机当前行高度 //计算打印机当前行高度
countPrint(){ countPrint(){

20
pages/index/peopleList.vue

@ -24,12 +24,15 @@
</view> </view>
<view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;"> <view class="name-tel" style="width: 100%;display: flex;flex-direction: column;height:auto;font-size: 30rpx;">
<text>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text> <text>{{item.name == '散客'?'-':item.province + item.city + item.area}}</text>
<text style="font-size: 26rpx;color:#747474;height: auto;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text> <text style="width:75%;font-size: 26rpx;color:#747474;height: auto;line-height: 30rpx;">{{item.name == '散客'?'-':item.address}}</text>
</view> </view>
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 25rpx;"> <view v-if="item.name != '散客'" style="color: red;position: absolute;top: 8px;right: 17px;font-size: 13px;">
欠款:{{item.noEarn?item.noEarn :0}}
</view>
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goAddPeople('edit',item)" style="top: 70rpx;">
编辑 编辑
</view> </view>
<view v-if="item.name != '散客'" class="name-edit" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:25rpx"> <view v-if="item.name != '散客'" class="name-edit" @tap.stop="goDetail(item)" style="background: #FF9797;bottom:16rpx">
查看明细 查看明细
</view> </view>
</view> </view>
@ -415,17 +418,18 @@
font-size: 15px; font-size: 15px;
} }
.name-edit{ .name-edit{
width: 120rpx; width: 110rpx;
height: 60rpx; height: 55rpx;
position: absolute; position: absolute;
right: 35rpx; right: 35rpx;
background: #088FEB; background: #088FEB;
color: #fff; color: #fff;
font-size: 24rpx; font-size: 22rpx;
line-height: 60rpx; line-height: 55rpx;
text-align: center; text-align: center;
border-radius: 5px; border-radius: 5px;
} }
.standard-box { .standard-box {
color: #088FEB; color: #088FEB;
width: 30%; width: 30%;

Loading…
Cancel
Save