|
|
@@ -54,9 +54,21 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="btn-view">
|
|
|
- <button :class="['admin-button-com', 'blue']" @click="batchEvent" >收款</button>
|
|
|
+ <!--<button :class="['admin-button-com', 'blue']" @click="batchEvent" >收款</button>-->
|
|
|
+ <button :class="['admin-button-com', 'blue']" @click="isModelFun" >收款</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="'收款'" color="#333" :size="32" padding="30rpx 30rpx" >
|
|
|
+ <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="number"/></view>
|
|
|
+ <view class="flex">优惠:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -64,17 +76,20 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import DetailsItem from "./detailsItem";
|
|
|
import { getOrderDebtListApi,clearOrderApi } from "@/api/arrears/index";
|
|
|
import wexinPay from "@/utils/pay/wxPay";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
|
|
|
export default {
|
|
|
- components: { AppWrapperEmpty, DetailsItem },
|
|
|
+ components: { AppWrapperEmpty, ModalModule,DetailsItem },
|
|
|
data() {
|
|
|
return {
|
|
|
+ modifyPrice:null,
|
|
|
customInfo: "",
|
|
|
totalAmount: "",
|
|
|
num: "",
|
|
|
detailsList: [],
|
|
|
listLoading: false,
|
|
|
- isAllCheck: false
|
|
|
+ isAllCheck: false,
|
|
|
+ isModel: false
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -109,6 +124,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.modifyPrice = amount.toFixed(2);
|
|
|
return amount.toFixed(2);
|
|
|
}
|
|
|
},
|
|
|
@@ -122,6 +138,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ isModelFun(){
|
|
|
+ if (this.$util.isEmpty(this.selectList)) {
|
|
|
+ this.$msg("请选择还款订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.isModel = true;
|
|
|
+ },
|
|
|
+ affirm(val) {
|
|
|
+ if (val.index === 0) {
|
|
|
+ this.isModel = false;
|
|
|
+ console.log('取消')
|
|
|
+ } else {
|
|
|
+
|
|
|
+ let ids = this.selectList.map(ele => {
|
|
|
+ return {id:ele.id};
|
|
|
+ });
|
|
|
+ let parameter = {
|
|
|
+ id:JSON.stringify(ids),
|
|
|
+ customId:this.customInfo.id,
|
|
|
+ }
|
|
|
+ this.paySuccess(parameter)
|
|
|
+ console.log('确认')
|
|
|
+ }
|
|
|
+ },
|
|
|
async initData() {
|
|
|
try {
|
|
|
this.listLoading = true;
|
|
|
@@ -196,7 +236,7 @@ export default {
|
|
|
},
|
|
|
// 支付成功
|
|
|
async paySuccess(parameter) {
|
|
|
- await clearOrderApi(parameter);
|
|
|
+ await clearOrderApi({...parameter,modifyPrice:this.modifyPrice});
|
|
|
this.pageTo({url:'/common/pageSuccess?title=收款成功', type: 2});
|
|
|
},
|
|
|
payFail() {
|
|
|
@@ -309,5 +349,22 @@ export default {
|
|
|
color: $mainColor !important;
|
|
|
}
|
|
|
}
|
|
|
+ .select-cmd_bx {
|
|
|
+ .num_bx {
|
|
|
+ margin-bottom: 80px;
|
|
|
+ view{
|
|
|
+ height: 80rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ height: 80rpx;
|
|
|
+ border: 1px solid #dddddd;
|
|
|
+ border-radius: 4px;
|
|
|
+ text-align: left;
|
|
|
+ margin-right: 24px;
|
|
|
+ font-size: 40rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|