123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
- <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
- <title>title</title>
- <link rel="stylesheet" href="../../css/api.css"/>
- <link rel="stylesheet" href="../../css/aui.css"/>
- <link rel="stylesheet" href="../../css/weui.min.css"/>
- <link rel="stylesheet" href="../../css/html.css"/>
- <link rel="stylesheet" href="../../css/xunjia_wuliao.css"/>
- <style>
- #app {
- padding-bottom: 3rem;
- }
- .weui_cell:before {
- border-top: 0px !important;
- }
- .weui_btn {
- border-radius: 0px !important;
- }
- .zmq-radius {
- border: 1px solid#00787B;
- border-radius: 5px;
- padding : 0px 5px;
- margin-top: -5px;
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak>
- <article style="bottom: 0;">
- <div class="weui_cells weui_cells_access zmq-width-90 zmq-bg-transparent">
- <a class="weui_cell zmq-margin-top-10 zmq-bg-white zmq-radius-10" href="javascript:;" v-for="(store,index) in list">
- <div class="weui_cell_bd weui_cell_primary">
- <div class="wuliao-title zmq-border-bottom-1">
- <label class="zmq-text-msg">商品编码:{{store.bizGoodsDto.serialNumber}}</label>
- <!--<span class="zmq-text-msg" >-{{store.statusName}}</span>-->
- <span class="require zmq-line-1 zmq-float-right zmq-position-absolute zmq-radius"><label class="zmq-text-msg">{{store.bizGoodsDto.brand}}</label></span>
- </div>
- <div class="wuliao-title">
- <label class="zmq-text-font-06">{{store.bizGoodsDto.comName}}</label>
- </div>
- <div class="detail zmq-flex-nowarp">
- <span class="date zmq-text-explain">总库存:{{store.tatalStock}}</span>
- <!--<span class="date zmq-text-explain">可用库存:{{store.onsaleStock}}</span>-->
- </div>
- <div class="detail zmq-flex-nowarp">
- <span class="date zmq-text-explain">创建时间:{{store.createTime}}</span>
- </div>
- </div> </a>
- </div>
- </article>
- <img class="zmq-img-nodata" v-show="hasData == false" src="../../image/nodata.png" />
- <div v-show="upLock == false" class="zmq-text-explain zmq-margin-top-10 zmq-textAlign-center zmq-margin-bottom-10 zmq-block-text">
- 已无更多数据
- </div>
- </div>
- </body>
- <script type="text/javascript" src="../../script/api.js"></script>
- <script type="text/javascript" src="../../script/aui-scroll.js"></script>
- <script type="text/javascript" src="../../script/vue.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 : {
- retariler_id : '',
- // 获取库存url
- getStockUrl : 'getKucunInfoUrl',
- type : '',
- list : [],
- // 是否有数据
- hasData : false,
- // 分页查询
- upLock : true,
- current : 1,
- total : 1,
-
- },
- methods : {
- init : function() {
- var _this = this;
- this.retariler_id = $api.getStorage("retailerid");
- _this.getStock();
- this.configHeaderRefush(function() {
- _this.upLock = true;
- _this.current = 1;
- _this.getStock();
- })
- // 配置上啦刷星
- this.configBottomRefush(function(status) {
- if (_this.hasData == true) {
- // 开启上拉加载
- if (_this.total > _this.current) {
- _this.downData = 'up';
- _this.current = _this.current + 1;
- _this.getList();
- } else {
- // 上啦没有数据了
- _this.upLock = false;
- }
- }
- })
- },
- // 获取库存
- getStock : function() {
- // var data = {
- // retarilerId : this.retariler_id,
- // current : this.current,
- // }, _this = this;
- // this.$post(this.getStockUrl, data, function(ret) {
- // alertJson(ret);
- // if (ret.code == 0) {
- // _this.list = ret.page.records;
- // }
- // })
- var data = {
- retailerId : this.retariler_id,
- current : this.current,
- }, _this = this;
- this.$post(this.getStockUrl, data, function(ret) {
- if (ret.code == 0) {
- _this.total = ret.page.pages;
- if (_this.downData == 'up') {
- _this.list = _this.list.concat(ret.page.records);
- } else {
- _this.list = ret.page.records;
- if (_this.list.length > 0) {
- _this.hasData = true;
- }
- }
- }
- })
- },
- // 查看商品详情
- loonInfo : function(id){
- var page = {
- id : id,
- page : 'get'
- }
- this.goWin("orderScan_win","orderScan_win.html",page);
- }
- },
- mounted : function() {
- this.init();
- }
- })
- }
- </script>
- </html>
|