You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
8.0 KiB
1 lines
8.0 KiB
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package2/stock/addStock"],{"2e11":function(t,e,s){},"7d5b":function(t,e,s){"use strict";s.r(e);var i=s("8e44"),o=s("c5ab");for(var a in o)["default"].indexOf(a)<0&&function(t){s.d(e,t,(function(){return o[t]}))}(a);s("90c3");var n=s("828b"),r=Object(n["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=r.exports},"8e44":function(t,e,s){"use strict";s.d(e,"b",(function(){return o})),s.d(e,"c",(function(){return a})),s.d(e,"a",(function(){return i}));var i={uniSearchBar:function(){return Promise.all([s.e("common/vendor"),s.e("uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar")]).then(s.bind(null,"f56e"))},uniIcons:function(){return Promise.all([s.e("common/vendor"),s.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(s.bind(null,"6bbb6"))},uLoadmore:function(){return Promise.all([s.e("common/vendor"),s.e("uni_modules/uview-ui/components/u-loadmore/u-loadmore")]).then(s.bind(null,"9fc5"))},uniPopup:function(){return s.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(s.bind(null,"2864"))},uniNumberBox:function(){return s.e("uni_modules/uni-number-box/components/uni-number-box/uni-number-box").then(s.bind(null,"b2ff"))}},o=function(){var t=this,e=t.$createElement,s=(t._self._c,t.__map(t.stockList,(function(e,s){var i=t.__get_orig(e),o=t.__map(e.checkStockAttributeVos,(function(e,s){var i=t.__get_orig(e),o=t._f("sliceMsg")(e.attributeList);return{$orig:i,f0:o}}));return{$orig:i,l0:o}})));t._isMounted||(t.e0=function(t){return this.$refs.carPopup.close()},t.e1=function(e){return t.$refs.showPopup.close()}),t.$mp.data=Object.assign({},{$root:{l1:s}})},a=[]},"90c3":function(t,e,s){"use strict";var i=s("2e11"),o=s.n(i);o.a},"994d":function(t,e,s){"use strict";(function(t,e){var i=s("47a9");s("7859");i(s("3240"));var o=i(s("7d5b"));t.__webpack_require_UNI_MP_PLUGIN__=s,e(o.default)}).call(this,s("3223")["default"],s("df3c")["createPage"])},b73e:function(t,e,s){"use strict";(function(t,i){var o=s("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=o(s("af34")),n=o(s("b9aa")),r={components:{},data:function(){return{indexList:[],status:"loadmore",pageNum:1,shopList:[],shopList1:[],shopOwnerPhone:t.getStorageSync("shopOwnerPhone"),username:t.getStorageSync("username"),carPages:1,zheng:"",fu:"",pages:1,totalPages:0,info:0,categoryId:"",searchName:"",shopId:"",carList:new Map,attributeList:[],purchasePrice:0,storageType:"",carType:0,type:"",productId:"",pdList:[],stockList:[],height:0,gateType:""}},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var s=JSON.parse(t);for(var i in s)e+=s[i]+"/"}return e},maxNum:function(t){return t>=10?10:t<0?0:void 0}},onReachBottom:function(){this.pageNum>=this.pages||(this.status="loading",this.pageNum++,"search"==this.gateType?this.getShareList("search"):this.getShareList())},onShow:function(){this.pdList=this.pdList,this.shopId=t.getStorageSync("shopId");for(var e=0;e<this.shopList.length;e++)this.shopList[e].id==this.pdList.id&&(this.shopList[e].hasCheck=!0);for(var s=0;s<this.shopList1.length;s++)this.shopList1[s].id==this.pdList.id&&(this.shopList1[s].hasCheck=!0);if(this.pdList.saleDetailQueryDTO)if(0==this.carList.size){for(var i={id:this.pdList.id,productName:this.pdList.productName,productPicture:this.pdList.productPicture,productSn:this.pdList.productSn,supplierName:this.pdList.supplierName,stockLogList:new Map},o=0;o<this.pdList.saleDetailQueryDTO.length;o++)i.stockLogList.set(this.pdList.saleDetailQueryDTO[o].attributeList,this.pdList.saleDetailQueryDTO[o]);this.carList.set(this.pdList.id,i)}else if(1==this.carList.has(this.pdList.id))for(var a=0;a<this.pdList.saleDetailQueryDTO.length;a++)this.carList.get(this.pdList.id).stockLogList.set(this.pdList.saleDetailQueryDTO[a].attributeList,this.pdList.saleDetailQueryDTO[a]);else{for(var n={id:this.pdList.id,productName:this.pdList.productName,productPicture:this.pdList.productPicture,productSn:this.pdList.productSn,supplierName:this.pdList.supplierName,stockLogList:new Map},r=0;r<this.pdList.saleDetailQueryDTO.length;r++)n.stockLogList.set(this.pdList.saleDetailQueryDTO[r].attributeList,this.pdList.saleDetailQueryDTO[r]);this.carList.set(this.pdList.id,n)}this.carPages=1,this.stockList=[],this.$forceUpdate()},onLoad:function(e){this.height=i.getSystemInfoSync().windowHeight,this.getGategoryList(),this.storageType=t.getStorageSync("type")},methods:{seeStockCount:function(t,e){this.zheng=t,this.fu=e,this.$refs.showPopup.open()},getGategoryList:function(){var t=this;this.tui.request("/app/productCategory/list","get",{},!1,!0).then((function(e){if(200==e.code){t.indexList=e.result;for(var s=0;s<t.indexList.length;s++)t.indexList[s].parentId=0==s;t.categoryId=t.indexList[0].id,t.getShareList()}else t.tui.toast(e.message)})).catch((function(t){}))},backPrevPage:function(){var e=[];this.carList.forEach((function(t){e.push(t),t.stockLogList1=[],t.stockLogList.forEach((function(e){t.stockLogList1.push(e)}))})),t.navigateBack({delta:1})},getShareList:function(e){var s=this,i={};"search"==e?(this.gateType="search",i={checkStockId:t.getStorageSync("stockId"),categoryId:"",searchStr:this.searchName,pageNum:this.pageNum,pageSize:"10"}):(this.gateType="",i={checkStockId:t.getStorageSync("stockId"),categoryId:this.categoryId,searchStr:this.searchName,pageNum:this.pageNum,pageSize:"10"}),this.tui.request("/app/product/getShareList","POST",i,!1,!1).then((function(t){if(200==t.code)if("search"==e){s.shopList=[],s.status="nomore",1==s.pages?s.shopList1=t.result.records:s.shopList1=[].concat((0,a.default)(s.shopList1),(0,a.default)(t.result.records));for(var i=0;i<s.shopList1.length;i++)null!=s.shopList1[i].checkStockAttributeVos&&(s.shopList1[i].hasCheck=!0);s.pages=t.result.pages}else{s.shopList1=[],s.status="nomore",1==s.pages?s.shopList=t.result.records:s.shopList=[].concat((0,a.default)(s.shopList),(0,a.default)(t.result.records));for(var o=0;o<s.shopList.length;o++)null!=s.shopList[o].checkStockAttributeVos&&(s.shopList[o].hasCheck=!0);s.pages=t.result.pages}else s.tui.toast(t.message)})).catch((function(t){}))},toggle:function(e,s){"carPopup"==e?this.$refs.carPopup.open("bottom"):(this.productId=s.id,t.navigateTo({url:"/package2/stock/stockDetail?item="+JSON.stringify(s)}))},clickMask:function(e){var s="";s=0==e.delFlag?"请将商品上架后再操作!":"请将上次入库的采购价维护后再进行操作!",t.showToast({title:s,icon:"none"})},scanCode:function(){var e=this;t.scanCode({success:function(s){e.tui.request("/app/product/getById/"+n.default.decode(s.result.split(",")[0]),"POST",{},!1,!0).then((function(i){if(200==i.code){var o=n.default.decode(s.result.split(",")[1]);o==t.getStorageSync("shopId")?t.navigateTo({url:"/package2/stock/stockDetail?item="+JSON.stringify(i.result)}):e.tui.toast("您的店铺中暂无该商品!")}else e.tui.toast(i.message)})).catch((function(t){}))},fail:function(e){t.showToast({title:"扫描失败",icon:"none"})}})},search:function(t){""==t.value?(this.pageNum=1,this.searchName="",this.getShareList()):(this.pageNum=1,this.searchName=t.value,this.getShareList("search"))},clearSearch:function(){this.searchName="",this.getShareList()},clickLeftBtn:function(t){for(var e=0;e<this.indexList.length;e++)this.indexList[e].parentId=e==t;this.categoryId=this.indexList[t].id,this.pageNum=1,this.searchName="",this.shopList1=[],this.shopList=[],this.getShareList()},delShop:function(e){var s,i=this,o=[];s={checkStockId:t.getStorageSync("stockId"),productId:e.productId,productName:e.productName,productPicture:e.productPicture,productSn:e.productSn,checkStockAttributeVos:[]},o.push(s),this.tui.request("/app/checkStockDetail/addCheckStockDetail","POST",o,!1,!1).then((function(t){200==t.code||i.tui.toast(t.message)})).catch((function(t){}))}}};e.default=r}).call(this,s("df3c")["default"],s("3223")["default"])},c5ab:function(t,e,s){"use strict";s.r(e);var i=s("b73e"),o=s.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){s.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a}},[["994d","common/runtime","common/vendor"]]]);
|