bztang-admin/addons/yun_shop/static/app/js/chunk-538fe952.eb5f43b3.js

1 line
7.8 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-538fe952"],{1069:function(t,e,o){"use strict";o("c789")},"1daf":function(t,e,o){"use strict";o.r(e);var a=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"cloud-stock-home"},[o("c-title",{attrs:{text:"门店云库存"}}),o("van-search",{attrs:{placeholder:"搜索分类",shape:"round"},on:{search:t.onSearch},model:{value:t.cate_name,callback:function(e){t.cate_name=e},expression:"cate_name"}}),o("div",{staticClass:"content"},t._l(t.list,(function(e){return o("div",{key:e.id,staticClass:"item"},[o("div",{staticClass:"space-between flex mb24"},[o("span",{staticClass:"name"},[t._v(t._s(e.name)+"("+t._s(e.amount)+")")]),o("div",{staticClass:"flex",staticStyle:{"flex-direction":"column"}},[o("span",{staticClass:"inventory"},[t._v("库存:"+t._s(e.nums))])])]),o("div",{staticClass:"flex space-around"},[o("div",{staticClass:"flex column align-items-center"},[o("img",{staticStyle:{width:"1.5rem"},attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/store-cloud-stock/Details.png"}}),o("span",{staticStyle:{color:"#999","font-size":"0.75rem","margin-top":"0.25rem"},on:{click:function(o){return t.link(e.id)}}},[t._v("查看明细")])]),o("div",{staticClass:"flex column align-items-center"},[o("img",{staticStyle:{width:"1.5rem"},attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/plugin/store-cloud-stock/assignment.png"}}),o("span",{staticStyle:{color:"#999","font-size":"0.75rem","margin-top":"0.25rem"},on:{click:function(o){return t.show_overlay(e.id)}}},[t._v("转让库存")])])])])})),0),o("van-overlay",{attrs:{show:t.show},on:{click:function(e){t.show=!1}}},[o("div",{staticClass:"wrapper",on:{click:function(t){t.stopPropagation()}}},[o("div",{staticClass:"block"},[o("div",{staticClass:"close",on:{click:function(e){t.show=!1}}},[o("van-icon",{attrs:{name:"cross"}})],1),o("p",{staticClass:"mt-40",staticStyle:{"font-size":"1.125rem"}},[t._v("转让库存")]),o("div",{staticStyle:{padding:"0.75rem 1.75rem 1.25rem"}},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.mobile,expression:"mobile"}],staticStyle:{"margin-bottom":"0.75rem"},attrs:{type:"text",placeholder:"请输入会员手机号"},domProps:{value:t.mobile},on:{input:function(e){e.target.composing||(t.mobile=e.target.value)}}}),o("input",{directives:[{name:"model",rawName:"v-model",value:t.nums,expression:"nums"}],attrs:{type:"text",placeholder:"请输入转让数量"},domProps:{value:t.nums},on:{input:function(e){e.target.composing||(t.nums=e.target.value)}}})]),o("van-button",{staticStyle:{"border-radius":"0.3125rem",margin:"0 auto 2.125rem",width:"90%"},attrs:{color:"#EF5452",block:""},on:{click:t.confirm}},[t._v("确定转让")])],1)])])],1)},n=[],i=o("c7eb"),s=o("1da1"),c=(o("14d9"),o("99af"),o("ac0d")),r={mixins:[c["a"]],data:function(){return{list:[],page:1,total_page:1,isLoadMore:!1,stock_id:null,mobile:null,nums:null,show:!1,cate_name:"",is_manager:!1}},activated:function(){this.isLoadMore=!1,this.getData()},methods:{show_overlay:function(t){this.stock_id=t,this.show=!0},onSearch:function(t){this.getData({cate_name:t,page:1})},link:function(t){this.$router.push(this.fun.getUrl("cloudStock_list",{stock_id:t},{}))},confirm:function(){var t=this;return Object(s["a"])(Object(i["a"])().mark((function e(){var o,a,n,s;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o={stock_id:t.stock_id,mobile:t.mobile,nums:t.nums},e.next=3,$http.post("plugin.store-cloud-stock.frontend.controllers.home.trans",o,"loading");case 3:if(a=e.sent,n=a.result,s=a.msg,0!=n){e.next=8;break}return e.abrupt("return",t.$toast(s));case 8:t.show=!1,t.$toast(s);case 10:case"end":return e.stop()}}),e)})))()},getMoreData:function(){if(!(this.page>=this.total_page)){this.isLoadMore=!1;var t={},e=this.page+1;t.page=e,this.cate_name&&(t.cate_name=this.cate_name),this.getData(t)}},getData:function(){var t=arguments,e=this;return Object(s["a"])(Object(i["a"])().mark((function o(){var a,n,s,c,r,l,d,m;return Object(i["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:return a=t.length>0&&void 0!==t[0]?t[0]:{},o.next=3,$http.get("plugin.store-cloud-stock.frontend.controllers.home.index",a,"loading");case 3:if(n=o.sent,s=n.result,c=n.msg,r=n.data,l=r.data,d=r.current_page,m=r.last_page,0!=s){o.next=12;break}return o.abrupt("return",e.$toast(c));case 12:e.isLoadMore=!0,e.page=d,e.total_page=m,e.list=1==d?l||[]:e.list.concat(l);case 16:case"end":return o.stop()}}),o)})))()}}},l=r,d=(o("1069"),o("2877")),m=Object(d["a"])(l,a,n,!1,null,"2b015774",null);e["default"]=m.exports},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return i}));var a=document.documentElement,n=document.body,i={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:n&&(t=n.scrollTop),t},getClientHeight:function(){var t=0;return t=n.clientHeight&&a.clientHeight?Math.min(n.clientHeight,a.clientHeight):Math.max(n.clientHeight,a.clientHeight),t},getScrollHeight:function(){return Math.max(n.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(){}}}},c789:function(t,e,o){var a=o("fbe5");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=o("499e").default;n("71b308f9",a,!0,{sourceMap:!1,shadowMode:!1})},fbe5:function(t,e,o){var a=o("24fb");e=a(!1),e.push([t.i,".cloud-stock-home .name[data-v-2b015774]{font-size:.9375rem}.cloud-stock-home .align-items-center[data-v-2b015774]{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.cloud-stock-home .column[data-v-2b015774]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.cloud-stock-home .inventory[data-v-2b015774]{color:#999;font-size:.75rem}.cloud-stock-home .tips[data-v-2b015774]{position:absolute;top:50%;left:30%;color:#ef5452;font-size:.75rem}.cloud-stock-home .text-indent-1[data-v-2b015774]{text-indent:1em}.cloud-stock-home input[data-v-2b015774]{height:2.3125rem;border:1px solid #e7e7e7;opacity:1;border-radius:.25rem;padding-left:.625rem;width:100%}.cloud-stock-home .mt-40[data-v-2b015774]{margin-top:1.25rem}.cloud-stock-home .mt-22[data-v-2b015774]{margin-top:.6875rem}.cloud-stock-home .wrapper[data-v-2b015774]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;height:100%}.cloud-stock-home .block[data-v-2b015774]{width:19.5rem;border-radius:.625rem;position:relative;background-color:#fff}.cloud-stock-home .close[data-v-2b015774]{position:absolute;top:3%;right:.75rem;font-size:.75rem}.cloud-stock-home .mb24[data-v-2b015774]{margin-bottom:.75rem}.cloud-stock-home .flex[data-v-2b015774]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.cloud-stock-home .space-around[data-v-2b015774]{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.cloud-stock-home .space-between[data-v-2b015774]{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.cloud-stock-home .content[data-v-2b015774]{padding:.625rem .8125rem}.cloud-stock-home .content .item[data-v-2b015774]{background:#fff;padding:.75rem 1rem 1.3125rem .8125rem;border-radius:.3125rem;margin-bottom:.5rem}",""]),t.exports=e}}]);