| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- <!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 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;
- }
- </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">
- <div class="aui-slide-wrap" >
- <div class="aui-slide-node bg-dark" v-for="(b,i) in bannerList" v-on:click="lookBanner(b.linkId)">
- <img class="" v-bind:src ="b.imgPath"/>
- <!--{{b.imgPath}}-->
- </div>
- <!--<div class="aui-slide-node bg-dark">
- <img class="" src="../image/banner2.png" />
- </div>
- <div class="aui-slide-node bg-dark">
- <img class="" src="../image/banner3.png" />
- </div>-->
- </div>
- <div class="aui-slide-page-wrap">
- <!--分页容器-->
- </div>
- </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/aui-slide.js"></script>
- <script type="text/javascript" src="../script/vue.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() {
- new Vue({
- el : '#app',
- data : {
- // 用户id
- retailerId : '',
- // 购物车数量
- carNum : '',
- reid : '',
- // 扫码
- FNScanner : '',
- xwScanner : '',
- // 入库扫码
- getStoreUrl0705 : 'addOrgoScanUrl',
- // 出库扫码
- outStoreUrl : 'outScanUrl',
- // 获取新闻
- getNewsUrl : 'getNews',
- // 新闻
- animate : false,
- marqueeList : [],
- // 获取banner
- bannerUrl : 'getBannerUrl',
- bannerList : [],
- },
- methods : {
- init : function() {
- var _this = this;
- this.FNScanner = api.require('FNScanner');
- this.xwScanner = api.require('xwScanner');
- 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.getCarNum(_this.reid, function(num) {
- _this.carNum = num.length;
- })
- })
- // 刷新购物车数量
- 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;
- _this.$nextTick(function() {
- var slide3 = new auiSlide({
- container : document.getElementById("aui-slide3"),
- // "width":300,
- "height" : 190,
- "speed" : 500,
- "autoPlay" : 3000, //自动播放
- "loop" : true,
- "pageShow" : true,
- "pageStyle" : 'line',
- 'dotPosition' : 'center'
- })
- })
- }
- })
- },
- // 点击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;
- var url = type == 0 ?this.getStoreUrl0705 : this.outStoreUrl;
- this.scant(this.xwScanner, function(ret) {
- 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', '');
- },
- },
- mounted : function() {
- this.init();
- Vue.use(VueLazyload,{
- preLoad: 1.3,
- error: '../image/noimg.png',
- loading: '../image/load.gif',
- attempt: 1,
- });
- }
- })
- }
- 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>
|