Commit 59936af2 by 无尘

fix: 修改导购月指标

parent 47534b8d
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.62c865c67509da74e66ac1379ebf61bc.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.72bc241fcef3698b790a.js></script><script type=text/javascript src=./static/js/vendor.7bffa30b60868871b0ad.js></script><script type=text/javascript src=./static/js/app.c81f940c4dd5e19cb90a.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link href=./static/css/app.9e3036d4863c0c5d5536b174a2466df8.css rel=stylesheet></head><body style="min-width: 1400px;"><div id=app></div><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.929155cde96d3ad4cf63.js></script><script type=text/javascript src=./static/js/vendor.7bffa30b60868871b0ad.js></script><script type=text/javascript src=./static/js/app.8aa0eff97ff53c6c6a5f.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([48],{IKv2:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),n=r.n(a),o=r("2eFk"),s=r("Ke24"),c=r("PI0u"),l=r("Ch4/"),i=r("3E4D"),u=r("P9l9"),f={name:"reviewed",props:{brandId:{type:String,default:function(){return""}}},data:function(){return{tableH:window.screen.availHeight-464-126,activeTab:"1",activeBrand:this.brandId,topMenuData:[{id:"1",name:"指标管理",path:"/monthList"},{id:"2",name:"月指标",path:"/monthList"},{id:"3",name:"门店月指标",path:"storeMonthTask?yearMonth="+this.$route.query.yearMonth},{id:"4",name:"导购月指标详情",path:""}],activeId:"4",tableData:[],performanceSum:"",clerkObj:{storeId:"",storeName:"",yearMonth:"",settingAble:1,storePerformance:""},equalFlag:!0}},computed:{},methods:{inputPerformance:Object(c.a)(function(e,t,r){r.clerkPerformance=Number(r.clerkPerformance.replace(/[^\d.]/g,""))?r.clerkPerformance.replace(/[^\d+(.\d+)]/g,""):"";var a=0;this.tableData.forEach(function(e){a+=Number(e.clerkPerformance)}),this.performanceSum=Number(a).toFixed(2),this.diffData()},500),inputMonthPerformance:Object(c.a)(function(e){this.clerkObj.storePerformance=Number(this.clerkObj.storePerformance.replace(/[^\d.]/g,""))?this.clerkObj.storePerformance.replace(/[^\d+(.\d+)]/g,""):"",this.diffData()},500),diffData:function(){var e=Number(this.performanceSum)==Number(this.clerkObj.storePerformance);return this.equalFlag=!!e,e},saveSet:Object(c.a)(function(){if(!this.diffData())return!1;var e={clerkPerformanceList:this.tableData,storePerformance:this.clerkObj.storePerformance};this.postSave(e)},500),postSave:function(e){var t=this,r={brandId:t.activeBrand,storeId:t.clerkObj.storeId,yearMonth:t.clerkObj.yearMonth,performance:n()(e)};Object(u.c)("/haoban-app-performance-web/performance/save-clerk-month-performance",r).then(function(e){var t=e.data;1!=t.errorCode?l.a.errorMsg(t):i.a.showmsg("保存成功","success")}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getData:function(){var e=this,t={brandId:e.activeBrand,storeId:e.clerkObj.storeId,yearMonth:e.clerkObj.yearMonth};Object(u.c)("/haoban-app-performance-web/performance/query-clerk-month-performance",t).then(function(t){var r=t.data;if(1==r.errorCode){r.result.clerkPerformanceList&&r.result.clerkPerformanceList.length&&(r.result.clerkPerformanceList.forEach(function(e){e.clerkPerformance=Number(e.clerkPerformance).toFixed(2)}),e.tableData=r.result.clerkPerformanceList||[]),r.result.storePerformance=Number(r.result.storePerformance).toFixed(2),e.clerkObj=r.result;var a=0;return e.tableData.forEach(function(e){a+=Number(e.clerkPerformance)}),void(e.performanceSum=Number(a).toFixed(2))}l.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.clerkObj.yearMonth=this.$route.query.yearMonth,this.clerkObj.storeId=this.$route.query.storeId,this.getData())}},mounted:function(){document.documentElement.style.backgroundColor="#f0f2f5",this.$emit("showTab","11"),this.brandId&&(this.clerkObj.yearMonth=this.$route.query.yearMonth,this.clerkObj.storeId=this.$route.query.storeId,this.getData())},destroyed:function(){document.documentElement.style.backgroundColor="#fff"},components:{appDetail:o.a,commonDetailTop:s.a}},d={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-detail-wrap common-right-wrap"},[r("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),r("div",{staticClass:"task-set-content boder-box"},[r("div",{staticClass:"saler-set-title flex flex-space-between m-b-15"},[r("div",{staticClass:"saler-set-title_left"},[r("span",[e._v(e._s(e.clerkObj.yearMonth))]),r("span",{staticClass:"p-l-18"},[e._v(e._s(e.clerkObj.storeName)+"门店导购月指标详情")])]),e._v(" "),r("div",{staticClass:"saler-set-title_right"},[r("span",[e._v("门店月指标:")]),r("el-input",{staticClass:"w-105 p-l-8",attrs:{placeholder:"请输入指标值",disabled:0==e.clerkObj.settingAble},nativeOn:{keyup:function(t){return r=t,e.inputMonthPerformance(r);var r}},model:{value:e.clerkObj.storePerformance,callback:function(t){e.$set(e.clerkObj,"storePerformance",t)},expression:"clerkObj.storePerformance"}})],1)]),e._v(" "),r("div",{staticClass:"saler-set-table"},[r("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:e.tableH},attrs:{data:e.tableData,"tooltip-effect":"dark"}},[r("el-table-column",{attrs:{label:"导购"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.clerkName))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"月指标"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("el-input",{staticClass:"w-105 p-l-8",attrs:{placeholder:"请输入指标值",disabled:0==e.clerkObj.settingAble},nativeOn:{keyup:function(r){return a=r,e.inputPerformance(a,t.$index,t.row);var a}},model:{value:t.row.clerkPerformance,callback:function(r){e.$set(t.row,"clerkPerformance",r)},expression:"scope.row.clerkPerformance"}})],1)]}}])})],1)],1),e._v(" "),r("div",{staticClass:"task-set-save text-center m-t-30"},[r("span",{staticClass:"saler-set-sum"},[e._v("导购总计:"),r("span",{class:["font-20",e.equalFlag?"color-1890ff":"color-f5222d"]},[e._v(e._s(e.performanceSum))])]),e._v(" "),1==e.clerkObj.settingAble?r("el-button",{attrs:{disabled:!e.equalFlag,type:"primary"},on:{click:e.saveSet}},[e._v("确 认")]):e._e(),e._v(" "),e.equalFlag?e._e():r("span",{staticClass:"font-14 color-f5222d p-l-24"},[e._v("请确保导购月指标总计 = 门店月指标")])],1)])],1)},staticRenderFns:[]};var m=r("VU/8")(f,d,!1,function(e){r("ONt6")},"data-v-6dc4a544",null);t.default=m.exports},ONt6:function(e,t){}});
\ No newline at end of file
webpackJsonp([51],{da9f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={name:"enterprise",data:function(){return{projectName:"haoban-manage-web",collapseFlag:!1,contentHeight:window.screen.availHeight-5+"px"}},computed:{},methods:{toRouterView:function(t){this.$router.push({path:t.path})},collapseTag:function(t){this.collapseFlag=t}},mounted:function(){this.contentHeight=(document.documentElement.clientHeight||document.body.clientHeight)-64+"px"}},i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"enterprise-wrap"},[e("vue-office-header",{attrs:{projectName:this.projectName},on:{collapseTag:this.collapseTag,toRouterView:this.toRouterView}}),this._v(" "),e("div",{staticClass:"enterprise-wrap__body"},[e("div",{staticClass:"content",attrs:{id:"content"}},[e("div",{staticClass:"content-body",style:{height:this.contentHeight}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1)])])],1)},staticRenderFns:[]};var o=n("VU/8")(a,i,!1,function(t){n("lxEU")},"data-v-5a283aba",null);e.default=o.exports},lxEU:function(t,e){}});
\ No newline at end of file
webpackJsonp([50],{da9f:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a={name:"enterprise",data:function(){return{projectName:"haoban-manage-web",collapseFlag:!1,contentHeight:window.screen.availHeight-5+"px"}},computed:{},methods:{toRouterView:function(t){this.$router.push({path:t.path})},collapseTag:function(t){this.collapseFlag=t}},mounted:function(){this.contentHeight=(document.documentElement.clientHeight||document.body.clientHeight)-64+"px"}},i={render:function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"enterprise-wrap"},[e("vue-office-header",{attrs:{projectName:this.projectName},on:{collapseTag:this.collapseTag,toRouterView:this.toRouterView}}),this._v(" "),e("div",{staticClass:"enterprise-wrap__body"},[e("div",{staticClass:"content",attrs:{id:"content"}},[e("div",{staticClass:"content-body",style:{height:this.contentHeight}},[e("transition",{attrs:{name:"fade",mode:"out-in"}},[e("router-view")],1)],1)])])],1)},staticRenderFns:[]};var o=n("VU/8")(a,i,!1,function(t){n("lxEU")},"data-v-5a283aba",null);e.default=o.exports},lxEU:function(t,e){}});
\ No newline at end of file
webpackJsonp([51],{IKv2:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=r("mvHQ"),n=r.n(a),o=r("2eFk"),s=r("Ke24"),c=r("PI0u"),l=r("Ch4/"),i=r("3E4D"),u=r("P9l9"),f={name:"reviewed",props:{brandId:{type:String,default:function(){return""}}},data:function(){return{tableH:window.screen.availHeight-464-126,activeTab:"1",activeBrand:this.brandId,topMenuData:[{id:"1",name:"指标管理",path:"/monthList"},{id:"2",name:"月指标",path:"/monthList"},{id:"3",name:"门店月指标",path:"storeMonthTask?yearMonth="+this.$route.query.yearMonth},{id:"4",name:"导购月指标详情",path:""}],activeId:"4",tableData:[],performanceSum:"",clerkObj:{storeId:"",storeName:"",yearMonth:"",settingAble:1,storePerformance:""},equalFlag:!0}},computed:{},methods:{inputPerformance:Object(c.a)(function(e,t,r){r.clerkPerformance=Number(r.clerkPerformance.replace(/[^\d.]/g,""))?r.clerkPerformance.replace(/[^\d+(.\d+)]/g,""):"";var a=0;this.tableData.forEach(function(e){a+=Number(e.clerkPerformance)}),this.performanceSum=Number(a).toFixed(2),this.diffData()},500),inputMonthPerformance:Object(c.a)(function(e){this.clerkObj.storePerformance=Number(this.clerkObj.storePerformance.replace(/[^\d.]/g,""))?this.clerkObj.storePerformance.replace(/[^\d+(.\d+)]/g,""):"",this.diffData()},500),diffData:function(){var e=Number(this.performanceSum)==Number(this.clerkObj.storePerformance);return this.equalFlag=!!e,e},saveSet:Object(c.a)(function(){if(!this.diffData())return!1;if(""==this.clerkObj.storePerformance)return this.$message.error({duration:1e3,message:"请输入门店月指标"}),!1;var e={clerkPerformanceList:this.tableData,storePerformance:this.clerkObj.storePerformance};this.postSave(e)},500),postSave:function(e){var t=this,r={brandId:t.activeBrand,storeId:t.clerkObj.storeId,yearMonth:t.clerkObj.yearMonth,performance:n()(e)};Object(u.c)("/haoban-app-performance-web/performance/save-clerk-month-performance",r).then(function(e){var t=e.data;1!=t.errorCode?l.a.errorMsg(t):i.a.showmsg("保存成功","success")}).catch(function(e){t.$message.error({duration:1e3,message:e.message})})},getData:function(){var e=this,t={brandId:e.activeBrand,storeId:e.clerkObj.storeId,yearMonth:e.clerkObj.yearMonth};Object(u.c)("/haoban-app-performance-web/performance/query-clerk-month-performance",t).then(function(t){var r=t.data;if(1==r.errorCode){r.result.clerkPerformanceList&&r.result.clerkPerformanceList.length&&(r.result.clerkPerformanceList.forEach(function(e){e.clerkPerformance=Number(e.clerkPerformance).toFixed(2)}),e.tableData=r.result.clerkPerformanceList||[]),r.result.storePerformance=Number(r.result.storePerformance).toFixed(2),e.clerkObj=r.result;var a=0;return e.tableData.forEach(function(e){a+=Number(e.clerkPerformance)}),void(e.performanceSum=Number(a).toFixed(2))}l.a.errorMsg(r)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{brandId:function(e,t){e&&(this.activeBrand=e,this.clerkObj.yearMonth=this.$route.query.yearMonth,this.clerkObj.storeId=this.$route.query.storeId,this.getData())}},mounted:function(){document.documentElement.style.backgroundColor="#f0f2f5",this.$emit("showTab","11"),this.brandId&&(this.clerkObj.yearMonth=this.$route.query.yearMonth,this.clerkObj.storeId=this.$route.query.storeId,this.getData())},destroyed:function(){document.documentElement.style.backgroundColor="#fff"},components:{appDetail:o.a,commonDetailTop:s.a}},m={render:function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-detail-wrap common-right-wrap"},[r("common-detail-top",{attrs:{topMenuData:e.topMenuData,activeId:e.activeId}}),e._v(" "),r("div",{staticClass:"task-set-content boder-box"},[r("div",{staticClass:"saler-set-title flex flex-space-between m-b-15"},[r("div",{staticClass:"saler-set-title_left"},[r("span",[e._v(e._s(e.clerkObj.yearMonth))]),r("span",{staticClass:"p-l-18"},[e._v(e._s(e.clerkObj.storeName)+"门店导购月指标详情")])]),e._v(" "),r("div",{staticClass:"saler-set-title_right"},[r("span",[e._v("门店月指标:")]),r("el-input",{staticClass:"w-105 p-l-8",attrs:{placeholder:"请输入指标值",disabled:0==e.clerkObj.settingAble},nativeOn:{keyup:function(t){return r=t,e.inputMonthPerformance(r);var r}},model:{value:e.clerkObj.storePerformance,callback:function(t){e.$set(e.clerkObj,"storePerformance",t)},expression:"clerkObj.storePerformance"}})],1)]),e._v(" "),r("div",{staticClass:"saler-set-table"},[r("el-table",{ref:"multipleTable",staticClass:"select-table",style:{width:"100%",minHeight:e.tableH},attrs:{data:e.tableData,"tooltip-effect":"dark"}},[r("el-table-column",{attrs:{label:"导购"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[e._v(e._s(t.row.clerkName))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"月指标"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",[r("el-input",{staticClass:"w-105 p-l-8",attrs:{placeholder:"请输入指标值",disabled:0==e.clerkObj.settingAble},nativeOn:{keyup:function(r){return a=r,e.inputPerformance(a,t.$index,t.row);var a}},model:{value:t.row.clerkPerformance,callback:function(r){e.$set(t.row,"clerkPerformance",r)},expression:"scope.row.clerkPerformance"}})],1)]}}])})],1)],1),e._v(" "),r("div",{staticClass:"task-set-save text-center m-t-30"},[r("span",{staticClass:"saler-set-sum"},[e._v("导购总计:"),r("span",{class:["font-20",e.equalFlag?"color-1890ff":"color-f5222d"]},[e._v(e._s(e.performanceSum))])]),e._v(" "),1==e.clerkObj.settingAble?r("el-button",{attrs:{disabled:!e.equalFlag,type:"primary"},on:{click:e.saveSet}},[e._v("确 认")]):e._e(),e._v(" "),e.equalFlag?e._e():r("span",{staticClass:"font-14 color-f5222d p-l-24"},[e._v("请确保导购月指标总计 = 门店月指标")])],1)])],1)},staticRenderFns:[]};var d=r("VU/8")(f,m,!1,function(e){r("uVAL")},"data-v-585f7c42",null);t.default=d.exports},uVAL:function(e,t){}});
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,b,n){for(var r,t,o,i=0,u=[];i<c.length;i++)t=c[i],f[t]&&u.push(f[t][0]),f[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(a&&a(c,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=d(d.s=n[i]);return o};var c={},f={77:0};function d(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,d),f.l=!0,f.exports}d.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,d){a=f[e]=[c,d]});a[2]=c;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,d.nc&&n.setAttribute("nonce",d.nc),n.src=d.p+"static/js/"+e+"."+{0:"a184049fae2f2635f8c8",1:"0ebe3ead93207dc78a78",2:"58edd50ac6edf9ffe74d",3:"516fd1892569e7db9611",4:"d4485afae513466f4cb6",5:"9b24f917a75b1dba1d5e",6:"00b931389a74250125a3",7:"7e0164566e8e00575481",8:"a98d485a2a65238dc24d",9:"b916c8d12141617e4db2",10:"5aa39cededdd868bd5b7",11:"30af0471a7253c3555bb",12:"f0d23eddb494423628ef",13:"99eba27757bf881d6c39",14:"70a11e50ec358505e2b6",15:"cb3cf92669ce0fb6afde",16:"47caf94fd78d59ab457d",17:"4bddcee2555ecc9bae86",18:"092fe3ab141c75954a1a",19:"1eedffe1165c41206ce7",20:"8f48037229efe39f46f1",21:"2103d8428d4f707fa369",22:"8cf36e5abda233ba03eb",23:"a61a2fd134c5bec25be0",24:"9d547e5255fc6330d24b",25:"cf78be83049a1adcce6a",26:"8f0bb144b5e757399727",27:"ce77ab0c40dfc4cf302c",28:"bf32ffd86887211ae134",29:"0155355dd99fffcb77d7",30:"4cadfac284beef63d405",31:"af46f102606343be3a92",32:"3b67e82197191a363b1d",33:"b9e45fc343d93ce74292",34:"05e9803132e16d2e54ba",35:"32cae9a3f9ba6b187945",36:"706cf2b1fed575cc2e7b",37:"c72e6fea86e905c1443d",38:"7da020455236ec9cc0e6",39:"e89aa19926c766c37a0c",40:"364c2d8159200bad77f0",41:"878f07968a421ac3ea72",42:"0012c5d27a14f95fe04a",43:"d9f041192ca26ec0bc42",44:"57648d5396b4bddf19dc",45:"5e37827888b66626cf85",46:"edca05d8454a02bec6fd",47:"416bbfc19e4f9d7cd14a",48:"66f8ca1babb9b935505b",49:"1702151e583669ca1359",50:"dfff7d1c6255b9ebdb71",51:"3af7210dfb262608914c",52:"9f2c3cb68d4bd0b15a45",53:"1512da57f874c3560614",54:"1503b643475934e2b5e1",55:"aae5dff78601d6a56e92",56:"9556e1e5cf87dcb70581",57:"f6946da6046a75d445d5",58:"54d755af2660294c43ce",59:"67b36b3a174a12bcda21",60:"06083ce41737441c07f2",61:"2f37d96bc91f0a637cad",62:"c3caefedcb9fb6dcfb96",63:"bcb03549d44a2240f701",64:"d8a6b3c8a35ff11e9a43",65:"0f8e4244472f14c595e7",66:"50968f3396ef13b8f54a",67:"6a31e22bc6714d8b4ef3",68:"73ff41b9889cb6d90bb1",69:"c9eee42068fd13cd3f93",70:"6ecf8a854bce2acabe35",71:"f1102ca8af9eab1ab3ef",72:"82c73b5000810385ba93",73:"b425861e41d7dea6bf2e",76:"fd376da7cdbac115205f"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),c},d.m=e,d.c=c,d.d=function(e,a,c){d.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},d.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(a,"a",a),a},d.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},d.p="./",d.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(f,b,n){for(var r,t,o,i=0,u=[];i<f.length;i++)t=f[i],d[t]&&u.push(d[t][0]),d[t]=0;for(r in b)Object.prototype.hasOwnProperty.call(b,r)&&(e[r]=b[r]);for(c&&c(f,b,n);u.length;)u.shift()();if(n)for(i=0;i<n.length;i++)o=a(a.s=n[i]);return o};var f={},d={77:0};function a(c){if(f[c])return f[c].exports;var d=f[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,a),d.l=!0,d.exports}a.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var f=new Promise(function(f,a){c=d[e]=[f,a]});c[2]=f;var b=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.timeout=12e4,a.nc&&n.setAttribute("nonce",a.nc),n.src=a.p+"static/js/"+e+"."+{0:"6bf1f114dc55b6952f68",1:"0ebe3ead93207dc78a78",2:"58edd50ac6edf9ffe74d",3:"516fd1892569e7db9611",4:"4805f680ce9c01e16be8",5:"8593888f86a3714ccbf7",6:"c7fdfe566d376bb82bf1",7:"7e0164566e8e00575481",8:"17cbbf226d1dd6a9aae7",9:"7dc467d5cfcb4cfb033f",10:"5aa39cededdd868bd5b7",11:"3cab5490b8e5df4cc761",12:"18b04a93b9e2b30572d3",13:"99eba27757bf881d6c39",14:"70a11e50ec358505e2b6",15:"982c7f877d4d88d1d93b",16:"8f8e20ce84faa7e6b5e6",17:"4bddcee2555ecc9bae86",18:"092fe3ab141c75954a1a",19:"5c39f2f7f01d99cfe267",20:"8f48037229efe39f46f1",21:"930e20ae616f6af26835",22:"60bf083451e23ec1d781",23:"b71b3b3c67f19d86143d",24:"9d547e5255fc6330d24b",25:"cf78be83049a1adcce6a",26:"8f0bb144b5e757399727",27:"ce77ab0c40dfc4cf302c",28:"9a558c8ef26760ba85d7",29:"0155355dd99fffcb77d7",30:"4cadfac284beef63d405",31:"af46f102606343be3a92",32:"41a1620b882cbd77f621",33:"b9e45fc343d93ce74292",34:"05e9803132e16d2e54ba",35:"32cae9a3f9ba6b187945",36:"706cf2b1fed575cc2e7b",37:"c72e6fea86e905c1443d",38:"7da020455236ec9cc0e6",39:"e89aa19926c766c37a0c",40:"27851a220bdc8cf9de25",41:"878f07968a421ac3ea72",42:"72ef48e04e1219f52921",43:"d9f041192ca26ec0bc42",44:"b7e7933fd686076fd36d",45:"5e37827888b66626cf85",46:"edca05d8454a02bec6fd",47:"416bbfc19e4f9d7cd14a",48:"361b85f9c35e4e96b855",49:"52867121cd605885ce35",50:"331006123edd2049b7d9",51:"bb52452b83ba680f6369",52:"9f2c3cb68d4bd0b15a45",53:"1e933dfd51cc02e26d12",54:"1503b643475934e2b5e1",55:"aae5dff78601d6a56e92",56:"9556e1e5cf87dcb70581",57:"f6946da6046a75d445d5",58:"54d755af2660294c43ce",59:"f2fd74bdc642766effa7",60:"06083ce41737441c07f2",61:"2f37d96bc91f0a637cad",62:"c3caefedcb9fb6dcfb96",63:"bcb03549d44a2240f701",64:"6e29cec55dc8b683d2b6",65:"57f368d6223d9c18ec70",66:"20dbcbd944b194a590b5",67:"867dd757955fde990e05",68:"73ff41b9889cb6d90bb1",69:"c9eee42068fd13cd3f93",70:"6ecf8a854bce2acabe35",71:"0f099f12573116d08d77",72:"82c73b5000810385ba93",73:"b425861e41d7dea6bf2e",76:"fd376da7cdbac115205f"}[e]+".js";var r=setTimeout(t,12e4);function t(){n.onerror=n.onload=null,clearTimeout(r);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return n.onerror=n.onload=t,b.appendChild(n),f},a.m=e,a.c=f,a.d=function(e,c,f){a.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:f})},a.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(c,"a",c),c},a.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},a.p="./",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -46,6 +46,10 @@ export function formatPhone(phone) {
return phone.substr(0, 3) + '****' + phone.substr(7, 11);
}
/**
* 时间戳格式化
*/
function formatDig(num) {
return num > 9 ? '' + num : '0' + num;
}
......@@ -60,3 +64,20 @@ export function formatDate(time) {
let data = year + '-' + formatDig(month) + '-' + formatDig(date) + ' ' + formatDig(hour) + ':' + formatDig(minute) + ':' + formatDig(second);
return data;
}
/**
* 千位分割
*/
export function formatNum(num) {
let number = num.toString().split('.'); // 分隔小数点
let dot = '0.' + (number[1] || 0);
var reg = /\d{1,3}(?=(\d{3})+$)/g;
return (
(number[0] + '').replace(reg, '$&,') +
'.' +
Number(dot)
.toFixed(2)
.toString()
.split('.')[1]
);
}
......@@ -25,6 +25,7 @@
<script>
import commonDetailTop from '@/components/app/common-detail-top.vue';
import errMsg from '@/common/js/error';
import { formatNum } from '@/common/js/public';
import { apiYearList, apiMonthPerformanceList } from '@/api/enterpriseApp/quota.js';
export default {
components: {
......@@ -125,7 +126,12 @@ export default {
let res = await apiMonthPerformanceList({ brandId: this.brandId, year: this.year });
let resData = res.data;
if (resData.errorCode == 1) {
that.tableList = res.data.result || [];
if (!!resData.result.length) {
resData.result.forEach(ele => {
ele.totalPerformance = formatNum(Number(ele.totalPerformance).toFixed(2));
});
}
that.tableList = resData.result || [];
}
}
},
......
......@@ -131,6 +131,14 @@ export default {
if (!that.diffData()) {
return false;
}
/* 非空验证 */
if (that.clerkObj.storePerformance == '') {
that.$message.error({
duration: 1000,
message: '请输入门店月指标'
});
return false;
}
let data = {
clerkPerformanceList: that.tableData,
storePerformance: that.clerkObj.storePerformance
......
......@@ -49,7 +49,7 @@ import qrcodeDialog from '@/components/app/qrcode-dialog.vue';
import storeTreeSelect from '@/components/app/store-tree-select.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public';
import { _debounce, formatNum } from '@/common/js/public';
export default {
name: 'reviewed',
props: {
......@@ -253,21 +253,26 @@ export default {
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result.list && !!resData.result.list.length) {
resData.result.list.forEach(ele => {
ele.performance = formatNum(Number(ele.performance));
});
}
that.tableData = resData.result.list || [];
if (!!resData.result.statistics && !!Object.keys(resData.result.statistics).length) {
that.statistics = resData.result.statistics;
that.tableData.unshift({
completeStatus: resData.result.statistics.totalComplete,
performance: resData.result.statistics.totalPerformance,
performance: formatNum(Number(resData.result.statistics.totalPerformance)),
storeName: resData.result.statistics.totalStore,
totalComplete: resData.result.statistics.totalComplete,
totalPerformance: resData.result.statistics.totalPerformance,
totalPerformance: formatNum(Number(resData.result.statistics.totalPerformance)),
totalStore: resData.result.statistics.totalStore
});
} else {
that.tableData.unshift({
completeStatus: that.statistics.totalComplete,
performance: that.statistics.totalPerformance,
performance: formatNum(Number(that.statistics.totalPerformance)),
storeName: that.statistics.totalStore,
totalComplete: that.statistics.totalComplete,
totalPerformance: that.statistics.totalPerformance,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment