소스 검색

货架设置

lilei 2 년 전
부모
커밋
55985324a5
7개의 변경된 파일249개의 추가작업 그리고 72개의 파일을 삭제
  1. 10 1
      pages.json
  2. 21 18
      pages/index/index.vue
  3. 14 3
      pages/latePlay/chooseBulk.vue
  4. 1 1
      pages/replenishmentManage/manualPrint.vue
  5. 12 47
      pages/sales/addCustomer.vue
  6. 1 2
      pages/sales/index.vue
  7. 190 0
      pages/shelfSetting/shelfList.vue

+ 10 - 1
pages.json

@@ -47,7 +47,7 @@
             "path" : "pages/latePlay/chooseBulk",
             "style" :                                                                                    
             {
-                "navigationBarTitleText": "选择货",
+                "navigationBarTitleText": "选择货",
                 "enablePullDownRefresh": false
             }
         }
@@ -340,6 +340,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/shelfSetting/shelfList",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "选择货架",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 21 - 18
pages/index/index.vue

@@ -12,14 +12,18 @@
 					 <u-icon name="huowu-tuihui" custom-prefix="iscm-icon" size="70"></u-icon>
 				 </div>
 				 <div class="title">调回管理</div>
-				 <div>商品调回记录查询</div>
 			 </div>
 			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
 				 <div class="icon">
-				 	<u-icon name="icon_remark" custom-prefix="iscm-icon" size="70"></u-icon>
+				 	<u-icon name="icon_remark" custom-prefix="iscm-icon" size="65"></u-icon>
 				 </div>
 				 <div class="title">补打贴签</div>
-				 <div>遗漏标签快捷处理</div>
+			 </div>
+			 <div class="graid-box-1" @click="toPage('/pages/shelfSetting/shelfList')">
+				 <div class="icon">
+					<u-icon name="ison_shelf" custom-prefix="iscm-icon" size="65"></u-icon>
+				 </div>
+				 <div class="title">货架设置</div>
 			 </div>
 			 <div class="graid-box-1" @click="toPage('/pages/approveStore/list')">
 				 <div class="icon">
@@ -27,11 +31,15 @@
 					<u-badge type="error" size="mini" :offset="[-5,20]" :count="storeAuthNums"></u-badge>
 				 </div>
 				 <div class="title">门店审核</div>
-				 <div>审核门店的认证申请</div>
+			 </div>
+			 <div class="graid-box-1" @click="toPage('/pages/latePlay/chooseBulk')">
+				 <div class="icon">
+					<u-icon name="icon_warehousing" custom-prefix="iscm-icon" size="65"></u-icon>
+				 </div>
+				 <div class="title">库存盘点</div>
 			 </div>
 			 <!-- <div class="graid-box-1" @click="toPage('/pages/index/printAbc')">
 				 <div class="title">打印ABC</div>
-				 <div>遗漏标签快捷处理</div>
 			 </div> -->
 		 </div>
 	</view>
@@ -130,12 +138,15 @@
 		.graid-box{
 			display: flex;
 			align-items: center;
+			flex-wrap: wrap;
+			background-color: #ffffff;
+			border-radius: 30upx;
+			padding: 10upx 20upx;
+			box-shadow: 3upx 2upx 6upx #eee;
+			
 			.graid-box-1{
-				background-color: #ffffff;
-				border-radius: 30upx;
-				box-shadow: 3upx 2upx 6upx #eee;
-				padding: 30rpx;
-				width: 50%;
+				padding: 30rpx 0;
+				width: 25%;
 				font-size: 24rpx;
 				color: #424D5E;
 				text-align: center;
@@ -149,14 +160,6 @@
 					position: relative;
 				}
 			}
-			> div{
-				&:first-child{
-					margin-right: 15rpx;
-				}
-				&:last-child{
-					margin-left: 15rpx;
-				}
-			}
 		}
 		.panel-box {
 			background-color: #ffffff;

+ 14 - 3
pages/latePlay/chooseBulk.vue

@@ -2,7 +2,7 @@
 	<view class="moreShelfPart flex flex_column">
 		<view class="moreShelfPart-search">
 			<u-search
-			placeholder="请输入货名称搜索" 
+			placeholder="请输入货名称搜索" 
 			v-model="shelfName" 
 			:show-action="isGobleSearch" 
 			@focus="isGobleSearch=true"
@@ -25,10 +25,13 @@
 						</view>
 						<view class="item-detail">
 							<text class="item-detail-text">
-								{{item.customerEntity&&item.customerEntity.provinceName}}{{item.customerEntity&&item.customerEntity.cityName}}{{item.customerEntity&&item.customerEntity.countyName}}{{item.customerEntity&&item.customerEntity.customerAddr}}
+								地址:{{item.customerEntity&&item.customerEntity.provinceName}}{{item.customerEntity&&item.customerEntity.cityName}}{{item.customerEntity&&item.customerEntity.countyName}}{{item.customerEntity&&item.customerEntity.customerAddr}}
 							</text>
 						</view>
 					</view>
+					<view class="arrow">
+						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
+					</view>
 				</view>
 				<view v-if="shelfList&&shelfList.length==0">
 					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" mode="list" :margin-top="50"></u-empty>
@@ -98,7 +101,7 @@
 							this.total = 0
 							_this.status = 'nomore'
 						}
-						_this.noDataText = '暂无配件'
+						_this.noDataText = '暂无货架'
 					}else{
 						_this.status = 'loadmore'
 						_this.shelfList = []
@@ -149,6 +152,14 @@
 				padding:20upx 10upx;
 				border-bottom: 2rpx solid #f5f5f5;
 				display: flex;
+				align-items: center;
+				&:active{
+					background: #f8f8f8;
+				}
+				.arrow{
+					text-align: right;
+					padding-left: 20rpx;
+				}
 				.item-info{
 					.item-name{
 						font-size: 32upx;

+ 1 - 1
pages/replenishmentManage/manualPrint.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="replenishment-manualPrint-wrap">
 		<view class="replenishment-manualPrint-body">
-			<u-alert-tips :show="!show" @close="show = false" type="warning" description="正在打印中,请勿息屏或退出应用!"></u-alert-tips>
+			<u-alert-tips :show="show" @close="show = false" type="warning" description="正在打印中,请勿息屏或退出应用!"></u-alert-tips>
 			<view class="part-list">
 				<!-- 补货产品 -->
 				<partList :list="partList" title="补货产品" model="checkbox" fromPage="manualPrint" ref="partList" noDataText="暂无产品" @allChecked="allCheckedCallback"></partList>

+ 12 - 47
pages/sales/addCustomer.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="addCustomer-content">
 		<view class="content-form">
-			<u-form :model="form" ref="uForm"  label-width="180" :error-type="['toast']">
-				<u-form-item label="客户名称" required ><u-input v-model.trim="form.customerName" placeholder="请输入客户名称(最多30个字符)" input-align="right" :maxlength="60"/></u-form-item>
-				<u-form-item label="客户地址" required >
+			<u-form :model="form" ref="uForm" label-width="150rpx" :error-type="['toast']">
+				<u-form-item label="客户名称" required prop="customerName" ><u-input v-model.trim="form.customerName" placeholder="请输入客户名称(最多30个字符)" input-align="right" :maxlength="60"/></u-form-item>
+				<u-form-item label="客户地址" required prop="provinceSn">
 					<u-input v-model="areaInfo.label" :disabled="true" input-align="right" placeholder="请选择客户地址" @click="openAddress"/>
 					<u-icon name="arrow-right" color="#C0C4CC" slot="right"  @click="openAddress"></u-icon>
 				</u-form-item>
 				<u-form-item label="详细地址">
-					<textarea :auto-height="true" input-align="right" placeholder="请输入详细地址(最多60个字符)" :maxlength="60" v-model="form.customerAddr" class="receiveAddress" placeholder-style="color:#C0C4CC;font-size:28upx;"/>
+					<u-input type="textarea" :auto-height="true" input-align="right" placeholder="请输入详细地址(最多60个字符)" :maxlength="60" v-model="form.customerAddr"/>
 				</u-form-item>
 				<u-form-item label="联系人">
 					<u-input v-model="form.contactName" input-align="right" placeholder="请输入联系人(最多20个字符)" :maxlength="20"/>
@@ -84,6 +84,12 @@
 					priceType: undefined, //  价格类型
 					settleStyleSn: undefined //  收款方式
 				},
+				rules: {
+					customerName: [{ required: true, message: '请输入客户名称', trigger: 'change' }],
+					provinceSn: [{ required: true, message: '请选择客户地址', trigger: 'change' }],
+					priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
+					settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }],
+				},
 				showSettle:false,//结算方式初始值
 				settleTypeList:[],//收款方式列表
 				settleStyleName:'',//收款方式名称
@@ -173,41 +179,6 @@
 			customerSubmit(){
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						if (this.form.customerName ==='') {
-							uni.showToast({
-								title: '请输入客户名称',
-								icon: 'none'
-							})
-							return false
-						}
-						if(this.form.contactMobile){
-							if (!isvalidPhone(this.form.contactMobile)) {
-								uni.showToast({
-									title: '请输入正确的联系手机',
-									icon: 'none'
-								})
-								return false
-							}
-						}
-						//  省市区
-						if(this.areaIdArr.length == 0){
-							uni.showToast({icon: 'none',title: '请选择客户地址'})
-							return
-						}
-						if (!this.form.priceType) {
-							uni.showToast({
-								title: '请选择价格类型',
-								icon: 'none'
-							})
-							return false
-						}
-						if (!this.form.settleStyleSn) {
-							uni.showToast({
-								title: '请选择收款方式',
-								icon: 'none'
-							})
-							return false
-						}
 						const params=Object.assign({},this.form)
 						console.log(params,'params')
 						if(this.form.id) {
@@ -254,15 +225,9 @@
 		display: flex;
 		flex-direction: column;
 		.content-form{
-			flex-grow:1;
+			flex:1;
+			padding: 0 0.5rem;
 			overflow: auto;
-			.receiveAddress{
-				width: 100%;
-				line-height: 1.5em;
-				box-sizing: border-box;
-				font-style: normal;
-				text-align: end;
-			}
 		}
 		.form-footer-btn{
 			background-color: #fff;

+ 1 - 2
pages/sales/index.vue

@@ -75,7 +75,7 @@
 		onReady() {
 			const query = uni.createSelectorQuery().in(this);
 			query.select('#tjCons').boundingClientRect(data => {
-			  this.listHeight = Math.floor(data.height + 18)
+			  this.listHeight = Math.floor(data.height + 5)
 			}).exec();
 		},
 		onLoad() {
@@ -251,7 +251,6 @@
 		}
 		.sales-list{
 			.title{
-				margin-bottom: 14upx;
 				display: flex;
 				align-items: center;
 				justify-content: space-between;

+ 190 - 0
pages/shelfSetting/shelfList.vue

@@ -0,0 +1,190 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search
+			placeholder="请输入货架名称搜索" 
+			v-model="shelfName" 
+			:show-action="isGobleSearch" 
+			@focus="isGobleSearch=true"
+			@blur="isGobleSearch=false"
+			@custom="getShelfList" 
+			@search="getShelfList" 
+			@clear="clearSearch"
+			:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
+			</u-search>
+		</view>
+		<view class="moreShelfPart-body">
+			<scroll-view
+			class="nav-right" 
+			scroll-y 
+			@scrolltolower="onreachBottom">
+				<view class="nav-right-item" v-for="(item, index) in shelfList" :key="item.id" @click="viewDetail(item)">
+					<view class="item-info">
+						<view class="item-name">
+							<text>{{item.shelfName}}</text>
+						</view>
+						<view class="item-detail">
+							<text class="item-detail-text">
+								货位数量:3
+							</text>
+							<text class="item-detail-text">
+								已绑定产品款数:3
+							</text>
+							<text class="item-detail-text">
+								设置完成:是
+							</text>
+						</view>
+					</view>
+					<view class="arrow">
+						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
+					</view>
+				</view>
+				<view v-if="shelfList&&shelfList.length==0">
+					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-if="total>pageSize || status=='loading'">
+					<u-loadmore :status="status" />
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getShelfList } from '@/api/shelf'
+	export default {
+		data() {
+			return {
+				shelfName: '',
+				isGobleSearch: false,
+				shelfList: [],
+				pageNo:1,
+				pageSize: 10,
+				total: 0, // 列表总数
+				noDataText: '暂无货架',
+				status: 'loading',
+				vinstatus: 'loading'
+			}
+		},
+		onLoad(opts) {
+			this.getShelfList()
+		},
+		methods: {
+			clearSearch(){
+				this.shelfName = ''
+				this.pageNo = 1
+				this.shelfList = []
+				this.getShelfList()
+			},
+			// 获取数字货架列表
+			getShelfList(){
+				const _this = this
+				let params = {
+				    pageNo: this.pageNo,
+				    pageSize: this.pageSize,
+					shelfName: this.shelfName
+				}
+				_this.status = 'loading'
+				getShelfList(params).then(res => {
+					uni.hideLoading()
+					if(res.status == 200){
+						let list = res.data.list
+						if (list && list.length){
+							// 分页 拼接数据
+							if (_this.pageNo != 1) {
+								_this.shelfList = _this.shelfList ? _this.shelfList.concat(list) : list
+							} else {
+								_this.shelfList = list
+							}
+							this.total = res.data.count
+							if (_this.shelfList.length == res.data.count) {
+								_this.status = 'nomore'
+							} else {
+								_this.status = 'loadmore'
+							}
+						} else {
+							_this.shelfList = list || []
+							this.total = 0
+							_this.status = 'nomore'
+							_this.noDataText = '没有查询到相关货架'
+						}
+					}else{
+						_this.status = 'loadmore'
+						_this.shelfList = []
+						_this.total = 0
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.shelfList.length < this.total ){
+					if(this.isGobleSearch&&this.shelfName==''){
+						return
+					}
+					this.pageNo++
+					this.getShelfList()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			viewDetail(item){
+				uni.navigateTo({
+					url: "/pages/latePlay/chooseProduct?shelfSn="+item.shelfSn+'&shelfName='+item.shelfName
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		width: 100%;
+		height: 100vh;
+		.moreShelfPart-search{
+			padding: 20rpx;
+			background-color: #FFFFFF;
+		}
+		.moreShelfPart-body{
+			flex-grow: 1;
+			background-color: #fff;
+		}
+		.nav-right{
+			padding: 0 30upx;
+			height: calc(100vh - 110rpx);
+			box-sizing: border-box;
+			 
+			.nav-right-item{
+				padding:20upx 10upx;
+				border-bottom: 2rpx solid #f5f5f5;
+				display: flex;
+				align-items: center;
+				&:active{
+					background: #f8f8f8;
+				}
+				.arrow{
+					text-align: right;
+					padding-left: 20rpx;
+				}
+				.item-info{
+					flex:1;
+					.item-name{
+						font-size: 30upx;
+						display: flex;
+						align-items: center;
+					}
+					.item-detail{
+						margin-top: 10rpx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						.item-detail-text{
+							font-size: 26upx;
+							color: #9DA8B5;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>