1 line
17 KiB
JavaScript
1 line
17 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5175e4e6"],{1446:function(t,e,o){"use strict";o("885bd")},"2f35":function(t,e,o){var a=o("bc4c");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=o("499e").default;n("42073bc7",a,!0,{sourceMap:!1,shadowMode:!1})},"4f36":function(t,e,o){var a=o("be3e");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=o("499e").default;n("6b66193d",a,!0,{sourceMap:!1,shadowMode:!1})},"78fe":function(t,e,o){"use strict";o("2f35")},"885bd":function(t,e,o){var a=o("c6e6");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var n=o("499e").default;n("12d0a250",a,!0,{sourceMap:!1,shadowMode:!1})},bc4c:function(t,e,o){var a=o("24fb");e=a(!1),e.push([t.i,".platform-popup-pane .tip{text-align:center;margin-top:1.31rem;font-size:1rem;font-weight:400;color:#202020}.platform-popup-pane .cancal-tip{text-align:center;font-size:.94rem;font-weight:400;color:#393939;line-height:1.13rem;margin:2.28rem 0 3.06rem 0}.platform-popup-pane .btn-sty{border-top:.05rem solid #dbdbdb;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:2.72rem;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:space-evenly;-webkit-justify-content:space-evenly;-ms-flex-pack:space-evenly;justify-content:space-evenly}.platform-popup-pane .btn-sty .cancal{font-size:1.06rem;font-weight:400;color:#030303}.platform-popup-pane .btn-sty .line{height:100%;width:.05rem;background:#dbdbdb;display:block}.platform-popup-pane .btn-sty .sure{font-size:1.06rem;font-weight:400;color:#f14e4e}",""]),t.exports=e},be3e:function(t,e,o){var a=o("24fb");e=a(!1),e.push([t.i,"#take-goods .popup-pane[data-v-2f315dcc]{margin:1.31rem 1.5rem .94rem 1.5rem}#take-goods .popup-pane .top-pane[data-v-2f315dcc]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:relative;font-size:1rem;font-weight:500;color:#3b3b4a;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;line-height:1}#take-goods .popup-pane .close-icon[data-v-2f315dcc]{position:absolute;right:0;top:25%;zoom:.8;color:#707070}#take-goods .popup-pane .type[data-v-2f315dcc]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-size:.88rem;font-weight:400;color:#3b3b4a;margin:1.63rem 0 2.06rem 0}#take-goods .popup-pane .type .type-name[data-v-2f315dcc]{margin-right:1.531em}#take-goods .popup-pane .num[data-v-2f315dcc]{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;font-size:.88rem;font-weight:400;color:#3b3b4a}#take-goods .popup-pane .tip[data-v-2f315dcc]{margin-top:.81rem;font-size:.69rem;font-weight:400;color:#848484;text-align:left}#take-goods .popup-pane .btn-sty[data-v-2f315dcc]{background:#f51d1d;border-radius:.925rem;padding:.75rem 9.31rem;color:#fff;margin-top:4.28rem;display:block}",""]),t.exports=e},c6e6:function(t,e,o){var a=o("24fb");e=a(!1),e.push([t.i,".my-inventory .pane[data-v-cdbe14b6]{margin:0 .63rem}.my-inventory .pane .box[data-v-cdbe14b6]{background:#fff;border-radius:.25rem;width:100%;margin-top:.63rem;padding:.63rem}.my-inventory .pane .box .top-tip[data-v-cdbe14b6]{font-size:.65rem;font-weight:400;color:#807e7e;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}.my-inventory .pane .box .middle-detail[data-v-cdbe14b6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin:.81rem 0 0 0}.my-inventory .pane .box .middle-detail img[data-v-cdbe14b6]{width:3.75rem;height:3.75rem;border-radius:.19rem;margin:0!important}.my-inventory .pane .box .middle-detail .right-goods[data-v-cdbe14b6]{margin-left:.63rem;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;width:100%}.my-inventory .pane .box .middle-detail .right-goods .top-name[data-v-cdbe14b6]{text-align:left;word-break:break-all;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.my-inventory .pane .box .middle-detail .right-goods .active-bottom-box[data-v-cdbe14b6]{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}.my-inventory .pane .box .middle-detail .right-goods .active-num[data-v-cdbe14b6]{margin-right:0!important}.my-inventory .pane .box .middle-detail .right-goods .bottom-box[data-v-cdbe14b6]{text-align:left;font-size:.69rem;color:#807e7e}.my-inventory .pane .box .middle-detail .right-goods .bottom-box[data-v-cdbe14b6],.my-inventory .pane .box .middle-detail .right-goods .bottom-box .bottom-right[data-v-cdbe14b6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;font-weight:400;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.my-inventory .pane .box .middle-detail .right-goods .bottom-box .bottom-right[data-v-cdbe14b6]{font-size:.63rem;color:#f51d1d}.my-inventory .pane .box .middle-detail .right-goods .bottom-box .van-count[data-v-cdbe14b6]{font-size:.63rem;font-weight:400;color:#f51d1d;margin-left:.3rem}.my-inventory .pane .box .active-bottom-btn[data-v-cdbe14b6]{background:silver!important}.my-inventory .pane .box .bottom-btn[data-v-cdbe14b6]{text-align:left;margin:1.25rem .72rem .63rem .72rem;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}.my-inventory .pane .box .bottom-btn .pick-up-goods[data-v-cdbe14b6]{padding:.56rem 3.47rem;background:#f51d1d;border-radius:.94rem;font-size:.75rem;font-weight:400;color:#fff}.my-inventory .pane .box .bottom-btn .consignment[data-v-cdbe14b6]{padding:.56rem 3.47rem;background:#f08012;border-radius:.94rem;font-size:.75rem;font-weight:400;color:#fff}.my-inventory .pane .box .bottom-btn .platform-repurchase[data-v-cdbe14b6]{padding:.56rem 2.75rem;background:#f08012;border-radius:.94rem;font-size:.75rem;font-weight:400;color:#fff}.my-inventory .consignment-popup-pane[data-v-cdbe14b6]{margin:1.31rem 1.5rem 1.64rem 1.5rem}.my-inventory .consignment-popup-pane .top-pane[data-v-cdbe14b6]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;position:relative;font-size:.95rem;font-weight:500;color:#3b3b4a}.my-inventory .consignment-popup-pane .close-icon[data-v-cdbe14b6]{position:absolute;right:0;top:25%;zoom:.9;color:#707070}.my-inventory .consignment-popup-pane .tip[data-v-cdbe14b6]{margin:2.2rem 0 4.66rem 0;font-size:.8rem;font-weight:400;color:#3b3b4a}.my-inventory .consignment-popup-pane .btn-sty[data-v-cdbe14b6]{background:#f51d1d;border-radius:37px;padding:.75rem 9.31rem;color:#fff}",""]),t.exports=e},f42a: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:"my-inventory"},[o("c-title",{attrs:{text:t.name}}),o("van-search",{attrs:{shape:"round",placeholder:"请输入搜索内容"},on:{search:t.onSearch},model:{value:t.goods_name,callback:function(e){t.goods_name=e},expression:"goods_name"}}),o("d-list",{attrs:{loading:t.loading,finished:t.finished},on:{load:t.onLoad}},[o("div",{staticClass:"pane"},t._l(t.listData,(function(e,a){return o("div",{key:a,staticClass:"box"},[o("div",{staticClass:"top-tip"},[o("span",{staticClass:"order-on"},[t._v(t._s(e.order_sn))]),o("span",{staticClass:"date"},[t._v(t._s(e.created_at))])]),o("div",{staticClass:"middle-detail"},[o("img",{attrs:{src:e.thumb,alt:""}}),o("div",{staticClass:"right-goods"},[o("div",{staticClass:"top-name"},[t._v(t._s(e.title))]),o("div",{staticClass:"bottom-box active-bottom-box"},[o("span",{staticClass:"num active-num"},[t._v("数量: "+t._s(e.nums))]),o("span",{staticClass:"remain"},[t._v("剩下: "+t._s(e.rest_nums))]),o("span",{staticClass:"bottom-right",style:{opacity:"代销管理"==t.name&&e.lock_time?"":"0"}},[t._v("锁定期: "),o("van-count-down",{staticClass:"van-count",attrs:{time:t.fun.getTimeDifference(e.lock_time),format:"DD天HH:mm:ss"},on:{finish:function(e){return t.finishTime(a)}}})],1)])])]),o("div",{staticClass:"bottom-btn"},[o("span",{class:e.take_button?"pick-up-goods":"pick-up-goods active-bottom-btn",on:{click:function(o){return t.openTakeGoodsShow(e,e.take_button)}}},[t._v("提货")]),"我的存货"==t.name?o("span",{class:e.help_button?"consignment":"consignment active-bottom-btn",on:{click:function(o){return t.openConsignment(e.id,e.help_button,e.order_id)}}},[t._v("代销")]):t._e(),"代销管理"==t.name?o("span",{class:e.back_button?"platform-repurchase":"platform-repurchase active-bottom-btn",on:{click:function(o){return t.openPlatformShow(e.id,e.back_button)}}},[t._v("平台回购")]):t._e()])])})),0)]),o("van-popup",{attrs:{position:"bottom",round:""},model:{value:t.popupConsignmentShow,callback:function(e){t.popupConsignmentShow=e},expression:"popupConsignmentShow"}},[o("div",{staticClass:"consignment-popup-pane"},[o("div",{staticClass:"top-pane"},[o("span",{staticClass:"name"},[t._v("代销")]),o("van-icon",{staticClass:"close-icon",attrs:{name:"cross"},on:{click:function(e){t.popupConsignmentShow=!1}}})],1),o("div",{staticClass:"tip"},[t._v("选择代销后"+t._s(t.lock)+"天不能进行提货")]),o("span",{staticClass:"btn-sty",on:{click:t.sureConsignment}},[t._v("代销")])])]),o("van-popup",{style:{width:"20rem"},attrs:{round:"","get-container":"#app"},model:{value:t.popupPlatformShow,callback:function(e){t.popupPlatformShow=e},expression:"popupPlatformShow"}},[o("div",{staticClass:"platform-popup-pane"},[o("div",{staticClass:"tip"},[t._v("提示")]),o("div",{staticClass:"cancal-tip"},[t._v("是否确认平台回购?")]),o("div",{staticClass:"btn-sty"},[o("span",{staticClass:"cancal",on:{click:function(e){t.popupPlatformShow=!1}}},[t._v("取消")]),o("span",{staticClass:"line"}),o("span",{staticClass:"sure",on:{click:t.surePlatform}},[t._v("确定")])])])]),t.takeGoodsShow?o("takeGoods",{attrs:{takeGoodsShow:t.takeGoodsShow,name:t.name,manage_goods:t.manage_goods},on:{"update:takeGoodsShow":function(e){t.takeGoodsShow=e},"update:take-goods-show":function(e){t.takeGoodsShow=e}}}):t._e()],1)},n=[],i=o("c7eb"),s=o("2909"),r=o("1da1"),c=(o("b0c0"),o("14d9"),function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"take-goods"}},[o("van-popup",{attrs:{position:"bottom",round:""},on:{"click-overlay":t.closePopup},model:{value:t.takeGoodsShow,callback:function(e){t.takeGoodsShow=e},expression:"takeGoodsShow"}},[o("div",{staticClass:"popup-pane"},[o("div",{staticClass:"top-pane"},[o("span",{staticClass:"name"},[t._v("提货")]),o("van-icon",{staticClass:"close-icon",attrs:{name:"cross"},on:{click:t.closePopup}})],1),t.chooseRadio?o("div",{staticClass:"type"},[o("span",{staticClass:"type-name"},[t._v("类型")]),o("van-radio-group",{attrs:{direction:"horizontal"},model:{value:t.chooseRadio,callback:function(e){t.chooseRadio=e},expression:"chooseRadio"}},[t.manage_goods.original.show?o("van-radio",{attrs:{name:1,"checked-color":"#F51D1D"}},[t._v("基酒")]):t._e(),t.manage_goods.product.show?o("van-radio",{attrs:{name:2,"checked-color":"#F51D1D"}},[t._v("成品酒")]):t._e()],1)],1):t._e(),o("div",{staticClass:"num"},[o("span",{staticClass:"num-name"},[t._v("数量")]),o("van-stepper",{attrs:{theme:"round","button-size":"22","disable-input":""},model:{value:t.numValue,callback:function(e){t.numValue=e},expression:"numValue"}})],1),o("div",{staticClass:"tip"},[t._v("可提货数量"+t._s(1==t.chooseRadio?t.manage_goods.original.can_take:t.manage_goods.product.can_take)+",最低提货数量"+t._s(1==t.chooseRadio?t.manage_goods.original.limit:t.manage_goods.product.limit))]),o("span",{staticClass:"btn-sty",on:{click:t.delivery}},[t._v("提货")])])])],1)}),d=[],p=o("5530"),l={props:{takeGoodsShow:{type:Boolean,default:!1},name:{type:String,default:!1},manage_goods:{type:null,default:{}}},data:function(){return{chooseRadio:1,numValue:1}},mounted:function(){this.chooseRadio=this.manage_goods.original.show?1:this.manage_goods.product.show?2:""},methods:{closePopup:function(){this.$emit("update:takeGoodsShow",!1)},delivery:function(){var t={goodsId:1==this.chooseRadio?this.manage_goods.original.goods_id:this.manage_goods.product.goods_id,total:this.numValue,stock_token:this.manage_goods.stock_token,take_type:this.chooseRadio,tag:"stock_service",take_way:"代销管理"==this.name?2:"我的存货"==this.name?1:"",option_id:1==this.chooseRadio?this.manage_goods.original.option_id:this.manage_goods.product.option_id};this.$router.push(this.fun.getUrl("goodsorder",{},Object(p["a"])({},t))),this.$emit("update:takeGoodsShow",!1)}}},m=l,b=(o("fb3a"),o("2877")),u=Object(b["a"])(m,c,d,!1,null,"2f315dcc",null),f=u.exports,g=o("94b4"),h={data:function(){return{goods_name:"",popupConsignmentShow:!1,takeGoodsShow:!1,popupPlatformShow:!1,name:"",listData:[],loading:!1,finished:!1,page:1,lock:0,manage_id:"",manage_goods:{},is_sign:!1,order_id:""}},activated:function(){this.name=this.$route.params.name,this.fun.setWXTitle(this.$route.params.name),this.onSearch()},methods:{getData:function(){var t=this;return Object(r["a"])(Object(i["a"])().mark((function e(){var o,a,n,r,c,d;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(a="代销管理"==t.name?"plugin.stock-service.frontend.controllers.help.index":"我的存货"==t.name?"plugin.stock-service.frontend.controllers.stock.index":"",!0!==t.loading&&!0!==t.finished){e.next=3;break}return e.abrupt("return");case 3:return t.loading=!0,e.next=6,$http.post(a,{page:t.page,goods_name:t.goods_name});case 6:if(n=e.sent,r=n.data,c=n.result,d=n.msg,0!==c){e.next=13;break}return t.$toast(d),e.abrupt("return");case 13:t.lock=r.lock,t.is_sign=r.is_sign,(0===r.list.data.length||r.list.data.length<r.list.per_page||r.list.current_page===r.list.last_page)&&(t.finished=!0),(o=t.listData).push.apply(o,Object(s["a"])(r.list.data)),t.page++,t.loading=!1;case 19:case"end":return e.stop()}}),e)})))()},onLoad:function(){this.getData()},onSearch:function(){this.loading=!1,this.finished=!1,this.page=1,this.listData=[],this.getData()},openConsignment:function(t,e,o){e&&(this.manage_id=t,this.order_id=o,this.popupConsignmentShow=!0)},sureConsignment:function(){var t=this;return Object(r["a"])(Object(i["a"])().mark((function e(){return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.is_sign?$http.get("plugin.shop-esign.frontend.contract.get-contract",{activity_id:t.order_id,plugin_name:"stock-service"},"...").then((function(e){1===e.result?1===e.data.need_sign&&e.data.contract_id?t.$dialog.alert({message:"代销前需要签署电子合同"}).then((function(){t.$router.push(t.fun.getUrl("signPagePlu",{id:e.data.contract_id},{fromOrder:1}))})).catch((function(){})):t.asyncConsignment():t.$toast(e.data.msg)})):t.asyncConsignment();case 1:case"end":return e.stop()}}),e)})))()},asyncConsignment:function(){var t=this;return Object(r["a"])(Object(i["a"])().mark((function e(){var o,a,n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.post("plugin.stock-service.frontend.controllers.stock.help",{manage_id:t.manage_id});case 2:if(o=e.sent,o.data,a=o.result,n=o.msg,t.$toast(n),0!==a){e.next=9;break}return e.abrupt("return");case 9:t.popupConsignmentShow=!1,t.onSearch();case 11:case"end":return e.stop()}}),e)})))()},openTakeGoodsShow:function(t,e){e&&(this.takeGoodsShow=!0,this.manage_goods=t)},openPlatformShow:function(t,e){e&&(this.manage_id=t,this.popupPlatformShow=!0)},surePlatform:function(){var t=this;return Object(r["a"])(Object(i["a"])().mark((function e(){var o,a,n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,$http.post("plugin.stock-service.frontend.controllers.help.back",{manage_id:t.manage_id});case 2:if(o=e.sent,o.data,a=o.result,n=o.msg,t.$toast(n),0!==a){e.next=9;break}return e.abrupt("return");case 9:t.popupPlatformShow=!1,t.onSearch();case 11:case"end":return e.stop()}}),e)})))()},finishTime:function(t){}},components:{takeGoods:f,DList:g["a"]}},v=h,k=v,y=(o("78fe"),o("1446"),Object(b["a"])(k,a,n,!1,null,"cdbe14b6",null));e["default"]=y.exports},fb3a:function(t,e,o){"use strict";o("4f36")}}]); |