bztang-admin/addons/yun_shop/static/app/js/chunk-e59c4000.f7fbb7a7.js

1 line
12 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-e59c4000"],{"5b57":function(o,e,t){var i=t("24fb");e=i(!1),e.push([o.i,"#newRetail-inventory .group-box[data-v-28855164]{padding:0 .875rem 8rem;background:#fff}#newRetail-inventory .group-box[data-v-28855164] .van-checkbox__label{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#newRetail-inventory .group-box .good-info[data-v-28855164]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;text-align:left}#newRetail-inventory .group-box .good-info .good-img[data-v-28855164]{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;width:6.25rem;height:6.25rem;background-color:#cfcfcf;border-radius:.313rem;overflow:hidden;margin:.75rem .75rem .75rem 0}#newRetail-inventory .group-box .good-info .goods-main[data-v-28855164]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:.75rem 0}#newRetail-inventory .group-box .good-info .goods-main .good-title[data-v-28855164]{font-size:15px;line-height:24px;font-weight:600;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}#newRetail-inventory .group-box .good-info .goods-main .good-other[data-v-28855164]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#newRetail-inventory .group-box .good-info .goods-main .good-other .good-num[data-v-28855164]{font-size:15px}#newRetail-inventory .group-box .Inventory_details-box[data-v-28855164]{height:1.5rem;line-height:1.5rem;border:1px solid #f14e4e;color:#f14e4e;display:table;padding:0 .875rem}#newRetail-inventory .goods-sku[data-v-28855164]{color:#999;font-size:12px}#newRetail-inventory .bottom-btn-box[data-v-28855164]{position:fixed;bottom:0;left:0;width:100%;height:2.844rem;line-height:2.844rem;text-align:center;background-color:#f14e4e;font-size:18px;color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#newRetail-inventory .bottom-btn-box .btn[data-v-28855164]{width:50%}#newRetail-inventory .good-price-popup[data-v-28855164]{height:100%;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}#newRetail-inventory .good-price-popup .h2[data-v-28855164]{height:3rem;line-height:3rem;text-align:center;font-size:18px}#newRetail-inventory .good-price-popup .good-list[data-v-28855164]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:100%;overflow:scroll;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding-bottom:3.2rem}#newRetail-inventory .good-price-popup .good-list .good-list-child[data-v-28855164]{padding:.5rem .75rem;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}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-goods-info[data-v-28855164]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-goods-info .good-img[data-v-28855164]{width:5.125rem;height:5.125rem;border-radius:.25rem;margin:0 .5rem 0 0}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-goods-info .goods-main[data-v-28855164]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;text-align:left;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-goods-info .goods-main .good-title[data-v-28855164]{font-size:14px;line-height:16px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-goods-info .goods-main input[data-v-28855164]{border:none;line-height:1.75rem;border-bottom:1px solid #f1f1f1}#newRetail-inventory .good-price-popup .good-list .good-list-child .popup-del-good[data-v-28855164]{padding:.75rem 0 .75rem .75rem;color:#f14e4e}#newRetail-inventory .good-price-popup .btn[data-v-28855164]{width:90%;height:2.188rem;line-height:2.188rem;text-align:center;color:#fff;background-color:#f14e4e;border-radius:1.094rem;overflow:hidden;margin:.625rem auto}",""]),o.exports=e},"7bcc":function(o,e,t){"use strict";t.r(e);var i=function(){var o=this,e=o.$createElement,t=o._self._c||e;return t("div",{attrs:{id:"newRetail-inventory"}},[t("c-title",{attrs:{hide:!1,text:"我的库存"}}),t("van-sticky",{attrs:{"offset-top":40}},[t("van-search",{attrs:{"show-action":"",shape:"round",placeholder:"请输入商品名称"},on:{search:o.getGood},scopedSlots:o._u([{key:"action",fn:function(){return[t("div",{on:{click:o.getGood}},[o._v("搜索")])]},proxy:!0}]),model:{value:o.searchValue,callback:function(e){o.searchValue=e},expression:"searchValue"}})],1),t("div",{staticClass:"group-box"},[t("van-checkbox-group",{model:{value:o.selectGoods,callback:function(e){o.selectGoods=e},expression:"selectGoods"}},o._l(o.goodsList,(function(e){return t("van-checkbox",{key:e.goods_id,attrs:{name:e,disabled:Number(e.goods_stock)<1,"checked-color":"#f14e4e"}},[t("div",{staticClass:"good-info"},[t("img",{staticClass:"good-img",attrs:{src:e.goods_thumb,alt:""}}),t("div",{staticClass:"goods-main"},[t("div",{staticClass:"good-title"},[o._v(o._s(e.goods_title))]),e.option_title?t("div",{staticClass:"goods-sku"},[o._v("规格:"+o._s(e.option_title))]):o._e(),t("div",{staticClass:"good-other",on:{click:function(o){o.stopPropagation()}}},[t("div",{staticClass:"good-num"},[o._v("库存:"+o._s(e.goods_stock))]),Number(e.goods_stock)>0?t("van-stepper",{attrs:{integer:"",theme:"round","button-size":"22",min:"1",max:e.goods_stock},model:{value:e.goods_num,callback:function(t){o.$set(e,"goods_num",t)},expression:"good.goods_num"}}):o._e()],1)])]),t("div",{staticClass:"Inventory_details-box",on:{click:function(t){return t.stopPropagation(),o.gotoUrl("newRetailInventoryDetails",{gid:e.goods_id,optionId:e.goods_option})}}},[o._v("库存明细")])])})),1)],1),t("div",{staticClass:"bottom-btn-box set-pc-style"},[t("div",{staticClass:"btn",staticStyle:{"background-color":"#ff9500"},on:{click:function(e){return e.stopPropagation(),o.agentSalePopup()}}},[o._v("零售")]),t("div",{staticClass:"btn",on:{click:function(e){return e.stopPropagation(),o.freeSend()}}},[o._v("自主提货")])]),t("van-popup",{style:{height:"65%"},attrs:{position:"bottom",closeable:""},model:{value:o.showPrice,callback:function(e){o.showPrice=e},expression:"showPrice"}},[t("div",{staticClass:"good-price-popup"},[t("div",{staticClass:"h2"},[o._v("价格设置")]),t("div",{staticClass:"good-list"},o._l(o.selectGoods,(function(e,i){return t("div",{key:e.goods_id,staticClass:"good-list-child"},[t("div",{staticClass:"popup-goods-info"},[t("img",{staticClass:"good-img",attrs:{src:e.goods_thumb,alt:""}}),t("div",{staticClass:"goods-main"},[t("div",{staticClass:"good-title"},[o._v(o._s(e.goods_title))]),t("div",{staticClass:"goods-sku"},[o._v("x "+o._s(e.goods_num))]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.goods_price,expression:"g.goods_price"}],attrs:{type:"number",placeholder:"请输入单价金额"},domProps:{value:e.goods_price},on:{input:function(t){t.target.composing||o.$set(e,"goods_price",t.target.value)}}})])]),t("div",{staticClass:"popup-del-good",on:{click:function(e){return e.stopPropagation(),o.delSelectGood(i)}}},[t("i",{staticClass:"iconfont icon-ht_operation_delete"})])])})),0),t("div",{staticClass:"btn",on:{click:function(e){return e.stopPropagation(),o.confirmAgentSale.apply(null,arguments)}}},[o._v("确定")])])])],1)},n=[],s=(t("e7e5"),t("d399")),l=(t("d3b7"),t("159b"),t("99af"),t("a434"),t("e9c4"),t("ac0d")),a={mixins:[l["a"]],data:function(){return{searchValue:"",goodsList:[],value:1,selectGoods:[],showPrice:!1,page:1,isLoadMore:!0,total_page:0}},components:{},computed:{},mounted:function(){this.getGood()},methods:{gotoUrl:function(o){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.$router.push(this.fun.getUrl(o,e,t))},getGood:function(){var o=this;$http.get("plugin.new-retail.frontend.index.getStock",{goods_name:this.searchValue},"").then((function(e){1===e.result?(o.goodsList=e.data.data,o.isLoadMore=!0,o.total_page=e.data.last_page,o.total_page||(o.total_page=0),o.goodsList.forEach((function(o){o.goods_num=1,o.goods_price=null})),o.selectGoods=[]):(Object(s["a"])(e.msg),o.$router.go(-1))})).catch((function(o){}))},getMoreData:function(){this.isLoadMore=!1;var o=this;o.page>=o.total_page||(o.page+=1,$http.get("plugin.new-retail.frontend.index.getStock",{goods_name:this.searchValue,page:o.page},"加载中").then((function(e){if(o.isLoadMore=!0,1!=e.result)return o.page=o.page-1,void(o.isLoadMore=!1);var t=e.data.data;t.forEach((function(o){o.goods_num=1,o.goods_price=null})),o.goodsList=o.goodsList.concat(t)})).catch((function(o){})))},agentSalePopup:function(){this.selectGoods.length<1?Object(s["a"])("请选择商品"):this.showPrice=!0},delSelectGood:function(o){this.selectGoods.splice(o,1),this.selectGoods.length<1&&(Object(s["a"])("请选择商品"),this.showPrice=!1)},confirmAgentSale:function(){var o=this;if(this.selectGoods.length<1)Object(s["a"])("请选择商品");else{for(var e=0;e<this.selectGoods.length;e++)if(!this.selectGoods[e].goods_price||""==this.selectGoods[e].goods_price)return void Object(s["a"])("请填写单价");$http.post("plugin.new-retail.frontend.index.onlineRetail",{goods:this.selectGoods},"").then((function(e){1===e.result?o.$router.push(o.fun.getUrl("newRetailRetailLink",{id:e.data.id})):Object(s["a"])(e.msg)})).catch((function(o){}))}},freeSend:function(){if(this.selectGoods.length<1)Object(s["a"])("请选择商品");else{var o=[];this.selectGoods.forEach((function(e){o.push({goods_id:e.goods_id,goods_option:e.goods_option,goods_num:e.goods_num})})),this.$router.push(this.fun.getUrl("goodsorder",{},{orderType:"newRetail",tag:"-2",goodsId:0,optionsId:0,total:0,goods:JSON.stringify(o),retail_state:"2"}))}}}},d=a,r=(t("859e"),t("2877")),c=Object(r["a"])(d,i,n,!1,null,"28855164",null);e["default"]=c.exports},"859e":function(o,e,t){"use strict";t("b0ab")},ac0d:function(o,e,t){"use strict";t.d(e,"a",(function(){return s}));var i=document.documentElement,n=document.body,s={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var o=0;return i&&i.scrollTop?o=i.scrollTop:n&&(o=n.scrollTop),o},getClientHeight:function(){var o=0;return o=n.clientHeight&&i.clientHeight?Math.min(n.clientHeight,i.clientHeight):Math.max(n.clientHeight,i.clientHeight),o},getScrollHeight:function(){return Math.max(n.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var o=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=o>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},b0ab:function(o,e,t){var i=t("5b57");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[o.i,i,""]]),i.locals&&(o.exports=i.locals);var n=t("499e").default;n("1ef073ca",i,!0,{sourceMap:!1,shadowMode:!1})}}]);