chenrui %!s(int64=3) %!d(string=hai) anos
pai
achega
cd24e70521
Modificáronse 6 ficheiros con 499 adicións e 220 borrados
  1. 8 0
      api/sales.js
  2. 3 1
      pages.json
  3. 6 189
      pages/sales/index.vue
  4. 47 30
      pages/sales/list.vue
  5. 238 0
      pages/sales/listComponent.vue
  6. 197 0
      pages/sales/salesSearch.vue

+ 8 - 0
api/sales.js

@@ -54,4 +54,12 @@ export const dealerProductList = (params) => {
     data: params,
     method: 'post'
   })
+}
+//  结算方式列表
+export const settleStyleQueryAll = (params) => {
+  return axios.request({
+    url: 'settleStyle/findAll',
+    data: params,
+    method: 'post'
+  })
 }

+ 3 - 1
pages.json

@@ -204,7 +204,9 @@
 			"path": "pages/sales/list", // 销售列表
 			"style": {
 				"navigationBarTitleText": "销售单",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": false,
+				"navigationStyle":"custom",
+				"navigationBarTextStyle": "white"
 			}
 		},
 		{

+ 6 - 189
pages/sales/index.vue

@@ -37,61 +37,18 @@
 				<text class="title-name">销售单</text>
 				<view class="title-all" @click="toPage('/pages/sales/list')">查看全部<u-icon name="arrow-right" color="#666" size="28"></u-icon></view>
 			</view>
-			<scroll-view class="sales-list-con" scroll-y @scrolltolower="onreachBottom">
-				<view class="sales-list-main">
-					<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id" @click="getDetail(item)">
-						<view class="list-item-tit">
-							<view class="u-line" :style="{backgroundColor: $config('primaryColor')}"></view>{{item.buyerName}}
-						</view>
-						<view class="list-item-con">
-							<view class="list-item-line flex align_center justify_between">
-								<view>
-									<view style="display: inline-block;margin-right: 6upx;">{{item.salesBillNo}}</view>
-									<u-tag v-if="item.oosFlag==1" text="急件" :bg-color="$config('errorColor')" mode="dark" shape="circle" size="mini" style="margin-right: 6upx;vertical-align: text-top;" />
-									<u-tag v-if="item.salesBillSourceDictValue" :text="item.salesBillSourceDictValue" :bg-color="$config('primaryColor')" mode="dark" shape="circle" size="mini" style="vertical-align: text-top;" />
-								</view>
-								<view class="color_6 font_13">{{item.createDate || '--'}}</view>
-							</view>
-							<view class="list-item-line flex align_center justify_between">
-								<view>总款数:<text>{{toThousands(item.totalCategory||0)}}</text></view>
-								<view>总数量:<text>{{toThousands(item.totalQty||0)}}</text></view>
-								<view>总售价:<text>{{toThousands(item.totalAmount||0, 2)}}</text></view>
-							</view>
-							<view class="list-item-line flex align_center justify_between">
-								<view class="flex_1">财务状态:<text>{{item.financialStatusDictValue||'--'}}</text></view>
-								<view class="flex_1">收款方式:<text>{{item.settleStyleEntity&&item.settleStyleEntity.name||'--'}}</text></view>
-							</view>
-						</view>
-						<view class="button-box">
-							<u-button @click="handleFun('audit', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_AUDIT'">审核</u-button>
-							<u-button @click="handleFun('out', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE'">出库</u-button>
-							<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'WAIT_SUBMIT' || item.billStatus == 'AUDIT_REJECT'))">编辑</u-button>
-							<u-button @click="handleFun('del', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && item.billStatus != 'FINISH')">删除</u-button>
-							<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">改单</u-button>
-							<u-button @click="handleFun('cancel', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">取消</u-button>
-						</view>
-					</view>
-					<view v-if="listData && listData.length == 0">
-						<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
-					</view>
-				</view>
-			</scroll-view>
+			<!-- 销售单列表 -->
+			<listComponent height="458" />
 		</view>
-		<!-- 审核弹框 -->
-		<common-modal :openModal="auditModal" content="请点击下方按钮确认操作" confirmText="审核通过" cancelText="审核不通过" :isClose="true" @confirm="handleAudit('WAIT_OUT_WAREHOUSE')" @cancel="handleAudit('AUDIT_REJECT')" @close="auditModal=false" />
-		<!-- 出库弹框 -->
-		<common-modal :openModal="outModal" content="确认要出库吗?" @confirm="handleOut" @close="outModal=false" />
-		<!-- 删除/取消弹框 -->
-		<common-modal :openModal="delModal" :content="delText" @confirm="handleDel" @close="delModal=false" />
 	</view>
 </template>
 
 <script>
-	import commonModal from '@/pages/common/commonModal.vue'
+	import ListComponent from './listComponent.vue'
 	import { toThousands } from '@/libs/tools'
-	import { bizData, salesList, salesWriteAudit, salesWriteStockOut, salesDel } from '@/api/sales'
+	import { bizData } from '@/api/sales'
 	export default{
-		components: { commonModal },
+		components: { ListComponent },
 		data(){
 			return{
 				tabNav: [
@@ -101,18 +58,7 @@
 				],
 				navInd: 0,
 				bizData: null, // 销售数据统计
-				theme: '',
-				listData: [],
-				pageNo: 1,
-				pageSize: 6,
-				totalNum: 0,
-				noDataText: '暂无数据',
-				toThousands,
-				auditModal: false,  // 审核弹框
-				dataInfo: null,
-				outModal: false,  // 出库弹框
-				delModal: false,  // 删除/取消弹框
-				delText: '确认要删除吗?'
+				theme: ''
 			}
 		},
 		onLoad() {
@@ -120,37 +66,8 @@
 		},
 		onShow() {
 			this.getBizData()
-			this.getList()
 		},
 		methods:{
-			// 列表
-			getList(pageNo){
-				const _this = this
-				if (pageNo) {
-					this.pageNo = pageNo
-				}
-				salesList({ pageNo: this.pageNo, pageSize: this.pageSize }).then(res => {
-					if (res.status == 200) {
-						if(this.pageNo>1){
-							this.listData = this.listData.concat(res.data.list || [])
-						}else{
-							this.listData = res.data.list || []
-						}
-						this.totalNum = res.data.count || 0
-					} else {
-						this.listData = []
-						this.totalNum = 0
-						this.noDataText = res.message
-					}
-				})
-			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-				if(this.listData.length < this.totalNum){
-					this.pageNo += 1
-					this.getList()
-				}
-			},
 			seleteTime(val){
 				this.navInd = val
 			},
@@ -165,62 +82,6 @@
 						this.bizData = null
 					}
 				})
-			},
-			// 查看详情
-			getDetail(data){},
-			// 操作
-			handleFun(type, data){
-				this.dataInfo = data
-				if(type == 'audit'){  // 审核
-					this.auditModal = true
-				}else if(type == 'out'){  // 出库
-					this.outModal = true
-				}else if(type == 'del'){  // 删除
-					this.delText = '确认要删除吗?'
-					this.delModal = true
-				}else if(type == 'cancel'){  // 取消
-					this.delText = '确认要取消吗?'
-					this.delModal = true
-				}
-			},
-			// 审核通过或不通过
-			handleAudit(billStatus){
-				salesWriteAudit({
-					id: this.dataInfo.id,
-					billStatus: billStatus
-				}).then(res => {
-					if (res.status == 200) {
-						this.toashMsg(res.message)
-						this.getList(1)
-						this.auditModal = false
-					} else {
-						this.auditModal = false
-					}
-				})
-			},
-			// 出库
-			handleOut(){
-				salesWriteStockOut({ salesBillSn: this.dataInfo.salesBillSn }).then(res => {
-					if (res.status == 200) {
-						this.toashMsg(res.message)
-						this.getList(1)
-						this.outModal = false
-					} else {
-						this.outModal = false
-					}
-				})
-			},
-			// 删除
-			handleDel(){
-				salesDel({ id: this.dataInfo.id }).then(res => {
-					if (res.status == 200) {
-						this.toashMsg(res.message)
-						this.getList(1)
-						this.delModal = false
-					} else {
-						this.delModal = false
-					}
-				})
 			}
 		}
 	}
@@ -313,50 +174,6 @@
 					color: #666;
 				}
 			}
-			.sales-list-con{
-				height: calc(100vh - 458upx);
-				.sales-list-main{
-					.sales-list-item{
-						background: #ffffff;
-						padding: 20upx;
-						margin-bottom: 25upx;
-						border-radius: 25upx;
-						box-shadow: 1px 1px 3px #EEEEEE;
-						.list-item-tit{
-							padding-bottom: 12upx;
-							border-bottom: 1px dashed #e4e7ed;
-							white-space: nowrap;
-							overflow: hidden;
-							text-overflow: ellipsis;
-							.u-line{
-								display: inline-block;
-								width: 6upx;
-								height: 40upx;
-								background-color: red;
-								vertical-align: bottom;
-								margin: 0 20upx 0 10upx;
-							}
-						}
-						.list-item-con{
-							padding: 10upx 0;
-							.list-item-line{
-								padding: 8upx 0;
-							}
-							text{
-								color: #666;
-							}
-						}
-						.button-box{
-							text-align: right;
-							padding-top: 10upx;
-							border-top: 1px dashed #e4e7ed;
-							button{
-								margin: 0 10upx;
-							}
-						}
-					}
-				}
-			}
 		}
 	}
 </style>

+ 47 - 30
pages/sales/list.vue

@@ -1,15 +1,31 @@
 <template>
 	<view class="sales-list-wrap">
-		<u-dropdown>
-			<u-dropdown-item v-model="billStatus" title="业务状态" :options="billStatusOpt"></u-dropdown-item>
+		<!-- 标题 -->
+		<u-navbar title="销售单" :safeAreaInsetTop="false" :border-bottom="true">
+			<view class="u-nav-slot" slot="right" style="padding-right: 20rpx;">
+				<u-icon name="search" color="#999" size="28" @click="openModal=true"></u-icon>查询
+			</view>
+		</u-navbar>
+		<u-dropdown class="search-top-box">
+			<u-dropdown-item v-model="searchForm.billStatus" @change="handleChange('bill')" title="业务状态" :options="billStatusOpt"></u-dropdown-item>
+			<u-dropdown-item v-model="searchForm.financialStatus" @change="handleChange('financial')" title="财务状态" :options="financialStatusOpt"></u-dropdown-item>
 		</u-dropdown>
+		<!-- 销售单列表 -->
+		<view class="list-box">
+			<listComponent ref="salesList" height="80" :params="searchParams" />
+		</view>
+		<!-- 查询右侧弹框 -->
+		<salesSearch :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
 	</view>
 </template>
 
 <script>
+	import ListComponent from './listComponent.vue'
+	import SalesSearch from './salesSearch.vue'
 	import { getLookUpItem } from '@/api/data'
 	import { salesList } from '@/api/sales'
 	export default{
+		components: { ListComponent, SalesSearch },
 		data(){
 			return{
 				listData: [],
@@ -17,47 +33,38 @@
 				pageSize: 6,
 				totalNum: 0,
 				noDataText: '暂无数据',
-				billStatus: undefined,
-				financialStatus: undefined,
 				billStatusOpt: [],
 				financialStatusOpt: [],
+				searchForm: {
+					billStatus: null,
+					financialStatus: null
+				},
+				searchParams: {},
+				openModal: false
 			}
 		},
 		onLoad() {
 			this.getLookUpItem('SALES_BILL_STATUS')
 			this.getLookUpItem('FINANCIAL_RECEIVE_STATUS')
-			this.getList()
 		},
 		methods: {
-			// 列表
-			getList(pageNo){
+			// 获取查询参数 刷新列表
+			refresh(params){
 				const _this = this
-				if (pageNo) {
-					this.pageNo = pageNo
-				}
-				salesList({ pageNo: this.pageNo, pageSize: this.pageSize }).then(res => {
-					if (res.status == 200) {
-						if(this.pageNo>1){
-							this.listData = this.listData.concat(res.data.list || [])
-						}else{
-							this.listData = res.data.list || []
-						}
-						this.totalNum = res.data.count || 0
-					} else {
-						this.listData = []
-						this.totalNum = 0
-						this.noDataText = res.message
-					}
+				this.searchParams = Object.assign(params, this.searchForm)
+				this.$nextTick(function(){
+					_this.$refs.salesList.getList(1)
 				})
 			},
-			// scroll-view到底部加载更多
-			onreachBottom() {
-				if(this.listData.length < this.totalNum){
-					this.pageNo += 1
-					this.getList()
+			// 状态  change
+			handleChange(type){
+				if(type == 'bill'){
+					this.searchParams.billStatus = this.searchForm.billStatus
+				}else if(type == 'financial'){
+					this.searchParams.financialStatus = this.searchForm.financialStatus
 				}
+				this.$refs.salesList.getList(1)
 			},
-			handleChange(){},
 			// 配送方式
 			getLookUpItem (type) {
 				getLookUpItem({ lookupCode: type, pageNo: 1, pageSize: 1000 }).then(res => {
@@ -66,6 +73,7 @@
 							item.label = item.dispName
 							item.value = item.code
 						})
+						res.data.list.splice(0, 0, { label: '全部', value: null })
 						if(type == 'SALES_BILL_STATUS'){
 							this.billStatusOpt = res.data.list
 						}else if(type == 'FINANCIAL_RECEIVE_STATUS'){
@@ -84,5 +92,14 @@
 	}
 </script>
 
-<style>
+<style lang="scss">
+	.sales-list-wrap{
+		width: 100%;
+		.search-top-box{
+			background-color: #fff;
+		}
+		.list-box{
+			padding: 20upx 20upx;
+		}
+	}
 </style>

+ 238 - 0
pages/sales/listComponent.vue

@@ -0,0 +1,238 @@
+<template>
+	<view class="sales-list-component">
+		<scroll-view class="sales-list-con" :style="{height: scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
+			<view class="sales-list-main">
+				<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id" @click="getDetail(item)">
+					<view class="list-item-tit">
+						<view class="u-line" :style="{backgroundColor: $config('primaryColor')}"></view>{{item.buyerName}}
+					</view>
+					<view class="list-item-con">
+						<view class="list-item-line flex align_center justify_between">
+							<view>
+								<view style="display: inline-block;margin-right: 6upx;">{{item.salesBillNo}}</view>
+								<u-tag v-if="item.oosFlag==1" text="急件" :bg-color="$config('errorColor')" mode="dark" shape="circle" size="mini" style="margin-right: 6upx;vertical-align: text-top;" />
+								<u-tag v-if="item.salesBillSourceDictValue" :text="item.salesBillSourceDictValue" :bg-color="$config('primaryColor')" mode="dark" shape="circle" size="mini" style="vertical-align: text-top;" />
+							</view>
+							<view class="color_6 font_13">{{item.createDate || '--'}}</view>
+						</view>
+						<view class="list-item-line flex align_center justify_between">
+							<view>总款数:<text>{{toThousands(item.totalCategory||0)}}</text></view>
+							<view>总数量:<text>{{toThousands(item.totalQty||0)}}</text></view>
+							<view>总售价:<text>{{toThousands(item.totalAmount||0, 2)}}</text></view>
+						</view>
+						<view class="list-item-line flex align_center justify_between">
+							<view class="flex_1">财务状态:<text>{{item.financialStatusDictValue||'--'}}</text></view>
+							<view class="flex_1">收款方式:<text>{{item.settleStyleEntity&&item.settleStyleEntity.name||'--'}}</text></view>
+						</view>
+					</view>
+					<view class="button-box">
+						<u-button @click="handleFun('audit', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_AUDIT'">审核</u-button>
+						<u-button @click="handleFun('out', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE'">出库</u-button>
+						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'WAIT_SUBMIT' || item.billStatus == 'AUDIT_REJECT'))">编辑</u-button>
+						<u-button @click="handleFun('del', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && item.billStatus != 'FINISH')">删除</u-button>
+						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">改单</u-button>
+						<u-button @click="handleFun('cancel', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">取消</u-button>
+					</view>
+				</view>
+				<view v-if="listData && listData.length == 0">
+					<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
+				</view>
+			</view>
+		</scroll-view>
+		<!-- 审核弹框 -->
+		<common-modal :openModal="auditModal" content="请点击下方按钮确认操作" confirmText="审核通过" cancelText="审核不通过" :isClose="true" @confirm="handleAudit('WAIT_OUT_WAREHOUSE')" @cancel="handleAudit('AUDIT_REJECT')" @close="auditModal=false" />
+		<!-- 出库弹框 -->
+		<common-modal :openModal="outModal" content="确认要出库吗?" @confirm="handleOut" @close="outModal=false" />
+		<!-- 删除/取消弹框 -->
+		<common-modal :openModal="delModal" :content="delText" @confirm="handleDel" @close="delModal=false" />
+	</view>
+</template>
+
+<script>
+	import commonModal from '@/pages/common/commonModal.vue'
+	import { toThousands } from '@/libs/tools'
+	import { salesList, salesWriteAudit, salesWriteStockOut, salesDel } from '@/api/sales'
+	export default{
+		components: { commonModal },
+		props: {
+			height: {  // 非滚动区域高度   upx
+				type: String || Number,
+				default: 300
+			},
+			params: {  // 列表查询条件
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		data(){
+			return{
+				listData: [],
+				pageNo: 1,
+				pageSize: 6,
+				totalNum: 0,
+				noDataText: '暂无数据',
+				toThousands,
+				auditModal: false,  // 审核弹框
+				dataInfo: null,
+				outModal: false,  // 出库弹框
+				delModal: false,  // 删除/取消弹框
+				delText: '确认要删除吗?'
+			}
+		},
+		computed: {
+			scrollH(){
+				const winH = window.innerHeight * 2
+				return winH - this.height
+			}
+		},
+		mounted() {
+			this.getList()
+		},
+		methods:{
+			// 列表
+			getList(pageNo){
+				const _this = this
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				let params = {
+					pageNo: this.pageNo,
+					pageSize: this.pageSize
+				}
+				salesList(Object.assign(params, this.params)).then(res => {
+					if (res.status == 200) {
+						if(this.pageNo>1){
+							this.listData = this.listData.concat(res.data.list || [])
+						}else{
+							this.listData = res.data.list || []
+						}
+						this.totalNum = res.data.count || 0
+					} else {
+						this.listData = []
+						this.totalNum = 0
+						this.noDataText = res.message
+					}
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.listData.length < this.totalNum){
+					this.pageNo += 1
+					this.getList()
+				}
+			},
+			// 查看详情
+			getDetail(data){},
+			// 操作
+			handleFun(type, data){
+				this.dataInfo = data
+				if(type == 'audit'){  // 审核
+					this.auditModal = true
+				}else if(type == 'out'){  // 出库
+					this.outModal = true
+				}else if(type == 'del'){  // 删除
+					this.delText = '确认要删除吗?'
+					this.delModal = true
+				}else if(type == 'cancel'){  // 取消
+					this.delText = '确认要取消吗?'
+					this.delModal = true
+				}
+			},
+			// 审核通过或不通过
+			handleAudit(billStatus){
+				salesWriteAudit({
+					id: this.dataInfo.id,
+					billStatus: billStatus
+				}).then(res => {
+					if (res.status == 200) {
+						this.toashMsg(res.message)
+						this.getList(1)
+						this.auditModal = false
+					} else {
+						this.auditModal = false
+					}
+				})
+			},
+			// 出库
+			handleOut(){
+				salesWriteStockOut({ salesBillSn: this.dataInfo.salesBillSn }).then(res => {
+					if (res.status == 200) {
+						this.toashMsg(res.message)
+						this.getList(1)
+						this.outModal = false
+					} else {
+						this.outModal = false
+					}
+				})
+			},
+			// 删除
+			handleDel(){
+				salesDel({ id: this.dataInfo.id }).then(res => {
+					if (res.status == 200) {
+						this.toashMsg(res.message)
+						this.getList(1)
+						this.delModal = false
+					} else {
+						this.delModal = false
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.sales-list-component{
+		.color_6{
+			color: #666;
+		}
+		.font_13{
+			font-size: 26upx;
+		}
+		.sales-list-con{
+			.sales-list-main{
+				.sales-list-item{
+					background: #ffffff;
+					padding: 20upx;
+					margin-bottom: 25upx;
+					border-radius: 25upx;
+					box-shadow: 1px 1px 3px #EEEEEE;
+					.list-item-tit{
+						padding-bottom: 12upx;
+						border-bottom: 1px dashed #e4e7ed;
+						white-space: nowrap;
+						overflow: hidden;
+						text-overflow: ellipsis;
+						.u-line{
+							display: inline-block;
+							width: 6upx;
+							height: 40upx;
+							background-color: red;
+							vertical-align: bottom;
+							margin: 0 20upx 0 10upx;
+						}
+					}
+					.list-item-con{
+						padding: 10upx 0;
+						.list-item-line{
+							padding: 8upx 0;
+						}
+						text{
+							color: #666;
+						}
+					}
+					.button-box{
+						text-align: right;
+						padding-top: 10upx;
+						border-top: 1px dashed #e4e7ed;
+						button{
+							margin: 0 10upx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 197 - 0
pages/sales/salesSearch.vue

@@ -0,0 +1,197 @@
+<template>
+	<view class="salesSearch-wrap">
+		<u-popup v-model="isShow" class="search-popup" mode="right" @close="isShow=false" length="85%">
+			<view class="search-title">筛选</view>
+			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
+				<u-form-item label="创建时间" prop="date" class="form-item">
+					<u-input clearable v-model="form.date" disabled placeholder="请选择创建时间区间" class="form-item-inp" @click="showDate=true" />
+					<u-icon v-show="form.date.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearTime"></u-icon>
+				</u-form-item>
+				<u-form-item label="客户名称" prop="buyerName" class="form-item">
+					<u-input v-model="form.buyerName" :maxlength="30" placeholder="请输入客户名称" />
+				</u-form-item>
+				<u-form-item label="销售单号" prop="salesBillNo" class="form-item">
+					<u-input v-model="form.salesBillNo" :maxlength="30" placeholder="请输入销售单号" />
+				</u-form-item>
+				<u-form-item label="采购单号" prop="purchaseBillNo" class="form-item">
+					<u-input v-model="form.purchaseBillNo" :maxlength="30" placeholder="请输入采购单号" />
+				</u-form-item>
+				<u-form-item label="收款方式" prop="settleStyleSn" class="form-item">
+					<u-input v-model="settleStyleName" @click="settleStyleModal=true" disabled placeholder="请选择收款方式" class="form-item-inp" />
+					<u-icon v-show="settleStyleName.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearSettleStyle"></u-icon>
+				</u-form-item>
+			</u-form>
+			<view class="uni-list-btns">
+				<u-button class="handle-btn" size="medium" hover-class="none" @click="resetForm">重置</u-button>
+				<u-button class="handle-btn search-btn" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+			</view>
+		</u-popup>
+		<!-- 选择日期范围 -->
+		<u-calendar v-model="showDate" @change="dateChange" mode="range"></u-calendar>
+		<!-- 选择收款方式 -->
+		<u-picker v-model="settleStyleModal" @confirm="settleStyleChange" :range="settleStyleList" range-key="name" mode="selector"></u-picker>
+	</view>
+</template>
+
+<script>
+	import { settleStyleQueryAll } from '@/api/sales'
+	export default{
+		props: {
+			openModal: { //  弹框显示状态
+				type: Boolean,
+				default: false
+			},
+			defaultParams: {  //  默认筛选条件
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		data(){
+			return{
+				isShow: this.openModal,
+				form: {
+					date: '',
+					beginDate: '',
+					endDate: '',
+					buyerName: '', //  客户名称
+					salesBillNo: '', //  销售单号
+					purchaseBillNo: '', //  采购单号
+					settleStyleSn: undefined //  收款方式
+				},
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				showDate: false, // 是否显示时间弹窗
+				settleStyleName: '',
+				settleStyleModal: false,
+				settleStyleList: []
+			}
+		},
+		mounted() {
+			this.init()
+			this.getTypeList()
+		},
+		methods: {
+			//  初始化数据
+			init(){
+				if(this.defaultParams.beginDate && this.defaultParams.endDate){
+					this.form.date = this.defaultParams.beginDate + ' ~ ' + this.defaultParams.endDate
+				}else{
+					this.form.date = ''
+				}
+				this.beginDate = this.defaultParams.beginDate ? this.defaultParams.beginDate : ''
+				this.endDate = this.defaultParams.endDate ? this.defaultParams.endDate : ''
+				this.form.buyerName = this.defaultParams.buyerName ? this.defaultParams.buyerName : ''
+				this.form.salesBillNo = this.defaultParams.salesBillNo ? this.defaultParams.salesBillNo : ''
+				this.form.purchaseBillNo = this.defaultParams.purchaseBillNo ? this.defaultParams.purchaseBillNo : ''
+				this.form.settleStyleSn = this.defaultParams.settleStyleSn ? this.defaultParams.settleStyleSn : ''
+			},
+			// 查询
+			handleSearch() {
+				let params = JSON.parse(JSON.stringify(this.form))
+				delete params.date
+				this.$emit('refresh', params)
+				this.isShow = false
+			},
+			// 重置
+			resetForm() {
+				this.settleStyleName = ''
+				this.form.beginDate = ''
+				this.form.endDate = ''
+				this.$refs.uForm.resetFields()
+				this.$emit('refresh', {})
+				this.isShow = false
+			},
+			//  清空收款方式
+			clearSettleStyle(){
+				this.settleStyleName = ''
+				this.form.settleStyleSn = undefined
+			},
+			// 收款方式  change
+			settleStyleChange(ind){
+				this.form.settleStyleSn = this.settleStyleList[ind].settleStyleSn || undefined
+				this.settleStyleName = this.settleStyleList[ind].name || ''
+			},
+			// 收款方式
+			getTypeList () {
+				settleStyleQueryAll({}).then(res => {
+					if (res.status == 200 && res.data) {
+						this.settleStyleList = res.data
+						// 收款方式有值时,匹配对应name
+						if(this.defaultParams.settleStyleSn || this.defaultParams.settleStyleSn==0){
+							this.settleStyleList.map(item => {
+								if(item.settleStyleSn == this.defaultParams.settleStyleSn){
+									this.settleStyleName = item.name
+								}
+							})
+						}
+					} else {
+						this.settleStyleList = []
+					}
+				})
+			},
+			// 时间  change
+			dateChange(date){
+				this.form.date = date.startDate + ' ~ ' + date.endDate
+				this.form.beginDate = date.startDate
+				this.form.endDate = date.endDate
+			},
+			//  清空创建时间
+			clearTime(){
+				this.form.date = ''
+				this.form.beginDate = ''
+				this.form.endDate = ''
+			}
+		},
+		watch: {
+			//  父页面传过来的弹框状态
+			openModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.salesSearch-wrap{
+		.search-popup {
+			.search-title {
+				text-align: center;
+				padding: 18upx 22upx;
+				color: #333;
+				border-bottom: 1px solid #eee;
+			}
+			.form-content {
+				display: block;
+				padding: 0 20upx;
+				box-sizing: content-box;
+				.form-item-inp{
+					display: inline-block;
+					width: 88%;
+					vertical-align: top;
+				}
+			}
+			.uni-list-btns {
+				display: flex;
+				padding: 20upx;
+				margin-top: 200upx;
+				.handle-btn {
+					font-size: 28upx;
+					margin: 0 30upx;
+					width: 100%;
+					flex: 1;
+				}
+			}
+		}
+	}
+</style>