|
|
@@ -31,7 +31,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="btn-view">
|
|
|
- <button :class="['admin-button-com', 'blue']" @click="createOrder">创建账单</button>
|
|
|
+ <button :class="['admin-button-com', 'blue']" @click="createOrder">结清账单</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -40,7 +40,8 @@
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import DebtItem from "./debtItem";
|
|
|
-import { getDebtOrderList,clearOrderApi } from "@/api/order";
|
|
|
+import { getDebtOrderList } from "@/api/order";
|
|
|
+import { confirmSettle } from "@/api/settle";
|
|
|
import DateSelect from "@/components/module/dateSelect";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
export default {
|
|
|
@@ -111,12 +112,26 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
createOrder(){
|
|
|
- this.$msg('开发中')
|
|
|
- return false
|
|
|
let that = this
|
|
|
let price = parseFloat(that.modifyPrice)
|
|
|
that.$util.confirmModal({content:'总金额'+price+'元,确认提交?'},() => {
|
|
|
- that.confirmData()
|
|
|
+
|
|
|
+
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['请选择收款方式:', '微信', '支付宝','现金','银行卡'],
|
|
|
+ success: function (respond) {
|
|
|
+ let currentIndex = respond.tapIndex
|
|
|
+ let inWay = [{name:"未选择",id:-1},{name:"微信",id:0},{name:"支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}]
|
|
|
+ if(currentIndex > 0){
|
|
|
+ let payWay = inWay[currentIndex].id
|
|
|
+ that.payWay = payWay
|
|
|
+ that.confirmData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
payWayChange(e){
|
|
|
@@ -202,7 +217,7 @@ export default {
|
|
|
return {id:ele.id};
|
|
|
});
|
|
|
let parameter = {
|
|
|
- id:JSON.stringify(ids),
|
|
|
+ id:JSON.stringify(ids),
|
|
|
customId:this.customInfo.id,
|
|
|
}
|
|
|
let that = this;
|
|
|
@@ -215,16 +230,13 @@ export default {
|
|
|
async paySuccess(parameter) {
|
|
|
let that = this
|
|
|
uni.showLoading({mask:true})
|
|
|
- const res = await clearOrderApi({...parameter,modifyPrice:this.modifyPrice,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime});
|
|
|
+ const res = await confirmSettle({...parameter,modifyPrice:this.modifyPrice,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,payWay:this.payWay});
|
|
|
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})
|
|
|
- }
|
|
|
+ that.$msg('已结清')
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.navigateBack()
|
|
|
+ },2000);
|
|
|
}
|
|
|
}
|
|
|
}
|