| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431 | 
							- <!DOCTYPE html>
 
- <html>
 
- 	<head>
 
- 		<meta charset="UTF-8">
 
- 		<title>生活服务</title>
 
- 		<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
 
- 		<meta content="yes" name="apple-mobile-web-app-capable"/>
 
- 		<meta content="black" name="apple-mobile-web-app-status-bar-style"/>
 
- 		<meta content="telephone=no" name="format-detection"/>
 
- 		<link href="../css/style.css" rel="stylesheet" type="text/css"/>
 
- 		<link href="../css/html.css" rel="stylesheet" type="text/css"/>
 
- 		<link href="../css/element-ui.css" rel="stylesheet" type="text/css"/>
 
- 		<link rel="stylesheet" type="text/css" href="../css/aui-slide.css" />
 
- 		<link href="../css/vueBox.css" rel="stylesheet" type="text/css"/>
 
- 		<!--<script type="text/javascript" src="../script/jquery.min.js"></script>-->
 
- 		<!--<script type="text/javascript" src="../script/slider.js"></script>-->
 
- 		<style>
 
- 			.aui-voice {
 
- 				width: 40px;
 
- 				height: 40px;
 
- 				margin-top: -10px;
 
- 			}
 
- 			.marquee_box {
 
- 				width: 75%;
 
- 			}
 
- 			[v-cloak] {
 
- 				display: none
 
- 			}
 
- 			.aui-slide-page-line {
 
- 				height: 2px !important;
 
- 			}
 
- 			.aui-slide-node img {
 
- 				height: 180px !important;
 
- 			}
 
- 			.bannerImg {
 
- 				width: 100%;
 
- 				height: 190px;
 
- 			}
 
- 		</style>
 
- 	</head>
 
- 	<body>
 
- 		<section class="aui-flexView" id="app">
 
- 			<div class="zmq-header" style="display: none">
 
- 				<div class="zmq-flex">
 
- 					<img class="zmq-logo-img" src="../image/drawable-xhdpi/logo12.png" />
 
- 					<div class="zmq-header-search">
 
- 						<img src="../image/drawable-xhdpi/search.png" class="zmq-search-img"/>找订单,查库存
 
- 					</div>
 
- 				</div>
 
- 			</div>
 
- 			<section class="aui-scrollView">
 
- 				<div class="zmq-card">
 
- 					<!--<div class="m-slider" data-ydui-slider>
 
- 					<div class="slider-wrapper">
 
- 					<div class="slider-item">
 
- 					<a href="javascript:;"> <img src="../image/drawable-xhdpi/banner.png"> </a>
 
- 					</div>
 
- 					<div class="slider-item">
 
- 					<a href="javascript:;"> <img src="../image/drawable-xhdpi/banner.png"> </a>
 
- 					</div>
 
- 					<div class="slider-item">
 
- 					<a href="javascript:;"> <img src="../image/drawable-xhdpi/banner.png"> </a>
 
- 					</div>
 
- 					</div>
 
- 					<div class="slider-pagination"></div>
 
- 					</div>-->
 
- 					<div id="aui-slide3">
 
- 						<el-carousel ref = "carousel" trigger="click" arrow="always" height="190px" v-on:change="onChange">
 
- 							<el-carousel-item v-for="(b,i) in bannerList" :key="i">
 
- 								<img class="bannerImg" v-lazy= "b.imgPath" v-on:click="lookBanner(b.linkId)"/>
 
- 							</el-carousel-item>
 
- 						</el-carousel>
 
- 					</div>
 
- 					<!--<div id="aui-slide3">
 
- 					<el-carousel trigger="click" arrow="always" height="190px">
 
- 					<el-carousel-item >
 
- 					<img class="bannerImg" src= "../image/drawable-xhdpi/banner.png" />
 
- 					</el-carousel-item>
 
- 					</el-carousel>
 
- 					</div>-->
 
- 					<!-- 公告啦 -->
 
- 					<div class="vueBox" style="margin-top: -2px;">
 
- 						<div class="marquee">
 
- 							<div class="marquee_title">
 
- 								<span><img class="aui-voice" src="../image/news.png"></span>
 
- 							</div>
 
- 							<div class="marquee_box" v-cloak>
 
- 								<ul class="marquee_list" :class="{marquee_top:animate}">
 
- 									<li style="font-size: 12px;" class="zmq-line-1" v-for="(item, index) in marqueeList" v-on:click="goInfo(item)">
 
- 										{{item.title}}
 
- 									</li>
 
- 								</ul>
 
- 							</div>
 
- 						</div>
 
- 					</div>
 
- 					<div class="aui-grids">
 
- 						<a href="javascript:;" class="aui-grids-item" onclick="goWin('storeList1_win')">
 
- 						<div class="aui-grids-item-icon">
 
- 							<img src="../image/drawable-xhdpi/icon01.png" alt="">
 
- 						</div>
 
- 						<div class="aui-grids-item-text">
 
- 							采购下单
 
- 						</div> </a>
 
- 						<a href="javascript:;" class="aui-grids-item" onclick="goWin('kucunjjs_win')">
 
- 						<div class="aui-grids-item-icon">
 
- 							<img src="../image/drawable-xhdpi/icon02.png" alt="">
 
- 						</div>
 
- 						<div class="aui-grids-item-text">
 
- 							云端查货
 
- 						</div> </a>
 
- 						<a href="javascript:;" class="aui-grids-item" onclick="goWin('orderList_win')">
 
- 						<div class="aui-grids-item-icon">
 
- 							<img src="../image/drawable-xhdpi/icon03.png" alt="">
 
- 						</div>
 
- 						<div class="aui-grids-item-text">
 
- 							订单管理
 
- 						</div> </a>
 
- 						<a href="javascript:;" class="aui-grids-item" onclick="goWin('orderCar_win')">
 
- 						<div class="aui-grids-item-icon">
 
- 							<div class="aui-badge">
 
- 								{{carNum}}
 
- 							</div>
 
- 							<img src="../image/drawable-xhdpi/icon04.png" alt="">
 
- 						</div>
 
- 						<div class="aui-grids-item-text">
 
- 							订单维护
 
- 						</div> </a>
 
- 					</div>
 
- 				</div>
 
- 				<div class="zmq-card zmq-margin-top-10 zmq-padding-top-10">
 
- 					<div class="aui-list-cell">
 
- 						<a href="javascript:;" class="aui-list-cell-item">
 
- 						<div class="aui-list-cell-item-info aui-list-cell-item-img" v-on:click="scan1(0)">
 
- 							<h2 class="zmq-btn-title"><img class="zmq-btn-img" src="../image/drawable-xhdpi/scanIcon.png" />扫码入库</h2>
 
- 							<span class="zmq-btn-msg"> <em>扫码入库,赚取积分,兑换商品</em></span>
 
- 						</div> </a>
 
- 						<a href="javascript:;" class="aui-list-cell-item">
 
- 						<div class="aui-list-cell-item-info aui-list-cell-item-info-one" v-on:click="scan1(1)">
 
- 							<h2 class="zmq-btn-title"><img class="zmq-btn-img" src="../image/drawable-xhdpi/scanList.png" />扫码销售</h2>
 
- 							<!--<h2 class="zmq-btn-title"><img class="zmq-btn-img" src="../image/drawable-xhdpi/scanin.png" />进销存</h2>-->
 
- 							<!--<span class="zmq-btn-msg-1"><em>进销存</em></span>-->
 
- 						</div>
 
- 						<div class="aui-list-cell-item-info aui-list-cell-item-info-two" onclick="goWin('handKucun_win')">
 
- 							<!--<h2>扫码明细</h2>-->
 
- 							<h2 class="zmq-btn-title"><img class="zmq-btn-img" src="../image/drawable-xhdpi/scanin.png" />店面库存</h2>
 
- 							<!--<span class="zmq-btn-msg-1"></span>-->
 
- 						</div> </a>
 
- 					</div>
 
- 				</div>
 
- 				<!-- 车友俱乐部 -->
 
- 				<div class="zmq-card zmq-margin-top-10 zmq-padding-top-10" v-on:click="lookJF">
 
- 					<img class="zmq-width-90" src="../image/banner4.png">
 
- 					<span class="zmq-btn-msg zmq-btn-bottom"> <em>零售商俱乐部</em></span>
 
- 				</div>
 
- 			</section>
 
- 			<!-- 手工录入 -->
 
- 		</section>
 
- 	</body>
 
- 	<script type="text/javascript" src="../script/api.js"></script>
 
- 	<script type="text/javascript" src="../script/vue.js"></script>
 
- 	<script type="text/javascript" src="../script/jquery.min.js"></script>
 
- 	<!--<script type="text/javascript" src="../script/elememt-ui.js"></script>-->
 
- 	<script type="text/javascript" src="https://unpkg.com/element-ui@2.0.11/lib/index.js"></script>
 
- 	<script type="text/javascript" src="../script/vue-lazyload.js"></script>
 
- 	<script type="text/javascript" src="../script/httpRequest.js"></script>
 
- 	<script type="text/javascript" src="../script/vue_plugins.js"></script>
 
- 	<script type="text/javascript">
 
- 		apiready = function() {
 
- 			api.showProgress({
 
- 			});
 
- 			new Vue({
 
- 				el : '#app',
 
- 				data : {
 
- 					//  用户id
 
- 					retailerId : '',
 
- 					// 购物车数量
 
- 					carNum : '',
 
- 					reid : '',
 
- 					//  扫码
 
- 					FNScanner : '',
 
- 					xwScanner : '',
 
- 					// 入库扫码
 
- 					getStoreUrl0705 : 'addOrgoScanUrl',
 
- 					// 出库扫码
 
- 					outStoreUrl : 'outScanUrl',
 
- 					// 获取新闻
 
- 					getNewsUrl : 'getNews',
 
- 					// 新闻
 
- 					animate : false,
 
- 					marqueeList : [],
 
- 					//  获取banner
 
- 					bannerUrl : 'getBannerUrl',
 
- 					bannerList : [],
 
- 					carouselPlay : "",
 
- 					orc : '', // 百度orc的接口
 
- 					xwScanner : '',
 
- 				},
 
- 				methods : {
 
- 					init : function() {
 
- 						var _this = this;
 
- 						this.xwScanner = api.require('xwScanner');
 
- 						this.FNScanner = api.require('FNScanner');
 
- 						this.orc = api.require('baiduOCRRecognizer');
 
- 						this.retailerId = $api.getStorage("retailerid");
 
- 						this.getNews();
 
- 						this.getBanner();
 
- 						this.getUserInfo(function(ret) {
 
- 							if ( typeof ret.retailerDto == 'undefined' || ret.retailerDto == null) {
 
- 								_this.showAlert("系统检测您账户信息出现异常,请重新完善。", function() {
 
- 									// TODO 完善信息
 
- 								})
 
- 							} else {
 
- 								_this.reid = ret.retailerDto.id;
 
- 								_this.getCarNum(ret.retailerDto.id, function(num) {
 
- 									_this.carNum = num.length;
 
- 								})
 
- 							}
 
- 						});
 
- 						this.addEvent("openFrameGroup", function() {
 
- 							_this.getUserInfo(function(ret) {
 
- 								_this.getCarNum(ret.retailerDto.id, function(num) {
 
- 									_this.carNum = num.length;
 
- 								})
 
- 							});
 
- 							_this.getNews();
 
- 							_this.getBanner();
 
- 						})
 
- 						//  刷新购物车数量
 
- 						this.addEvent("refushCar", function() {
 
- 							_this.getCarNum(_this.reid, function(num) {
 
- 								_this.carNum = num.length;
 
- 							})
 
- 						})
 
- 						//  配置下拉刷新
 
- 						this.configHeaderRefush(function() {
 
- 							_this.getUserInfo(function(ret) {
 
- 								_this.getCarNum(ret.retailerDto.id, function(num) {
 
- 									_this.carNum = num.length;
 
- 								})
 
- 							});
 
- 							_this.getNews();
 
- 							_this.getBanner();
 
- 						})
 
- 					},
 
- 					//  获取banner列表
 
- 					getBanner : function() {
 
- 						var _this = this;
 
- 						var data = {
 
- 							retailer_id : _this.retailerId,
 
- 							url : 'json',
 
- 							type : 'body'
 
- 						};
 
- 						this.$post(this.bannerUrl, data, function(ret) {
 
- 							if (ret.code == 0) {
 
- 								_this.bannerList = ret.list;
 
- 							}
 
- 						})
 
- 					},
 
- 					//  点击banner查看详情
 
- 					lookBanner : function(id) {
 
- 						var page = {
 
- 							id : id
 
- 						}
 
- 						this.goWin("banner_win", "./order/banner_win.html", page);
 
- 					},
 
- 					//  展示公告 -- 获取公告
 
- 					showMarquee : function() {
 
- 						var _this = this;
 
- 						this.animate = true;
 
- 						setTimeout(function() {
 
- 							_this.marqueeList.push(_this.marqueeList[0]);
 
- 							_this.marqueeList.shift();
 
- 							_this.animate = false;
 
- 						}, 500)
 
- 					},
 
- 					//  跳转新闻列表
 
- 					goInfo : function(news) {
 
- 						var page = {
 
- 							n : JSON.stringify(news)
 
- 						}
 
- 						this.goWin("news_win", "./order/news_win.html", page);
 
- 					},
 
- 					//  获取新闻
 
- 					getNews : function() {
 
- 						var data = {
 
- 						}, _this = this;
 
- 						this.$post(this.getNewsUrl, "", function(ret) {
 
- 							if (ret.code == 0) {
 
- 								_this.marqueeList = ret.page.records;
 
- 								if (_this.marqueeList.length > 2) {
 
- 									setInterval(_this.showMarquee, 2000);
 
- 								}
 
- 							}
 
- 						})
 
- 					},
 
- 					//  百度
 
- 					scan1 : function(type) {
 
- 						var _this = this;
 
- 						api.actionSheet({
 
- 							title : '请选择途径',
 
- 							cancelTitle : '取消',
 
- 							buttons : ['自动扫码', '图片识别', '人工录入']
 
- 						}, function(ret, err) {
 
- 							var index = ret.buttonIndex;
 
- 							if (index == 1) {// 自动扫码
 
- 								_this.scan12(type)
 
- 							} else if (index == 2) {
 
- 								_this.scan_orc(type)
 
- 							} else if (index == 3) {
 
- 								//  手动录入
 
- 								api.prompt({
 
- 									buttons : ['确定']
 
- 								}, function(ret, err) {
 
- 									var index = ret.buttonIndex;
 
- 									var text = ret.text;
 
- 								});
 
- 							}
 
- 						});
 
- 					},
 
- 					//  orc
 
- 					scan_orc : function(type) {
 
- 						var _this = this;
 
- 						api.getPicture({
 
- 							sourceType : 'album',
 
- 							encodingType : 'jpg',
 
- 							mediaValue : 'pic',
 
- 							destinationType : 'url',
 
- 							allowEdit : true,
 
- 							quality : 100,
 
- 							saveToPhotoAlbum : false
 
- 						}, function(ret, err) {
 
- 							if (ret) {
 
- 								url = ret.data;
 
- 								api.showProgress({
 
- 								    msg : '正在识别中'
 
-                                 });
 
- 								_this.orc.init({
 
- 									appKey : 'l4VgvxAuSPAHWtiHicMh9HEq',
 
- 									appSecret : 'zO8cF7Nq4hmcpnIlwlYCyMHSBQecOQUI',
 
- 								}, function(ret) {
 
- 								});
 
- 								_this.orc.recognizeAccurateBasic({
 
- 									// path:'widget://image/text.png',
 
- 									path : url,
 
- 									DetectDirection : true,
 
- 								}, function(ret, err) {
 
- 								    api.hideProgress();
 
- 									api.alert({
 
- 										msg : JSON.stringify(ret)
 
- 									});
 
- 								});
 
- 							}
 
- 						})
 
- 					},
 
- 					//  扫码
 
- 					scan12 : function(type) {
 
- 						var _this = this;
 
- 						var url = type == 0 ? this.getStoreUrl0705 : this.outStoreUrl;
 
- 						this.scan(this.FNScanner, function(ret) {
 
- 							return;
 
- 							var data = {
 
- 								serialNumber : ret,
 
- 								retailerId : _this.retailerId,
 
- 								url : 'json',
 
- 								type : 'body'
 
- 							}
 
- 							_this.$post(url, data, function(retMsg) {
 
- 								if (retMsg.code == 0) {
 
- 									var page = {
 
- 										content : ret,
 
- 										type : type,
 
- 										i : 'scan'
 
- 									}
 
- 									goWin("orderPlace_win", page);
 
- 								} else {
 
- 									if (type == 0) {
 
- 										//  入库
 
- 										_this.showModal("未完善该商品", "系统检测到该码对应的商品不存在系统中,是否要完善该物料商品?", ["确认", "取消"], function(index) {
 
- 											if (index == 1) {
 
- 												var option = {
 
- 													msg : ret,
 
- 												}
 
- 												goWin("orderScan_win.html", option);
 
- 											}
 
- 										})
 
- 									}
 
- 								}
 
- 							});
 
- 						})
 
- 					},
 
- 					lookJF : function() {
 
- 						this.goWin('jifen_win', './order/jifen_win.html', '');
 
- 					},
 
- 					onChange : function() {
 
- 						//  触发了这个事件以后,让他手动加载
 
- 						if (this.carouselPlay != "") {
 
- 							clearInterval(this.carouselPlay);
 
- 						}
 
- 						var _this = this;
 
- 						this.carouselPlay = setInterval(function() {// 手动计时器解决移动端autoplay失效的问题
 
- 							_this.$refs.carousel.next();
 
- 						}, 3000);
 
- 					}
 
- 				},
 
- 				mounted : function() {
 
- 					this.init();
 
- 					Vue.use(VueLazyload, {
 
- 						preLoad : 1.0,
 
- 						error : '../image/noimg.png',
 
- 						loading : '../image/page.gif',
 
- 						attempt : 3,
 
- 					});
 
- 				}
 
- 			})
 
- 		}
 
- 		function goWin(winName, page) {
 
- 			api.openWin({
 
- 				name : winName,
 
- 				url : './order/' + winName + '.html',
 
- 				pageParam : page
 
- 			});
 
- 		}
 
- 		function gg() {
 
- 			api.openWin({
 
- 				name : 'jjs',
 
- 				url : '../jjs/index.html'
 
- 			});
 
- 		}
 
- 	</script>
 
- </html>
 
 
  |