|
|
@@ -12,14 +12,7 @@
|
|
|
</view>
|
|
|
<view class="shop-list">
|
|
|
<block v-if="!$util.isEmpty(detailsList)">
|
|
|
- <DetailsItem
|
|
|
- v-for="(item, index) in detailsList"
|
|
|
- :key="index"
|
|
|
- :info="item"
|
|
|
- :isEdit="true"
|
|
|
- :isCheck="item.checked"
|
|
|
- @click="checkItemEvent"
|
|
|
- ></DetailsItem>
|
|
|
+ <DetailsItem v-for="(item, index) in detailsList" :key="index" :info="item" :isEdit="true" :isCheck="item.checked" @click="checkItemEvent" ></DetailsItem>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
<AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(detailsList)" />
|
|
|
@@ -34,27 +27,20 @@
|
|
|
<button class="admin-button-com blue middle" v-else>全选</button>
|
|
|
|
|
|
</view>
|
|
|
- 已选 <text class="price">{{ selectList.length }}</text> 笔
|
|
|
- <text class="unit">¥</text>
|
|
|
- <text class="price">{{ parseFloat(selectTotalAmount) }}</text>
|
|
|
+ 已选 <text class="price">{{ selectList.length }}</text> 笔 <text class="unit">¥</text> <text class="price">{{ parseFloat(selectTotalAmount) }}</text>
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="btn-view">
|
|
|
- <button :class="['admin-button-com', 'blue']" @click="isModelFun" >收款</button>
|
|
|
+ <button :class="['admin-button-com', 'blue']" @click="isModelFun" >提交</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <modal-module :show="isModel" @click="affirm" :title="'收款'" color="#333" :size="32" padding="30upx 30upx" >
|
|
|
+ <modal-module :show="isModel" @click="confirmData" :title="'确认金额'" color="#333" :size="32" padding="30upx 30upx" >
|
|
|
<template slot="customContent">
|
|
|
<view class="select-cmd_bx">
|
|
|
<view class="num_bx">
|
|
|
<view class="flex">金额:{{selectTotalAmount}}</view>
|
|
|
<view class="flex">实收:<input @focus="modifyPrice = null" v-model="modifyPrice" type="digit"/></view>
|
|
|
- <view class="flex">减免:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
|
|
|
- <view class="flex">付款:
|
|
|
- <picker @change="payWayChange" :value="payWayindex" range-key="name" :range="payWayList">
|
|
|
- <view class="uni-input" style="height:auto;border:2upx solid #ccc;width:300upx;padding:5upx 0 5upx 10upx;">{{payWayList[payWayindex].name}}</view>
|
|
|
- </picker>
|
|
|
- </view>
|
|
|
+ <view class="flex">优惠:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -79,7 +65,6 @@ export default {
|
|
|
listLoading: false,
|
|
|
isAllCheck: false,
|
|
|
isModel: false,
|
|
|
- payWayList:[{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
payWayindex:0,
|
|
|
payWay:0,
|
|
|
searchTime:'',
|
|
|
@@ -148,21 +133,6 @@ export default {
|
|
|
}
|
|
|
this.isModel = true;
|
|
|
},
|
|
|
- affirm(val) {
|
|
|
- if (val.index === 0) {
|
|
|
- this.isModel = false;
|
|
|
- } else {
|
|
|
- let ids = this.selectList.map(ele => {
|
|
|
- return {id:ele.id};
|
|
|
- });
|
|
|
- let parameter = {
|
|
|
- id:JSON.stringify(ids),
|
|
|
- customId:this.customInfo.id,
|
|
|
- payWay:this.payWay
|
|
|
- }
|
|
|
- this.paySuccess(parameter)
|
|
|
- }
|
|
|
- },
|
|
|
selectDateFn(val){
|
|
|
this.searchTime = val.searchTime
|
|
|
this.startTime = val.startTime
|
|
|
@@ -210,6 +180,20 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ confirmData(val) {
|
|
|
+ if (val.index === 0) {
|
|
|
+ this.isModel = false;
|
|
|
+ } else {
|
|
|
+ let ids = this.selectList.map(ele => {
|
|
|
+ return {id:ele.id};
|
|
|
+ });
|
|
|
+ let parameter = {
|
|
|
+ id:JSON.stringify(ids),
|
|
|
+ customId:this.customInfo.id
|
|
|
+ }
|
|
|
+ this.paySuccess(parameter)
|
|
|
+ }
|
|
|
+ },
|
|
|
batchEvent() {
|
|
|
try {
|
|
|
if (this.$util.isEmpty(this.selectList)) {
|
|
|
@@ -219,23 +203,31 @@ export default {
|
|
|
let ids = this.selectList.map(ele => {
|
|
|
return {id:ele.id};
|
|
|
});
|
|
|
- let parameter = {
|
|
|
- id:JSON.stringify(ids),
|
|
|
- customId:this.customInfo.id,
|
|
|
- }
|
|
|
- let that = this;
|
|
|
-
|
|
|
- that.$util.confirmModal({content:'确定已收款?'},() => {
|
|
|
- that.paySuccess(parameter)
|
|
|
- })
|
|
|
+ let parameter = {
|
|
|
+ id:JSON.stringify(ids),
|
|
|
+ customId:this.customInfo.id,
|
|
|
+ }
|
|
|
+ let that = this;
|
|
|
|
|
|
+ that.$util.confirmModal({content:'确定提交?'},() => {
|
|
|
+ that.paySuccess(parameter)
|
|
|
+ })
|
|
|
} catch (error) {}
|
|
|
},
|
|
|
async paySuccess(parameter) {
|
|
|
- await clearOrderApi({...parameter,modifyPrice:this.modifyPrice,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime});
|
|
|
- this.pageTo({url:'/common/success', type: 2,query:{titleType:3}});
|
|
|
- },
|
|
|
- payFail() {
|
|
|
+ let that = this
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ const res = await clearOrderApi({...parameter,modifyPrice:this.modifyPrice,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime});
|
|
|
+ uni.hideLoading()
|
|
|
+ if(res.code == 1){
|
|
|
+ if(res.data.hasUnComplete && res.data.hasUnComplete == 1){
|
|
|
+ that.$util.confirmModal({content:'此客户还有待完成的账单',okText:'查看'},() => {
|
|
|
+ that.pageTo({url:'/admin/clear/customList',type:2})
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ that.pageTo({url:'/pagesArrears/clearResult',query:{id:res.data.id},type:2})
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -369,4 +361,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|