Jelajahi Sumber

客户欠款有用

shish 5 tahun lalu
induk
melakukan
8825286aaf
2 mengubah file dengan 21 tambahan dan 15 penghapusan
  1. 7 3
      ghsApp/src/api/arrears/index.js
  2. 14 12
      ghsApp/src/pagesArrears/details.vue

+ 7 - 3
ghsApp/src/api/arrears/index.js

@@ -1,15 +1,19 @@
 import https from "@/plugins/luch-request_0.0.7/request";
 
+/**
+ * 客户欠款列表查询
+ * @param {*} name
+ */
 export const getDebtListApi = name => {
 	return https.get("/custom/debt-list", { name });
 };
 
 /**
- * 供应商欠款详情查询
+ * 客户欠款详情查询
  * @param {*} name
  */
 export const getOrderDebtListApi = id => {
-	return https.get("/purchase/debt-list", { id });
+	return https.get("/order/debt-list", { id });
 };
 
 /**
@@ -17,5 +21,5 @@ export const getOrderDebtListApi = id => {
  * @param {*} id
  */
 export const clearOrderApi = id => {
-	return https.post("/purchase-clear/create-order", id);
+	return https.post("/order-clear/clear", id);
 };

+ 14 - 12
ghsApp/src/pagesArrears/details.vue

@@ -2,18 +2,18 @@
 	<view class="order-page">
 		<view class="top-view">
 			<view class="top-row">
-				<text class="header-item">供应商</text>
+				<text class="header-item"> 客户</text>
 				<text class="header-item">总欠款 </text>
 			</view>
 			<view class="top-row">
 				<view class="info-item">
-					<image class="logo" :src="ghsInfo.smallAvatar"/>
+					<image class="logo" :src="customInfo.smallAvatar"/>
 					<text class="name">
-						{{ ghsInfo.name || "" }}
+						{{ customInfo.name || "" }}
 					</text>
 				</view>
 				<view class="price-item">
-					{{ ghsInfo.debtAmount || "0.00" }}
+					{{ totalAmount || "" }}
 				</view>
 			</view>
 		</view>
@@ -54,21 +54,23 @@
 				</view>
 			</template>
 			<view class="btn-view">
-				<button :class="['admin-button-com', 'blue']" @click="batchEvent" >结算</button>
+				<button :class="['admin-button-com', 'blue']" @click="batchEvent" >收款</button>
 			</view>
 		</view>
+    <kd-entrance></kd-entrance>
 	</view>
 </template>
 <script>
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import DetailsItem from "./detailsItem";
 import { getOrderDebtListApi,clearOrderApi } from "@/api/arrears/index";
+import wexinPay from "@/utils/pay/wxPay";
 
 export default {
 	components: { AppWrapperEmpty, DetailsItem },
 	data() {
 		return {
-			ghsInfo: "",
+			customInfo: "",
 			totalAmount: "",
 			num: "",
 			detailsList: [],
@@ -104,7 +106,7 @@ export default {
 			if (this.detailsList) {
 				for (const item of this.detailsList) {
 					if (item.checked) {
-						amount=amount+Number(item.realPrice);
+						amount=amount+Number(item.actPrice);
 					}
 				}
 			}
@@ -125,9 +127,9 @@ export default {
 			try {
 				this.listLoading = true;
 				const {
-					data: { ghsInfo, num, totalAmount, list }
+					data: { customInfo, num, totalAmount, list }
 				} = await getOrderDebtListApi(this.option.id);
-				this.ghsInfo = ghsInfo;
+				this.customInfo = customInfo;
 				this.totalAmount = totalAmount;
 				this.num = num;
 				this.detailsList = list.map(ele => {
@@ -179,12 +181,12 @@ export default {
 				});
 			let parameter = {
 					id:JSON.stringify(ids),
-				ghsId:this.ghsInfo.id,
+				customId:this.customInfo.id,
 			}
 			let self = this;
 				uni.showModal({
 					title: '提示',
-					content: '确定已结算?',
+					content: '确定已收款?',
 					success: function (res) {
 						if (res.confirm) {
 							self.paySuccess(parameter)
@@ -196,7 +198,7 @@ export default {
 		// 支付成功
 		async paySuccess(parameter) {
 			await clearOrderApi(parameter);
-			this.pageTo({url:'/common/pageSuccess?title=结算成功', type: 2});
+			this.pageTo({url:'/common/pageSuccess?title=收款成功', type: 2});
 		},
 		payFail() {
 		}