(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/stock-manage/stock-manage"],{281:function(n,t,e){"use strict";(function(n,t){var o=e(4);e(26);o(e(25));var u=o(e(282));n.__webpack_require_UNI_MP_PLUGIN__=e,t(u.default)}).call(this,e(1)["default"],e(2)["createPage"])},282:function(n,t,e){"use strict";e.r(t);var o=e(283),u=e(285);for(var r in u)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return u[n]}))}(r);e(287),e(289);var i,a=e(32),s=Object(a["default"])(u["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],i);s.options.__file="pages/stock-manage/stock-manage.vue",t["default"]=s.exports},283:function(n,t,e){"use strict";e.r(t);var o=e(284);e.d(t,"render",(function(){return o["render"]})),e.d(t,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(t,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(t,"components",(function(){return o["components"]}))},284:function(n,t,e){"use strict";var o;e.r(t),e.d(t,"render",(function(){return u})),e.d(t,"staticRenderFns",(function(){return i})),e.d(t,"recyclableRender",(function(){return r})),e.d(t,"components",(function(){return o}));var u=function(){var n=this,t=n.$createElement,e=(n._self._c,n.__map(n.goodsList,(function(t,e){var o=n.__get_orig(t),u=n._f("man")(t.sku),r=n._f("female")(t.sku),i=t.sku.reduce((function(n,t){return n+Number(t.num||0)}),0);return{$orig:o,f0:u,f1:r,g0:i}})));n.$mp.data=Object.assign({},{$root:{l0:e}})},r=!1,i=[];u._withStripped=!0},285:function(n,t,e){"use strict";e.r(t);var o=e(286),u=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(r);t["default"]=u.a},286:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=e(71),u={data:function(){return{goodsList:[]}},onShow:function(){this.getlist()},filters:{man:function(n){var t=0;return n&&n.map((function(n){"男款"==n.type&&(t+=n.num)})),t},female:function(n){var t=0;return n&&n.map((function(n){"女款"==n.type&&(t+=n.num)})),t}},methods:{cur:function(n){this.goodsList[n].toggle=!this.goodsList[n].toggle},add:function(n,t){this.goodsList[n].sku[t].num++},getVal:function(n,t,e){this.goodsList[t].sku[e].num=Number(n.detail.value)},minus:function(t,e,o){if(0==o)return n.showToast({title:"没有啦~",icon:"none"}),!1;this.goodsList[t].sku[e].num--},getlist:function(){var n=this;(0,o.getSku)().then((function(t){if(200==t.code){var e=t.data;e.map((function(t,e){n.$set(t,"sku",[]),0==e?n.$set(t,"toggle",!0):n.$set(t,"toggle",!1);var o=t.size;for(var u in o)o[u].map((function(n){t.sku.push(n)}))})),n.goodsList=e}}))},submit:function(){var t=this.goodsList,e=[],u=0;t.map((function(n){var t=n.sku;for(var o in t)t[o].num>0&&(e[u]=[t[o].id,t[o].num],u++)})),(0,o.setStock)({data:e}).then((function(t){200==t.code?n.showModal({content:"设置成功",showCancel:!1,success:function(t){n.navigateBack({})}}):n.showModal({content:t.data||"设置失败",showCancel:!1})}))}}};t.default=u}).call(this,e(2)["default"])},287:function(n,t,e){"use strict";e.r(t);var o=e(288),u=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(r);t["default"]=u.a},288:function(n,t,e){},289:function(n,t,e){"use strict";e.r(t);var o=e(290),u=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(n){e.d(t,n,(function(){return o[n]}))}(r);t["default"]=u.a},290:function(n,t,e){}},[[281,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/stock-manage/stock-manage.js.map