require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_company/order/confirmOrder"],{3245:function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r("98ea"),o=r("9dab"),c={data:function(){return{count0:0,messageShow:!1,orderKey:null,price:{totalPrice:0,payPrice:0},carts:[]}},onLoad:function(t){this.orderKey=t.orderKey},onShow:function(){this.utils.isLogin()&&this.getOrderCount(),this.getSalesOrder()},methods:{showOrder:function(){this.utils.isLogin().then((function(e){e&&t.navigateTo({url:"/pages_user/user/storeOrder?status=0"})}))},closeOrder:function(){this.messageShow=!1},getOrderCount:function(){var t=this;(0,n.getOrderCount)().then((function(e){200==e.code&&(t.count0=e.count0,t.count0>0&&(t.messageShow=!0))}),(function(t){}))},showDetail:function(e){t.navigateTo({url:"./productShowDetails?productId="+e.productId})},getSalesOrder:function(e){var r=this,n=this;n.totalPrice=0,n.payPrice=0;var c={createOrderKey:this.orderKey};(0,o.getSalesOrder)(c).then((function(e){200==e.code?(r.carts=e.carts,r.carts.forEach((function(t){n.price.totalPrice+=t.price*t.cartNum})),n.price.payPrice=e.totalMoney):t.showToast({icon:"none",title:e.msg})}),(function(t){}))},submitOrder:function(){var e=this;this.utils.isLogin().then((function(r){if(r){var n={createOrderKey:e.orderKey};(0,o.addUserCart)(n).then((function(r){200==r.code?t.navigateTo({url:"/pages/shopping/confirmCreateOrder?type=buy&cartIds="+r.cartIds.toString()+"&companyId="+r.companyId+"&companyUserId="+r.companyUserId+"&createOrderKey="+e.orderKey}):t.showToast({icon:"none",title:r.msg})}),(function(t){}))}}))}}};e.default=c}).call(this,r("df3c")["default"])},"337a":function(t,e,r){},"64a6":function(t,e,r){"use strict";var n=r("337a"),o=r.n(n);o.a},"70f0":function(t,e,r){"use strict";r.r(e);var n=r("3245"),o=r.n(n);for(var c in n)["default"].indexOf(c)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(c);e["default"]=o.a},"936b":function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"c",(function(){return o})),r.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,r=(t._self._c,t.__map(t.carts,(function(e,r){var n=t.__get_orig(e),o=t.utils.getDictLabelName("storeProductType",e.productType),c=e.price.toFixed(2);return{$orig:n,g0:o,g1:c}}))),n=t.price.totalPrice.toFixed(2),o=t.price.payPrice.toFixed(2),c=t.price.payPrice.toFixed(2);t.$mp.data=Object.assign({},{$root:{l0:r,g2:n,g3:o,g4:c}})},o=[]},"957e":function(t,e,r){"use strict";r.r(e);var n=r("936b"),o=r("70f0");for(var c in o)["default"].indexOf(c)<0&&function(t){r.d(e,t,(function(){return o[t]}))}(c);r("64a6"),r("cc68");var i=r("828b"),a=Object(i["a"])(o["default"],n["b"],n["c"],!1,null,"6bc4e532",null,!1,n["a"],void 0);e["default"]=a.exports},"9d96":function(t,e,r){},a08f:function(t,e,r){"use strict";(function(t,e){var n=r("47a9");r("584a");n(r("3240"));var o=n(r("957e"));t.__webpack_require_UNI_MP_PLUGIN__=r,e(o.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},cc68:function(t,e,r){"use strict";var n=r("9d96"),o=r.n(n);o.a}},[["a08f","common/runtime","common/vendor","pages_company/common/vendor"]]]);