require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugin/cloud_warehouse/index"],{"005e":function(t,e,o){},"02a8c":function(t,e,o){"use strict";var n=o("6b36"),i=o.n(n);i.a},"6b36":function(t,e,o){},"71df":function(t,e,o){"use strict";o.r(e);var n=o("851e"),i=o("9f91");for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(s);o("02a8c"),o("7d30");var u=o("828b"),c=Object(u["a"])(i["default"],n["b"],n["c"],!1,null,"7c696084",null,!1,n["a"],void 0);e["default"]=c.exports},"7d30":function(t,e,o){"use strict";var n=o("005e"),i=o.n(n);i.a},"851e":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return s})),o.d(e,"a",(function(){return n}));var n={uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"b248"))},uTabs:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-tabs/u-tabs")]).then(o.bind(null,"614b"))},uEmpty:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(o.bind(null,"f174"))},uSafeBottom:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-safe-bottom/u-safe-bottom")]).then(o.bind(null,"f585"))}},i=function(){var t=this.$createElement,e=(this._self._c,this.list.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},s=[]},"9f91":function(t,e,o){"use strict";o.r(e);var n=o("f21e"),i=o.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(s);e["default"]=i.a},d948:function(t,e,o){"use strict";(function(t,e){var n=o("47a9");o("4c1a");n(o("3240"));var i=n(o("71df"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},f21e:function(t,e,o){"use strict";(function(t){var n=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(o("af34")),s=n(o("7ca3")),u=o("8f59");function c(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,n)}return o}var d={data:function(){return{page:1,tabs:[{name:"全部"},{name:"进货"},{name:"出货"},{name:"提货"}],list:[],current:0,stock:0,jinhuo_stock:0,chuhuo_stock:0,total_stock:0,tihuo_stock:0,goods_id:"",goodsList:[],goodsIndex:0,selectedGoods:null}},computed:function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?c(Object(o),!0).forEach((function(e){(0,s.default)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):c(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({},(0,u.mapGetters)(["user","base","fenxiao"])),onLoad:function(t){this.getGoodsList(),t.goods_id&&(this.goods_id=t.goods_id,this.getList())},onShow:function(){this.page=1,this.getList()},onReachBottom:function(){this.getList()},methods:{onTab:function(t){this.current=t.index,this.page=1,this.getList()},onCopy:function(e){var o=this;e&&t.setClipboardData({data:e,success:function(){o.toast("复制成功")}})},onDetail:function(t){t.order_id&&2==t.item_type&&this.jump("/pages/order/detail?type=1&id="+t.order_id)},getList:function(){var t=this;this.$util.get("cloud_warehouse/goods/getRecordList",{page:this.page,goods_id:this.goods_id,current:this.current}).then((function(e){if(1==t.page&&(t.list=[],t.stock=e.data.stock,t.jinhuo_stock=e.data.jinhuo_stock,t.chuhuo_stock=e.data.chuhuo_stock,t.total_stock=e.data.total_stock,t.tihuo_stock=e.data.tihuo_stock),1==e.code){var o=e.data.list;t.list=[].concat((0,i.default)(t.list),(0,i.default)(o)),t.page++}})).catch((function(e){1==t.page&&(t.list=[])}))},getGoodsList:function(){var t=this;this.$util.get("cloud_warehouse/goods/index").then((function(e){if(1==e.code)if(t.goodsList=e.data.goods,t.goods_id){var o=t.goodsList.findIndex((function(e){return e.id==t.goods_id}));o>-1?(t.goodsIndex=o,t.selectedGoods=t.goodsList[o]):t.$util.toast("商品不存在")}else t.goodsIndex=0,t.selectedGoods=t.goodsList[0],t.goods_id=t.selectedGoods.id}))},bindPickerChange:function(t){this.goodsIndex=t.detail.value,this.selectedGoods=this.goodsList[this.goodsIndex],this.goods_id=this.selectedGoods.id,this.page=1,this.getList()}}};e.default=d}).call(this,o("df3c")["default"])}},[["d948","common/runtime","common/vendor"]]]);