chenrui пре 2 година
родитељ
комит
a2260ee87c

+ 7 - 0
pages.json

@@ -408,6 +408,13 @@
 				"navigationBarTextStyle": "black"
 			}
 		},
+		{
+			"path": "pages/sales/chooseCustomerBill", 
+			"style": {
+				"navigationBarTitleText": "选择客户",
+				"navigationBarTextStyle": "black"
+			}
+		},
 		{
 			"path": "pages/sales/addSales", // 新增销售单
 			"style": {

+ 6 - 1
pages/sales/bill.vue

@@ -179,7 +179,7 @@
 				costShow:false
 			};
 		},
-		onLoad() {
+		onReady() {
 			uni.setNavigationBarColor({
 				frontColor: '#ffffff',
 				backgroundColor: this.$config('primaryColor')
@@ -227,6 +227,11 @@
 					this.queryPramas.endDate = ''
 				}
 			},
+			jumpPage(url){
+				uni.navigateTo({
+					url
+				})
+			}
 		}
 	}
 </script>

+ 226 - 2
pages/sales/chooseCustomerBill.vue

@@ -1,8 +1,232 @@
 <template>
+	<view class="content flex flex_column">
+		<view class="header u-flex">
+			<view class="tab">
+				<u-tabs :show-bar="false" :active-item-style="activeItemStyle" :list="tabsList" :is-scroll="false" :current="current" @change="changeTabs"></u-tabs>
+			</view>
+			<view class="payType" @click="gatherShow = true">
+				<text :style="{ color: wordColor }">收款方式</text>
+				<u-icon name="shaixuan" custom-prefix="iscm-icon" size="30" :color="wordColor"></u-icon>
+			</view>
+		</view>
+		<view class="tabCon flex flex_column" v-show="current == 0">
+			<view class="scroll-con u-flex u-row-between">
+				<scroll-view scroll-x class="scroll-date">
+					<view class="u-flex" v-show="!showType">
+						<view v-for="(item, i) in 10" :key="i">
+							<view class="scroll-box" :class="chooseNum == i ? 'activeBox' : ''" v-if="i < 2" @click="handleDate(i)">
+								<view>11.{{ i + 1 }}</view>
+								<view>今日</view>
+							</view>
+							<view class="scroll-box" v-else :class="chooseNum == i ? 'activeBox' : ''" @click="handleDate(i)">{{ i + 1 }}</view>
+						</view>
+					</view>
+					<view class="u-flex" v-show="showType">
+						<view v-for="(item, i) in 10" :key="i">
+							<view class="scroll-box" :class="chooseNum == i ? 'activeBox' : ''" v-if="i < 2" @click="handleDate(i)">
+								<view>2022.{{ i + 1 }}</view>
+								<view>本月</view>
+							</view>
+							<view class="scroll-box" v-else :class="chooseNum == i ? 'activeBox' : ''" @click="handleDate(i)">2022.{{ i + 1 }}</view>
+						</view>
+					</view>
+				</scroll-view>
+				<u-image :src="`../../static/${theme}/navIcon/dayImg.png`" width="42" height="42" v-show="!showType" @click="chooseType"></u-image>
+				<u-image :src="`../../static/${theme}/navIcon/monthImg.png`" width="42" height="42" v-show="showType" @click="chooseType"></u-image>
+			</view>
+			<view class="customer-con">
+				<view class="customer-list">
+					<view class="u-line-1">按成修配按成修配按成修配按成修配按成修配按成修配按成修配按成修配按成修配</view>
+					<view class="customer-b u-flex">
+						<view class="customer-box">
+							<text>欠款:</text>
+							<text>¥582222.00</text>
+						</view>
+						<view class="customer-box">收款方式:现金</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="tabCon flex flex_column" v-show="current == 1">
+			<view class="customer-search">
+				<u-search
+					v-model="keyword"
+					@input="$u.debounce(getSearchCon, 800)"
+					@search="getSearchCon"
+					@custom="getSearchCon"
+					@clear="clearSearch"
+					:show-action="false"
+					placeholder="请输入客户名称拼音首字母查询"
+				></u-search>
+			</view>
+			<view class="customer-con">
+				<u-index-list :scrollTop="scrollTop">
+					<view v-for="(item, index) in indexList" :key="index">
+						<u-index-anchor :index="item" />
+						<view class="customer-list">
+							<view class="u-line-1">按成修配按成修配按成修配按成修配按成修配按成修配按成修配按成修配按成修配</view>
+							<view class="customer-b u-flex">
+								<view class="customer-box">
+									<text>欠款:</text>
+									<text>¥582222.00</text>
+								</view>
+								<view class="customer-box">收款方式:现金</view>
+							</view>
+						</view>
+					</view>
+				</u-index-list>
+			</view>
+		</view>
+		<!-- 收款方式弹窗 -->
+		<search :showModal="gatherShow" @refresh="refreshList" @close="gatherShow=false"/>
+	</view>
 </template>
 
 <script>
+import search from './gather.vue'
+export default {
+	components:{search},
+	data() {
+		return {
+			tabsList: [
+				{
+					name: '最近开单'
+				},
+				{
+					name: '全部用户'
+				}
+			],
+			current: 0,
+			activeItemStyle: {
+				color: this.$config('primaryColor'),
+				borderBottom: '4rpx solid ' + this.$config('primaryColor')
+			},
+			wordColor: this.$config('infoColor'),
+			theme: '',
+			chooseNum: 0,
+			showType: false,
+			indexList: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'],
+			scrollTop: 0,
+			keyword:'',
+			gatherShow:false
+		};
+	},
+	onReady() {
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		});
+	},
+	onLoad() {
+		this.theme = getApp().globalData.theme;
+	},
+	onPageScroll(e) {
+				this.scrollTop = e.scrollTop;
+			},
+	methods: {
+		changeTabs(index) {
+			this.current = index;
+		},
+		handleDate(i) {
+			this.chooseNum = i;
+		},
+		chooseType() {
+			this.showType = !this.showType;
+		},
+		getSearchCon(){
+			
+		},
+		clearSearch(){
+			
+		},
+		refreshList(){
+			
+		}
+	}
+};
 </script>
 
-<style>
-</style>
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100vh;
+	.header {
+		position: relative;
+		background: #fff;
+		.tab {
+			width: 60%;
+			margin: 0 auto;
+		}
+		.payType {
+			position: absolute;
+			right: 20rpx;
+			text {
+				vertical-align: top;
+				font-size: 26rpx;
+			}
+		}
+	}
+	.tabCon {
+		flex-grow: 1;
+		.scroll-con {
+			width: 100%;
+			background: #fff;
+			margin: 6rpx 0;
+			padding: 10rpx 20rpx;
+			.scroll-date {
+				width: calc(100% - 62rpx);
+				.scroll-box {
+					margin-right: 20rpx;
+					padding: 10rpx 20rpx;
+					text-align: center;
+					font-size: 26rpx;
+					view {
+						&:last-child {
+							font-size: 24rpx;
+							color: #666;
+						}
+					}
+				}
+				.activeBox {
+					font-weight: bold;
+					color: $uni-color-primary;
+					view {
+						&:last-child {
+							font-size: 24rpx;
+							color: $uni-color-primary;
+						}
+					}
+				}
+			}
+		}
+		.customer-con {
+			flex-grow: 1;
+			overflow: auto;
+			background: #fff;
+			.customer-list {
+				padding: 20rpx;
+				border-bottom: 1rpx solid #f8f8f8;
+			}
+			.customer-b {
+				margin-top: 10rpx;
+				color: #666;
+				font-size: 26rpx;
+				.customer-box {
+					width: 46%;
+					text {
+						&:last-child {
+							color: $uni-color-warning;
+						}
+					}
+				}
+			}
+		}
+		//选择客户
+		.customer-search {
+			padding: 10rpx 20rpx;
+			background: #fff;
+			margin: 6rpx 0;
+		}
+	}
+}
+</style>

+ 95 - 0
pages/sales/gather.vue

@@ -0,0 +1,95 @@
+<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="list" v-for="(item,i) in list" :key="i">{{item}}</view>
+			</view>
+			<view class="showMore" :style="{color:$config('primaryColor')}" @click="toggle=!toggle">
+				<text>{{toggle?'收起':'更多选项'}}</text>
+				<u-icon :name="toggle?'arrow-up':'arrow-down'" :color="$config('primaryColor')" size="28"></u-icon>
+			</view>
+			<view class="form-footer-btn">
+				<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClean">重置</u-button>
+				<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	export default{
+		props:{
+			showModal:{
+				type: Boolean,
+				default: false
+			}
+			
+		},
+		data(){
+			return{
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				isShow:this.showModal,
+				toggle:false,
+				list:['未指定','现金','月结','挂账','支付宝','微信支付','银行刷卡','银行汇款','待收','托收','农银e管家','农银e管家(代付)','市场通企业支付','市场通个人支付']
+			}
+		},
+		methods:{
+			
+		},
+		watch:{
+			//  父页面传过来的弹框状态
+			showModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.modal-box{
+		width: 100%;
+		.modal-con{
+			padding:20upx;
+			overflow: hidden;
+			.list{
+				width: 46%;
+				text-align: center;
+				line-height: 70rpx;
+				height: 70rpx;
+				border-radius: 38rpx;
+				margin-bottom: 20rpx;
+				background:#f0f0f0;
+				font-size: 26rpx;
+			}
+		}
+		.showMore{
+			text-align: center;
+			margin-top: 30rpx;
+			text{
+				margin-right: 10rpx;
+			}
+		}
+		
+		.form-footer-btn {
+			display: flex;
+			padding: 20upx;
+			margin-top: 180upx;
+			.handle-btn {
+				font-size: 28upx;
+				margin: 0 30upx;
+				width: 100%;
+				flex: 1;
+			}
+		}
+	}
+</style>

+ 45 - 16
pages/sales/salesDetail.vue

@@ -18,7 +18,7 @@
 			<view class="sales-product-header">
 				<u-tabs :show-bar="false" :active-item-style="activeItemStyle" :list="tabsList" :is-scroll="false" :current="current" @change="changeTabs"></u-tabs>
 			</view>
-			<view class="flex flex_column">
+			<view class="flex flex_column" v-show="current == 0">
 			<!-- 合计 -->
 			<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'}">
@@ -70,23 +70,37 @@
 				</scroll-view>
 			</view>
 			</view>
-		</view>
-		<!-- 操作按钮 -->
-		<!-- <view class="sales-btn-box" v-if="detailData&&detailData.billStatus!='FINISH'">
-			<view v-if="pageData.type=='edit'" class="flex align_center justify_between">
-				<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleDel()">整单删除</u-button>
-				<u-button class="handle-btn search-btn" shape="circle" @click="handleSubmit" size="medium" hover-class="none" :custom-style="customBtnStyle">提交</u-button>
+			<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">
+						<view class="sales-list-l">
+							<view>2022-11-30 9:12:25</view>
+							<view>微信支付(线上)</view>
+						</view>
+						<view class="sales-list-r income" >
+							+¥32.00
+						</view>
+					</view>
+					<view v-if="false">
+						<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: 20upx;">
+						<u-loadmore v-if="totalNum>listData.length || status=='loading'" :status="status" />
+					</view>
+				</scroll-view>
 			</view>
-			<u-button v-if="pageData.type=='detail' && (detailData&&detailData.billStatus !== 'CANCEL' && detailData.billStatus !== 'FINISH' && detailData.billStatus != 'WAIT_OUT_WAREHOUSE')" class="edit-btn" shape="circle" @click="goPage" size="medium" hover-class="none" :custom-style="customBtnStyle">编辑</u-button>
-		</view> -->
+			</view>
+		</view>
 		<!-- 基础信息 -->
 		<orderInfoModal :openModal="infoModal" :infoData="detailData" @close="infoModal=false" />
-		<!-- 折扣 -->
-		<discountModal :openModal="discountModal" :infoData="detailData" :amount="detailData&&detailData.discountAmount" @confirm="discountConfirm" @close="discountModal=false" />
-		<!-- 删除产品/整单删除弹框 -->
-		<common-modal :openModal="commonModal" :content="modalText" @confirm="handleCommon" @cancel="handleCancel" @close="commonModal=false" />
-		<!-- 添加/编辑产品 -->
-		<productModal :openModal="openProductModal" :infoData="productInfo" @confirm="productConfirm" @close="openProductModal=false" />
 	</view>
 </template>
 
@@ -449,7 +463,7 @@
 				flex-grow: 1;
 				.sales-list-con{
 					.sales-list-item{
-						padding: 20upx 0;
+						padding: 20upx;
 						.pimgs{
 							margin-right: 20upx;
 							position: relative;
@@ -485,6 +499,21 @@
 						.btn-box{
 							padding: 30upx 30upx;
 						}
+						.sales-list-l{
+							font-size: 20rpx;
+							view{
+								&:last-child{
+									font-size: 26rpx;
+									margin-top:10rpx;
+								}
+							}
+						}
+						.sales-list-r.spending{
+							color:$uni-color-error;
+						}
+						.sales-list-r.income{
+							color:$uni-color-success;
+						}
 					}
 					.sales-list-item:last-child{
 						border: none;

BIN
static/default/navIcon/dayImg.png


BIN
static/default/navIcon/monthImg.png