1 line
4.3 KiB
JavaScript
1 line
4.3 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46ae8e3c"],{"1f67":function(t,e,i){var a=i("24fb");e=a(!1),e.push([t.i,".tbs[data-v-d7c9b3d6]{background:#fff;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;padding:.625rem .875rem;border-bottom:.0625rem solid #ebebeb;font-size:14px}.tbs .item1[data-v-d7c9b3d6]{color:#8c8c8c;font-size:12px}.tbs .item2[data-v-d7c9b3d6]{-webkit-box-flex:2;-webkit-flex:2;-ms-flex:2;flex:2;text-align:left}.tbs .item2 li[data-v-d7c9b3d6]{line-height:1.5rem}.tbs .item3 .add[data-v-d7c9b3d6]{font-size:18px;color:#259b24}.tbs .item3 .reduce[data-v-d7c9b3d6]{font-size:18px;color:#f15353}",""]),t.exports=e},ac0d:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var a=document.documentElement,s=document.body,o={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return a&&a.scrollTop?t=a.scrollTop:s&&(t=s.scrollTop),t},getClientHeight:function(){var t=0;return t=s.clientHeight&&a.clientHeight?Math.min(s.clientHeight,a.clientHeight):Math.max(s.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(s.scrollHeight,a.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},c367:function(t,e,i){var a=i("1f67");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var s=i("499e").default;s("1175d7c9",a,!0,{sourceMap:!1,shadowMode:!1})},e676:function(t,e,i){"use strict";i("c367")},e7e8:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"storeBalanceDetail"}},[i("c-title",{attrs:{hide:!1,text:t.title+"明细"}}),i("van-tabs",{on:{click:t.swichTabTItem},model:{value:t.active,callback:function(e){t.active=e},expression:"active"}},[i("van-tab",{attrs:{title:"全部"}}),i("van-tab",{attrs:{title:"收入"}}),i("van-tab",{attrs:{title:"支出"}})],1),t.recordsList&&t.recordsList.length>0?i("div",t._l(t.recordsList,(function(e,a){return i("router-link",{key:a,attrs:{to:t.fun.getUrl("details",{item:e.id,name:"store"})}},[i("div",{staticClass:"tbs"},[i("ul",{staticClass:"item2"},[i("li",[t._v(t._s(e.mold_name))]),i("li",[t._v(t._s(t.title)+":"+t._s(e.after_balance))]),i("li",{staticClass:"item1"},[t._v(t._s(e.created_at))])]),1==e.type?i("div",{staticClass:"item3"},[i("span",{staticClass:"add"},[t._v("+ "+t._s(e.change_balance))])]):t._e(),-1==e.type?i("div",{staticClass:"item3"},[i("span",{staticClass:"reduce"},[t._v(t._s(e.change_balance))])]):t._e()])])})),1):t._e()],1)},s=[],o=(i("99af"),i("ac0d")),l={mixins:[o["a"]],data:function(){return{title:"",isLoadMore:!0,page:1,total_page:0,active:"0",recordsList:[]}},methods:{getData:function(){var t=this,e="0"==this.active?"0":"1"==this.active?"1":"-1";$http.post("plugin.store-cashier.frontend.store.balance.log.index",{store_id:this.$route.params.store_id,log_type:e},"").then((function(e){t.isShow=!0,1===e.result?(t.page=1,t.recordsList=e.data.list.data,t.total_page=e.data.list.last_page,t.title=e.data.title):Toast(e.msg)})).catch((function(t){}))},init:function(){this.isLoadMore=!0,this.page=1,this.total_page=0,this.active="0",this.recordsList=[]},swichTabTItem:function(){this.page=1,this.total_page=0,this.recordsList=[],this.isLoadMore=!0,this.getData()},getMoreData:function(){var t=this,e="0"==this.active?"0":"1"==this.active?"1":"-1";this.isLoadMore=!1,this.page>=this.total_page||(this.page=this.page+1,$http.get("plugin.store-cashier.frontend.store.balance.log.index",{page:this.page,store_id:this.$route.params.store_id,log_type:e},"加载中").then((function(e){if(t.isLoadMore=!0,1===e.result){var i=e.data.list.data;t.recordsList=t.recordsList.concat(i)}else t.page=t.page-1,t.isLoadMore=!1}),(function(t){})))}},activated:function(){this.init(),this.getData()}},n=l,c=(i("e676"),i("2877")),r=Object(c["a"])(n,a,s,!1,null,"d7c9b3d6",null);e["default"]=r.exports}}]); |