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
26 KiB
1 lines
26 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/index/downStearmList"],{"1a12":function(t,e,i){"use strict";i.r(e);var s=i("808f"),r=i.n(s);for(var o in s)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(o);e["default"]=r.a},"230e":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return s}));var s={cmdNavBar:function(){return i.e("components/cmd-nav-bar/cmd-nav-bar").then(i.bind(null,"3d8f"))},uNoticeBar:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-notice-bar/u-notice-bar")]).then(i.bind(null,"013b"))},uniSearchBar:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar")]).then(i.bind(null,"f56e"))},uLoadmore:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-loadmore/u-loadmore")]).then(i.bind(null,"9fc5"))},uniIcons:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(i.bind(null,"6bbb6"))},uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"2864"))},uniDataCheckbox:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-data-checkbox/components/uni-data-checkbox/uni-data-checkbox")]).then(i.bind(null,"fab5"))},uniNumberBox:function(){return i.e("uni_modules/uni-number-box/components/uni-number-box/uni-number-box").then(i.bind(null,"b2ff"))},uniForms:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(i.bind(null,"ac36"))},uniFormsItem:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item")]).then(i.bind(null,"b258"))},uniEasyinput:function(){return i.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(i.bind(null,"5fa6"))}},r=function(){var t=this,e=t.$createElement,i=(t._self._c,t.carList.length),s=t.userList.length,r=t.__map(t.carList,(function(e,i){var s=t.__get_orig(e),r=t.__map(e.stockLogList1,(function(e,i){var s=t.__get_orig(e),r=t._f("sliceMsg")(e.attributeList);return{$orig:s,f0:r}}));return{$orig:s,l0:r}}));t._isMounted||(t.e0=function(e){return t.$refs.addressPopup.open()},t.e1=function(t){return this.$refs.carPopup.close()}),t.$mp.data=Object.assign({},{$root:{g0:i,g1:s,l1:r}})},o=[]},"2de2":function(t,e,i){"use strict";i.r(e);var s=i("230e"),r=i("1a12");for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);i("6c42");var a=i("828b"),n=Object(a["a"])(r["default"],s["b"],s["c"],!1,null,null,null,!1,s["a"],void 0);e["default"]=n.exports},"6c42":function(t,e,i){"use strict";var s=i("dfe9"),r=i.n(s);r.a},"808f":function(t,e,i){"use strict";(function(t){var s=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=s(i("7eb4")),o=s(i("af34")),a=s(i("ee10")),n=i("072a"),u={components:{cmdNavBar:function(){i.e("components/cmd-nav-bar/cmd-nav-bar").then(function(){return resolve(i("3d8f"))}.bind(null,i)).catch(i.oe)}},data:function(){return{isSelfOrder:!1,isKaiDan:!1,enDayShow:!1,textArr:["您还未关注快衣店服务号,暂无法接收充值及上新提醒,点击关注"],FWHPic:"https://jewel-shop.oss-cn-beijing.aliyuncs.com/f2ba2080aaa54c618c2e47df4f220087.png",indexList:[],pages:1,totalPages:0,mini_program_openid:"",official_account_openid:"",swiperDotIndex:0,current:0,shopList:[],info:0,bigImg:[],categoryId:"",catagoryUserId:"",searchName:"",shopId:"",checkbox:[],temporaryNum:0,priceType:"",yanseList:new Map,chimaList:new Map,goodsDetail:[],attrNameList:[],temporaryList:[],oldTemList:[],carList:[],columns:[],keyList:[],specsList:[],shopName:"",pecsList:[],productNum:0,evalue:[],userList:[],shareType:"1",productId:"",goodsList:[],allChangeNum:0,attributeList:[],zNum:0,pageZongPrice:0,newTemList:[],customId:"",addressObj:{},zPrice:0,carType:0,carNum:0,pageOldTemList:[],dataObj:new Map,formData:{consigneeMobile:"",consigneeName:"",address1:"",address:"",province:"",city:"",area:"",id:"",userId:""},status:"loadmore",rules:{consigneeName:{rules:[{required:!0,errorMessage:"请输入姓名"}]}}}},filters:{sliceMsg:function(t){var e="";if("string"==typeof t){var i=JSON.parse(t);for(var s in i)e+=i[s]+" | "}return e}},onReachBottom:function(){this.pages>=this.totalPages||(this.status="loading",this.pages++,this.getShareList())},onShow:function(){t.getStorageSync("officialAccountOpenid")||t.getStorageSync("shopId")||!t.getStorageSync("miniProgramOpenid")||this.getUserInfo()},onLoad:function(e){var i=this;if(e.shareType&&(this.shareType=e.shareType),e.khid)this.khid=e.khid,this.userId=e.userId,this.customId=e.customId,this.customId&&(this.formData.userId=this.customId),this.mini_program_openid=e.mini_program_openid,this.official_account_openid=e.official_account_openid;else if(e.scene){var s=decodeURIComponent(e.scene);if(-1!=s.indexOf("-"))return void t.redirectTo({url:"/package1/index/oneGoodsShare?khid="+s.replace(/-/g,"")});this.khid=s}!t.getStorageSync("id")||t.getStorageSync("miniProgramOpenid")||t.getStorageSync("shopId")||this.getOpenId(this.customId,t.getStorageSync("id")?t.getStorageSync("id"):this.userId),this.tui.request("/app/productShare/getShareList","POST",{searchStr:this.searchName,id:this.khid,pageNum:this.pages,pageSize:"10"},!1,!0).then((function(t){i.status="nomore",200==t.code?(null!=t.result.share.scene&&(i.catagoryUserId=JSON.parse(t.result.share.scene).id,i.customName=JSON.parse(t.result.share.scene).name,i.formData.userId=JSON.parse(t.result.share.scene).customId,i.userId=JSON.parse(t.result.share.scene).userId,i.mini_program_openid=JSON.parse(t.result.share.scene).mini_program_openid,i.official_account_openid=JSON.parse(t.result.share.scene).official_account_openid,i.unionid=JSON.parse(t.result.share.scene).unionid),i.shopId=t.result.share.shopId,i.getGategoryList()):i.tui.toast(t.message)})).catch((function(t){})),this.contrastOpneId()},methods:{bigFWHPic:function(){t.previewImage({urls:[this.FWHPic]})},getUserInfo:function(){var e=this;this.tui.request("/user/getUserInfo","post",{miniProgramOpenid:t.getStorageSync("miniProgramOpenid")},!1,!0).then((function(i){200==i.code&&("null"==i.result.officialAccountOpenid||null==i.result.officialAccountOpenid||void 0==i.result.officialAccountOpenid||""==i.result.officialAccountOpenid?e.enDayShow=!0:(t.setStorageSync("officialAccountOpenid",i.result.officialAccountOpenid),e.enDayShow=!1))})).catch((function(t){}))},contrastOpneId:function(){var e=this;return(0,a.default)(r.default.mark((function i(){var s,o;return r.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:s=t.getStorageSync("miniProgramOpenid"),o=e.mini_program_openid,""!=s&&void 0!=s&&null!=s?void 0!=o&&"undefined"!=o&&"null"!=o&&""!=o&&null!=o?s!=o||(e.isSelfOrder=!0,e.$forceUpdate()):(e.updateUserId(),e.isSelfOrder=!0,e.$forceUpdate()):void 0!=o&&"null"!=o&&""!=o&&null!=o?(e.isSelfOrder=!0,e.$forceUpdate()):(e.updateUserId(),e.isSelfOrder=!0,e.$forceUpdate());case 3:case"end":return i.stop()}}),i)})))()},updateUserId:function(){var e=this;this.customId&&t.getStorageSync("id")&&this.tui.request("/app/customer/updateUserId","post",{customerId:this.customId,userId:t.getStorageSync("id")},!1,!0).then((function(t){200!=t.code&&e.tui.toast(t.message)})).catch((function(t){}))},getOpenId:function(e,i){var s=this;return new Promise((function(r,o){t.login({provider:"weixin",success:function(o){t.getUserInfo({provider:"weixin",success:function(a){s.tui.request("/user/login","post",{jsCode:o.code,customId:e,userId:i,wechatName:a.userInfo.nickName,userType:"2"},!1,!1).then((function(e){if(200==e.code)return t.setStorageSync("hiver_token",e.result.accessToken),t.setStorageSync("wayValue","2"),t.setStorageSync("nickname",e.result.user.nickname),t.setStorageSync("id",e.result.user.id),t.setStorageSync("unionid",e.result.user.unionid),t.setStorageSync("miniProgramOpenid",e.result.user.miniProgramOpenid),t.setStorageSync("officialAccountOpenid",e.result.user.officialAccountOpenid),r(e.result);tui.toast(e.message)})).catch((function(t){}))},fail:function(t){console.log("微信信息获取失败",t)}})},fail:function(t){console.log("微信登录失败",t)}})}))},getGategoryList:function(){var t=this;this.tui.request("/app/productCategory/listByShopId","get",{shopId:this.shopId},!1,!0).then((function(e){if(200==e.code){if(t.indexList=e.result,"2"==t.shareType){t.categoryId="";t.indexList.unshift({categoryName:"全部"})}else t.categoryId=t.indexList[0].id;for(var i=0;i<t.indexList.length;i++)t.indexList[i].parentId=0==i;t.pageNum=1,t.searchName="",t.shopList1=[],t.shopList=[],t.getShareList()}else t.tui.toast(e.message)})).catch((function(t){}))},minusNum:function(){this.isChange=!0;for(var t=0;t<this.temporaryList.length;t++){if(0==this.evalue.length)this.temporaryList[t].productCount>0?this.temporaryList[t].productCount--:this.temporaryList[t].productCount=0;else for(var e=0;e<this.evalue.length;e++)this.evalue[e]==this.temporaryList[t].name&&(this.temporaryList[t].productCount>0?this.temporaryList[t].productCount--:this.temporaryList[t].productCount=0);for(var i=0;i<this.pageOldTemList.length;i++)this.temporaryList[t].attributeList==this.pageOldTemList[i].attributeList&&(this.pageOldTemList[i].productCount=this.temporaryList[t].productCount);for(e=0;e<this.oldTemList.length;e++)this.temporaryList[t].attributeList==this.oldTemList[e].attributeList&&(this.oldTemList[e].productCount=this.temporaryList[t].productCount)}this.temporaryChange()},plusNum:function(){this.isChange=!0;for(var t=0;t<this.temporaryList.length;t++){if(0==this.evalue.length)void 0==this.temporaryList[t].productCount?this.temporaryList[t].productCount=1:this.temporaryList[t].productCount+1>this.temporaryList[t].productNum&&("1838094297858183168"==this.shopId||"1811579958284390400"==this.shopId)?this.tui.toast(this.temporaryList[t].name+"已超出可购买数量",300):this.temporaryList[t].productCount++;else for(var e=0;e<this.evalue.length;e++)this.evalue[e]==this.temporaryList[t].name&&(void 0==this.temporaryList[t].productCount?this.temporaryList[t].productCount=1:this.temporaryList[t].productCount+1>this.temporaryList[t].productNum&&("1838094297858183168"==this.shopId||"1811579958284390400"==this.shopId)?this.tui.toast(this.temporaryList[t].name+"已超出可购买数量",300):this.temporaryList[t].productCount++);for(var i=0;i<this.pageOldTemList.length;i++)this.temporaryList[t].attributeList==this.pageOldTemList[i].attributeList&&(this.pageOldTemList[i].productCount=this.temporaryList[t].productCount);for(e=0;e<this.oldTemList.length;e++)this.temporaryList[t].attributeList==this.oldTemList[e].attributeList&&(this.oldTemList[e].productCount=this.temporaryList[t].productCount)}this.temporaryChange()},allChange:function(t){if(1==this.isChange)this.isChange=!1;else for(var e=0;e<this.temporaryList.length;e++){if(0==this.evalue.length)Number(this.allChangeNum)>this.temporaryList[e].productNum&&("1838094297858183168"==this.shopId||"1811579958284390400"==this.shopId)?this.tui.toast(this.temporaryList[e].name+"已超出可购买数量",300):this.temporaryList[e].productCount=Number(this.allChangeNum);else for(var i=0;i<this.evalue.length;i++)this.evalue[i]==this.temporaryList[e].name&&(Number(this.allChangeNum)>this.temporaryList[e].productNum&&("1838094297858183168"==this.shopId||"1811579958284390400"==this.shopId)?this.tui.toast(this.temporaryList[e].name+"已超出可购买数量",300):this.temporaryList[e].productCount=Number(this.allChangeNum));for(var s=0;s<this.pageOldTemList.length;s++)this.temporaryList[e].attributeList==this.pageOldTemList[s].attributeList&&(this.pageOldTemList[s].productCount=this.temporaryList[e].productCount);for(i=0;i<this.oldTemList.length;i++)this.temporaryList[e].attributeList==this.oldTemList[i].attributeList&&(this.oldTemList[i].productCount=this.temporaryList[e].productCount)}this.temporaryChange()},mapMinusNum:function(t,e){this.carList[t].stockLogList1[e].productCount--,this.carChange(),this.$forceUpdate()},mapPlusNum:function(t,e){this.carList[t].stockLogList1[e].productCount++,this.carChange(),this.$forceUpdate()},attrNameChange:function(e,i,s){var r=this;t.showLoading({title:"加载中..."}),this.goodsDetail.attributeList[e].isChecked=!this.goodsDetail.attributeList[e].isChecked,this.goodsDetail.attributeList[e].value[s].isChecked=!this.goodsDetail.attributeList[e].value[s].isChecked,this.evalue=[];for(var o=[],a=0,n=this.goodsDetail.attributeList[0].value;a<n.length;a++)if(n[a].isChecked)for(var u=0,c=this.goodsDetail.attributeList[1].value;u<c.length;u++){var h,d="{";if(h=n[a].value+" | "+c[u].value,d+='"颜色":"'+n[a].value+'",',d+='"尺码":"'+c[u].value+'"',d+="}","1838094297858183168"==this.shopId||"1811579958284390400"==this.shopId)for(var p=0;p<this.pecsList.length;p++)d==this.pecsList[p].attributeList&&null!=this.pecsList[p].stockCount&&Number(this.pecsList[p].stockCount)>0&&(o.push(d),this.evalue.push(h));else o.push(d),this.evalue.push(h)}if(0==o.length&&(this.temporaryList=this.pageOldTemList),0==this.temporaryList.length)for(var l=0;l<o.length;l++)this.attributeList={attributeList:o[l],productCount:this.temporaryNum,productNum:null,name:this.evalue[l],price:this.purchasePrice},this.temporaryList.push(this.attributeList);else{var m=0;for(l=0;l<o.length;l++){for(var g=0;g<this.temporaryList.length;g++)this.temporaryList[g].attributeList==o[l]&&(m=this.temporaryList[g].productCount);this.attributeList={attributeList:o[l],productCount:m,productNum:null,name:this.evalue[l],price:this.purchasePrice},this.newTemList.push(this.attributeList),m=0}for(l=0;l<this.oldTemList.length;l++){var f=!0;for(g=0;g<this.newTemList.length;g++)this.oldTemList[l].attributeList==this.newTemList[g].attributeList&&(this.newTemList[g].productCount=this.oldTemList[l].productCount,f=!1);this.newTemList.length>0&&f&&this.newTemList.push(this.oldTemList[l])}for(l=0;l<this.pageOldTemList.length;l++){var L=!0;for(g=0;g<this.newTemList.length;g++)this.pageOldTemList[l].attributeList==this.newTemList[g].attributeList&&(this.newTemList[g].productCount=this.pageOldTemList[l].productCount,L=!1);this.newTemList.length>0&&L&&this.newTemList.push(this.pageOldTemList[l])}}this.$nextTick((function(){for(var t=0;t<r.temporaryList.length;t++)for(var e=0;e<r.pecsList.length;e++)r.temporaryList[t].attributeList==r.pecsList[e].attributeList&&(r.temporaryList[t].productNum=r.pecsList[e].stockCount),r.$forceUpdate()})),0!=this.newTemList.length&&(this.temporaryList=this.newTemList,this.oldTemList=[],this.newTemList=[]),setTimeout((function(e){t.hideLoading()}),200)},lunbochange:function(t){this.current=t.detail.current},temporaryChange:function(t){this.zNum=0;for(var e=0;e<this.temporaryList.length;e++)this.zNum+=this.temporaryList[e].productCount||0;this.zPrice=this.zNum*this.purchasePrice},checkUser:function(t){this.formData.consigneeMobile=t.phone,this.formData.consigneeName=t.name,this.formData.userId=t.id,this.formData.address1=t.province+t.city+t.area,this.formData.address=t.address,this.formData.province=t.province,this.formData.city=t.city,this.formData.area=t.area,this.$refs.addressPopup.close()},clickPrice:function(){""!=this.carList?(this.getOldPhone(t.getStorageSync("id")?t.getStorageSync("id"):this.userId),this.$refs.inputDialog.open("bottom")):this.tui.toast("请选择商品后再开单")},getOldPhone:function(e){var i,s=this;i=""!=e&&void 0!=e&&"null"!=e&&null!=e?e:t.getStorageSync("userPhone")?t.getStorageSync("userPhone"):"",this.tui.request("/app/customer/findByUserPhoneAndShopId","post",{userPhone:i,shopId:this.shopId},!1,!0).then((function(t){200==t.code&&""!=t.result&&(t.result.length>1?(s.userList=t.result,s.$refs.addressPopup.open()):(s.formData.consigneeMobile=t.result[0].phone,s.formData.consigneeName=t.result[0].name,s.formData.address1=t.result[0].province+t.result[0].city+t.result[0].area,s.formData.address=t.result[0].address,s.formData.userId=t.result[0].id,s.formData.province=t.result[0].province,s.formData.city=t.result[0].city,s.formData.area=t.result[0].area))}))},change:function(t){},toggle:function(e,i){if(this.type=e,"carPopup"==e){this.oldList=this.carList,this.carNum=0;for(var s=0;s<this.carList.length;s++)this.carNum+=this.carList[s].num;this.countTotalPrice(),this.$refs.carPopup.open("bottom"),this.carType=this.carList.length}else t.showLoading({title:"加载中..."}),this.productId=i.id,this.goodsList=[],this.allChangeNum=0,this.checkGoods(i)},checkGoods:function(e){var i=this;return(0,a.default)(r.default.mark((function s(){var o,a;return r.default.wrap((function(s){while(1)switch(s.prev=s.next){case 0:if(t.showLoading({title:"加载中..."}),o=i,1==i.priceType?i.purchasePrice=e.wholesalePrice:i.purchasePrice=e.price,i.goodsDetail=e,i.temporaryList=[],i.pageOldTemList=[],""!=i.carList)for(i.zNum=0,a=0;a<i.carList.length;a++)e.id==i.carList[a].id&&(i.goodsNum=i.carList[a].stockLogList1[0].productCount,i.zNum=i.carList[a].num,i.temporaryList=i.carList[a].stockLogList1,i.pageOldTemList=i.carList[a].stockLogList1,i.oldTemList=i.carList[a].stockLogList1);return s.next=9,i.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId","POST",{categoryId:i.goodsDetail.attrId},!1,!0).then((function(t){if(200==t.code){if("string"==typeof t.result.attributeAndValue){var e=JSON.parse(t.result.attributeAndValue),s=[];for(var r in e){for(var a=[],n=0;n<e[r].length;n++){for(var u=0;u<i.oldTemList.length;u++)for(var c=i.oldTemList[u].name.split("/"),h=0;h<c.length;h++)c[h]==e[r][n]&&!0;for(u=0;u<i.pageOldTemList.length;u++)for(c=i.pageOldTemList[u].name.split("/"),h=0;h<c.length;h++)c[h]==e[r][n]&&!0;a.push({value:e[r][n],isChecked:!1}),o.dataObj.set(e[r][n],r),!1}s.push({name:r,value:a})}i.focus=!1,i.$refs.popup.open("bottom"),i.goodsDetail.attributeList=s;for(n=0;n<i.goodsDetail.attributeList.length;n++){var d=!1,p=[];for(u=0;u<i.goodsDetail.attributeList[n].value.length;u++)1==i.goodsDetail.attributeList[n].value[u].isChecked&&(d=!0,p.push(i.goodsDetail.attributeList[n].value[u].value));if(d){var l={specs:[]};l.specs=p,i.goodsList.push(l)}else{i.goodsList.push({specs:[]})}d=!1,p=[]}i.getKCList(t.result.stock),""==i.temporaryList&&i.attrNameChange(0,i.goodsDetail.attributeList[0].value[0].value,0)}}else i.tui.toast(res.message)})).catch((function(t){}));case 9:return s.next=11,t.hideLoading();case 11:case"end":return s.stop()}}),s)})))()},goToInfo:function(){t.reLaunch({url:"/pages/index/home"})},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.pages=1,this.searchName="",this.shopList1=[],this.shopList=[],this.getShareList(this.indexList[t].id)},getKCList:function(t){var e=this;this.yanseList=new Map,this.chimaList=new Map,this.pecsList=t;for(var i=function(i){var s=JSON.parse(t[i].attributeList);Object.keys(s).forEach((function(t){"颜色"==t&&1!=e.yanseList.has(s[t])&&e.yanseList.set(s[t],s[t])}))},s=0;s<t.length;s++)i(s);for(var r=0;r<this.goodsDetail.attributeList[0].value.length;r++)1==this.yanseList.has(this.goodsDetail.attributeList[0].value[r].value)&&(this.goodsDetail.attributeList[0].value[r].isKucun=!0)},search:function(t){this.pages=1,this.searchName=t.value,this.getShareList()},clearSearch:function(){this.pages=1,this.searchName="",this.getShareList()},inputDialogToggle:function(){this.$refs.inputDialog.open()},carChange:function(t,e,i){this.carNum=0,this.pageZongPrice=0;for(var s=0;s<this.carList.length;s++){this.carList[s].num=0;for(var r=0;r<this.carList[s].stockLogList1.length;r++)this.carList[s].num+=this.carList[s].stockLogList1[r].productCount,this.pageZongPrice+=this.carList[s].stockLogList1[r].productCount*this.carList[s].stockLogList1[r].price;this.carNum+=this.carList[s].num}},temporaryCheck:function(){for(var t=[],e=0;e<this.temporaryList.length;e++)0!=this.temporaryList[e].productCount&&t.push(this.temporaryList[e]);var i={productId:this.goodsDetail.id,price:this.zPrice,num:this.zNum,discount:10,categoryId:this.goodsDetail.categoryId,productName:this.goodsDetail.productName,purchasePrice:this.goodsDetail.purchasePrice,discountAmount:this.goodsDetail.discountAmount,productSn:this.goodsDetail.productSn,productPicture:this.goodsDetail.productPicture,supplierName:this.goodsDetail.supplierName,stockLogList1:t,saleDetailQueryDTO1:[],wholesalePrice:this.goodsDetail.wholesalePrice,lsprice:this.goodsDetail.price};if(0==this.carList.length)this.carList.push(i);else{for(var s=!0,r=0;r<this.carList.length;r++)this.carList[r].productId==i.productId&&(this.carList[r]=i,s=!1);s&&this.carList.push(i)}for(var o=0;o<this.carList.length;o++){this.carList[o].num=0;for(var a=0;a<this.carList[o].stockLogList1.length;a++)this.carList[o].num+=this.carList[o].stockLogList1[a].productCount}this.temporaryList=[],this.oldTemList=[],this.purchasePrice="",this.zPrice="",this.zNum="";for(var n=0;n<this.goodsDetail.attributeList.length;n++){this.goodsDetail.attributeList[n].isChecked=!1;for(var u=0;u<this.goodsDetail.attributeList[n].value.length;u++)this.goodsDetail.attributeList[n].value[u].isChecked=!1}this.$refs.popup.close()},delShop:function(e){var i=this;t.showModal({title:"提示",content:"确定删除此条商品吗?",success:function(t){if(t.confirm){for(var s=0;s<i.carList.length;s++)i.carList[s].productId==e.productId&&(i.carNum-=i.carList[s].num,i.carList.splice(s,1));i.carType=i.carList.length}i.$forceUpdate(),i.countTotalPrice()}})},countTotalPrice:function(){this.pageZongPrice=0;for(var t=0;t<this.carList.length;t++)for(var e=0;e<this.carList[t].stockLogList1.length;e++)this.pageZongPrice+=this.carList[t].stockLogList1[e].productCount*this.carList[t].stockLogList1[e].price},largeImg:function(t){if(null==t.productPicture&&null==t.productPictures||""==t.productPicture&&null==t.productPictures)this.tui.toast("暂无可展示的图片",300);else{if(this.bigImg=[],null!=t.productPicture){var e={productPicture:t.productPicture};this.bigImg.push(e)}if(null!=t.productPictures)for(var i=0;i<t.productPictures.length;i++)this.bigImg.push(t.productPictures[i]);this.$refs.imgPopup.open()}},delCarData:function(t){this.temporaryList.splice(t,1),this.temporaryChange()},delShopSpec:function(e,i){var s=this;t.showModal({title:"提示",content:"确定删除此条商品吗?",success:function(t){if(t.confirm){for(var r=0;r<s.carList.length;r++){if(s.carList[r].productId==e)for(var o=0;o<s.carList[r].stockLogList1.length;o++)s.carList[r].stockLogList1[o].attributeList!=i||(s.carList[r].num-=s.carList[r].stockLogList1[o].productCount,s.carNum-=s.carList[r].stockLogList1[o].productCount,s.carList[r].stockLogList1.splice(o,1));0==s.carList[r].stockLogList1.length&&s.carList.splice(r,1)}s.carType=s.carList.length}s.$forceUpdate(),s.countTotalPrice()}})},backPrevPage:function(){var e=this;if(!this.isKaiDan){this.isKaiDan=!0;var i=this;t.setStorageSync("userPhone",i.formData.consigneeMobile),this.$refs.form.validate().then((function(s){var r={mobile:i.formData.consigneeMobile,username:i.formData.consigneeName,userId:void 0==e.formData.userId||null==e.formData.userId||"undefined"==e.formData.userId||"null"==e.formData.userId?"":e.formData.userId,userPhone:e.formData.consigneeMobile,categoryId:"1"==e.priceType||"0"==e.priceType?"":e.catagoryUserId,categoryName:"1"==e.priceType||"0"==e.priceType?"":e.customName,oldSaleId:e.khid,sale:{area:e.formData.area,city:e.formData.city,discount:10,province:e.formData.province,receiveAddress:i.formData.address,totalAmount:i.pageZongPrice,shopId:e.shopId},saleDetailList:e.carList};e.tui.request("/app/sale/savePresale","post",r,!1,!1).then((function(i){200==i.code?(e.tui.toast("下单成功,待商家配货"),setTimeout((function(){t.reLaunch({url:"/package2/login/login"})}),2e3)):e.tui.toast(i.message)}))})).catch((function(t){}))}},openPicker:function(){var e=this;t.chooseLocation({success:function(t){if(""!=t.name){var i=(0,n.getArea)(t.address);e.formData.province=i.province,e.formData.city=i.city,e.formData.area=i.country,e.formData.address=i.address+"-"+t.name,e.formData.address1=i.province+i.city+i.country}else e.tui.toast("微信地址选择器调用失败,请重新选择!")},fail:function(t){}})},getShareList:function(t){var e=this;this.status="loading",this.tui.request("/app/productShare/getShareList","POST",{searchStr:this.searchName,categoryId:void 0==this.categoryId?"":this.categoryId,id:this.khid,pageNum:this.pages,pageSize:"10"},!1,!0).then((function(t){if(e.status="nomore",200==t.code){e.shopName=t.result.share.shopName,e.priceType=t.result.share.priceType,e.shopId=t.result.shareList.records[0].shopId,1==e.pages?e.shopList=t.result.shareList.records:e.shopList=[].concat((0,o.default)(e.shopList),(0,o.default)(t.result.shareList.records));for(var i=0;i<e.shopList.length;i++)if(1==t.result.share.priceType)e.shopList[i].discountAmount=e.shopList[i].wholesalePrice;else if(0==t.result.share.priceType)e.shopList[i].discountAmount=e.shopList[i].price;else if(e.shopList[i].discountAmount=e.shopList[i].wholesalePrice,null!=e.shopList[i].customerCategoryRule&&""!=e.shopList[i].customerCategoryRule)for(var s=JSON.parse(e.shopList[i].customerCategoryRule),r=0;r<s.length;r++)""!=s[r].categoryPrice&&s[r].categoryId==e.catagoryUserId&&(e.shopList[i].discountAmount=s[r].categoryPrice);e.totalPages=t.result.shareList.pages}else e.tui.toast(t.message)})).catch((function(t){}))},combination:function(t){var e=[[]];return t.map((function(t){var i=[];e.map((function(e){t.specs.map((function(t){i.push([].concat((0,o.default)(e),[t]))}))})),e=i})),e},saveCheck:function(){this.pageOldTemList=this.temporaryList;for(var t=0;t<this.goodsDetail.attributeList.length;t++){this.goodsList[t].specs=[];for(var e=0;e<this.goodsDetail.attributeList[t].value.length;e++)this.goodsDetail.attributeList[t].value[e].isChecked=!1}}}};e.default=u}).call(this,i("df3c")["default"])},a520:function(t,e,i){"use strict";(function(t,e){var s=i("47a9");i("7859");s(i("3240"));var r=s(i("2de2"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(r.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},dfe9:function(t,e,i){}},[["a520","common/runtime","common/vendor"]]]);
|