lilei 3 år sedan
förälder
incheckning
c64362e7b7

+ 4 - 0
.hbuilderx/launch.json

@@ -10,6 +10,10 @@
      	{
      	{
      		"launchtype" : "local"
      		"launchtype" : "local"
      	},
      	},
+     	"h5" : 
+     	{
+     		"launchtype" : "local"
+     	},
      	"type" : "uniCloud"
      	"type" : "uniCloud"
      }
      }
     ]
     ]

+ 161 - 3
App.vue

@@ -41,12 +41,170 @@
 		display: flex;
 		display: flex;
 		background-color: #F8F8F8;
 		background-color: #F8F8F8;
 	}
 	}
-	.isIPXup{
-		padding-bottom: 64rpx !important;
-	}
 	/* 登录页是否记住密码多选框样式 */
 	/* 登录页是否记住密码多选框样式 */
 	uni-checkbox.login-form-checkbox .uni-checkbox-input{
 	uni-checkbox.login-form-checkbox .uni-checkbox-input{
 		width: 24upx !important;
 		width: 24upx !important;
 		height: 24upx !important;
 		height: 24upx !important;
 	}
 	}
+	.isIPXup{
+		padding-bottom: 64rpx !important;
+	}
+	/*  form表单样式 */
+	.form-box{
+		background-color: #fff;
+		padding: 0 30rpx;
+	}
+	.form-input {
+		font-size: 28rpx;
+		color: #333;
+		text-align: right;
+		width: 95%;
+		box-sizing: border-box;
+		height: 60rpx;
+		line-height: 60rpx;
+		&.textarea{
+			height: 240rpx;
+			padding: 24rpx 0;
+			text-align: left;
+		}
+	}
+	
+	.form-input-placeholder {
+		font-size: 28rpx;
+		color: #999;
+	}
+	.form-textarea{
+		height: 240rpx;
+		padding: 24rpx 0;
+		text-align: left;
+	}
+	.form-number-input{
+		margin: 0 auto;
+	}
+	.u-required{
+		position: relative;
+	}
+	.u-required:before{
+		content: '*';
+		position: absolute;
+		left: -8px;
+		top: 10upx;
+		font-size: 14px;
+		color: #fa3534;
+		height: 9px;
+		line-height: 1;
+	}
+	/* 元素宽度 百分比 */
+	.uni-col-1{
+		box-sizing: border-box;
+		width: 10%;
+	}
+	.uni-col-2{
+		box-sizing: border-box;
+		width: 20%;
+	}
+	.uni-col-3{
+		box-sizing: border-box;
+		width: 30%;
+	}
+	.uni-col-4{
+		box-sizing: border-box;
+		width: 40%;
+	}
+	.uni-col-5{
+		box-sizing: border-box;
+		width: 50%;
+	}
+	.uni-col-6{
+		box-sizing: border-box;
+		width: 60%;
+	}
+	.uni-col-7{
+		box-sizing: border-box;
+		width: 70%;
+	}
+	.uni-col-8{
+		box-sizing: border-box;
+		width: 80%;
+	}
+	.uni-col-9{
+		box-sizing: border-box;
+		width: 90%;
+	}
+	.uni-col-10{
+		box-sizing: border-box;
+		width: 100%;
+	}
+	
+	/* felx布局 */
+	.flex{
+		display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */  
+		display: -moz-flex; /* Firefox 18+ */  
+		display: -ms-flexbox; /* IE 10 */  
+		display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
+	}
+	/*伸缩流方向*/
+	.flex_column{
+	    -webkit-box-orient: vertical;
+	    -ms-flex-direction: column;
+	    -webkit-flex-direction: column;
+	    flex-direction: column;
+	}
+	/*主轴对齐*/
+	.justify_center{
+	    -webkit-box-pack: center;
+	    -ms-flex-pack: center;
+	    -webkit-justify-content: center;
+	    justify-content: center;
+	}
+	.justify_end{
+	    -webkit-box-pack: end;
+	    -ms-flex-pack: end;
+	    -webkit-justify-content: flex-end;
+	    justify-content: flex-end;
+	}
+	.justify_between{
+	    -webkit-box-pack: justify;
+	    -ms-flex-pack: justify;
+	    -webkit-justify-content: space-between;
+	    justify-content: space-between;
+	}
+	/*侧轴对齐*/
+	.align_start{
+	    -webkit-box-align: start;
+	    -ms-flex-align: start;
+	    -webkit-align-items: flex-start;
+	    align-items: flex-start;
+	}
+	.align_end{
+	    -webkit-box-align: end;
+	    -ms-flex-align: end;
+	    -webkit-align-items: flex-end;
+	    align-items: flex-end;
+	}
+	.align_center{
+	    -webkit-box-align: center;
+	    -ms-flex-align: center;
+	    -webkit-align-items: center;
+	    align-items: center;
+	}
+	.align_baseline{
+	    -webkit-box-align: baseline;
+	    -ms-flex-align: baseline;
+	    -webkit-align-items: baseline;
+	    align-items: baseline;
+	}
+	/*伸缩性*/
+	.flex_auto{
+	    -webkit-box-flex: 1;
+	    -ms-flex: auto;
+	    -webkit-flex: auto;
+	    flex: auto;
+	}
+	.flex_1{
+	    -webkit-box-flex: 1;
+	    -ms-flex: 1;
+	    -webkit-flex: 1;
+	    flex: 1;    
+	}
 </style>
 </style>

+ 52 - 0
api/shelfRecall.js

@@ -0,0 +1,52 @@
+import axios from '@/libs/axios.js'
+
+// 分页查询调回单列表
+export const shelfRecallList = (params) => {
+	let url = `shelfRecall/queryPage/${params.pageNo}/${params.pageSize}`
+	delete params.pageNo
+	delete params.pageSize
+	return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	})
+}
+// 查询调回单信息
+export const shelfRecallFindBySn = (params) => {
+	return axios.request({
+		url: `shelfRecall/findBySn/${params.sn}`,
+		method: 'get'
+	})
+}
+// 查询调回单详情列表
+export const detailQueryCount = (params) => {
+	return axios.request({
+		url: `shelfRecall/detail/queryCount`,
+		data: params,
+		method: 'post'
+	})
+}
+// 查询调回单详情列表
+export const shelfRecallDetail = (params) => {
+	return axios.request({
+		url: `shelfRecall/detail/queryList`,
+		data: params,
+		method: 'post'
+	})
+}
+// 确认调回
+export const shelfRecallConfirm = (params) => {
+	return axios.request({
+		url: `shelfRecall/confirm`,
+		data: params,
+		method: 'post'
+	})
+}
+// 查询每个状态的数据条数
+export const queryStateCount = (params) => {
+	return axios.request({
+		url: `shelfRecall/queryStateCount`,
+		data: params,
+		method: 'post'
+	})
+}

+ 4 - 3
libs/axios.js

@@ -25,7 +25,6 @@ const request = (opts, hasToken) => {
 	let promise = new Promise(function(resolve, reject) {
 	let promise = new Promise(function(resolve, reject) {
 		uni.request(DefaultOpts).then(
 		uni.request(DefaultOpts).then(
 			(res) => {
 			(res) => {
-				console.log(res)
 				// 是否超时已跳转
 				// 是否超时已跳转
 				let loginTimeOut = uni.getStorageSync('loginTimeOut');
 				let loginTimeOut = uni.getStorageSync('loginTimeOut');
 				if(res[0]&&res[0].errMsg.indexOf('request:fail')>=0){
 				if(res[0]&&res[0].errMsg.indexOf('request:fail')>=0){
@@ -35,13 +34,15 @@ const request = (opts, hasToken) => {
 					})
 					})
 				}
 				}
 				let ret = res[1]
 				let ret = res[1]
-				ret.status = ret.statusCode
+				if(!ret.status){
+					ret.status = ret.statusCode
+				}
 				if(res[1].data.status){
 				if(res[1].data.status){
 					ret = res[1].data
 					ret = res[1].data
 				}else if(res[1].status){
 				}else if(res[1].status){
 					ret = res[1]
 					ret = res[1]
 				}
 				}
-				
+				console.log(ret)
 				if(ret.status == '200'){
 				if(ret.status == '200'){
 					resolve(ret)
 					resolve(ret)
 				}else{
 				}else{

+ 5 - 2
pages.json

@@ -70,7 +70,10 @@
             "style" :                                                                                    
             "style" :                                                                                    
             {
             {
                 "navigationBarTitleText": "调回退货",
                 "navigationBarTitleText": "调回退货",
-                "enablePullDownRefresh": false
+                "enablePullDownRefresh": false,
+				"titleView":false,
+				// 将回弹属性关掉
+				"bounce":"none"
             }
             }
         }
         }
 		,{
 		,{
@@ -84,7 +87,7 @@
     ],
     ],
 	"globalStyle": {
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
+		"navigationBarTitleText": "iscm",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#f2f2f2",
 		"backgroundColor": "#f2f2f2",
 		"app-plus": {
 		"app-plus": {

+ 149 - 0
pages/common/partList.vue

@@ -0,0 +1,149 @@
+<template>
+	<view class="partList-box">
+		<view class="partList-title flex align_center justify_between">
+			<text>配件列表</text>
+			<view>
+                  {{list.length}}款,共<text>{{totalNums}}</text>件
+            </view>
+		</view>
+		<view class="partList-list">
+			<view class="partList-list-box" v-for="item in partList" :key="item.id">
+				<view class="product flex align_center">
+					<view class="checkbox"><u-checkbox size="40" shape="circle"></u-checkbox></view>
+					<view class="flex align_center">
+						<view class="pimgs">
+							<u-image width="128" height="128" border-radius="10"></u-image>
+						</view>
+						<view class="pinfo">
+							<view class="pname">
+								箭牌机油滤清器 10 款进口大众途锐 5.0L V10
+							</view>
+							<view class="ptxt flex align_center justify_between">
+								<view>
+									<text class="pcode">JB-11066A</text>
+								</view>
+								<view>
+								  调回数量:<text class="pnums">3个</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="ptools flex align_center justify_between">
+					<view></view>
+					<view class="pcurnums">
+						<text>实退数量</text>
+						<u-number-box :min="1"></u-number-box>
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-if="list.length==0">
+				<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="120" :text="noDataText" img-width="120" mode="list"></u-empty>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: function(){
+					return []
+				}
+			},
+			noDataText: {
+				type: String,
+				default: '暂无配件'
+			}
+		},
+		watch: {
+			list(newValue, oldValue) {
+				this.partList = newValue
+			}
+		},
+		computed: {
+			totalNums() {
+				let ret = 0
+				this.list.map(item => {
+					ret = ret + item.qty
+				})
+				return ret
+			}
+		},
+		data() {
+			return {
+				partList: this.list
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+.partList-box{
+	.nodata{
+		padding: 10vh 0;
+	}
+	.partList-title{
+		padding: 20rpx 0;
+		> text{
+			font-size: 32rpx;
+			color: #222222;
+		}
+		> view{
+			font-size: 32rpx;
+			text{
+				color: red;
+				margin: 0 5rpx;
+			}
+		}
+	}
+	.partList-list-box{
+		padding: 10px 0;
+		border-bottom: 2rpx solid #f5f5f5;
+		&:last-child{
+			border:0;
+		}
+		.product{
+			flex-grow: 1;
+			.pinfo{
+				flex-grow: 1;
+				padding-left: 20rpx;
+				.pname{
+					font-size: 32rpx;
+					color: #191919;
+					font-weight: bold;
+					margin-bottom: 10rpx;
+				}
+				.pno{
+					background-color: rgba(3, 54, 146, 0.15);
+					border-radius: 50rpx;
+					padding: 0 20rpx;
+					color: #033692;
+					font-size: 24rpx;
+					margin-right: 10rpx;
+				}
+				.ptxt{
+					font-size: 28rpx;
+					color: #999;
+					.pnums{
+						color: #222;
+					}
+				}
+			}
+		}
+		.ptools{
+			margin-top: 20rpx;
+			.pcurnums{
+				> text{
+					margin-right: 20rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 17 - 19
pages/login/login.vue

@@ -131,27 +131,25 @@ export default {
 			}
 			}
 			
 			
 			//  登录
 			//  登录
-			login(_this.form).then(ret => {
+			login(_this.form).then(res => {
 				uni.hideLoading();
 				uni.hideLoading();
-				let res = ret.data ? ret.data : ret;
-				console.log(res,'--------')
 				if (res.status == 200) {
 				if (res.status == 200) {
-					_this.$u.vuex('vuex_token', 'Bearer ' + res.access_token);
-					_this.$u.vuex('vuex_userData', _this.fiterAuthCode(res.auth_user));
-					getApp().globalData.token = 'Bearer ' + res.access_token;
-					//登录成功将用户名密码存储到用户本地
-					if (_this.isRemember) {
-						//用户勾选“记住密码”
-						_this.$u.vuex('vuex_user.account', _this.form.username);
-						_this.$u.vuex('vuex_user.password', _this.form.password);
-					} else {
-						//用户没有勾选“记住密码”
-						_this.$u.vuex('vuex_user.account', '');
-						_this.$u.vuex('vuex_user.password', '');
-						_this.form.username = '';
-						_this.form.password = '';
-					}
-					uni.setStorageSync('loginTimeOut', 'NO');
+					// _this.$u.vuex('vuex_token', 'Bearer ' + res.access_token);
+					// _this.$u.vuex('vuex_userData', _this.fiterAuthCode(res.auth_user));
+					// getApp().globalData.token = 'Bearer ' + res.access_token;
+					// //登录成功将用户名密码存储到用户本地
+					// if (_this.isRemember) {
+					// 	//用户勾选“记住密码”
+					// 	_this.$u.vuex('vuex_user.account', _this.form.username);
+					// 	_this.$u.vuex('vuex_user.password', _this.form.password);
+					// } else {
+					// 	//用户没有勾选“记住密码”
+					// 	_this.$u.vuex('vuex_user.account', '');
+					// 	_this.$u.vuex('vuex_user.password', '');
+					// 	_this.form.username = '';
+					// 	_this.form.password = '';
+					// }
+					// uni.setStorageSync('loginTimeOut', 'NO');
 					_this.toMain();
 					_this.toMain();
 				} else {
 				} else {
 					uni.showToast({ icon: 'none', title: res.message });
 					uni.showToast({ icon: 'none', title: res.message });

+ 110 - 6
pages/shuntBackManage/cancellingStocks.vue

@@ -1,22 +1,126 @@
 <template>
 <template>
-	<view>
-		
+	<view class="cancelStockPages" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
+		<view class="cancelStockPages-body">
+			<view class="head-info" v-if="info">
+				<view>
+					<view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32" color="#7C7D7E"></u-icon><text>货架名称</text></view>
+					<view>{{info.shelfName}}</view>
+				</view>
+				<view>
+					<view class="label"><u-icon name="icon_position" custom-prefix="iscm-icon" size="32" color="#7C7D7E"></u-icon><text>客户地址</text></view>
+					<view>{{info.shelfAddress}}</view>
+				</view>
+			</view>
+			<view class="part-list">
+				<!-- 配件列表 -->
+				<partList :list="partList"></partList>
+			</view>
+		</view>
+		<view class="cancelStockPages-footer">
+			<view>
+				<u-checkbox size="40" v-model="allChecked" shape="circle">全选</u-checkbox>
+			</view>
+			<view>
+				<u-button shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
+			</view>
+		</view>
 	</view>
 	</view>
 </template>
 </template>
 
 
 <script>
 <script>
+	import { shelfRecallFindBySn, detailQueryCount, shelfRecallDetail } from '@/api/shelfRecall.js'
+	import partList from '../common/partList.vue'
 	export default {
 	export default {
+		components: {
+			partList
+		},
 		data() {
 		data() {
 			return {
 			return {
-				
+				allChecked: false,
+				recallBillSn: '',
+				info:null,
+				partList: []
 			}
 			}
 		},
 		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#fff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
+		onLoad(option) {
+			this.recallBillSn = option.recallBillSn
+			this.getDetail()
+			this.getPartList()
+		},
 		methods: {
 		methods: {
-			
+			getDetail(){
+				shelfRecallFindBySn({sn:this.recallBillSn}).then(res => {
+					if(res.status == 200){
+						this.info = res.data
+					}
+				})
+			},
+			getPartList(){
+				shelfRecallDetail({recallBillSn:this.recallBillSn}).then(res => {
+					if(res.status == 200){
+						this.partList = res.data.data
+					}
+				})
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>
 
 
-<style>
-
+<style lang="less">
+.cancelStockPages{
+	width: 100%;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
+	.cancelStockPages-body{
+		padding: 30rpx;
+		flex-grow: 1;
+		overflow: auto;
+		> view{
+			padding: 10rpx 25rpx;
+			background-color: #fff;
+			margin-bottom: 20rpx;
+			border-radius: 25rpx;
+			box-shadow: 2rpx 3rpx 5rpx #eee;
+		}
+		.head-info{
+			font-size: 30rpx;
+			> view{
+				display: flex;
+				border-bottom: 2rpx solid #f5f5f5;
+				padding: 20rpx 0;
+				> view:last-child{
+					flex-grow: 1;
+					width: 80%;
+				}
+				&:last-child{
+					border:0;
+				}
+			}
+			.label{
+				display: flex;
+				align-items: center;
+				width: 220rpx;
+				height: 44rpx;
+				color: #7C7D7E;
+				text{
+					margin-left: 10rpx;
+				}
+			}
+		}
+	}
+	.cancelStockPages-footer{
+		background-color: #fff;
+		padding: 20rpx 40rpx;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+	}
+}
 </style>
 </style>

+ 17 - 11
pages/shuntBackManage/shuntBackList.vue

@@ -10,20 +10,20 @@
 						<view  
 						<view  
 						class="check-order-list" 
 						class="check-order-list" 
 						v-if="index==current"
 						v-if="index==current"
-						v-for="(item,sindex) in 20" 
+						v-for="(item,sindex) in list" 
 						:key="item.id+'-'+sindex"
 						:key="item.id+'-'+sindex"
 						@click="viewRow(item)"
 						@click="viewRow(item)"
 						>
 						>
 							<view class="check-row">
 							<view class="check-row">
-								<view>西安车领主常青二路数字货架</view>
+								<view>{{item.shelfName}}</view>
 								<view>
 								<view>
 									<text :style="{color:$config('errorColor')}">待退库</text>
 									<text :style="{color:$config('errorColor')}">待退库</text>
 								</view>
 								</view>
 							</view>
 							</view>
 							<view class="check-col">
 							<view class="check-col">
-								<view>调货单号:BH202101010001</view>
-								<view>调回数量:33</view>
-								<view>2021-08-20 15:40:57</view>
+								<view>调货单号:{{item.recallBillNo}}</view>
+								<view>调回数量:{{item.totalConfirmQty}}</view>
+								<view>{{item.createDate}}</view>
 							</view>
 							</view>
 						 </view>
 						 </view>
 						 <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
 						 <u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="240" :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
@@ -37,7 +37,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-	// import { getBackLogList } from '@/api/backLog.js'
+	import { queryStateCount, shelfRecallList } from '@/api/shelfRecall.js'
 	export default {
 	export default {
 		components: {
 		components: {
 		},
 		},
@@ -79,13 +79,19 @@
 		},
 		},
 		onLoad() {
 		onLoad() {
 			// 监听整改完成后刷新事件
 			// 监听整改完成后刷新事件
-			uni.$on('refreshBL',this.getRow)
-			// this.getRow(1)
+			uni.$on('refreshBL',this.pageInit)
+			this.pageInit()
 		},
 		},
 		onUnload() {
 		onUnload() {
-			uni.$off('refreshBL',this.getRow)
+			uni.$off('refreshBL')
 		},
 		},
 		methods:{
 		methods:{
+			pageInit(){
+				queryStateCount({billState:'待退货'}).then(res =>{
+					this.tabList[1].count = res.data.totalConfirmQty
+					this.getRow(1)
+				})
+			},
 			// tabs通知swiper切换
 			// tabs通知swiper切换
 			tabsChange(index) {
 			tabsChange(index) {
 				this.swiperCurrent = index;
 				this.swiperCurrent = index;
@@ -134,7 +140,7 @@
 			    billState: this.tabList[this.current].status,
 			    billState: this.tabList[this.current].status,
 			  }
 			  }
 			  this.status = "loading"
 			  this.status = "loading"
-			  getBackLogList(params).then(res => {
+			  shelfRecallList(params).then(res => {
 				if (res.status == 200) {
 				if (res.status == 200) {
 				  if(this.pageNo>1){
 				  if(this.pageNo>1){
 					  this.list = this.list.concat(res.data.list || [])
 					  this.list = this.list.concat(res.data.list || [])
@@ -167,7 +173,7 @@
 			viewRow(item){
 			viewRow(item){
 				// 已完成的
 				// 已完成的
 				uni.navigateTo({
 				uni.navigateTo({
-					url: "/pages/shuntBackManage/cancellingStocks?id="+item.id
+					url: "/pages/shuntBackManage/cancellingStocks?recallBillSn="+item.recallBillSn
 				})
 				})
 			},
 			},
 			// 状态颜色处理
 			// 状态颜色处理