shish 5 anni fa
parent
commit
8457cdf639

+ 1 - 1
ghsApp/dist/build/mp-weixin/admin/clear/list.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "结单",
+  "navigationBarTitleText": "结单",
   "usingComponents": {
     "order-item": "/admin/clear/orderItem",
     "app-wrapper-empty": "/components/app-wrapper-empty"

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesClient/member/detail.wxml


+ 1 - 1
ghsApp/dist/build/mp-weixin/pagesGys/details.json

@@ -1,5 +1,5 @@
 {
-  "navigationBarTitleText": "结单",
+  "navigationBarTitleText": "结单",
   "enablePullDownRefresh": true,
   "usingComponents": {
     "app-wrapper-empty": "/components/app-wrapper-empty",

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesOrder/detail.wxml


+ 1 - 1
ghsApp/dist/build/mp-weixin/pagesPurchase/supplier.wxml

@@ -1 +1 @@
-<view class="order-page data-v-c19c5444"><scroll-view class="order_list data-v-c19c5444" scroll-y="{{true}}" scroll-view="{{true}}"><block class="data-v-c19c5444"><block wx:if="{{!$root.g0}}"><block class="data-v-c19c5444"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['gotoDetails',['$event']]]]]}}" class="list_item data-v-c19c5444" bindtap="__e"><image src="{{item.$orig.avatar}}" class="data-v-c19c5444"></image><view class="store_name data-v-c19c5444"><view class="store_title data-v-c19c5444">{{item.$orig.name}}</view><view class="accumulative data-v-c19c5444">{{"欠款: "+item.$orig.debtAmount}}</view></view><view class="store_btn data-v-c19c5444"><view data-event-opts="{{[['tap',[['gotoDetails',['$event']]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">采购</view><block wx:if="{{item.m0>0}}"><view data-event-opts="{{[['tap',[['gotoDetailsEvent',['$0'],[[['supplierList','',index]]]]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">结账</view></block><block wx:else><view data-event-opts="{{[['tap',[['',['$event']]]]]}}" class="btn_entrance btn_forbid data-v-c19c5444" catchtap="__e">结账</view></block><view data-event-opts="{{[['tap',[['pageTo',[['o',['url','/admin/clear/list'],['query',{ghsId:item.$orig.id}]]]]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">结单</view></view></view></block></block></block><block wx:else><block class="data-v-c19c5444"><app-wrapper-empty vue-id="6b4875c2-1" title="暂无数据" is-empty="{{$root.g1}}" class="data-v-c19c5444" bind:__l="__l"></app-wrapper-empty></block></block></block></scroll-view><view class="app-footer _div data-v-c19c5444"><view data-event-opts="{{[['tap',[['add',['$event']]]]]}}" class="admin-button-com middle blue _div data-v-c19c5444" bindtap="__e">添加</view></view></view>
+<view class="order-page data-v-c19c5444"><scroll-view class="order_list data-v-c19c5444" scroll-y="{{true}}" scroll-view="{{true}}"><block class="data-v-c19c5444"><block wx:if="{{!$root.g0}}"><block class="data-v-c19c5444"><block wx:for="{{$root.l0}}" wx:for-item="item" wx:for-index="index" wx:key="index"><view data-event-opts="{{[['tap',[['gotoDetails',['$event']]]]]}}" class="list_item data-v-c19c5444" bindtap="__e"><image src="{{item.$orig.avatar}}" class="data-v-c19c5444"></image><view class="store_name data-v-c19c5444"><view class="store_title data-v-c19c5444">{{item.$orig.name}}</view><view class="accumulative data-v-c19c5444">{{"欠款: "+item.$orig.debtAmount}}</view></view><view class="store_btn data-v-c19c5444"><view data-event-opts="{{[['tap',[['gotoDetails',['$event']]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">采购</view><block wx:if="{{item.m0>0}}"><view data-event-opts="{{[['tap',[['gotoDetailsEvent',['$0'],[[['supplierList','',index]]]]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">结账</view></block><block wx:else><view data-event-opts="{{[['tap',[['',['$event']]]]]}}" class="btn_entrance btn_forbid data-v-c19c5444" catchtap="__e">结账</view></block><view data-event-opts="{{[['tap',[['pageTo',[['o',['url','/admin/clear/list'],['query',{ghsId:item.$orig.id}]]]]]]]}}" class="btn_entrance data-v-c19c5444" catchtap="__e">结单</view></view></view></block></block></block><block wx:else><block class="data-v-c19c5444"><app-wrapper-empty vue-id="6b4875c2-1" title="暂无数据" is-empty="{{$root.g1}}" class="data-v-c19c5444" bind:__l="__l"></app-wrapper-empty></block></block></block></scroll-view><view class="app-footer _div data-v-c19c5444"><view data-event-opts="{{[['tap',[['add',['$event']]]]]}}" class="admin-button-com middle blue _div data-v-c19c5444" bindtap="__e">添加</view></view></view>

+ 1 - 1
ghsApp/src/pagesArrears/details.vue

@@ -63,7 +63,7 @@
 					<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">减免:{{(selectTotalAmount - modifyPrice).toFixed(2)}}</view>
 					</view>
 				</view>
 			</template>

+ 76 - 31
ghsApp/src/pagesGys/details.vue

@@ -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>

+ 1 - 1
ghsApp/src/pagesOrder/detail.vue

@@ -62,7 +62,7 @@
 					<view>欠款:</view>
 					<view v-if="detailInfo.debt==1">是</view>
 					<view v-else>
-						<view v-if="detailInfo.clearId > 0">已结清 <span style="color:blue;margin-left:10rpx;" @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})">结单</span></view>
+						<view v-if="detailInfo.clearId > 0">已结清 <span style="color:blue;margin-left:10rpx;" @click="pageTo({url: '/admin/clear/info',query: {id: detailInfo.clearId}})">结单</span></view>
 						<view v-else>-</view>
 					</view>
 				</view>

+ 1 - 1
ghsApp/src/pagesPurchase/supplier.vue

@@ -30,7 +30,7 @@
                 结账
               </view>
               <view class="btn_entrance" @click.stop="pageTo({ url: '/admin/clear/list',query: {ghsId: item.id}})">
-                结单
+                结
               </view>
             </view>
           </view>

Some files were not shown because too many files changed in this diff