123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476 |
- <!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;
- }
- </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">总库存:<label class="zmq-text-msg">{{store.tatalStock}}</label></span>
- </div>
- <div class="wuliao-title">
- <label class="zmq-text-font-06 zmq-margin-vertical-5">{{store.bizGoodsDto.comName}}</label>
- </div>
- <div class="detail clearfix">
- <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.downData = 'down';
- _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) {
- 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>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>简约表格插件</title>
- <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
- <script src="../../script/jquery.min.js"></script>
- <script src="../../script/tableXR.js"></script>
- <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
- <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
- <link rel="stylesheet" type="text/css" href="../../css/base.css"/>
- <link rel="stylesheet" type="text/css" href="../../css/html.css"/>
- <link type="text/css" rel="stylesheet" href="../../css/shaixuan.css">
- <script src="../../script/jquery.min.js"></script>
- <script src="../../script/shaixuan.js"></script>
- <style>
- table.gridtable {
- font-family: verdana, arial, sans-serif;
- font-size: 11px;
- color: #333333;
- border-width: 1px;
- border-color: #666666;
- border-collapse: collapse;
- width: 100%;
- margin-top: 0.5rem;
- }
- table.gridtable th {
- border-width: 1px;
- padding: 8px;
- border-style: solid;
- border-color: #007f86;
- background-color: #007f86;
- color: #fff;
- text-align: center;
- }
- table.gridtable td {
- border-width: 1px;
- padding: 8px;
- border-style: solid;
- border-color: #666666;
- text-align: center;
- color: #007f86;
- }
- table.gridtable tr:nth-child(odd) {
- background: #d1f8ff !important;
- }
- table tr:nth-child(even) {
- background: #fff !important;
- }
- .aui-flex {
- display: flex;
- display: -webkit-flex;
- margin: 10px;
- float: right;
- }
- .aui-input {
- width: 2rem !important;
- border: 1px solid #999 !important;
- height: 1.3 rem !important;
- margin: 0 10px !important;
- }
- .slide {
- height: 200px
- }
- .slide li a {
- font-size: 0.6 rem;
- }
- .aui-content {
- padding-bottom: 3rem;
- padding-top: 40px;
- }
- #screen {
- /*position: fixed;*/
- z-index: 105;
- width: 100%
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak>
- <!-- <section class="job-module" id="screen">
- <dl class="retrie">
- <dt>
- <a class="zmq-text-done zmq-text-font-07" href="javascript:;">经销商 </a>
- <div class="zmq-text-font-06 zmq-text-msg" style="height: 40px;line-height: 40px;">{{chooseSupplierName}}</div>
- </dt>
- <dd class="area">
- <ul class="slide downlist">
- <li v-for="(i,index) in supplierList" v-on:click="doneThisSupplier(i.agentId,i.agentDto.agentName)">
- <a class="zmq-text-font-06" href="#">{{i.agentDto.agentName}}</a>
- </li>
- </ul>
- </dd>
- </dl>
- </section>-->
- <div v-show = "hasData == true">
- <table class="gridtable">
- <tr>
- <th>规格</th><th>花纹</th><th>品牌</th><th>库存</th><th>可销售库存</th>
- </tr>
- <tr v-for="(item,index) in stickList2">
- <td>{{item.bizGoodsDto.spec}}</td><td>{{item.bizGoodsDto.model}}</td><td>{{item.bizGoodsDto.brand}}</td><td>{{item.tatalStock}}</td><td>{{item.onsaleStock}}</td>
- </tr>
- </table>
- <div class="aui-flex">
- <div class="zmq-text-font-06 zmq-lineHeight-13">
- 上一页
- </div>
- <div>
- <input type="text" class="aui-input zmq-text-font-06 zmq-textAlign-center" style="height: 1.2rem"/>
- </div>
- <div class="zmq-text-font-06 zmq-lineHeight-13">
- 下一页
- </div>
- <div class="zmq-text-font-06 zmq-lineHeight-13 zmq-margin-level-5">
- 共 {{total}} 页
- </div>
- </div>
- </div>
- <img class="zmq-img-nodata" v-show="hasData == false" src="../../image/nodata.png" />
- </div>
- </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/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 : '',
- // 获取经销商列表
- getSupplierUrl : 'getSupplierListUrl',
- supplierList : [],
- chooseSupplierName : '请先选择一个经销商',
- // 根据经销商获取库存
- getStockListUrl : 'checkStoreUrl',
- stockList : [],
- // 获取库存url
- getStockUrl : 'getKucunInfoUrl',
- stickList2 : [], // 库存
- // 商品列表
- // stockList : [{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // },{
- // specs : '7.50R16LT',
- // pattern : 'JT456',
- // brand : '金宇',
- // materialName : '外胎:2001933202191'
- // }],
- // 是否有数据
- hasData : true,
- // 购物车数量
- badge : 0,
- // 是否显示背景
- chooseInfo : false,
- // 是否显示模板
- showModal : false,
- // ss : [{},{},{},{},{},{},{},{}]
- // 分页
- total : 1,
- currPage : 1,
- },
- methods : {
- init : function() {
- // 配置筛选
- var _this = this;
- this.retariler_id = $api.getStorage("retailerid");
- this.getStock2();
- // this.getSupplierList();
- },
- // 获取库存列表
- getStock2 : function(){
- var data = {
- retailerId : this.retariler_id,
- currPage : this.currPage,
- }, _this = this;
- this.$post(this.getStockUrl, data, function(ret) {
- if (ret.code == 0) {
- _this.total = ret.page.total;
- _this.stickList2 = ret.page.records;
- if(_this.stickList2.length > 0){
- _this.hasData = true;
- }
- }
- })
- },
- // 选择了这个经销商
- doneThisSupplier : function(id, name) {
- this.chooseSupplierName = name;
- this.hideList();
- this.getSupplierStore(id);
- },
- // 隐藏列表i
- hideList : function() {
- $(".retrie dt a").removeClass('up');
- $('.downlist').hide();
- $('.mask').hide();
- },
- // 获取经销商下的库存
- getSupplierStore : function(id) {
- var data = {
- agentId : id,
- url : 'json',
- type : 'body'
- }, _this = this;
- this.$post(this.getStockListUrl, data, function(ret) {
- if (ret.code == 0) {
- _this.total = ret.page.total;
- _this.stockList = ret.page.records;
- if (ret.page.records.length > 0) {
- _this.hasData = true;
- }
- }
- })
- },
- // 配置筛选
- config : function() {
- var _this = this;
- $('.retrie dt a').click(function() {
- var $t = $(this);
- if ($t.hasClass('up')) {
- $(".retrie dt a").removeClass('up');
- $('.downlist').hide();
- $('.mask').hide();
- _this.showModal = false;
- api.setFrameAttr({
- name : api.frameName,
- bounces : true
- });
- } else {
- _this.showModal = true;
- api.setFrameAttr({
- name : api.frameName,
- bounces : false
- });
- $(".retrie dt a").removeClass('up');
- $('.downlist').hide();
- $t.addClass('up');
- $('.downlist').eq($(".retrie dt a").index($(this)[0])).show();
- $('.mask').show();
- }
- });
- $(".area ul li a:contains('" + $('#area').text() + "')").addClass('selected');
- $(".wage ul li a:contains('" + $('#wage').text() + "')").addClass('selected');
- },
- // 获取经销商列表
- getSupplierList : function() {
- var data = {
- retailer_id : this.retariler_id,
- url : 'json',
- type : 'body'
- }, _this = this;
- this.$post(this.getSupplierUrl, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.supplierList = ret.list;
- _this.config();
- }
- })
- },
- // 获取库存
- getStock : function() {
- var data = {
- retailerId : this.retariler_id
- }, _this = this;
- this.$post(this.getStockUrl, data, function(ret) {
- if (ret.code == 0 || ret.code == '0') {
- _this.stockList = ret.page.records;
- if (_this.stockList.length == 0) {
- _this.hasData = false;
- }
- }
- })
- },
- // 查看详情
- lookInfo : function(id) {
- var param = {
- id : id,
- }
- this.goWin('storeInfo_win', '../store/storeInfo_win.html', param);
- },
- // 添加商品到购物车 materialId materialCode retailerId amount -- 选择产品规格
- addCar : function(index, type) {
- var param = {
- shopInfo : this.stockList[index],
- type : type
- }
- this.sendEvent("showInfo", param);
- },
- demo : function(e) {
- e.preventDefault()
- }
- },
- mounted : function() {
- this.init();
- }
- })
- }
- </script>
- </html>
|