ソースを参照

Merge branch 'develop_szhj08' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj08

对账单
lilei 2 年 前
コミット
747b3401cb

+ 12 - 1
api/sales.js

@@ -199,5 +199,16 @@ export const salesDetailExport = params => {
     url: `sales/excel/${params.sn}`,
     method: 'get',
     responseType: 'blob'
-  })
+    })
+}
+//销售详情 -- 收款记录
+export const queryFlowByBizSn = (params) => {
+	const url = `settle/flow/queryFlowByBizSn/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	  return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	  })
 }

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.0.103:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.215:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 32 - 0
hybrid/html/css/common.css

@@ -0,0 +1,32 @@
+*{
+    margin:0;
+    padding:0;
+    font-size: 14px;
+}
+.flex{
+    display: -webkit-flex; 
+    display: -moz-flex;
+    display: -ms-flexbox;
+    display: flex;
+}
+.align_center{
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    -webkit-align-items: center;
+    align-items: center;
+}
+.flex-between{
+    justify-content:space-between;
+}
+.flex-column{
+    -webkit-box-orient: vertical;
+    -ms-flex-direction: column;
+    -webkit-flex-direction: column;
+    flex-direction: column;
+}
+.justify_between{
+    -webkit-box-pack: justify;
+    -ms-flex-pack: justify;
+    -webkit-justify-content: space-between;
+    justify-content: space-between;
+}

BIN
hybrid/html/img/close.png


BIN
hybrid/html/img/open.png


+ 285 - 0
hybrid/html/index.html

@@ -0,0 +1,285 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>箭冠东莞汽配-对账单</title>
+    <link rel="stylesheet" href="./css/common.css">
+    <script src="./js/resize.js"></script>
+	 <script src="./js/vue.min.js"></script>
+    <script src="./js/axios.min.js"></script>
+    <style>
+        .content {
+            width: 100%;
+            height: 100vh;
+            background: #f3f3f3;
+        }
+
+        .head {
+            /* 头部 */
+            background: #848484;
+            padding: .3rem .2rem 1rem;
+            box-sizing: border-box;
+            color: #fff;
+            position: relative;
+        }
+
+        .shareTime {
+            font-size: .12rem;
+            text-align: center;
+            margin-bottom: .2rem;
+        }
+
+        .tip {
+            font-weight: bold;
+        }
+
+        .tipDesc {
+            font-weight: bold;
+            font-size: .12rem;
+            line-height: .5rem;
+        }
+
+        .orderInfo {
+            background: #fff;
+            box-sizing: border-box;
+            padding: .2rem;
+            width: calc(100% - .4rem);
+            border-radius: .3rem;
+            overflow: hidden;
+            position: absolute;
+            bottom: -1.1rem;
+            left: .2rem;
+            color: #333;
+        }
+
+        .downLoadTip,
+        .downLoadUrl {
+            max-width: 83%;
+            font-size: .12rem;
+            word-wrap: break-word;
+            white-space: normal;
+            word-break: break-all;
+        }
+
+        .downLoadTip {
+            margin-top: .2rem;
+            line-height: .4rem;
+            color: #999;
+        }
+
+        .downLoadUrl {
+            color: #007aff;
+        }
+
+        .amount {
+            color: #f0ad4e;
+            font-weight: bold;
+        }
+
+        .handleOrder {
+            color: #999;
+            padding: 1.3rem .2rem .2rem;
+            font-size: .12rem;
+        }
+
+        .handleOrder span:last-child {
+            color: #007aff;
+        }
+
+        /* 滚动盒子 */
+        .oederBox {
+            flex-grow: 1;
+            overflow: auto;
+        }
+
+        .oederList {
+            background: #fff;
+            border-bottom: .01rem solid #e0e0e0;
+            padding: .2rem;
+            box-sizing: border-box;
+        }
+
+        .order-l {
+            flex: 1;
+        }
+
+        .order-t,
+        .order-b {
+            font-size: .12rem;
+            color: #999;
+        }
+
+        .order-t span:first-child {
+            color: #333;
+        }
+
+        .order-b,
+        .list-b {
+            line-height: .5rem;
+        }
+
+        .order-b span {
+            color: #f0ad4e;
+            vertical-align: middle;
+        }
+
+        .order-r img {
+            width: .5rem;
+            height: .5rem;
+            border-radius: 50%;
+            object-fit: contain;
+            margin-left: .2rem;
+        }
+
+        /* 折叠列表 */
+        .otherList {
+            width: 100%;
+            box-sizing: border-box;
+            padding-left: .4rem;
+            background-color: #fff;
+        }
+
+        .list {
+            box-sizing: border-box;
+            padding: .2rem;
+            border-bottom: .01rem solid #e0e0e0;
+            font-size: .12rem;
+        }
+
+        .list:last-child {
+            border-bottom: 0 solid #e0e0e0;
+        }
+
+        .list-b div:first-child {
+            text-overflow: ellipsis;
+            overflow: hidden;
+            white-space: nowrap;
+            width: 70%;
+        }
+
+        .list-b {
+            color: #999;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="app" class="content flex flex-column">
+        <div class="head">
+            <div class="shareTime">
+                分享时间:2022-11-15 09:59:29
+            </div>
+            <div class="tip">
+                尊敬的“{{customerName}}”,您好!
+            </div>
+            <div class="tipDesc">
+                以下是您2022-11-01至2022-11-30在本店的对账单,请查阅。
+            </div>
+            <div class="orderInfo">
+                <div class="flex align_center flex-between">
+                    <span>欠款金额</span>
+                    <span class="amount">¥160.00</span>
+                </div>
+                <div class="downLoadTip">
+                    单据明细Excel下载请点击下面的链接:
+                </div>
+                <div class="downLoadUrl">
+                    http://iscm.360arrow.com/bill/202211150004.xls
+                </div>
+            </div>
+        </div>
+        <div class="orderCon flex flex-column">
+            <div class="handleOrder flex flex-between align_center">
+                <span>共{{saleList.length}}个销售单</span>
+                <span>全部展开</span>
+            </div>
+            <div class="oederBox">
+                <div class="oederList flex align_center" v-for="(item,i) in saleList" :key="item.bizSn">
+                    <div class="order-l">
+                        <div class="order-t flex align_center flex-between">
+                            <span>{{item.bizDate.substr(0,10)}}</span>
+                            <span>{{item.bizNo}}</span>
+                        </div>
+                        <div class="order-b  flex align_center flex-between">
+                            <div>应付:¥{{item.bizAmount ||0}}</div>
+                            <div>已付:¥{{item.settledAmount | 0}}</div>
+                            <div>欠款:<span>¥{{item.unsettleAmount|| 0}}</span></div>
+                        </div>
+                    </div>
+                    <div class="order-r" @click="handleShow">
+                        <img src="./img/close.png" alt="" v-if="!isShow">
+                        <img src="./img/open.png" alt="" v-else>
+                    </div>
+                </div>
+                <div class="otherList" v-if="isShow">
+                    <div class="list">
+                        <div class="list-t flex align_center flex-between">
+                            <span>JA-11070N</span>
+                            <span>¥40.00</span>
+                        </div>
+                        <div class="list-b flex align_center flex-between">
+                            <div>箭牌空气滤清器 07款丰田新皇冠207款丰田新皇冠2.5 / 3.0车用</div>
+                            <div>x2</div>
+                        </div>
+                    </div>
+                    <div class="list">
+                        <div class="list-t flex align_center flex-between">
+                            <span>JA-11070N</span>
+                            <span>¥40.00</span>
+                        </div>
+                        <div class="list-b flex align_center flex-between">
+                            <div>箭牌空气滤清器 07款丰田新皇冠2.5 / 3.0车用</div>
+                            <div>x2</div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</body>
+<script>
+    new Vue({
+        el: '#app',
+        data: {
+            isShow:false,
+			ajaxUrl:'http://192.168.0.215:8503/qpls-md/',
+			customerName:'名字名字',
+			customerSn:'437705264826884096',
+			startTime:'2022-11-01 00:00:00',
+			endTime:'2022-11-30 23:59:59',
+
+			saleList:[]
+        },
+		created() {
+			this.loadData();
+		},
+        methods:{
+            handleShow(){
+                this.isShow = !this.isShow
+            },
+			getUrlParam(name){
+				var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
+				var r = window.location.search.substr(1).match(reg);  //匹配目标参数
+				if (r!=null) return unescape(r[2]); return null; //返回参数值
+			},
+			loadData(){
+				let ajaxData={
+					targetSn: this.customerSn,
+					bizBeginDate: this.startTime,
+					bizEndDate: this.endTime
+				}
+				axios.post(this.ajaxUrl+'verify/queryUnsettleSaleList',ajaxData).then((res)=> {
+				   this.saleList=res.data;
+				}).catch((error)=> {
+				    console.log(error);
+				});
+			}
+
+        }
+    })
+</script>
+
+</html>

ファイルの差分が大きいため隠しています
+ 0 - 0
hybrid/html/js/axios.min.js


+ 17 - 0
hybrid/html/js/resize.js

@@ -0,0 +1,17 @@
+(function(doc, win) {
+    var docEl = doc.documentElement,
+        resizeEvt = "orientationchange" in window ? "orientationchange" : "resize",
+        recalc = function() {
+            if (docEl.clientWidth > 750) {
+                docEl.style.fontSize = "100px";
+                doc.getElementById("app").style.width = "750px";
+            } else {
+                var width = docEl.clientWidth / 7.5;
+                docEl.style.fontSize = width + "px";
+                doc.getElementById("app").style.width = "auto";
+            }
+        };
+    if (!doc.addEventListener) return;
+    win.addEventListener(resizeEvt, recalc, false);
+    doc.addEventListener("DOMContentLoaded", recalc, false);
+})(document, window);

ファイルの差分が大きいため隠しています
+ 5 - 0
hybrid/html/js/vue.min.js


+ 1 - 1
manifest.json

@@ -125,7 +125,7 @@
                 },
                 "share" : {
                     "weixin" : {
-                        "appid" : "112313",
+                        "appid" : "wx1409d0e9171fc6ed",
                         "UniversalLinks" : "https://iscm.360arrow.com/ulink/"
                     }
                 }

+ 118 - 77
pages/sales/bill.vue

@@ -26,14 +26,14 @@
 		<view class="statistical u-flex">
 			<view class="statisticalList">
 				<text>总单数:</text>
-				<text>{{bill.length}}</text>
+				<text>{{ bill.length }}</text>
 			</view>
 			<view class="statisticalList">
 				<text>待收金额合计:</text>
-				<text>¥{{totalPayPrice}}</text>
+				<text>¥{{ totalPayPrice }}</text>
 			</view>
 		</view>
-		<view class="chooseCon"><billList ref="bill" :showCheck="true" :list="bill"  @allChecked="allCheckedCallback"></billList></view>
+		<view class="chooseCon"><billList ref="bill" :showCheck="true" :list="bill" @allChecked="allCheckedCallback"></billList></view>
 		<view class="footer u-flex">
 			<view class="f-left">
 				<u-checkbox @change="allCheckeChange" v-model="allChecked" shape="circle">{{ allChecked ? '取消全选' : '全选' }}</u-checkbox>
@@ -41,16 +41,16 @@
 			<view class="f-mid" @click="isDetailShow = !isDetailShow">
 				<view>
 					待收:
-					<text>¥{{chooseTotalPayPrice}}</text>
+					<text>¥{{ chooseTotalPayPrice }}</text>
 				</view>
-				<view v-if="chooseList.length>0">
+				<view v-if="chooseList.length > 0">
 					折后:
-					<text>¥{{settlement}}</text>
+					<text>¥{{ settlement }}</text>
 				</view>
-				<view class="u-flex" v-if="chooseList.length>0">
+				<view class="u-flex" v-if="chooseList.length > 0">
 					<view>
 						折让:
-						<text>¥{{discountVal || 0}}</text>
+						<text>¥{{ discountVal || 0 }}</text>
 					</view>
 					<view class="costBtn" @click="costShow = true">打折</view>
 				</view>
@@ -85,15 +85,15 @@
 				<view class="costPopupCon">
 					<view class="costList">
 						<text class="label">待收金额:</text>
-						<text>¥{{chooseTotalPayPrice}}</text>
+						<text>¥{{ chooseTotalPayPrice }}</text>
 					</view>
 					<view class="costList u-flex">
 						<view class="label">折让金额:</view>
-						<u-input v-model="discountVal" @input="onKeyInput" :border="true" :height="50"/>
+						<u-input v-model="discountVal" :border="true" :height="50" />
 					</view>
-					<view class="tip" v-if="discountVal>chooseTotalPayPrice">折让金额不能大于待收金额,请重新输入</view>
+					<view class="tip" v-if="discountVal > chooseTotalPayPrice">折让金额不能大于待收金额,请重新输入</view>
 					<view class="costText">折让后金额</view>
-					<view class="costText">¥{{settlement}}</view>
+					<view class="costText">¥{{ settlement }}</view>
 				</view>
 				<u-button type="primary" :custom-style="customStyle" shape="circle" @click="handleDisCount">确定</u-button>
 			</view>
@@ -105,7 +105,7 @@
 
 <script>
 import billList from './billListComponent.vue';
-import { queryUnsettleSaleList,insert } from '@/api/verify.js';
+import { queryUnsettleSaleList, insert } from '@/api/verify.js';
 import getDate from '@/libs/getDate.js';
 export default {
 	components: { billList },
@@ -126,7 +126,7 @@ export default {
 			},
 			allChecked: false,
 			tipShow: false,
-			discountVal: null,//折让金额
+			discountVal: null, //折让金额
 			tipContent: `账单周期指销售单的创建时间`,
 			placeTab: [
 				{
@@ -164,24 +164,25 @@ export default {
 				}
 			],
 			curTab: '0',
-			
+
 			showSearch: false,
 			showDate: false,
 			costShow: false,
-			
+
 			customerObj: {
 				customerName: null
 			},
 			cycleName: '',
-			
+
 			params: {
 				targetSn: undefined,
 				bizBeginDate: undefined,
 				bizEndDate: undefined
 			},
 			bill: [],
-			dateArray:'',
-			chooseList:[]
+			dateArray: '',
+			chooseList: [],
+			isDetailShow:false
 		};
 	},
 	onReady() {
@@ -192,9 +193,9 @@ export default {
 	},
 	onLoad(options) {
 		//获取对账周期默认值
-		if(uni.getStorageSync('curTab')){
+		if (uni.getStorageSync('curTab')) {
 			this.curTab = uni.getStorageSync('curTab');
-		}else{
+		} else {
 			let systemList = this.$store.state.vuex_systemSetList;
 			let cycleObj = systemList.find(item => {
 				return item.remarks == 'sales_bill_period';
@@ -207,6 +208,10 @@ export default {
 			this.customerObj = JSON.parse(options.data);
 			this.params.targetSn = this.customerObj.customerSn;
 		}
+		uni.$on('customerInfo', res => {
+			this.customerObj = res;
+			this.params.targetSn = res.customerSn;
+		});
 		this.changeTime();
 	},
 	onNavigationBarButtonTap() {
@@ -217,35 +222,48 @@ export default {
 	onBackPress() {
 		if (this.showSearch) {
 			this.showSearch = false;
-		}else{
-			uni.removeStorageSync('curTab')
+		} else {
+			uni.removeStorageSync('curTab');
 		}
 	},
+	onUnload() {
+		uni.removeStorageSync('curTab');
+	},
 	computed: {
 		totalPayPrice() {
 			let totalPrice = 0;
 			for (let i = 0; i < this.bill.length; i++) {
-				this.bill[i].unsettleAmount = this.bill[i].unsettleAmount ? this.bill[i].unsettleAmount :0
+				this.bill[i].unsettleAmount = this.bill[i].unsettleAmount ? this.bill[i].unsettleAmount : 0;
 				totalPrice += this.bill[i].unsettleAmount;
 			}
 			return totalPrice;
 		},
-		chooseTotalPayPrice(){
-			let price=0;
-			this.chooseList.forEach(item=>{
-				item.unsettleAmount =item.unsettleAmount? item.unsettleAmount:0;
+		chooseTotalPayPrice() {
+			let price = 0;
+			this.chooseList.forEach(item => {
+				item.unsettleAmount = item.unsettleAmount ? item.unsettleAmount : 0;
 				price += item.unsettleAmount;
-			})
+			});
 			return price;
 		},
-		settlement(){
+		settlement() {
 			return this.chooseTotalPayPrice - this.discountVal || 0;
 		}
 	},
 	methods: {
+		handleClean(){
+			this.showSearch = false;
+			let systemList = this.$store.state.vuex_systemSetList;
+			let cycleObj = systemList.find(item => {
+				return item.remarks == 'sales_bill_period';
+			});
+			this.curTab = this.placeTab.findIndex(con => con.name == cycleObj.valueShow);
+			this.cycleName = this.changeShowTime();
+			this.changeTime();
+		},
 		//选择客户
-		goChooseCustomer(){
-			uni.setStorageSync('curTab',this.curTab);
+		goChooseCustomer() {
+			uni.setStorageSync('curTab', this.curTab);
 			this.jumpPage('/pages/sales/chooseCustomerBill');
 		},
 		changeTime() {
@@ -253,12 +271,12 @@ export default {
 				this.params.bizBeginDate = this.getQueryDate().beginDate;
 				this.params.bizEndDate = this.getQueryDate().endDate;
 				this.cycleName = this.changeShowTime();
-			}else if(this.curTab == 7){
+			} else if (this.curTab == 7) {
 				this.cycleName = this.placeTab[this.curTab].name;
 				this.params.bizBeginDate = undefined;
 				this.params.bizEndDate = undefined;
-			}else{
-				this.dateArray = ''
+			} else {
+				this.dateArray = '';
 			}
 			this.getList();
 		},
@@ -276,11 +294,18 @@ export default {
 			this.dateArray = date.startDate + ' ~ ' + date.endDate;
 			this.params.bizBeginDate = date.startDate + ' 00:00:00';
 			this.params.bizEndDate = date.endDate + ' 23:59:59';
-			this.cycleName=date.startDate + '至' + date.endDate;
+			this.cycleName = date.startDate + '至' + date.endDate;
 		},
 		// 更改日期格式显示
-		changeShowTime(){
-			const fun = [getDate.getTodayInfo, getDate.getYesterdayInfo, getDate.getCurrWeekDaysInfo, getDate.getLastWeekDaysInfo, getDate.getCurrLastMonthDaysInfo, getDate.getLastMonthDaysInfo];
+		changeShowTime() {
+			const fun = [
+				getDate.getTodayInfo,
+				getDate.getYesterdayInfo,
+				getDate.getCurrWeekDaysInfo,
+				getDate.getLastWeekDaysInfo,
+				getDate.getCurrLastMonthDaysInfo,
+				getDate.getLastMonthDaysInfo
+			];
 			return fun[this.curTab]();
 		},
 		tabChange(data) {
@@ -302,64 +327,80 @@ export default {
 				url
 			});
 		},
-		handleDisCount(){
-			this.costShow = false
+		handleDisCount() {
+			if(this.discountVal > this.chooseTotalPayPrice){
+				uni.showToast({
+					title: '折让金额不能大于待收金额,请重新输入',
+					icon: 'none'
+				});
+				return
+			}
+			let reg=/^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;
+			if(!reg.test(this.discountVal)){
+				uni.showToast({
+					title: '折让金额格式不正确,请重新输入',
+					icon: 'none'
+				});
+				return
+			}
+			this.costShow = false;
 		},
-		submitOrder(){//发送对账单
-			if(this.chooseList.length==0){
+		submitOrder() {
+			//发送对账单
+			if (this.chooseList.length == 0) {
 				uni.showToast({
-					title:'请选择要发送的对账单',
-					icon:'none'
-				})
+					title: '请选择要发送的对账单',
+					icon: 'none'
+				});
 				return;
 			}
-			let obj={
-				detailNum:this.chooseList.length,
-				totalAmount:this.chooseTotalPayPrice,
-				discountAmount:this.discountVal,
-				settleAmount:this.settlement,
-				detailList:this.chooseList
-			}
-			let ajaxData=Object.assign(this.params,obj)
+			let obj = {
+				detailNum: this.chooseList.length,
+				totalAmount: this.chooseTotalPayPrice,
+				discountAmount: this.discountVal,
+				settleAmount: this.settlement,
+				detailList: this.chooseList
+			};
+			let ajaxData = Object.assign(this.params, obj);
 			insert(ajaxData).then(res => {
 				if (res.status == 200) {
 					this.goShare();
 				}
 			});
 		},
-		allCheckeChange(e){
-			this.$refs.bill.allSelect(e.value)
-			const list = this.$refs.bill.getAllData()
+		allCheckeChange(e) {
+			this.$refs.bill.allSelect(e.value);
+			const list = this.$refs.bill.getAllData();
 		},
 		// 选中事件
-		allCheckedCallback(isAllChecked,row){
-			const has = this.chooseList.findIndex(k => k.bizSn == row.bizSn)
+		allCheckedCallback(isAllChecked, row) {
+			const has = this.chooseList.findIndex(k => k.bizSn == row.bizSn);
 			// 在已选列表中
-			if(has>=0){
+			if (has >= 0) {
 				// 取消选中
-				if(!row.checked){
-					this.chooseList.splice(has,1)
+				if (!row.checked) {
+					this.chooseList.splice(has, 1);
 				}
-			}else{
-				if(row.checked){
-					this.chooseList.push(row)
+			} else {
+				if (row.checked) {
+					this.chooseList.push(row);
 				}
 			}
 			// 是否全选
-			this.allChecked = isAllChecked
+			this.allChecked = isAllChecked;
 		},
 		// 分享图文
-		goShare(){
+		goShare() {
 			uni.shareWithSystem({
-			  summary: '',
-			  href: '',
-			  success(){
-			    // 分享完成,请注意此时不一定是成功分享
-			  },
-			  fail(){
-			    // 分享失败
-			  }
-			})
+				summary: '',
+				href: '',
+				success() {
+					// 分享完成,请注意此时不一定是成功分享
+				},
+				fail() {
+					// 分享失败
+				}
+			});
 		}
 	}
 };
@@ -416,7 +457,7 @@ export default {
 	}
 	.footer {
 		background-color: #f8f8f8;
-		padding:10rpx 20rpx;
+		padding: 10rpx 20rpx;
 		.f-mid {
 			flex-grow: 1;
 			color: #666;
@@ -506,7 +547,7 @@ export default {
 					color: $uni-text-color-grey;
 				}
 			}
-			.tip{
+			.tip {
 				color: $uni-color-error;
 				font-size: 20rpx;
 				text-align: right;

+ 5 - 5
pages/sales/billHistoryDetail.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content flex flex_column">
+	<view class="content flex flex_column" v-if="billInfo">
 		<view class="b_head">
 			<view class="head_list">
 				<text>分享时间</text>
@@ -60,11 +60,11 @@ export default {
 			customStyle:{
 				backgroundColor: this.$config('primaryColor'),
 				color: '#fff',
-				verifySn:'',
-				billInfo:null,
-				billList:[],
-				timeInfo:''
+				verifySn:''
 			},
+			billInfo:null,
+			billList:[],
+			timeInfo:''
 		};
 	},
 	onReady() {

+ 15 - 2
pages/sales/chooseCustomerBill.vue

@@ -6,7 +6,8 @@
 					<u-tabs :show-bar="false" :active-item-style="activeItemStyle" :list="tabsList" :is-scroll="false" :current="params.allCustomerFlag" @change="changeTabs"></u-tabs>
 				</view>
 				<view class="payType" @click="gatherShow = true">
-					<text :style="{ color: wordColor }">收款方式</text>
+					<text v-if="!payTypeWord" :style="{ color: wordColor }">收款方式</text>
+					<text v-else :style="{ color: $config('primaryColor') }">{{payTypeWord}}</text>
 					<u-icon name="shaixuan" custom-prefix="iscm-icon" size="30" :color="wordColor"></u-icon>
 				</view>
 			</view>
@@ -71,6 +72,7 @@ export default {
 					name: '全部客户'
 				}
 			],
+			payTypeWord:null,
 			activeItemStyle: {
 				color: this.$config('primaryColor'),
 				borderBottom: '4rpx solid ' + this.$config('primaryColor')
@@ -110,6 +112,7 @@ export default {
 		  this.listHeight = Math.floor(data.height)
 		}).exec();
 	},
+	
 	onLoad() {
 		this.theme = getApp().globalData.theme;
 		this.getSetInfo();
@@ -120,9 +123,13 @@ export default {
 	onBackPress() {
 		if(this.gatherShow){
 			this.gatherShow = false
-			return true
+		}else{
+			uni.removeStorageSync('curTab')
 		}
 	},
+	onUnload() {
+		uni.removeStorageSync('curTab')
+	},
 	methods: {
 		//获取系统参数
 		getSetInfo(){
@@ -171,12 +178,18 @@ export default {
 			this.refreshList();
 		},
 		clearSearch(){
+			_this.params.customer.queryWord = undefined
 			this.refreshList();
 		},
 		refreshList(e){
 			const _this= this
 			if(e){
 				_this.params.customer.settleStyleSn = e.code;
+				_this.payTypeWord = e.dispName
+			}
+			if(e == 'reSet'){
+				_this.params.customer.settleStyleSn= undefined;
+				_this.payTypeWord = null
 			}
 			this.$nextTick(()=>{
 				_this.$refs.customer.getList(1);

+ 22 - 23
pages/sales/customerList.vue

@@ -1,23 +1,19 @@
 <template>
 	<view class="sales-list-component">
-		<view v-if="listData && listData.length>0">
-			<scroll-view class="sales-list-con" :style="{ height: scrollH + 'px' }"  scroll-y @scrolltolower="onreachBottom">
-				<view class="customer-list" v-for="(item,i) in listData" :key="i" @click="getDetail(item)">
-					<view class="u-line-1">{{item.customer.customerName}}</view>
-					<view class="customer-b u-flex">
-						<view class="customer-box">
-							<text>欠款:</text>
-							<text>¥{{item.settleAmount || 0}}</text>
-						</view>
-						<view class="customer-box">收款方式:{{item.customer.settleStyleSnDictValue}}</view>
+		<scroll-view class="sales-list-con" :style="{ height: scrollH + 'px' }" scroll-y @scrolltolower="onreachBottom">
+			<view class="customer-list" v-for="(item, i) in listData" :key="i" @click="getDetail(item)">
+				<view class="u-line-1">{{ item.customer.customerName }}</view>
+				<view class="customer-b u-flex">
+					<view class="customer-box">
+						<text>欠款:</text>
+						<text>¥{{ item.settleAmount || 0 }}</text>
 					</view>
+					<view class="customer-box">收款方式:{{ item.customer.settleStyleSnDictValue }}</view>
 				</view>
-			</scroll-view>
-		</view>
-		<view v-else>
-			<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" :text="noDataText" mode="list" :margin-top="50"></u-empty>
-		</view>
-		<view style="padding-bottom: 20upx;" ><u-loadmore v-if="totalNum > listData.length || status == 'loading'" :status="status" /></view>
+			</view>
+			<view v-if="listData && listData.length == 0"><u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" :text="noDataText" mode="list" :margin-top="100"></u-empty></view>
+			<view style="padding:20upx 0;"><u-loadmore v-if="totalNum > listData.length || status == 'loading'" :status="status" /></view>
+		</scroll-view>
 	</view>
 </template>
 
@@ -42,11 +38,11 @@ export default {
 		return {
 			listData: [],
 			pageNo: 1,
-			pageSize: 10,
+			pageSize: 15,
 			totalNum: 0,
 			status: 'loadmore',
 			noDataText: '暂无数据',
-			
+
 			auditModal: false, // 审核弹框
 			dataInfo: null,
 			outModal: false, // 出库弹框
@@ -57,9 +53,7 @@ export default {
 	},
 	watch: {
 		height(a, b) {
-			console.log(a, b);
 			const sys = uni.getSystemInfoSync();
-			console.log(sys);
 			if (sys.platform == 'android') {
 				this.scrollH = sys.windowHeight - a;
 			} else {
@@ -109,9 +103,14 @@ export default {
 			}
 		},
 		getDetail(data) {
-			uni.redirectTo({
-				url:'/pages/sales/bill?data='+JSON.stringify(data.customer)
-			})
+			if(uni.getStorageSync('curTab')){
+				uni.$emit('customerInfo',data.customer);
+				uni.navigateBack();
+			}else{
+				uni.navigateTo({
+					url: '/pages/sales/bill?data=' + JSON.stringify(data.customer)
+				})
+			}
 		}
 	}
 };

+ 2 - 2
pages/sales/gather.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="modal-box">
 		<u-popup v-model="isShow"  @close="isShow=false" mode="right" length="85%" >
-			<view class="modal-con u-flex u-flex-wrap u-row-between" :style="{height:toggle? auto:'180rpx'}">
+			<view class="modal-con u-flex u-flex-wrap u-row-between" :style="{height:toggle? 'auto':'180rpx'}">
 				<view class="list" :class="selectNum==i?'selectBox':''" v-for="(item,i) in list" :key="item.id" @click="handleChoole(i)">{{item.dispName}}</view>
 			</view>
 			<view class="showMore" :style="{color:$config('primaryColor')}" @click="toggle=!toggle">
@@ -66,7 +66,7 @@
 			handleClear(){
 				this.selectNum=-1;
 				this.isShow = false
-				this.$emit('refresh');
+				this.$emit('refresh','reSet');
 			}
 		},
 		watch:{

+ 140 - 131
pages/sales/orderInfoModal.vue

@@ -1,155 +1,164 @@
 <template>
 	<u-mask class="orderInfoModal" :show="isShow" :mask-click-able="false">
 		<view class="order-info-con">
+			<scroll-view scroll-y>
 			<view class="order-info-main">
-				<view>
-					<text class="info-item-tit">销售单号:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesBillNo || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">客户名称:</text>
-					<text class="info-item-txt">{{infoData && infoData.buyerName || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">客户地址:</text>
-					<text class="info-item-txt" v-if="infoData && (infoData.shippingAddressProvinceName || infoData.shippingAddressCityName || infoData.shippingAddressCountyName || infoData.shippingAddress)">
-						{{infoData.shippingAddressProvinceName || ''}}{{infoData.shippingAddressCityName || ''}}{{infoData.shippingAddressCountyName || ''}}{{infoData.shippingAddress || ''}}
-					</text>
-					<text class="info-item-txt" v-else>--</text>
-				</view>
-				<view>
-					<text class="info-item-tit">联系电话:</text>
-					<text class="info-item-txt">{{infoData && infoData.consigneeTel || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">收款方式:</text>
-					<text class="info-item-txt">{{infoData && infoData.settleStyleSnDictValue || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">{{infoFlag? '开单人':'制单人'}}:</text>
-					<text class="info-item-txt">{{infoData && infoData.operatorName || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">业务员:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesManName || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">{{infoFlag? '单据来源':'来源'}}:</text>
-					<text class="info-item-txt">{{infoData && infoData.sourceTypeDictValue || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">业务状态:</text>
-					<text class="info-item-txt">{{infoData && infoData.billStatusDictValue || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">财务状态:</text>
-					<text class="info-item-txt">{{infoData && infoData.financialStatusDictValue || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">备注:</text>
-					<text class="info-item-txt">{{infoData && infoData.remarks || '--'}}</text>
-				</view>
-				<view v-if="infoFlag">
-				<view>
-					<text class="info-item-tit">创建时间:</text>
-					<text class="info-item-txt">{{infoData && infoData.sourceTypeDictValue || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">审核时间:</text>
-					<text class="info-item-txt">{{infoData && infoData.auditDate || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">联系人:</text>
-					<text class="info-item-txt">{{infoData && infoData.consigneeName || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">联系手机:</text>
-					<text class="info-item-txt">{{infoData && infoData.consigneeMobile || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">价格类型:</text>
-					<text class="info-item-txt">{{infoData && infoData.priceType || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">配送方式:</text>
-					<text class="info-item-txt">{{infoData && infoData.dispatchType || '--'}}</text>
-				</view>
-				<view>
-					<text class="info-item-tit">铺货出库:</text>
-					<text class="info-item-txt">{{infoData && infoData.sourceTypeDictValue || '--'}}</text>
-				</view>
-				</view>
-			</view>
-			<view class="order-info-footer">
-				<view class="button-cancel" @click="isShow=false">关闭</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">销售单号:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.salesBillNo) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">客户名称:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.buyerName) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">客户地址:</text>
+						<text
+							class="info-item-txt"
+							v-if="
+								infoData &&
+									(infoData.shippingAddressProvinceName || infoData.shippingAddressCityName || infoData.shippingAddressCountyName || infoData.shippingAddress)
+							"
+						>
+							{{ infoData.shippingAddressProvinceName || '' }}{{ infoData.shippingAddressCityName || '' }}{{ infoData.shippingAddressCountyName || ''
+							}}{{ infoData.shippingAddress || '' }}
+						</text>
+						<text class="info-item-txt" v-else>--</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">联系电话:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.consigneeTel) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">收款方式:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.settleStyleSnDictValue) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">{{ infoFlag ? '开单人' : '制单人' }}:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.operatorName) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">业务员:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.salesManName) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">{{ infoFlag ? '单据来源' : '来源' }}:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.sourceTypeDictValue) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">业务状态:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.billStatusDictValue) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">财务状态:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.financialStatusDictValue) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">备注:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.remarks) || '--' }}</text>
+					</view>
+					<view v-if="infoFlag">
+						<view class="order-info-list">
+							<text class="info-item-tit">创建时间:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.sourceTypeDictValue) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">审核时间:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.auditDate) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">联系人:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.consigneeName) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">联系手机:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.consigneeMobile) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">价格类型:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.priceTypeDictValue) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">配送方式:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.dispatchType) || '--' }}</text>
+						</view>
+						<view class="order-info-list">
+							<text class="info-item-tit">铺货出库:</text>
+							<text class="info-item-txt">{{ (infoData && infoData.sourceTypeDictValue)?infoData.sourceTypeDictValue==0?'否':'是':'--' }}</text>
+						</view>
+					</view>
 			</view>
+			</scroll-view>
+			<view class="order-info-footer"><view class="button-cancel" @click="isShow = false">关闭</view></view>
 		</view>
 	</u-mask>
 </template>
 
 <script>
-	export default {
-		props: {
-			openModal: { //  弹框显示状态
-				type: Boolean,
-				default: false
-			},
-			infoData: {
-				tyoe: Object,
-				default: ()=>{
-					return null
-				}
-			},
-			infoFlag:{
-				type: Boolean,
-				default: false
-			}
+export default {
+	props: {
+		openModal: {
+			//  弹框显示状态
+			type: Boolean,
+			default: false
 		},
-		data() {
-			return {
-				isShow: this.openModal, //  是否打开弹框
+		infoData: {
+			tyoe: Object,
+			default: () => {
+				return null;
 			}
 		},
-		methods: {},
-		watch: {
-			//  父页面传过来的弹框状态
-			openModal (newValue, oldValue) {
-				this.isShow = newValue
-			},
-			//  重定义的弹框状态
-			isShow (newValue, oldValue) {
-			  if (!newValue) {
-			    this.$emit('close')
-			  }
+		infoFlag: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			isShow: this.openModal //  是否打开弹框
+		};
+	},
+	methods: {},
+	watch: {
+		//  父页面传过来的弹框状态
+		openModal(newValue, oldValue) {
+			this.isShow = newValue;
+		},
+		//  重定义的弹框状态
+		isShow(newValue, oldValue) {
+			if (!newValue) {
+				this.$emit('close');
 			}
 		}
 	}
+};
 </script>
 
 <style lang="scss" scoped>
-	.orderInfoModal{
-		width: 100%;
-		height: 100%;
-		.order-info-con{
-			width: 78%;
-			margin: 30% auto 0;
-			background-color: #fff;
-			border-radius: 24upx;
-			.order-info-main{
-				padding: 20upx 20upx;
-				>view{
-					padding: 10upx 0;
-					border-bottom: 1upx solid #e4e7ed;
-					.info-item-tit{
-						color: #666;
-						display: inline-block;
-					}
+.orderInfoModal {
+	width: 100%;
+	height: 100%;
+	.order-info-con {
+		width: 78%;
+		margin: 30% auto 0;
+		background-color: #fff;
+		border-radius: 24upx;
+		.order-info-main {
+			padding: 20upx 20upx;
+			height:800rpx;
+			.order-info-list {
+				padding: 10upx 0;
+				border-bottom: 1upx solid #e4e7ed;
+				.info-item-tit {
+					color: #666;
+					display: inline-block;
 				}
 			}
-			.order-info-footer{
-				text-align: center;
-				padding-bottom: 20upx;
-			}
+		}
+		.order-info-footer {
+			text-align: center;
+			padding-bottom: 20upx;
 		}
 	}
+}
 </style>

+ 35 - 6
pages/sales/salesDetail.vue

@@ -74,19 +74,18 @@
 				</scroll-view>
 			</view>
 			</view>
+			<!-- 收款记录列表 -->
 			<view class="flex flex_column" v-show="current == 1">
-			<!-- 合计 -->
 			<view ref="salesTotal" class="sales-total-box border-b font_13 flex justify_between">
 				<view class="sales-total-con flex_1" :style="{height: toggle ? 'auto' : '44upx'}">
 					应收:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.totalCategory || detailData.totalCategory==0) ? toThousands(detailData.totalCategory) : '--'}}</text>;已收:<text class="sales-total-num" :style="{color: $config('warringColor')}">{{detailData && (detailData.totalQty || detailData.totalQty==0) ? toThousands(detailData.totalQty) : '--'}}</text>;待收:<text class="sales-total-num" :style="{color: $config('warringColor')}">¥{{detailData && (detailData.discountAmount || detailData.discountAmount==0) ? toThousands(detailData.discountAmount, 2) : '--'}}</text>;
 				</view>
 			</view>
-			<!-- 产品列表 -->
 			<view class="sales-list-box">
-				<scroll-view class="sales-list-con" :style="{height:scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
-					<view class="sales-list-item flex align_center justify_between">
+				<scroll-view class="sales-list-con" :style="{height:scrollH+'upx'}" scroll-y>
+					<view class="sales-list-item flex align_center justify_between" v-for="(con,i) in payRecode" :key="">
 						<view class="sales-list-l">
-							<view>2022-11-30 9:12:25</view>
+							<view>{{con.createDate}}</view>
 							<view>微信支付(线上)</view>
 						</view>
 						<view class="sales-list-r income" >
@@ -115,7 +114,7 @@
 	import ProductModal from './productModal.vue'
 	import { toThousands } from '@/libs/tools'
 	import { stockByProductSn } from '@/api/stock'
-	import { salesDetailList, salesDetailDel, salesDel, salesDetailBySn, salesSubmit, salesDiscount, salesDetailUpdate } from '@/api/sales'
+	import { salesDetailList, salesDetailDel, salesDel, salesDetailBySn, salesSubmit, salesDiscount, salesDetailUpdate,queryFlowByBizSn } from '@/api/sales'
 	export default{
 		components: { OrderInfoModal, DiscountModal, commonModal, ProductModal },
 		data(){
@@ -158,6 +157,7 @@
 				productInfo: null,  // 编辑产品需要的参数
 				editInfo: null,  // 添加/编辑 提交的值
 				commonType: 1,  // 公共弹框类型  1删除产品,2删除销售单,3编辑产品时库存不足
+				payRecode:null
 			}
 		},
 		onLoad(options) {
@@ -170,12 +170,40 @@
 			uni.$off('refreshEditBL')
 		},
 		methods: {
+			//获取收款记录
+			getRecodeData(pageNo){
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				let params = {
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					bizSn: this.salesBillSn
+				}
+				this.status = "loading"
+				queryFlowByBizSn(params).then(res => {
+					if (res.status == 200) {
+						if (this.pageNo > 1) {
+							this.payRecode = this.payRecode.concat(res.data.list || []);
+						} else {
+							this.payRecode = res.data.list || [];
+						}
+						this.totalNum = res.data.count || 0;
+					} else {
+						this.payRecode = [];
+						this.totalNum = 0;
+						this.noDataText = res.message;
+					}
+					this.status = 'loadmore';
+				})
+			},
 			changeTabs(index){
 				this.current= index
 			},
 			init(){
 				this.getList(1)
 				this.getDetail()
+				this.getRecodeData(1)
 			},
 			// 列表
 			getList(pageNo){
@@ -219,6 +247,7 @@
 				if(this.listData.length < this.totalNum){
 					this.pageNo += 1
 					this.getList()
+					this.getRecodeData()
 				}
 			},
 			// 折扣金额

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません