瀏覽代碼

新增回调单页面

chenrui 2 年之前
父節點
當前提交
d5ef0c228b

+ 62 - 3
pages.json

@@ -118,7 +118,21 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "调回管理",
-                "enablePullDownRefresh": false
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue8c0 新增" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#00aaff",
+								"width":"90px"
+							}
+						]
+					}
+				}
             }
         },
 		{
@@ -127,9 +141,23 @@
             {
                 "navigationBarTitleText": "调回退库",
                 "enablePullDownRefresh": false,
-				"titleView":false,
 				// 将回弹属性关掉
-				"bounce":"none"
+				"bounce":"none",
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue859 生成销售退货单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#ffffff",
+								"width":"140px"
+							}
+						]
+					}
+				}
             }
         },
 		{
@@ -137,6 +165,37 @@
 		    "style" :                                                                                    
 		    {
 		        "navigationBarTitleText": "调回详情",
+		        "enablePullDownRefresh": false,
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue859 生成销售退货单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#ffffff",
+								"width":"140px"
+							}
+						]
+					}
+				}
+		    }
+		},
+		{
+		    "path" : "pages/shuntBackManage/shelfList",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "选择货架",
+		        "enablePullDownRefresh": false
+		    }
+		},
+		{
+		    "path" : "pages/shuntBackManage/addBackOrder",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "新增调回单",
 		        "enablePullDownRefresh": false
 		    }
 		},

+ 3 - 3
pages/common/partList.vue

@@ -7,9 +7,9 @@
 		<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" v-if="model == 'checkbox'">
+					<!-- <view class="checkbox" v-if="model == 'checkbox'">
 						<u-checkbox v-model="item.checked" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox>
-					</view>
+					</view> -->
 					<view class="flex align_center flex_1">
 						<view class="pimgs" @click="checkChange({name:item.id})">
 							<u-image :src="item.product&&item.product.productMsg?item.product.productMsg:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
@@ -67,7 +67,7 @@
 					<view class="pcurnums flex align_center" v-if="pageType=='recall'">
 						<text>实退数量</text>
 						<view class="u-ninput">
-							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.confirmQty" :min="1" :max="item.qty"></u-number-box>
+							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.confirmQty" :min="0" :max="item.qty"></u-number-box>
 						</view>
 					</view>
 					<view class="pcurnums flex align_center" v-if="pageType=='manualPrint'">

+ 362 - 0
pages/shuntBackManage/addBackOrder.vue

@@ -0,0 +1,362 @@
+<template>
+	<view class="modal-box">
+		<view class="header_box">
+			<view class="headerName u-flex">
+				<text class="barBox"></text>
+				<view class="shelfName u-line-1">{{shelfName}}对方的观点和个人就一个人国服日服固定板</view>
+				<view class="screeningBox"  @click="sortShow = true">
+					<text>滞销天数</text>
+					<u-icon color="#666666" size="36" name="shaixuan" custom-prefix="iscm-icon"></u-icon>
+				</view>
+			</view>
+			<view class="searchBox">
+				<view class="searchBox_l">
+					<u-search
+						placeholder="请输入产品编码或产品名称搜索"
+						@change="getSearchCon"
+						@search="getSearchCon"
+						@custom="getSearchCon"
+						@clear="clearSearch"
+						v-model="keyword"
+						bg-color="#FFF"
+						shape="round"
+						:show-action="false"
+					></u-search>
+				</view>
+				<view class="searchBox_r">
+					<u-icon color="#666666" size="40" name="saomiao" custom-prefix="iscm-icon"></u-icon>
+				</view>
+			</view>
+		</view>
+		
+		<!-- 排序弹窗 -->
+		<u-popup v-model="sortShow" mode="right" width="60%">
+			<view class="sortPopup">
+				<view class="sortList" v-for="(item, i) in sortList" :key="i" :class="isSortFlag == i ? 'sortChecked' : ''" @click="chooseSort(i)">{{ item.name }}</view>
+				<view class="butBox u-flex">
+					<!-- <u-button hover-class="none" shape="circle" size="medium" @click="reset">重置</u-button> -->
+					<!-- <u-button hover-class="none" :custom-style="customBtnStyle"  size="medium"  shape="circle"  @click="handelSort">确定</u-button> -->
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import { reportPage } from '@/api/vinLog';
+export default {
+	data() {
+		return {
+			sortShow: false,
+			keyword: '',
+			sortList: [
+				{
+					id: 1,
+					name: '最近一次VIN扫描时间降序'
+				},
+				{
+					id: 2,
+					name: '适配有货降序'
+				},
+				{
+					id: 3,
+					name: '适配无货降序'
+				}
+			],
+			isSortFlag: 0,
+			list: [],
+			shelfSn: '',
+			shelfName: '',
+			pageNo: 1,
+			pageSize: 10,
+			noDataText: '暂无数据',
+			status: 'loading',
+			totalNum: 0,
+			total: 0,
+			theme:'',
+			customBtnStyle: {  //  自定义按钮样式
+				borderColor: this.$config('primaryColor'),
+				backgroundColor: this.$config('primaryColor'),
+				color: '#fff'
+			},
+		};
+	},
+	onLoad(options) {
+		this.theme = getApp().globalData.theme;
+		this.shelfSn = options.shelfSn;
+		this.shelfName = options.shelfName;
+		let ajaxData = {
+			pageNo: this.pageNo,
+			pageSize: this.pageSize,
+			shelfSn: this.shelfSn
+		};
+		this.loadData(ajaxData);
+	},
+	onBackPress(e) {
+		if (this.sortShow) {
+			this.sortShow = false;
+			this.isSortFlag = 0;
+			return true;
+		}
+	},
+	methods: {
+		// 获取数字货架列表
+		loadData(params) {
+			const _this = this;
+			_this.status = 'loading';
+			reportPage(params).then(res => {
+				if (res.status == 200) {
+					if (this.pageNo > 1) {
+						this.list = this.list.concat(res.data.list || []);
+					} else {
+						this.list = res.data.list || [];
+					}
+					this.totalNum = res.data.count || 0;
+				} else {
+					this.list = [];
+					this.totalNum = 0;
+					this.noDataText = res.message;
+				}
+				this.status = 'loadmore';
+			});
+		},
+		chooseSort(i) {
+			this.isSortFlag = i;
+			this.handelSort();
+		},
+		reset() {
+			this.isSortFlag = 0;
+			this.pageNo = 1;
+			let ajaxData = {
+				pageNo: 1,
+				pageSize: this.pageSize,
+				shelfSn: this.shelfSn
+			};
+			this.loadData(ajaxData);
+		},
+		// 搜索
+		getSearchCon() {
+			this.pageNo = 1;
+			var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
+			var ajaxData = null;
+			if (reg.test(this.keyword)) {
+				//包含汉字
+				ajaxData = {
+					pageNo: 1,
+					pageSize: this.pageSize,
+					shelfSn: this.shelfSn,
+					productName: this.keyword.trim()
+				};
+			} else {
+				ajaxData = {
+					pageNo: 1,
+					pageSize: this.pageSize,
+					shelfSn: this.shelfSn,
+					productCode: this.keyword.trim()
+				};
+			}
+			if (this.isSortFlag == 0) {
+				ajaxData.orderBy = 'xvfp.scan_vin_date desc,xp.code asc';
+			} else if (this.isSortFlag == 1) {
+				ajaxData.orderBy = 'xvfp.in_stock_count desc,xp.code asc';
+			} else {
+				ajaxData.orderBy = 'xvfp.not_stock_count desc,xp.code asc';
+			}
+			this.loadData(ajaxData);
+		},
+		// 清空搜索内容
+		clearSearch() {
+			this.keyword = '';
+			this.reset();
+			
+		},
+		handelSort() {
+			this.pageNo = 1;
+			var ajaxData = {
+				shelfSn: this.shelfSn,
+				pageNo: 1,
+				pageSize: this.pageSize
+			};
+			if (this.keyword) {
+				var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
+				if (reg.test(this.keyword)) {
+					ajaxData.productName=this.keyword.trim();
+				}else{
+					ajaxData.productCode=this.keyword.trim();
+				}
+			}
+			if (this.isSortFlag == 0) {
+				ajaxData.orderBy = 'xvfp.scan_vin_date desc,xp.code asc';
+			} else if (this.isSortFlag == 1) {
+				ajaxData.orderBy = 'xvfp.in_stock_count desc,xp.code asc';
+			} else {
+				ajaxData.orderBy = 'xvfp.not_stock_count desc,xp.code asc';
+			}
+			this.sortShow = false;
+			this.loadData(ajaxData);
+		}
+	},
+	//到底部加载更多
+	onReachBottom() {
+		if (this.list.length < this.totalNum) {
+			this.pageNo += 1;
+			var ajaxData = {
+				shelfSn: this.shelfSn,
+				pageNo: this.pageNo,
+				pageSize: this.pageSize
+			};
+			if (this.keyword) {
+				var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
+				if (reg.test(this.keyword)) {
+					ajaxData.productName=this.keyword.trim();
+				}else{
+					ajaxData.productCode=this.keyword.trim();
+				}
+			}
+			if (this.isSortFlag == 0) {
+				ajaxData.orderBy = 'xvfp.scan_vin_date desc,xp.code asc';
+			} else if (this.isSortFlag == 1) {
+				ajaxData.orderBy = 'xvfp.in_stock_count desc,xp.code asc';
+			} else {
+				ajaxData.orderBy = 'xvfp.not_stock_count desc,xp.code asc';
+			}
+			this.loadData(ajaxData);
+		} else {
+			this.status = 'nomore';
+		}
+	}
+};
+</script>
+
+<style lang="less" scoped>
+.modal-box {
+	background: #ffffff;
+	padding: 20rpx;
+	width: 100%;
+	.header_box{
+		width: 100%;
+		padding: 0 20rpx 20rpx;
+		background-color: #fff;
+	.headerName{
+		padding-bottom: 15rpx;
+		color: #222;
+		font-size: 30rpx;
+		.barBox{
+				display: block;
+				height: 30rpx;
+				width: 6rpx;
+				background: #0485F6;
+				margin-right: 10rpx;
+				border-radius: 10rpx;
+			}
+		.shelfName{
+			font-weight: bold;
+			width: calc(100% - 166rpx);
+		}
+		.screeningBox{
+			font-size: 26rpx;
+			width: 150rpx;
+			text-align: right;
+			text{
+				vertical-align: top;
+			}
+		}
+	}
+	.searchBox {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		padding:0 20rpx;
+		border: 1rpx solid #e0e0e0;
+		border-radius: 32rpx;
+		box-sizing: border-box;
+		.searchBox_l{
+			width: 93%;
+		}
+		.searchBox_r{
+			width: 7%;
+		}
+	}
+	}
+	.listBox {
+		width: 100%;
+		display: flex;
+		padding: 30rpx 0;
+		border-bottom: 1rpx solid #e0e0e0;
+		.listBox_l {
+			width: 150rpx;
+			height: 150rpx;
+			overflow: hidden;
+			border-radius: 20rpx;
+			margin-right: 20rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.listBox_r {
+			width: calc(100% - 170rpx);
+			.type {
+				color: #222;
+				font-size: 32rpx;
+			}
+			.tit {
+				margin: 10rpx 0;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-line-clamp: 1;
+				-webkit-box-orient: vertical;
+			}
+			.bot {
+				width: 100%;
+				view {
+					&:first-child {
+						color: #999;
+						text {
+							color: green;
+							margin: 0 10rpx;
+						}
+					}
+					&:last-child {
+						color: #999;
+						text {
+							color: red;
+							margin: 0 10rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+	// 弹窗样式
+	.sortPopup {
+		padding: 30rpx 20rpx;
+		box-sizing: border-box;
+		.sortList {
+			width: 100%;
+			height: 70rpx;
+			text-align: center;
+			line-height: 70rpx;
+			border-radius: 60rpx;
+			color: #333;
+			margin-bottom: 30rpx;
+			font-size: 26rpx;
+			border: 1rpx solid #e0e0e0;
+		}
+		.butBox {
+			margin-top: 100rpx;
+		}
+		.sortChecked {
+			background-color: rgb(0, 122, 255);
+			color: #ffffff;
+		}
+	}
+	.emptyStyle {
+		margin-top: 280rpx;
+	}
+	.u-size-medium {
+		padding: 0 60rpx !important;
+	}
+}
+</style>

+ 6 - 6
pages/shuntBackManage/cancellingStocks.vue

@@ -63,12 +63,12 @@
 		},
 		methods: {
 			// 全选
-			allCheckeChange(e){
-				this.$refs.partList.allSelect(e.value)
-			},
-			allCheckedCallback(val){
-				this.allChecked = val
-			},
+			// allCheckeChange(e){
+			// 	this.$refs.partList.allSelect(e.value)
+			// },
+			// allCheckedCallback(val){
+			// 	this.allChecked = val
+			// },
 			// 查询详情
 			getDetail(){
 				shelfRecallFindBySn({sn: this.recallBillSn}).then(res => {

+ 227 - 0
pages/shuntBackManage/shelfList.vue

@@ -0,0 +1,227 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search
+			placeholder="请输入货架名称搜索" 
+			v-model="shelfName" 
+			:show-action="isGobleSearch" 
+			@input="change"
+			@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">
+			<view class="nav-right">
+				<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 clearFix">
+							<text class="barBox"></text>
+							<text class="itemName">{{item.shelfName}}</text>
+						</view>
+						<view class="item-detail">
+							<view>
+								产品款数:
+								<text class="item-detail-text">{{item.scanVinCount || 0}}</text>
+							</view>
+							<view>
+								库存总量:
+								<text class="item-detail-text">{{item.scanVinCount || 0}}</text>
+							</view>
+						</view>
+					</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="100"></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-if="shelfList.length">
+					<u-loadmore :status="status" />
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getShelfList } from '@/api/shelf'
+	import { clzConfirm } from '@/libs/tools'
+	export default {
+		data() {
+			return {
+				shelfName: '',
+				isGobleSearch: false,
+				shelfList: [],
+				noDataText: '暂无货架',
+				status: 'loading',
+				tempData: null,
+				pageNo:1,
+				pageSize:20
+			}
+		},
+		onLoad() {
+			this.getShelfList()
+		},
+		methods: {
+			clearSearch(){
+				this.shelfName = ''
+				this.shelfList = []
+				this.getShelfList()
+			},
+			change(v){
+				if(v==''){
+					this.clearSearch()
+				}
+			},
+			// 获取数字货架列表
+			getShelfList(){
+				const _this = this
+				// if(this.shelfName == ''){
+				// 	this.pageNo = 1
+				// 	this.total = 0
+				// }
+				let params = {
+				    pageNo: _this.pageNo,
+				    pageSize: _this.pageSize,
+					shelfName: _this.shelfName
+				}
+				_this.status = 'loading'
+				getShelfList(params).then(res => {
+					if(res.status == 200){
+						let list = res.data.list
+						if (list && list.length){
+							// 分页 拼接数据
+							if(_this.pageNo>1){
+								_this.shelfList = _this.shelfList.concat(res.data.list || [])
+							}else{
+								_this.shelfList = res.data.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 = '没有查询到相关货架'
+						}
+						_this.noDataText = '暂无货架'
+					}else{
+						_this.status = 'loadmore'
+						_this.shelfList = []
+						_this.total = 0
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+				
+			},
+			viewDetail(item){
+				uni.navigateTo({
+					url:"/pages/shuntBackManage/addBackOrder"
+				})
+			}
+		},
+		// 上拉加载更多
+		onReachBottom () {
+			if(this.shelfList.length < this.total ){
+				if(this.isGobleSearch&&this.shelfName==''){
+					return
+				}
+				this.pageNo++
+				this.getShelfList()
+			}else{
+				this.status = "nomore"
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		width: 100%;
+		height: 100vh;
+		background-color: #f8f8f8;
+		.moreShelfPart-search{
+			padding: 20rpx;
+		}
+		.moreShelfPart-body{
+			flex-grow: 1;
+		}
+		.nav-right{
+			padding: 0 30upx;
+			box-sizing: border-box;
+			overflow: auto;
+			.nav-right-item{
+				padding:20upx;
+				border: 2rpx solid #f5f5f5;
+				border-radius: 15upx;
+				margin-bottom: 20upx;
+				box-shadow: 3rpx 3rpx 8rpx #eee;
+				background-color: #ffff;
+				&:active{
+					background: #f8f8f8;
+				}
+				.item-info{
+					.item-name{
+						font-size: 30upx;
+						vertical-align: middle;
+						.barBox {
+							display: block;
+							height: 30rpx;
+							width: 6rpx;
+							background: #9DA8B5;
+							margin-right: 10rpx;
+							border-radius: 10rpx;
+							float: left;	
+							margin-top:9rpx;
+						}
+						.itemName{
+							vertical-align: top;
+						}
+					}
+					.clearFix::after{
+						clear: both;
+						content:'';
+						display:block;
+						visibility: hidden;
+					}
+					.item-detail{
+						margin-top: 15rpx;
+						display: flex;
+						align-items: center;
+						color: #9DA8B5;
+						font-size: 26upx;
+						:nth-child(1){
+							margin-right: 50rpx;
+						}
+						.item-detail-text{
+							font-size: 26upx;
+							color: #333;
+						}
+					}
+				}
+				.button-box{
+					display: flex;
+					margin-top: 20upx;
+					button{
+						margin: 0 10upx;
+					}
+					> text{
+						font-size: 24upx;
+						color: #00aaff;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 5 - 0
pages/shuntBackManage/shuntBackList.vue

@@ -93,6 +93,11 @@
 		onShow() {
 			this.pageInit()
 		},
+		onNavigationBarButtonTap(){
+			uni.navigateTo({
+				url:'/pages/shuntBackManage/shelfList'
+			})
+		},
 		onUnload() {
 			uni.$off('refreshBL')
 		},

文件差異過大導致無法顯示
+ 0 - 0
static/iconfont/iconfont.css


二進制
static/iconfont/iconfont.ttf


部分文件因文件數量過多而無法顯示