123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 |
- <!DOCTYPE html>
- <html class="">
- <!--STATUS OK-->
- <head>
- <meta name="referrer" content="always" />
- <meta charset='utf-8' />
- <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta http-equiv="x-dns-prefetch-control" content="on">
- <meta name="description" content="">
- <meta name="format-detection" content="telephone=no" />
- <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
- <link rel="stylesheet" type="text/css" href="css/iconfont.css">
- <link rel="stylesheet" type="text/css" href="css/main.css" />
- <script src="js/vue.js"></script>
- <script src="js/vant-ui.js"></script>
- <script src="js/main.js"></script>
- <link rel="stylesheet" href="./mescroll/mescroll.min.css">
- <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
- <title></title>
- </head>
- <style>
- .kucunxiangqing , #app {
- overflow-y: scroll;
- }
- .kucunxiangqing .kucunList .srcollBox {
- overflow-y: scroll !important;
- }
- .kucunxiangqing .kucunList .title {
- position: static;
- }
- .kucunxiangqing .kucunList {
- position: static;
- padding-top: 0rem;
- }
- .kucunxiangqing {
- background-color: #fff !important;
- }
- .kucunxiangqing .typeFooter , .kucunxiangqing .leiji {
- background-color: #00a0ea !important;
- }
- .j-center {
- font-size: 0.3rem;
- }
- .list {
- padding: 0.2rem;
- border-bottom: 1px solid#e2e0e0;
- width: 96%;
- margin-left: 2%;
- }
- .top-center {
- margin: 0.1rem 0;
- }
- </style>
- <body>
- <div id="app" v-cloak>
- <div class="pageView kucunxiangqing col" id="mescroll">
- <!-- <div class="header flex a-center j-center">
- <i class="iconfont icon-back" onclick="history.go(-1)"></i>
- 库存查询
- <div class="toobla flex a-center">
- <div class="icon1"></div>
- <div class="icon2"></div>
- </div>
- </div>-->
- <!-- <div class="leiji flex a-center j-center">
- 库存总量:
- <h4> {{ info.stock }} </h4>
- </div>
- <div class="typeFooter flex a-center j-center">
- <div class="item flex j-center a-center">
- 品牌
- </div><span></span>
- <div class="item flex j-center a-center">
- 花纹
- </div><span></span>
- <div class="item flex j-center a-center">
- 规格
- </div>
- </div> -->
- <div class="kucunList" v-show="stockList.length > 0">
- <!-- <div class="title flex a-center j-center">
- <div class="item flex a-center j-center">
- 物料描述
- </div>
- <div class="item flex a-center j-center">
- 月入库
- </div>
- <div class="item flex a-center j-center">
- 月出库
- </div>
- <div class="item flex a-center j-center">
- 库存
- </div>
- </div> -->
- <!-- -->
- <div class="srcollBox">
- <div class="ite a-center j-center list" v-for="(item,index) in stockList" :key="index" v-on:click="lookInfo">
- <div class="fx1 flex a-center">
- {{ item.tireSize }}
- </div>
- <div class="fx1 flex a-center top-center">
- <p style="flex:1">库存:{{ item.sheetsNumber }}</p>
- </div>
- <!-- <div class="fx1 flex a-center" >
- <p>{{ item.stock }}</p>
- </div> -->
- </div>
- </div>
- </div>
- <div v-show="stockList.length == 0" style="text-align:center">
- <img src="./image/noData.png" style="margin:2rem auto" />
- </div>
- </div>
- </div>
- </body>
- <script type="text/javascript" src="../script/api.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: {
- userId: '', // 绑定的经销商kunnr
- brand: '', // 品牌
- spec: '', // 规格
- pattern: '', // 花纹
- starttime: '', // 开始时间
- endtime: '', // 结束时间
- page: 1,
- pagesize: 10,
- totalPages : 1,
- info: {}, // 包含总库存,筛选品牌,规格,库存
- stockList: [], // 库存列表
- },
- methods: {
- init: function() {
- var _this = this;
- this.userId = $api.getStorage('userid');
- this.getStockList();
- // 配置上拉加载下拉刷新
- this.configDownAndPull("mescroll",function(mescroll){
- _this.page = 1;
- _this.getStockList(mescroll);
- },function(mescroll){
- if(_this.page < _this.totalPages){
- _this.page = _this.page + 1;
- _this.getStockList(mescroll,1);
- }else{
- mescroll.endSuccess(_this.pagesize,false);
- }
- })
- },
- // 获取库存列表
- getStockList: function(mescroll) {
- var data = {
- "storeId": '1164',
- "brand": this.brand,
- "spec": this.spec,
- "pattern": this.pattern,
- "starttime": this.starttime,
- "endtime": this.endtime,
- "page": this.page,
- "pagesize": this.pagesize,
- "url": "json",
- "type": "body"
- },
- _this = this,
- url = "searchKuCunU";
- this.$post(url, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- if(mescroll){
- mescroll.endSuccess(_this.pagesize,true);
- }
- _this.totalPages = ret.page.pages;
- var brand = new Array(),
- pattern = new Array(),
- spec = new Array();
- // ret.data.data.brandList.map(function(b, index) {
- // brand.push({
- // name: b
- // })
- // })
- // ret.data.data.patternList.map(function(p, index) {
- // pattern.push({
- // name: p
- // })
- // })
- // ret.data.data.specList.map(function(s, index) {
- // spec.push({
- // name: s
- // })
- // })
- // _this.info = {
- // stock: ret.data.data.stock,
- // brand: brand,
- // pattern: pattern,
- // spec: spec
- // }
- _this.stockList = _this.page == 1 ? ret.page.records : _this.stockList.concat(ret.page.records);
- }
- })
- },
- // 查看详情
- lookInfo: function() {
- this.goWin('kucunxiangqing_win', 'kucunxiangqing_win.html', '');
- }
- },
- mounted: function() {
- this.init();
- }
- })
- }
- </script>
- </html>
|