(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"491e":function(t,e,o){"use strict";o.d(e,"b",(function(){return a})),o.d(e,"c",(function(){return s})),o.d(e,"a",(function(){return n}));var n={cmdNavBar:function(){return o.e("components/cmd-nav-bar/cmd-nav-bar").then(o.bind(null,"7172"))},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,"ed26"))},uniIcons:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(o.bind(null,"d3ec"))},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,"9e29"))},uEmpty:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(o.bind(null,"3f18"))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-popup/u-popup")]).then(o.bind(null,"0ae5"))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"83a8"))}},a=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,a=t.showDayPrice&&0==t.type?t.shopInfo.totalAlreadyEarnDetail.length:null,s=!t.showFormula||0!=t.type||3!=t.showDan||0==t.shopInfo.totalProfit&&0==t.shopInfo.totalAmount?null:(t.shopInfo.totalProfit/t.shopInfo.totalAmount*100).toFixed(2),i=t.showFormula&&0==t.type&&2==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,u=t.showFormula&&0==t.type&&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&&0==t.type&&1==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,l=t.shijiPrice&&0==t.type?(t.shopInfo.totalAmount-t.shopInfo.totalProfit).toFixed(2):null,c=t.shijiPrice&&0==t.type?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,d=t.shijiPrice&&0==t.type&&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,f=t.shijiPrice&&0==t.type&&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.e3=function(e){t.shijiPrice=!1}),t.$mp.data=Object.assign({},{$root:{g0:o,g1:n,g2:a,g3:s,g4:i,g5:u,g6:r,g7:l,g8:c,g9:d,g10:f}})},s=[]},"626e":function(t,e,o){"use strict";o.r(e);var n=o("9b7a"),a=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"]=a.a},"7d8e":function(t,e,o){},"9b7a":function(t,e,o){"use strict";(function(t,n){var a=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=a(o("7eb4")),i=a(o("ee10")),u=o("8f59"),r={computed:(0,u.mapState)(["userId","shopIndex","avatar"]),data:function(){return{menu:[{}],type:"",xuanchuan:!1,src:"http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg",inventoryList:[],settingShow:!1,isCancel:!1,showFormula:!1,chartData:{},showDan:"",warehouseKeeperFlag:t.getStorageSync("warehouseKeeperFlag"),storeFlag:t.getStorageSync("storeFlag"),returnList:new Map,shopName:"",zongAmount:0,waimaiRight:"-40px",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:function(){o.e("components/cmd-nav-bar/cmd-nav-bar").then(function(){return resolve(o("7172"))}.bind(null,o)).catch(o.oe)}},filters:{spliceMsg:function(t){return t}},onLoad:function(){var e=this;n.getLocation({type:"gcj02",success:function(t){}}),t.getStorage({key:"shopName",success:function(t){e.shopName=t.data}}),t.getStorage({key:"type",success:function(t){e.type=t.data}});var o=new Date,a=o.getDate();t.getStorageSync("publicize")==a||(t.setStorageSync("publicize",a),this.xuanchuan=!0),this.getEndTime()},onShow:function(){this.getSaleInfo()},onTabItemTap:function(e){this.warehouseKeeperFlag=t.getStorageSync("warehouseKeeperFlag"),this.storeFlag=t.getStorageSync("storeFlag")},methods:{getAmount:function(){var t=this,e=new Date,o=e.getFullYear().toString(),n=e.getMonth()+1<10?"0"+(e.getMonth()+1).toString():(e.getMonth()+1).toString(),a=e.getDate()<10?"0"+e.getDate().toString():e.getDate().toString(),s=e.getDate()+1<10?"0"+(e.getDate()+1).toString():(e.getDate()+1).toString(),i=o+"-"+n+"-"+a,u=o+"-"+n+"-"+s;this.tui.request("/app/dealingRecord/getDealingsRecordListByTimeRange","post",{startTime:i,endTime:u},!1,!0).then((function(e){t.zongAmount=0;for(var o=0;o0&&4==e.result[o].dealingsType&&0==e.result[o].delFlag&&-1!=e.result[o].remark.indexOf("客户充值:")&&(t.zongAmount+=e.result[o].amount,t.shopInfo.totalAlreadyEarn+=e.result[o].amount)}))},goOrderDetail:function(){t.navigateTo({url:"/package1/index/order?listStatus=8"})},goInventory:function(){t.navigateTo({url:"/package1/AI/waitStorageHeng?inStorageStatus=1&storeFlag=1"})},getEndTime:function(){var e=this;this.textArr=[],this.tui.request("/app/shop/getShopInfoById","post",{id:t.getStorageSync("shopId")},!1,!0).then((function(o){t.setStorageSync("endTime",o.result.endTime),e.endTime=o.result.endTime,e.endDay=e.daysUntil(o.result.endTime),e.endDay<7&&(e.enDayShow=!0)})),setTimeout((function(t){if(void 0!=e.endTime){var o="您的店铺有效期至"+e.endTime+",还有"+e.endDay+"天到期,请及时联系管理员续费或开通";e.textArr.push(o),console.log(e.textArr)}}),500)},daysUntil:function(t){var e=new Date(t),o=new Date,n=e-o,a=Math.ceil(n/864e5);return a},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.xuanchuan=!1},getReturnOrder:function(t){return(0,i.default)(s.default.mark((function t(){return s.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:case"end":return t.stop()}}),t)})))()},copyOrder:function(t){var e=this;return(0,i.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.id},!1,!1).then((function(o){200==o.code&&null!=o.result&&void 0!=o.result?""!=o.result?o.result.forEach((function(o){e.tui.request("/app/return/get/"+o.id,"GET",null,!1,!1).then((function(o){if(200==o.code&&null!=o.result&&void 0!=o.result)for(var a=0;a