(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/stock-manage/stock-manage"],{"0521":function(t,n,u){"use strict";var o=u("b7e4"),e=u.n(o);e.a},"261c":function(t,n,u){"use strict";u.r(n);var o=u("81f4"),e=u("6702");for(var i in e)"default"!==i&&function(t){u.d(n,t,(function(){return e[t]}))}(i);u("0521"),u("ab7c");var a,s=u("f0c5"),c=Object(s["a"])(e["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);n["default"]=c.exports},"3fc0":function(t,n,u){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=u("057a"),e={data:function(){return{goodsList:[]}},onShow:function(){this.getlist()},filters:{man:function(t){var n=0;return t&&t.map((function(t){"男款"==t.type&&(n+=t.num)})),n},female:function(t){var n=0;return t&&t.map((function(t){"女款"==t.type&&(n+=t.num)})),n}},methods:{cur:function(t){this.goodsList[t].toggle=!this.goodsList[t].toggle},add:function(t,n){this.goodsList[t].sku[n].num++},getVal:function(t,n,u){this.goodsList[n].sku[u].num=Number(t.detail.value)},minus:function(n,u,o){if(0==o)return t.showToast({title:"没有啦~",icon:"none"}),!1;this.goodsList[n].sku[u].num--},getlist:function(){var t=this;(0,o.getSku)().then((function(n){if(200==n.code){var u=n.data;u.map((function(n,u){t.$set(n,"sku",[]),0==u?t.$set(n,"toggle",!0):t.$set(n,"toggle",!1);var o=n.size;for(var e in o)o[e].map((function(t){n.sku.push(t)}))})),t.goodsList=u}}))},submit:function(){var n=this.goodsList,u=[],e=0;n.map((function(t){var n=t.sku;for(var o in n)n[o].num>0&&(u[e]=[n[o].id,n[o].num],e++)})),(0,o.setStock)({data:u}).then((function(n){200==n.code?t.showModal({content:"设置成功",showCancel:!1,success:function(n){t.navigateBack({})}}):t.showModal({content:n.data||"设置失败",showCancel:!1})}))}}};n.default=e}).call(this,u("543d")["default"])},6702:function(t,n,u){"use strict";u.r(n);var o=u("3fc0"),e=u.n(o);for(var i in o)"default"!==i&&function(t){u.d(n,t,(function(){return o[t]}))}(i);n["default"]=e.a},"81f4":function(t,n,u){"use strict";var o;u.d(n,"b",(function(){return e})),u.d(n,"c",(function(){return i})),u.d(n,"a",(function(){return o}));var e=function(){var t=this,n=t.$createElement,u=(t._self._c,t.__map(t.goodsList,(function(n,u){var o=t.__get_orig(n),e=t._f("man")(n.sku),i=t._f("female")(n.sku),a=n.sku.reduce((function(t,n){return t+Number(n.num||0)}),0);return{$orig:o,f0:e,f1:i,g0:a}})));t.$mp.data=Object.assign({},{$root:{l0:u}})},i=[]},"957d":function(t,n,u){"use strict";(function(t){u("fdf4");o(u("66fd"));var n=o(u("261c"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=u,t(n.default)}).call(this,u("543d")["createPage"])},ab7c:function(t,n,u){"use strict";var o=u("d6e7"),e=u.n(o);e.a},b7e4:function(t,n,u){},d6e7:function(t,n,u){}},[["957d","common/runtime","common/vendor"]]]);