|
@@ -32,6 +32,7 @@
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
|
|
<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
|
|
|
<uni-popup ref="popup" type="bottom">
|
|
<uni-popup ref="popup" type="bottom">
|
|
@@ -72,8 +73,8 @@
|
|
|
}],
|
|
}],
|
|
|
// 保存当前选中的桶对象
|
|
// 保存当前选中的桶对象
|
|
|
actionItem: {},
|
|
actionItem: {},
|
|
|
- total_pledge_money:0,//押金
|
|
|
|
|
- total_count:0,//总数
|
|
|
|
|
|
|
+ total_pledge_money: 0, //押金
|
|
|
|
|
+ total_count: 0, //总数
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onReachBottom() {
|
|
onReachBottom() {
|
|
@@ -94,15 +95,24 @@
|
|
|
confirmText: '押桶',
|
|
confirmText: '押桶',
|
|
|
success: res => {
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
|
|
+ if(res.content.search(/^\d*$/)<0){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '错误',
|
|
|
|
|
+ content: '请输入数字',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
createPledge({
|
|
createPledge({
|
|
|
- id:that.actionItem.id,
|
|
|
|
|
- num:res.content,
|
|
|
|
|
- pay_type:'yue'
|
|
|
|
|
|
|
+ id: that.actionItem.id,
|
|
|
|
|
+ num: res.content,
|
|
|
|
|
+ pay_type: 'yue'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
that.$refs.popup.close();
|
|
that.$refs.popup.close();
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '押桶成功'
|
|
title: '押桶成功'
|
|
|
})
|
|
})
|
|
|
|
|
+ that.reloadList();
|
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
@@ -112,6 +122,7 @@
|
|
|
},
|
|
},
|
|
|
// 退桶
|
|
// 退桶
|
|
|
delBarrel() {
|
|
delBarrel() {
|
|
|
|
|
+ const that = this;
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '退桶',
|
|
title: '退桶',
|
|
|
placeholderText: '请输入退桶数量',
|
|
placeholderText: '请输入退桶数量',
|
|
@@ -120,12 +131,32 @@
|
|
|
confirmText: '退桶',
|
|
confirmText: '退桶',
|
|
|
success: res => {
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
- certificate({
|
|
|
|
|
-
|
|
|
|
|
|
|
+ if(res.content.search(/^\d*$/)<0){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '错误',
|
|
|
|
|
+ content: '请输入数字',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(that.actionItem.pledge_num,res.content);
|
|
|
|
|
+ if(that.actionItem.pledge_num<+res.content){
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '错误',
|
|
|
|
|
+ content: '退桶数不可大于押桶数',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ delPledge({
|
|
|
|
|
+ id: that.actionItem.id,
|
|
|
|
|
+ num: res.content,
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
|
|
+ that.$refs.popup.close();
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '退桶成功'
|
|
title: '退桶成功'
|
|
|
})
|
|
})
|
|
|
|
|
+ that.reloadList();
|
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
|
console.log(e);
|
|
console.log(e);
|
|
|
});
|
|
});
|
|
@@ -183,7 +214,7 @@
|
|
|
let arr = data.data.map(e => {
|
|
let arr = data.data.map(e => {
|
|
|
return e;
|
|
return e;
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
navItem.orderList = navItem.orderList.concat(arr);
|
|
navItem.orderList = navItem.orderList.concat(arr);
|
|
|
// console.log(navItem.orderList);
|
|
// console.log(navItem.orderList);
|
|
|
navItem.page++;
|
|
navItem.page++;
|