平板端快衣店
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.
 
 
 
 
 

2 lines
16 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{168:function(t,e,o){"use strict";(function(t,e){var n=o(4);o(26);n(o(25));var i=n(o(169));t.__webpack_require_UNI_MP_PLUGIN__=o,e(i.default)}).call(this,o(1)["default"],o(2)["createPage"])},169:function(t,e,o){"use strict";o.r(e);var n=o(170),i=o(172);for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(e,t,(function(){return i[t]}))}(s);o(174);var a,u=o(38),r=Object(u["default"])(i["default"],n["render"],n["staticRenderFns"],!1,null,null,null,!1,n["components"],a);r.options.__file="pages/index/index.vue",e["default"]=r.exports},170:function(t,e,o){"use strict";o.r(e);var n=o(171);o.d(e,"render",(function(){return n["render"]})),o.d(e,"staticRenderFns",(function(){return n["staticRenderFns"]})),o.d(e,"recyclableRender",(function(){return n["recyclableRender"]})),o.d(e,"components",(function(){return n["components"]}))},171:function(t,e,o){"use strict";var n;o.r(e),o.d(e,"render",(function(){return i})),o.d(e,"staticRenderFns",(function(){return a})),o.d(e,"recyclableRender",(function(){return s})),o.d(e,"components",(function(){return n}));try{n={cmdNavBar:function(){return o.e("components/cmd-nav-bar/cmd-nav-bar").then(o.bind(null,960))},uNoticeBar:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-notice-bar/u-notice-bar")]).then(o.bind(null,967))},uGrid:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-grid/u-grid")]).then(o.bind(null,975))},uGridItem:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-grid-item/u-grid-item")]).then(o.bind(null,983))},uCountTo:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-count-to/u-count-to")]).then(o.bind(null,991))},uniIcons:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(o.bind(null,999))},qiunDataCharts:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/qiun-data-charts/components/qiun-data-charts/qiun-data-charts")]).then(o.bind(null,1007))},uniCard:function(){return o.e("uni_modules/uni-card/components/uni-card/uni-card").then(o.bind(null,1025))},uEmpty:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(o.bind(null,1032))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,1040))},uCellGroup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-cell-group/u-cell-group")]).then(o.bind(null,1048))},uCell:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-cell/u-cell")]).then(o.bind(null,1056))},uniPopup:function(){return o.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(o.bind(null,1064))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var t=this,e=t.$createElement,o=(t._self._c,0==t.type?(t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null),n=t.inventoryList.length,i=t.showDayPrice?t.shopInfo.totalAlreadyEarnDetail.length:null,s=!t.showFormula||3!=t.showDan||0==t.shopInfo.totalProfit&&0==t.shopInfo.totalAmount?null:(t.shopInfo.totalProfit/t.shopInfo.totalAmount*100).toFixed(2),a=t.showFormula&&2==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,u=t.showFormula&&2==t.showDan&&t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost!=0?((t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost)/(t.shopInfo.totalAmount-t.shopInfo.returnTotalAmount)*100).toFixed(2):null,r=t.showFormula&&1==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,l=t.shijiPrice?(t.shopInfo.totalAmount-t.shopInfo.totalProfit).toFixed(2):null,c=t.shijiPrice?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,d=t.shijiPrice&&0!=t.shopInfo.totalProfit&&null!=t.shopInfo.totalProfit&&0!=t.shopInfo.totalAmount&&null!=t.shopInfo.totalAmount?(t.shopInfo.totalProfit/t.shopInfo.totalAmount*100).toFixed(2):null,p=t.shijiPrice&&t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost!=0&&t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost!=null&&t.shopInfo.totalAmount-t.shopInfo.returnTotalAmount!=0&&t.shopInfo.totalAmount-t.shopInfo.returnTotalAmount!=null?((t.shopInfo.totalProfit-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost)/(t.shopInfo.totalAmount-t.shopInfo.returnTotalAmount)*100).toFixed(2):null;t._isMounted||(t.e0=function(e){t.shijiPrice=!0},t.e1=function(e){t.settingShow=!1},t.e2=function(e){t.shijiPrice=!1}),t.$mp.data=Object.assign({},{$root:{g0:o,g1:n,g2:i,g3:s,g4:a,g5:u,g6:r,g7:l,g8:c,g9:d,g10:p}})},s=!1,a=[];i._withStripped=!0},172:function(t,e,o){"use strict";o.r(e);var n=o(173),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},173:function(t,e,o){"use strict";(function(t,n){var i=o(4);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=i(o(28)),a=i(o(30)),u=o(32),r=function(){o.e("components/cmd-nav-bar/cmd-nav-bar").then(function(){return resolve(o(960))}.bind(null,o)).catch(o.oe)},l={computed:(0,u.mapState)(["userId","shopIndex","avatar"]),data:function(){return{type:"",src:"http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg",inventoryList:[],settingShow:!1,isCancel:!1,showFormula:!1,chartData:{},showDan:"",returnList:new Map,shopName:"",waimaiRight:"-70rpx",showDayPrice:!1,shijiPrice:!1,opts:{padding:[15,10,0,15],dataLabel:!0,dataPointShape:!1,enableScroll:!1,legend:{},xAxis:{disableGrid:!0},yAxis:{gridType:"dash",dashLength:2,data:[{min:0}]},extra:{column:{type:"group",width:30,customColor:["#44fd6d","#91CB74"],activeBgColor:"#000000",activeBgOpacity:.08,seriesGap:10,barBorderCircle:!0,barBorderRadius:[20,20,0,0],linearType:"custom"}}},shopInfo:{totalAmount:0,totalAlreadyEarn:0,totalPayAmount:0,totalCCount:0,totalCount:0,totalJCount:0,totalProfit:0,saleReturnCost:0,returnTotalAmount:0,returnTotalCount:0,totalAlreadyEarnDetail:0},waitCount:{},enDayShow:!1,endDay:"",textArr:[]}},components:{cmdNavBar:r},filters:{spliceMsg:function(t){return t}},onLoad:function(){var e=this;t.getLocation({type:"gcj02",success:function(t){}}),n.getStorage({key:"shopName",success:function(t){e.shopName=t.data}}),n.getStorage({key:"type",success:function(t){e.type=t.data}});var o=new Date,i=o.getDate();n.getStorageSync("publicize")==i||(n.setStorageSync("publicize",i),this.$refs.publicizepopup.open("center")),this.getSaleInfo(),this.getEndTime()},onTabItemTap:function(t){this.getSaleInfo()},methods:{getEndTime:function(){var t=this;this.textArr=[],this.tui.request("/app/shop/getShopInfoById","post",{id:n.getStorageSync("shopId")},!1,!0).then((function(e){n.setStorageSync("endTime",e.result.endTime),t.endTime=e.result.endTime,t.endDay=t.daysUntil(e.result.endTime),t.endDay<7&&(t.enDayShow=!0)})),setTimeout((function(e){if(void 0!=t.endTime){var o="您的店铺有效期至"+t.endTime+",还有"+t.endDay+"天到期,请及时联系管理员续费或开通";t.textArr.push(o),console.log(t.textArr)}}),500)},daysUntil:function(t){var e=new Date(t),o=new Date,n=e-o,i=Math.ceil(n/864e5);return i},changeFormula:function(t){var e=this;console.log(t),this.showFormula=!0,this.showDan=t,setTimeout((function(t){e.showFormula=!1}),2e3)},popClose:function(){this.$refs.publicizepopup.close()},getReturnOrder:function(t){var e=this;return(0,a.default)(s.default.mark((function o(){var n;return s.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:return n=e,o.next=3,e.tui.request("/app/return/list","post",{remark:3,saleId:t},!1,!1).then((function(t){200==t.code&&null!=t.result&&void 0!=t.result?""!=t.result&&t.result.forEach((function(t){e.tui.request("/app/return/get/"+t.id,"GET",null,!1,!1).then((function(t){if(200==t.code&&null!=t.result&&void 0!=t.result)for(var e=0;e<t.result.saleDetailDTOList.length;e++){t.result.saleDetailDTOList[e].returnPrice=t.result.saleDetailDTOList[e].discountAmount,t.result.saleDetailDTOList[e].stockLogList=new Map,n.returnList.set(t.result.saleDetailDTOList[e].productId,t.result.saleDetailDTOList[e]);for(var o=0;o<t.result.saleDetailDTOList[e].stockLogList1.length;o++)t.result.saleDetailDTOList[e].stockLogList1[o].productCount=0-t.result.saleDetailDTOList[e].stockLogList1[o].productCount,n.returnList.get(t.result.saleDetailDTOList[e].productId).stockLogList.set(t.result.saleDetailDTOList[e].stockLogList1[o].attributeList,t.result.saleDetailDTOList[e].stockLogList1[o])}})).catch((function(t){}))})):e.tui.toast(t.message)}));case 3:case"end":return o.stop()}}),o)})))()},cancelOrder:function(t,e){var o=this;return(0,a.default)(s.default.mark((function n(){var i;return s.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=o,n.next=3,o.getReturnOrder(t.id);case 3:return n.next=5,o.tui.modal("提示","goPay"==e?"您确定要撤销订单并重新开单吗?":"您确定要撤销订单吗?",!0,(function(o){o?i.cancelSale(t,e):i.returnList=new Map}));case 5:case"end":return n.stop()}}),n)})))()},cancelSale:function(t,e){var o=this;this.tui.request("/app/sale/cancelSale","POST",{id:t.id},!0,!0).then((function(n){200==n.code?"goPay"==e?(o.isCancel=!0,o.goSaleGoods(t,"cancel")):o.getSaleInfo():o.tui.toast(res.message)})).catch((function(t){}))},getOrderInfoList:function(t,e){var o=this;0==t.status||1==t.status?this.tui.request("/app/sale/status","POST",{status:4,orderId:t.id},!0,!0).then((function(n){200==n.code?o.cancelSale(t,e):o.tui.toast(res.message)})).catch((function(t){})):this.cancelSale(t,e)},sliceMsg:function(t){var e="";if("string"==typeof t){var o=JSON.parse(t);for(var n in o)e+=o[n]+"/"}return e},goSaleGoods:function(t,e){var o=this,i=[];if(null!=t.saleDetailDTOList&&""!=t.saleDetailDTOList||(t.saleDetailDTOList=[]),this.returnList.forEach((function(e,o){t.saleDetailDTOList.push(e)})),t.saleDetailDTOList)for(var s=0;s<t.saleDetailDTOList.length;s++){for(var a={},u=new Map,r=[],l=0,c=0;c<t.saleDetailDTOList[s].stockLogList1.length;c++)if(1==u.has(t.saleDetailDTOList[s].stockLogList1[c].attributeList)){var d=u.get(t.saleDetailDTOList[s].stockLogList1[c].attributeList);r[d].productCount=Number(r[d].productCount)+Number(t.saleDetailDTOList[s].stockLogList1[c].productCount),1==this.isCancel&&(r[d].stockCount=r[d].stockCount+r[d].productCount)}else t.saleDetailDTOList[s].stockLogList1[c].name=this.sliceMsg(t.saleDetailDTOList[s].stockLogList1[c].attributeList),1==this.isCancel&&(t.saleDetailDTOList[s].stockLogList1[c].stockCount=t.saleDetailDTOList[s].stockLogList1[c].stockCount+t.saleDetailDTOList[s].stockLogList1[c].productCount),r.push(t.saleDetailDTOList[s].stockLogList1[c]),u.set(t.saleDetailDTOList[s].stockLogList1[c].attributeList,l),l++;a.saleDetailQueryDTO=r,a.num=0,a.id=t.saleDetailDTOList[s].productId,a.attrId=t.saleDetailDTOList[s].attrId,a.buyCount=t.saleDetailDTOList[s].buyCount-1,a.price=t.saleDetailDTOList[s].price,a.lsprice=t.saleDetailDTOList[s].price,a.discount=t.saleDetailDTOList[s].discount,a.categoryId=t.saleDetailDTOList[s].categoryId,a.zPrice=t.saleDetailDTOList[s].discountAmount,a.customerCategoryRule=null!=t.saleDetailDTOList[s].customerCategoryRule?JSON.parse(t.saleDetailDTOList[s].customerCategoryRule):null,a.productName=t.saleDetailDTOList[s].productName,null!=t.saleDetailDTOList[s].productPicture&&""!=t.saleDetailDTOList[s].productPicture?a.productPicture=t.saleDetailDTOList[s].productPicture+"?time="+(new Date).getTime():a.productPicture="",a.productSn=t.saleDetailDTOList[s].productSn,a.wholesalePrice=t.saleDetailDTOList[s].wholesalePrice,a.discountAmount=t.saleDetailDTOList[s].discountAmount,a.returnPrice=t.saleDetailDTOList[s].returnPrice,a.saleId=t.id,a.remark=t.remark,a.xsyId=t.createBy,a.createByName=t.createByName,a.unitPrice="cancel"==e?this.getUnitPrice(t,t.saleDetailDTOList[s]):t.saleDetailDTOList[s].discountAmount,i.push(a)}else{var p={num:0,price:0};p.saleId=t.id,p.remark=t.remark,p.xsyId=t.createBy,p.createByName=t.createByName,i.push(p)}this.$nextTick((function(){o.tui.request("/app/debt/selectByUserId","post",{shopId:n.getStorageSync("shopId"),userId:t.userId},!1,!0).then((function(e){200==e.code&&(o.returnList=new Map,e.result.noEarn=e.result.amountOwed,e.result.name=e.result.userName,e.result.id=t.userId,n.setStorageSync("khName",JSON.stringify(e.result)),n.setStorageSync("carList1",JSON.stringify(i)),n.setStorageSync("discountAll",null!=t.discount?t.discount:10),n.setStorageSync("hangOrder",!0),n.switchTab({url:"/pages/inventory/goodsList1"}))}))}))},getUnitPrice:function(t,e){return 10!=t.discount?null==t.discount||0==t.discount||void 0==t.discount?e.discountAmount:(1e4*e.discountAmount/(100*t.discount)/10).toFixed(2):10!=e.discount?null==e.discount||0==e.discount||void 0==e.discount?e.discountAmount:(1e4*e.discountAmount/(100*e.discount)/10).toFixed(2):e.discountAmount||e.wholesalePrice},getSaleInfo:function(){var t=this;this.shopInfo={totalAmount:0,totalAlreadyEarn:0,totalPayAmount:0,totalCCount:0,totalCount:0,totalJCount:0,totalProfit:0,saleReturnCost:0,returnTotalAmount:0,returnTotalCount:0,totalAlreadyEarnDetail:0},this.inventoryList=[],this.tui.request("/app/sale/getShopAll","POST",{pageVo:{pageSize:5,pageNumber:1}},!1,!1).then((function(e){if(200==e.code){t.shopInfo={totalAmount:e.result.totalAmount,totalAlreadyEarn:e.result.totalAlreadyEarn,totalPayAmount:e.result.totalPayAmount,totalCCount:e.result.totalCCount,totalCount:e.result.totalCount,totalJCount:e.result.totalJCount,totalProfit:e.result.totalProfit,saleReturnCost:e.result.saleReturnCost,returnTotalAmount:e.result.returnTotalAmount,returnTotalCount:e.result.returnTotalCount,totalAlreadyEarnDetail:e.result.totalAlreadyEarnDetail};var o={categories:t.getWeek(),series:[{name:"七天营收统计",linearColor:[[0,"#1890FF"],[.33,"#00B5FF"],[.66,"#00D1ED"],[1,"#00E6BB"],[1,"#90F489"]],setShadow:[3,8,10,"#00E6BB"],data:e.result.weekSale}]};t.chartData=JSON.parse(JSON.stringify(o)),t.waitCount=e.result.countMap;for(var n=0;n<e.result.salePage.records.length;n++)e.result.salePage.records[n].img="/static/images/dingdan/dd"+n+".png",t.inventoryList=e.result.salePage.records}else t.tui.toast(e.message)}))},goToInfo:function(){this.settingShow=!0},quwaimai:function(){var t=this;"-70rpx"==this.waimaiRight?this.waimaiRight="20rpx":n.openEmbeddedMiniProgram({appId:"wxf5362b6e97ecee2f"}),setTimeout((function(e){t.waimaiRight="-70rpx"}),2e3)},gotoSearchData:function(){n.navigateTo({url:"/package1/index/dataStatistics"})},showPayType:function(){var t=this;this.showDayPrice=!0,setTimeout((function(e){t.showDayPrice=!1}),2e3)},outLogin:function(t){var e=this;n.showModal({title:"提示",content:"确定退出登录吗?",success:function(t){t.confirm&&e.tui.request("/oauth2/logout","POST",{},!1,!1).then((function(t){200==t.code?(e.tui.toast("退出登录成功"),n.removeStorage({key:"hiver_token"}),n.navigateTo({url:"/pages/login/login"})):e.tui.toast(t.message)}))}})},getWeek:function(){var t=7,e=["周日","周一","周二","周三","周四","周五","周六"],o=Array.from({length:t},(function(t,e){return e})).map((function(t){var o=new Date;return o.setDate(o.getDate()-t),e[o.getDay()]}));return o.reverse()},gotoDetail:function(t){n.navigateTo({url:"/package1/index/orderDetail?id="+t})},goSonPage:function(t){"/package1/index/waitStorage?inStorageStatus=0"!=t||0==this.type?n.navigateTo({url:t}):this.tui.toast("暂无查看权限!")}}};e.default=l}).call(this,o(1)["default"],o(2)["default"])},174:function(t,e,o){"use strict";o.r(e);var n=o(175),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},175:function(t,e,o){}},[[168,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map