Browse Source

Merge branch 'master' of http://git.echepei.com/tire-platform/parts_shop_ui_LT

Qukatie 2 months ago
parent
commit
0a38320158

+ 21 - 0
api/views/sale/salesOrderList.js

@@ -48,3 +48,24 @@ export function orderCollectionStatistics(params) {
     params
   })
 }
+
+
+// 待收款列表
+export function getPendingPaymentList(params) {
+  return http.request({
+    url: '/blade-sales-part/order/getPendingPaymentList',
+    method: 'get',
+    params
+  })
+}
+
+/**
+ * 待收款统计
+ * @returns {*} 结果
+ */
+export function getPendingPaymentSum() {
+  return http.request({
+    url: '/blade-sales-part/order/getPendingPaymentSum',
+    method: 'get'
+  })
+}

+ 9 - 9
pages/views/salesSlip/salesOrderDetails.vue

@@ -121,12 +121,12 @@
 		<view style="width: 100%;position: fixed;
 		bottom: 0;background-color: #fff;border-top: 1rpx solid #ccc;">
 			<view style="width: 100%;display: flex;font-size: 24rpx;">
-				<view @click="revokeCheckOrderRWfun" v-if="form.taskWhetherAdopt == '审核提交'" style="width: 100%; padding: 10rpx 0; 
+				<view @click="revokeCheckOrderRWfun" v-if="form.taskWhetherAdopt == '审核提交'" style="width: 100%; padding: 10rpx 0;
 					background-color: #d2983c;display: grid;justify-items: center;">
 					<u-icon name="edit-pen" color="#fff"></u-icon>
 					<view style="color: #fff;">撤销出库任务审批</view>
 				</view>
-				<view @click="orderRevokeGenerateShipTaskfun" v-else-if="form.generateTask == '已生成'" style="width: 100%; padding: 10rpx 0; 
+				<view @click="orderRevokeGenerateShipTaskfun" v-else-if="form.generateTask == '已生成'" style="width: 100%; padding: 10rpx 0;
 					background-color: #d2983c;display: grid;justify-items: center;">
 					<u-icon name="edit-pen" color="#fff"></u-icon>
 					<view style="color: #fff;">撤销任务</view>
@@ -195,7 +195,7 @@
 				font-size: 32rpx;">
 					<view style="display: flex; color: #fff;justify-content: space-around;">
 						<view style="color: #FD4B09; border: 1rpx solid #FD4B09;
-						width: 200rpx; height: 80rpx; 
+						width: 200rpx; height: 80rpx;
 						line-height: 80rpx; border-radius: 12rpx;" @click="popupShow = false">取消</view>
 						<view
 							style="background-color: #FF6F3B; width: 200rpx; height: 80rpx; line-height: 80rpx; border-radius: 12rpx;"
@@ -801,7 +801,7 @@
 			},
 			//集合筛选条件
 			filterAll(screen) {
-				// if (this.form.status != '录入') return 
+				// if (this.form.status != '录入') return
 				if (this.form.generateTask != '未生成') return
 				this.screen = screen
 				switch (screen[1]) {
@@ -1023,7 +1023,7 @@
 				}).then(res => {
 					if (res.data == 1) {
 						if (!this.form.storageId) {
-							return this.$refs.uNotify.show({
+							return this.$refs.uToast.show({
 								top: this.revenueTop,
 								type: 'warning',
 								message: '请选择发货仓库!'
@@ -1239,7 +1239,7 @@
 			},
 			// 产品跳转
 			chanpintiao() {
-				if (!this.form.customerId) return this.$refs.uNotify.show({
+				if (!this.form.customerId) return this.$refs.uToast.show({
 					top: this.revenueTop,
 					type: 'warning',
 					message: '请选择客户!'
@@ -1251,7 +1251,7 @@
 						corpId: this.form.corpId
 					});
 				} else {
-					this.$refs.uNotify.show({
+					this.$refs.uToast.show({
 						top: this.revenueTop,
 						type: 'warning',
 						message: '请选择发货仓库!'
@@ -1292,7 +1292,7 @@
 			},
 
 			selectCustomer() {
-				// if (this.form.status != '录入') return 
+				// if (this.form.status != '录入') return
 				if (this.form.generateTask != '未生成') return
 				this.$u.route('/pages/views/salesSlip/selectCustomer', {
 					corpType: 'KH'
@@ -1335,4 +1335,4 @@
 		right: 15rpx;
 		color: #fd4b09;
 	}
-</style>
+</style>

+ 72 - 58
pages/views/salesSlip/toBeCollectedlistBatch.vue

@@ -2,12 +2,17 @@
 	<view style="background-color: #f2f2f6;padding-bottom: 0.01rpx;" :class="mask ? 'tl-show': ''">
 		<!-- <view style="background-color: #fff;position: fixed;top: var(--window-top);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick" :current="current">
-			</u-tabs>
-			<view style="background-color: #fff;padding: 10rpx 20rpx;">
-				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
+			</u-tabs>
+			<view style="background-color: #fff;padding: 10rpx 20rpx;">
+				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
 			</view>
-		</view> -->
-		
+		</view> -->
+    <view class="contentBox" style="margin-top: 10px;">
+      <view class="textBox">
+        <view>待收款总金额: <text style="font-size: 40rpx;">¥{{amountSum}}</text>
+          元</view>
+      </view>
+    </view>
 		<!-- <view class="contentBox" style="margin-top: 100px;">
 			<view class="textBox">
 				<view>待收款总金额</view>
@@ -27,14 +32,14 @@
 				<view>流动资金增长率:{{statistics.flowAmount}}%</view>
 			</view>
 		</view> -->
-		<view class="content">
+		<view class="content">
 			<!-- @click="choice(item,index)" -->
 			<view class="contentBox" v-for="(item,index) in dataList" :key="index" >
 				<view style="width: 100%;margin: 0 auto;">
 					<u-cell-group :border="false">
 						<u-cell :border="false" center :title="item.customerName" arrow-direction="down">
 							<view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
-							<view slot="value">
+							<view slot="value">
 								<view>{{item.region?item.region:'--'}}</view>
 							</view>
 						</u-cell>
@@ -43,47 +48,49 @@
 						<!-- <view style="font-size: 32rpx;">{{item.customerName}}</view> -->
 						<view>{{item.createTime?item.createTime.slice(0,10):''}}</view>
 					</view>
-					<view class="textBox">
-						<view>业务员:{{item.salerName}}</view>
-						<view style="color: #FD4B09;font-size: 32rpx;">{{'未收款:¥' + item.unpaidAmount+'元'}}</view>
+					<view class="textBox">
+						<view>业务员:{{item.salerName}}</view>
+						<view style="color: #FD4B09;font-size: 32rpx;">{{'未收款:¥' + item.unpaidAmount+'元'}}</view>
 					</view>
 				</view>
 			</view>
 		</view>
-
-		<u-loadmore v-if="total !== 0 && dataList.length != 0" :status="status"/>
+
+		<u-loadmore v-if="total !== 0 && dataList.length != 0" :status="status"/>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
 
 <script>
 	import {
-		orderCollectionStatistics,
-		profitStatistics,
+    getPendingPaymentList,
+    getPendingPaymentSum,
 	} from '@/api/views/sale/salesOrderList.js'
 	export default {
 		data() {
 			return {
-				statistics: {
-					flowAmount: "0.00",
-					month: "0.00",
-					total: "0.00"
-				},
-				mask:false,
-				current: 0,
-				tabsList: [],
-				form: {
-					current: 1,
-					size: 20,
-				},
-				dataList: [],
-				total: 0,
+				statistics: {
+					flowAmount: "0.00",
+					month: "0.00",
+					total: "0.00"
+				},
+				mask:false,
+				current: 0,
+				tabsList: [],
+				form: {
+					current: 1,
+					size: 20,
+				},
+				dataList: [],
+				total: 0,
 				status: 'loadmore',
+        amountSum: 0.00
 			}
 		},
 		onShow() {
 			this.dataList = []
 			this.orderCollectionStatisticsfun()
+      this.getAmountSum()
 		},
 		onReachBottom() {
 			this.status = 'loading'
@@ -94,22 +101,29 @@
 				this.status = 'nomore'
 			}
 		},
-		methods: {
-			custom(e){
-				this.form = {
-					current: 1,
-					size: 10,
-					corpsName:e
-				}
-				this.dataList = []
-				this.orderCollectionStatisticsfun()
+		methods: {
+			custom(e){
+				this.form = {
+					current: 1,
+					size: 10,
+					corpsName:e
+				}
+				this.dataList = []
+				this.orderCollectionStatisticsfun()
 			},
 			choice(item, index) {
 				uni.$u.route('/pages/views/salesSlip/salesOrderDetails', {
-					id: item.id,
+					id: item.id,
 					corpId:item.corpId
 				});
 			},
+
+      getAmountSum(){
+        console.info('1212121212')
+        getPendingPaymentSum().then(res => {
+          this.amountSum = res.data
+        })
+      },
 			//查询
 			orderCollectionStatisticsfun() {
 				uni.showLoading({
@@ -119,7 +133,7 @@
 				// profitStatistics(this.form).then(res => {
 				// 	this.statistics = res.data
 				// })
-				orderCollectionStatistics({
+        getPendingPaymentList({
 					...this.form
 				}).then(res => {
 					if (res.data.records) {
@@ -138,23 +152,23 @@
 					this.form = {
 						current: 1,
 						size: 20
-					}
+					}
 					this.mask = false
 					this.dataList = []
 					this.orderCollectionStatisticsfun()
 				}
 			},
-			confirm(e) {
-				if(this.screen[0] == "corpId"){
-					this.form = {
-						current: 1,
-						size: 20,
-						corpId: e.value[0].id
-					}
-					this.dataList = []
-					this.orderCollectionStatisticsfun()
-					this.show = false
-					this.mask = false
+			confirm(e) {
+				if(this.screen[0] == "corpId"){
+					this.form = {
+						current: 1,
+						size: 20,
+						corpId: e.value[0].id
+					}
+					this.dataList = []
+					this.orderCollectionStatisticsfun()
+					this.show = false
+					this.mask = false
 				}else if (this.screen[1] == "salesName") {
 					this.form = {
 						current: 1,
@@ -165,13 +179,13 @@
 					this.orderCollectionStatisticsfun()
 					this.show = false
 					this.mask = false
-				}else{
-					this.formTwo.account = e.value[0].dictValue
-					this.show = false
-					this.mask = false
+				}else{
+					this.formTwo.account = e.value[0].dictValue
+					this.show = false
+					this.mask = false
 				}
-			}
-			
+			}
+
 		}
 	}
 </script>
@@ -213,4 +227,4 @@
 		height: 100%;
 		width: 100%;
 	}
-</style>
+</style>