(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/goods/inventory"],{"4c9d":function(t,i,e){},6027:function(t,i,e){"use strict";(function(t,i){var n=e("47a9");e("1d3c");n(e("3240"));var c=n(e("ef6e"));t.__webpack_require_UNI_MP_PLUGIN__=e,i(c.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},"783e":function(t,i,e){"use strict";var n=e("4c9d"),c=e.n(n);c.a},b33c:function(t,i,e){"use strict";(function(t){Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var n=e("bfd8"),c={components:{editNum:function(){e.e("pages/admin/goods/components/editNum/index").then(function(){return resolve(e("527f"))}.bind(null,e)).catch(e.oe)}},data:function(){return{attrsList:[],id:0,administer:!1,isAllSelect:!1,visiblePrice:!1,goodsInfo:{id:0,spec_type:1,attr_value:{}}}},onShow:function(){},onLoad:function(t){this.id=t.id,this.getAttrsList()},methods:{getIds:function(){var t=[];return this.attrsList.forEach((function(i){i.checked&&t.push(i.id)})),t},batchEdit:function(){this.getIds().length?(this.goodsInfo.id=this.id,this.goodsInfo.attr_value={stock:""},this.visiblePrice=!0):this.$util.Tips({title:"请选择商品规格"})},define:function(){var i=this,e={attr_value:[]};this.attrsList.forEach((function(t){e.attr_value.push({stock:Number(t.stock),id:t.id,version:0})}));var c={attrValueList:e.attr_value,id:Number(this.id)};(0,n.quickStockAdd)(c).then((function(e){200==e.code&&(i.$util.Tips({title:"操作成功"}),setTimeout((function(){t.navigateBack()}),300))}))},getAttrsList:function(){var t=this;(0,n.employeeProductInfo)(this.id).then((function(i){var e=i.data.attrValue;e.forEach((function(t){t.checked=!1;var i="",e=JSON.parse(t.attrValue);for(var n in e)i+="".concat(e[n],",");i=i.slice(0,i.length-1),t.attrValue=i,t.nowStock=t.stock,t.stock=0})),t.attrsList=e})).catch((function(i){t.$util.Tips({title:i})}))},checkboxChange:function(t){var i=t.detail.value;this.attrsList.forEach((function(t){-1!==i.indexOf(t.id+"")?t.checked=!0:t.checked=!1})),i.length==this.attrsList.length?this.isAllSelect=!0:this.isAllSelect=!1},forGoods:function(t){this.attrsList.length&&this.attrsList.forEach((function(i){i.checked=!!t}))},checkboxAllChange:function(t){var i=t.detail.value;i.length?(this.isAllSelect=!0,this.forGoods(1)):(this.isAllSelect=!1,this.forGoods(0))},manageTap:function(){this.administer=!this.administer},priceCloseDrawer:function(){this.visiblePrice=!1},successChange:function(t){this.visiblePrice=!1;var i=t;this.attrsList.forEach((function(t){t.checked&&i.stock&&(t.stock=i.stock)})),this.manageTap()}}};i.default=c}).call(this,e("df3c")["default"])},b444:function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return c})),e.d(i,"a",(function(){}));var n=function(){var t=this.$createElement;this._self._c},c=[]},e65b:function(t,i,e){"use strict";e.r(i);var n=e("b33c"),c=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return n[t]}))}(s);i["default"]=c.a},ef6e:function(t,i,e){"use strict";e.r(i);var n=e("b444"),c=e("e65b");for(var s in c)["default"].indexOf(s)<0&&function(t){e.d(i,t,(function(){return c[t]}))}(s);e("783e");var o=e("828b"),a=Object(o["a"])(c["default"],n["b"],n["c"],!1,null,"2b23d140",null,!1,n["a"],void 0);i["default"]=a.exports}},[["6027","common/runtime","common/vendor"]]]);