|
|
@@ -7,7 +7,7 @@
|
|
|
</view>
|
|
|
<view class="top-row">
|
|
|
<view class="info-item">
|
|
|
- <image class="logo" :src="ghsInfo.smallAvatar"/>
|
|
|
+ <image class="logo" :src="ghsInfo.avatar"/>
|
|
|
<text class="name">
|
|
|
{{ ghsInfo.name || "" }}
|
|
|
</text>
|
|
|
@@ -54,18 +54,32 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
<view class="btn-view">
|
|
|
- <button :class="['admin-button-com', 'blue']" @click="batchEvent" >结帐</button>
|
|
|
+ <button :class="['admin-button-com', 'blue']" @click="clearSelectedOrder" >结帐</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+ <modal-module :show="showClearModel" @cancel="modalCancel" @click="confirmClear" :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="digit"/></view>
|
|
|
+ <view class="flex">减免:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ </modal-module>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import DetailsItem from "./detailsItem";
|
|
|
import { getOrderDebtListApi,clearOrderApi } from "@/api/gys/index";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
|
|
|
export default {
|
|
|
- components: { AppWrapperEmpty, DetailsItem },
|
|
|
+ components: { AppWrapperEmpty, DetailsItem, ModalModule},
|
|
|
data() {
|
|
|
return {
|
|
|
ghsInfo: "",
|
|
|
@@ -73,7 +87,9 @@ export default {
|
|
|
num: "",
|
|
|
detailsList: [],
|
|
|
listLoading: false,
|
|
|
- isAllCheck: false
|
|
|
+ isAllCheck: false,
|
|
|
+ showClearModel:false,
|
|
|
+ modifyPrice:0,
|
|
|
};
|
|
|
},
|
|
|
onPullDownRefresh() {
|
|
|
@@ -108,19 +124,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- return amount.toFixed(2);
|
|
|
+ let newAmount = amount.toFixed(2);
|
|
|
+ this.modifyPrice = newAmount
|
|
|
+ return newAmount
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ selectList () {
|
|
|
+ if (this.selectList.length === this.detailsList.length) {
|
|
|
+ this.isAllCheck = true
|
|
|
+ } else {
|
|
|
+ this.isAllCheck = false
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- watch: {
|
|
|
- selectList () {
|
|
|
- if (this.selectList.length === this.detailsList.length) {
|
|
|
- this.isAllCheck = true
|
|
|
- } else {
|
|
|
- this.isAllCheck = false
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
+ clearSelectedOrder(){
|
|
|
+ if (this.$util.isEmpty(this.selectList)) {
|
|
|
+ this.$msg("请选择还款订单");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.showClearModel = true;
|
|
|
+ },
|
|
|
async initData() {
|
|
|
try {
|
|
|
this.listLoading = true;
|
|
|
@@ -141,25 +166,24 @@ export default {
|
|
|
this.listLoading = false;
|
|
|
}
|
|
|
},
|
|
|
- // 全选
|
|
|
- allCheck () {
|
|
|
- this.isAllCheck = !this.isAllCheck
|
|
|
- if (this.isAllCheck) {
|
|
|
- this.detailsList.map(ele => {
|
|
|
- ele.checked = true
|
|
|
- });
|
|
|
- } else {
|
|
|
- this.detailsList.map(ele => {
|
|
|
- ele.checked = false
|
|
|
- });
|
|
|
- }
|
|
|
- },
|
|
|
+ // 全选
|
|
|
+ allCheck () {
|
|
|
+ this.isAllCheck = !this.isAllCheck
|
|
|
+ if (this.isAllCheck) {
|
|
|
+ this.detailsList.map(ele => {
|
|
|
+ ele.checked = true
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.detailsList.map(ele => {
|
|
|
+ ele.checked = false
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
checkItemEvent(item) {
|
|
|
for (let index = 0; index < this.detailsList.length; index++) {
|
|
|
const element = this.detailsList[index].id;
|
|
|
if (element == item.id) {
|
|
|
//id相等选中
|
|
|
-
|
|
|
this.$set(this.detailsList, index, {
|
|
|
...this.detailsList[index],
|
|
|
checked: !this.detailsList[index].checked
|
|
|
@@ -168,7 +192,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- batchEvent() {
|
|
|
+ confirmClear() {
|
|
|
try {
|
|
|
if (this.$util.isEmpty(this.selectList)) {
|
|
|
this.$msg("请选择还款订单");
|
|
|
@@ -178,13 +202,14 @@ export default {
|
|
|
return {id:ele.id};
|
|
|
});
|
|
|
let parameter = {
|
|
|
- id:JSON.stringify(ids),
|
|
|
+ id:JSON.stringify(ids),
|
|
|
ghsId:this.ghsInfo.id,
|
|
|
+ modifyPrice:this.modifyPrice
|
|
|
}
|
|
|
let self = this;
|
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
|
- content: '确定已结帐?',
|
|
|
+ content: '确认提交?',
|
|
|
success: function (res) {
|
|
|
if (res.confirm) {
|
|
|
self.paySuccess(parameter)
|
|
|
@@ -308,5 +333,25 @@ export default {
|
|
|
color: $mainColor !important;
|
|
|
}
|
|
|
}
|
|
|
+ .select-cmd_bx {
|
|
|
+ .num_bx {
|
|
|
+ margin-top:30px;
|
|
|
+ margin-bottom:50px;
|
|
|
+ margin-left:80rpx;
|
|
|
+ view{
|
|
|
+ height: 80rpx;
|
|
|
+ font-size: 28rpx;
|
|
|
+ }
|
|
|
+ input {
|
|
|
+ height: 70rpx;
|
|
|
+ border: 1px solid #dddddd;
|
|
|
+ border-radius: 4px;
|
|
|
+ text-align: left;
|
|
|
+ margin-right: 24px;
|
|
|
+ font-size: 35rpx;
|
|
|
+ width:300rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|