Browse Source

对账单

chenrui 2 năm trước cách đây
mục cha
commit
089d4b6ca1

+ 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;

+ 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()
 				}
 			},
 			// 折扣金额