bztang-admin/addons/yun_shop/static/app/js/chunk-ea52108a.b75fc6c0.js

1 line
13 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ea52108a"],{"428b7":function(t,e,i){var n=i("24fb");e=n(!1),e.push([t.i,"#buying #content .top[data-v-301df347]{background:#fff;padding:.625rem .875rem}#buying #content .top .box li[data-v-301df347]{text-align:left}#buying #content .top .box li h1[data-v-301df347]{font-size:18px;line-height:2.25rem}#buying #content .top .box li[data-v-301df347]:nth-child(2),#buying #content .top .box li[data-v-301df347]:nth-child(3),#buying #content .top .box li[data-v-301df347]:nth-child(4){line-height:1.25rem;color:#8c8c8c}#buying #content .number[data-v-301df347]{margin-top:.625rem;background:#fff;padding:.625rem .875rem}#buying #content .number .more[data-v-301df347]{color:red}#buying #content .number .red[data-v-301df347]{margin:.5rem 0 0 .5rem;text-align:left;font-size:12px;color:red}#buying #content .number span[data-v-301df347]{display:block;line-height:2.25rem;font-size:16px;text-align:left}#buying #content .number input[data-v-301df347]{line-height:2.5rem;padding:0 .625rem;background:#f5f5f5;border:none;width:100%;font-size:18px}#buying #content .sum[data-v-301df347]{margin-top:.625rem;background:#fff;padding:0 .875rem}#buying #content .sum .box li[data-v-301df347]{line-height:2.8125rem;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:14px}#buying #content .sum .box li span[data-v-301df347]:first-child{color:#8c8c8c}#buying #content .discount[data-v-301df347]{margin-top:.625rem;background:#fff;padding:.625rem .875rem}#buying #content .discount .list li[data-v-301df347]{line-height:2.5rem;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center}#buying #content .discount .list li[data-v-301df347],#buying #content .sub_btn[data-v-301df347]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#buying #content .sub_btn[data-v-301df347]{background:#fff;width:100%;height:3.125rem;line-height:3.125rem;position:fixed;-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;bottom:0}#buying #content .sub_btn .small[data-v-301df347]{font-size:12px}#buying #content .sub_btn p[data-v-301df347]{text-align:right;width:16.5625rem;border-top:.0625rem solid #ebebeb;padding-right:.625rem;font-size:16px}#buying #content .sub_btn p span[data-v-301df347]{font-size:18px}#buying #content .sub_btn button[data-v-301df347]{width:6.875rem;background:#f7a145;color:#fff;border:none;font-size:18px}#buying #content .sub_btn.pcStyle[data-v-301df347]{width:375px}#buying .m-dialog[data-v-301df347]{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;z-index:100;background:rgba(0,0,0,.5)}#buying .popup_box[data-v-301df347]{background:#fff;border-radius:.375rem;padding-bottom:1.25rem}#buying .popup_box h1[data-v-301df347]{height:2.5rem;line-height:2.5rem;font-size:16px;border-bottom:.0625rem solid #ebebeb}#buying .popup_box h1 i[data-v-301df347]{position:absolute;left:.875rem;line-height:2.5rem;font-size:1rem;color:#999}#buying .pay-psw-info[data-v-301df347]{position:absolute;bottom:0;width:100vw;height:auto;background:#fff;max-height:100%;padding-top:.625rem}#buying footer[data-v-301df347]{width:100vw;font-weight:600}#buying .pay_btn[data-v-301df347]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;border-top:.0625rem solid #ddd;width:100vw;height:auto}#buying .pay_btn li[data-v-301df347]{width:33.333333%;height:3rem;line-height:3rem;text-align:center;background:#fff;font-size:14px;border-right:.0625rem solid #ddd;border-bottom:.0625rem solid #ddd}#buying .pay_btn li[data-v-301df347]:active{background:#c2c2c2}#buying .b9[data-v-301df347]:active{background:#fff!important}#buying .b9[data-v-301df347]{background:#c2c2c2!important}#buying .pay_content[data-v-301df347]{width:100vw;height:3.125rem;margin-bottom:.625rem}#buying .pay_content_title[data-v-301df347]{width:100vw;height:1.875rem;line-height:1.875rem;margin-bottom:.625rem;font-size:18px}#buying .pay_content_view[data-v-301df347]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100vw;height:3.125rem;border-bottom:.0625rem solid #ddd;border-top:.0625rem solid #ddd;border-right:.0625rem solid #ddd}#buying .ipt_pay_p[data-v-301df347]{line-height:3.125rem;height:3.125rem;font-size:20px}#buying .ipt_pay[data-v-301df347]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;height:3.125rem;text-align:center;border-left:.0625rem solid #ddd}#buying .popup_box_b[data-v-301df347]{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:18.75rem;background:#fff;border-radius:.375rem}#buying .popup_box_b h1[data-v-301df347]{height:2.5rem;line-height:2.5rem;font-size:16px;border-bottom:.0625rem solid #ebebeb}#buying .popup_box_b h1 i[data-v-301df347]{position:absolute;left:.875rem;line-height:2.5rem;font-size:1rem;color:#999}#buying .popup_box_b .sale_info[data-v-301df347]{text-align:left;padding:.625rem 1.25rem}#buying .popup_box_b .sale_info li[data-v-301df347]{line-height:1.875rem;font-size:16px}#buying .popup_box_b .set_password[data-v-301df347]{margin-top:2.25rem;border-top:.0625rem solid #ebebeb;height:2.5rem;line-height:2.5rem;color:#469de2;font-size:16px}",""]),t.exports=e},5816:function(t,e,i){var n=i("428b7");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var s=i("499e").default;s("6fc231a5",n,!0,{sourceMap:!1,shadowMode:!1})},ae3b:function(t,e,i){"use strict";i("5816")},e42c:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{attrs:{id:"buying"}},[i("c-title",{attrs:{hide:!1,text:"buy"===t.name?t.lang.buy_name:t.lang.subscription_name}}),i("div",{attrs:{id:"content"}},[i("div",{staticClass:"top"},[i("ul",{staticClass:"box"},[i("li",[i("h1",[t._v(t._s(t.buying.name||t.buying.asset_name))])]),t.name?t._e():i("li",[t._v("可"+t._s("buy"===t.name?t.lang.buy_name:t.lang.subscription_name)+"数量:"+t._s(t.buying.spare))]),i("li",[t._v("当前"+t._s("buy"===t.name?t.lang.buy_name:t.lang.subscription_name)+"价:"+t._s(t.$i18n.t("money"))+t._s(t.buying.price)+"/单位")])])]),i("div",{staticClass:"number"},[i("span",[t._v(t._s("buy"===t.name?t.lang.buy_name:t.lang.subscription_name)+"数量:")]),t.name?i("input",{directives:[{name:"model",rawName:"v-model",value:t.buyNum,expression:"buyNum"}],class:t.isMore?"more":"",attrs:{type:"tel",disabled:"",placeholder:""},domProps:{value:t.buyNum},on:{input:function(e){e.target.composing||(t.buyNum=e.target.value)}}}):t._e(),t.name?t._e():i("input",{directives:[{name:"model",rawName:"v-model",value:t.buyNum,expression:"buyNum"}],class:t.isMore?"more":"",attrs:{type:"tel",placeholder:"请输入"+t.lang.subscription_name+"数量"},domProps:{value:t.buyNum},on:{keyup:t.getBuying,input:function(e){e.target.composing||(t.buyNum=e.target.value)}}}),i("p",{directives:[{name:"show",rawName:"v-show",value:t.isMore,expression:"isMore"}],staticClass:"red"},[t._v("超出可"+t._s(t.lang.subscription_name)+"数量")])]),t.order_data.order_deductions?i("div",{staticClass:"discount"},[i("ul",{staticClass:"list"})]):t._e(),i("div",{staticClass:"sum"},[i("ul",{staticClass:"box"},[t.order_data.order_discounts?t._l(t.order_data.order_discounts,(function(e,n){return i("li",{key:n},["independentGoodsMemberLevel"===e.discount_code&&Number(e.amount)>0?i("span",[t._v("会员等级优惠")]):t._e(),"independentGoodsMemberLevel"!==e.discount_code&&Number(e.amount)>0?i("span",[t._v(t._s(e.name))]):t._e(),Number(e.amount)>0?i("span",[t._v(t._s(t.$i18n.t("money"))+" -"+t._s(e.amount))]):t._e()])})):t._e(),i("li",[i("span",[t._v("可用积分")]),i("span",[t._v(t._s(t.buying.supplier_integral||0))])])],2)]),i("div",{staticClass:"sub_btn",class:[3==t.fun.getPhoneEnv()?"pcStyle":""]},[i("p",[t._v("合计:"),i("span",[t._v(t._s(t.total_deduction_price||0))])]),t.buying.supplier_integral>=t.total_deduction_price&&!t.isMore?i("button",{attrs:{type:"button"},on:{click:t.submit}},[t._v("提交订单")]):t._e()])])],1)},s=[],o=(i("e7e5"),i("d399")),d=(i("a9e3"),i("b0c0"),i("a434"),i("e9c4"),i("6968")),a={data:function(){return{show2:!1,asset_id:"",order_data:"",goods_price:0,deduction_price:0,total_deduction_price:0,price:0,submit_active:!0,buying:{},buyNum:"",checkDeductionList:[],lang:{subscription_name:""},name:"",buyDataApi:"",buyApi:""}},activated:function(){this.asset_id=this.$route.params.asset_id,this.getLang(),this.initData(),this.getBuying()},computed:{isMore:function(){return Number(this.buyNum)>this.buying.spare}},methods:{getLang:function(){var t=this;$http.get("plugin.asset.Frontend.Controllers.Lang.index",{},"加载中...").then((function(e){1===e.result?(t.lang=e.data,t.fun.setWXTitle("buy"===name?t.lang.buy_name:t.lang.subscription_name)):Object(o["a"])(e.msg)})).catch((function(t){}))},initData:function(){this.name=this.$route.query.name,"buy"===this.name?(this.buyDataApi="plugin.asset.Frontend.Modules.Order.Controllers.buy.index",this.buyApi="plugin.asset.Frontend.Modules.Order.Controllers.buyCreate.index"):(this.buyDataApi="plugin.asset.Frontend.Modules.Order.Controllers.subscription.index",this.buyApi="plugin.asset.Frontend.Modules.Order.Controllers.subscriptionCreate.index"),this.order_data="",this.goods_price=0,this.deduction_price=0,this.total_deduction_price=0,this.price=0,this.submit_active=!0,this.show2=!1,this.buying={},this.buyNum="",this.checkDeductionList=[]},getBuying:function(){var t=this,e=this.assembleJson();$http.post(this.buyDataApi,e," ").then((function(e){1===e.result?t.setViewData(e.data):(Object(o["a"])(e.msg),t.$router.go(-1))})).catch((function(t){}))},setViewData:function(t){this.total_deduction_price=t.total_deduction_price,"buy"===this.name?(this.buying=t.asset_sell_records,this.buyNum=this.buying.total,this.order_data=t.orders[0],this.goods_price=t.total_goods_price,this.deduction_price=t.total_deduction_price,this.price=t.total_price):(this.buying=t.asset_digitization,this.order_data=t.orders[0],this.goods_price=t.total_goods_price,this.deduction_price=t.total_deduction_price,this.price=t.total_price)},assembleDeduction:function(){for(var t=[],e=0;e<this.checkDeductionList.length;e++)t.push(this.checkDeductionList[e]);return t},screenDiscount:function(t,e){var i={},n=[];if(e.checked)if(this.checkDeductionList.length>0){for(var s=0;s<this.checkDeductionList.length;s++)if(this.checkDeductionList[s].pre_id==t.pre_id){n=this.fun.isTextEmpty(this.checkDeductionList[s].deduction_ids)?[]:this.checkDeductionList[s].deduction_ids,this.checkDeductionList.splice(s,1);break}if(n.length>0){for(var o=0;o<n.length;o++)n[o]==e.code&&n.splice(o,1);n.push(e.code),i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else n.push(e.code),i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else if(n.length>0){for(var d=0;d<n.length;d++)n[d]==e.code&&n.splice(d,1);n.push(e.code),i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else n.push(e.code),i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i);else if(this.checkDeductionList.length>0){for(var a=0;a<this.checkDeductionList.length;a++)if(this.checkDeductionList[a].pre_id==t.pre_id){n=this.fun.isTextEmpty(this.checkDeductionList[a].deduction_ids)?[]:this.checkDeductionList[a].deduction_ids,this.checkDeductionList.splice(a,1);break}if(n.length>0){for(var r=0;r<n.length;r++)n[r]==e.code&&n.splice(r,1);i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else if(n.length>0){for(var u=0;u<n.length;u++)n[u]==e.code&&n.splice(u,1);i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)}else i.deduction_ids=n,i.pre_id=t.pre_id,this.checkDeductionList.push(i)},discountHandle:function(t,e){this.screenDiscount(t,e),this.getBuying()},assembleJson:function(){var t={};return t="buy"===this.name?{asset_sell_records_id:this.asset_id,orders:JSON.stringify(this.assembleDeduction())}:{asset_id:this.asset_id,total:this.buyNum,orders:JSON.stringify(this.assembleDeduction())},t},submit:function(){if(this.isMore)Object(o["a"])("超出可"+this.lang.subscription_name+"数量");else if(this.buyNum){if(!0===this.submit_active){this.submit_active=!1;var t=this,e=this.assembleJson();$http.post(this.buyApi,e,"提交中").then((function(e){t.submit_active=!0,1===e.result?t.$router.push(t.fun.getUrl("orderpay",{status:"2",order_ids:e.data.order_ids})):Object(o["a"])(e.msg)}),(function(t){}))}}else Object(o["a"])("请输入"+this.lang.subscription_name+"数量")}},components:{cTitle:d["a"]}},r=a,u=r,c=(i("ae3b"),i("2877")),b=Object(c["a"])(u,n,s,!1,null,"301df347",null);e["default"]=b.exports}}]);