(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