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
5.9 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package2/index/classifiedStatistics"],{"12f9":function(t,o,n){"use strict";(function(t){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var n={data:function(){return{showDan:"",showFormula:!1,indexList:[],range:[],oldDataList:[],dataList:[],shopInfo:{purchasingCost:0,purchasingCount:0,totalJCount:0,totalAmount:0,totalProfit:0,returnTotalAmount:0,saleReturnCost:0,returnTotalCount:0},showDayPrice:!1,type:t.getStorageSync("type")}},onShow:function(){""==this.range&&this.getMonth()},methods:{getGategoryList:function(){var t=this;this.tui.request("/app/productCategory/list","get",{},!1,!0).then((function(o){if(200==o.code){t.indexList=o.result,t.dataList=JSON.parse(JSON.stringify(t.oldDataList));for(var n=0;n<t.indexList.length;n++){t.indexList[n].isTrue=!1;for(var e=0;e<t.oldDataList.length;e++)t.indexList[n].id==t.oldDataList[e]&&(t.indexList[n].isTrue=!0)}t.$refs.filterPopup.open("bottom"),t.$forceUpdate()}else t.tui.toast(o.message)})).catch((function(t){}))},changeFormula:function(t){var o=this;console.log(t),this.showFormula=!0,this.showDan=t,setTimeout((function(t){o.showFormula=!1}),2e3)},classificationFilter:function(){this.getGategoryList()},clearData:function(){this.dataList=[];for(var t=0;t<this.indexList.length;t++)this.indexList[t].isTrue=!1;this.$forceUpdate()},confirmData:function(){var t=this;""==this.dataList?this.tui.toast("您未选择任何一个分类"):this.tui.request("/app/sale/getShopAllByCateId","post",{ids:this.dataList,pageVo:{pageSize:5,pageNumber:1},startTime:this.range[0],endTime:this.range[1]},!1,!1).then((function(o){if(200==o.code){t.oldDataList=[];for(var n=0;n<t.dataList.length;n++)t.oldDataList.push(t.dataList[n]);t.dataList=[],t.shopInfo=o.result,t.$refs.filterPopup.close()}else t.tui.toast(o.message)})).catch((function(t){}))},clickType:function(t){this.indexList[t].isTrue=!this.indexList[t].isTrue,-1==this.dataList.indexOf(this.indexList[t].id)?this.dataList.push(this.indexList[t].id):this.dataList.splice(this.dataList.indexOf(this.indexList[t].id),1),console.log("新的数组",this.dataList),this.$forceUpdate()},getMonth:function(){var t=new Date,o=t.getFullYear().toString(),n=t.getMonth()+1<10?"0"+(t.getMonth()+1).toString():(t.getMonth()+1).toString(),e=t.getDate()<10?"0"+t.getDate().toString():t.getDate().toString(),i=o+"-"+n+"-"+e,s=o+"-"+n+"-01";this.range=[s,i]}}};o.default=n}).call(this,n("df3c")["default"])},"1ebb":function(t,o,n){"use strict";var e=n("29bf"),i=n.n(e);i.a},"29bf":function(t,o,n){},5805:function(t,o,n){"use strict";(function(t,o){var e=n("47a9");n("7859");e(n("3240"));var i=e(n("f738"));t.__webpack_require_UNI_MP_PLUGIN__=n,o(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"6ab6":function(t,o,n){"use strict";n.d(o,"b",(function(){return i})),n.d(o,"c",(function(){return s})),n.d(o,"a",(function(){return e}));var e={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"6bbb6"))},uniPopup:function(){return n.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(n.bind(null,"2864"))},uniDatetimePicker:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(n.bind(null,"4632"))}},i=function(){var t=this,o=t.$createElement,n=(t._self._c,((null==t.shopInfo.totalProfit?0:t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2)),e=t.showDayPrice?(t.shopInfo.totalAmount-t.shopInfo.totalProfit).toFixed(2):null,i=t.showDayPrice?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,s=t.showDayPrice&&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,a=t.showDayPrice&&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,u=!t.showFormula||3!=t.showDan||0==t.shopInfo.totalProfit&&0==t.shopInfo.totalAmount?null:(t.shopInfo.totalProfit/t.shopInfo.totalAmount*100).toFixed(2),r=t.showFormula&&2==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null,l=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,f=t.showFormula&&1==t.showDan?(t.shopInfo.totalAmount-(t.shopInfo.totalAmount-t.shopInfo.totalProfit)-t.shopInfo.returnTotalAmount+t.shopInfo.saleReturnCost).toFixed(2):null;t._isMounted||(t.e0=function(o){t.showDayPrice=!0},t.e1=function(o){return t.$refs.filterPopup.close()},t.e2=function(o){t.showDayPrice=!1}),t.$mp.data=Object.assign({},{$root:{g0:n,g1:e,g2:i,g3:s,g4:a,g5:u,g6:r,g7:l,g8:f}})},s=[]},7866:function(t,o,n){"use strict";n.r(o);var e=n("12f9"),i=n.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){n.d(o,t,(function(){return e[t]}))}(s);o["default"]=i.a},f738:function(t,o,n){"use strict";n.r(o);var e=n("6ab6"),i=n("7866");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(o,t,(function(){return i[t]}))}(s);n("1ebb");var a=n("828b"),u=Object(a["a"])(i["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],void 0);o["default"]=u.exports}},[["5805","common/runtime","common/vendor"]]]);