require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_tool/pages/wxyj/index"],{456:function(e,t,a){"use strict";(function(e,t){var n=a(4);a(26);n(a(25));var r=n(a(457));e.__webpack_require_UNI_MP_PLUGIN__=a,t(r.default)}).call(this,a(1)["default"],a(2)["createPage"])},457:function(e,t,a){"use strict";a.r(t);var n=a(458),r=a(460);for(var i in r)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return r[e]}))}(i);a(462);var o,c=a(34),s=Object(c["default"])(r["default"],n["render"],n["staticRenderFns"],!1,null,null,null,!1,n["components"],o);s.options.__file="pages_tool/pages/wxyj/index.vue",t["default"]=s.exports},458:function(e,t,a){"use strict";a.r(t);var n=a(459);a.d(t,"render",(function(){return n["render"]})),a.d(t,"staticRenderFns",(function(){return n["staticRenderFns"]})),a.d(t,"recyclableRender",(function(){return n["recyclableRender"]})),a.d(t,"components",(function(){return n["components"]}))},459:function(e,t,a){"use strict";var n;a.r(t),a.d(t,"render",(function(){return r})),a.d(t,"staticRenderFns",(function(){return o})),a.d(t,"recyclableRender",(function(){return i})),a.d(t,"components",(function(){return n}));var r=function(){var e=this,t=e.$createElement,a=(e._self._c,e.__map(e.insurance,(function(t,a){var n=e.__get_orig(t),r=e.formatAmount(e.salary*e.toNumber(t.private_percentage)/100),i=e.formatAmount(e.salary*e.toNumber(t.company_percentage)/100);return{$orig:n,m0:r,m1:i}}))),n=e.formatAmount(e.salary*e.private_total/100),r=e.formatAmount(e.salary*e.company_total/100);e.$mp.data=Object.assign({},{$root:{l0:a,m2:n,m3:r}})},i=!1,o=[];r._withStripped=!0},460:function(e,t,a){"use strict";a.r(t);var n=a(461),r=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=r.a},461:function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;getApp();var a={data:function(){return{motto:"Hello World",inputValue:"",userInfo:{},focus:!1,index:1,salary:0,array:["上海","北京","广州","深圳"],cityBaseRange:{"上海":{min:2014,max:17814},"北京":{min:2320,max:21258},"广州":{min:2300,max:19707},"深圳":{min:2480,max:22986}},baseMin:0,baseMax:0,insurance:[{category:"养老",private_percentage:"8",company_percentage:"22"},{category:"医疗",private_percentage:"2",company_percentage:"12"},{category:"失业",private_percentage:"1",company_percentage:"1.7"},{category:"工伤",private_percentage:"0",company_percentage:"0.5"},{category:"生育",private_percentage:"0",company_percentage:"0.8"},{category:"公积金",private_percentage:"7",company_percentage:"7"}],private_total:0,company_total:0}},onLoad:function(){console.log("onLoad",this);this.total(),this.updateBaseRange()},methods:{bindViewTap:function(){e.navigateTo({url:"../logs/logs"})},bindPickerChange:function(e){console.log("picker发送选择改变，携带值为",e.detail.value),this.setData({index:e.detail.value});var t=this.array[e.detail.value],a=this.cityBaseRange[t]||{min:0,max:0};this.modalView("当前城市基数范围：".concat(a.min," - ").concat(a.max)),this.updateBaseRange()},updateBaseRange:function(){var e=this.array[this.index],t=this.cityBaseRange[e]||{min:0,max:0};this.setData({baseMin:t.min,baseMax:t.max})},total:function(){var e=this,t=this.insurance;console.log(t);var a=0,n=0;t&&t.forEach((function(t,r){a+=e.toNumber(t.private_percentage),n+=e.toNumber(t.company_percentage)})),this.setData({private_total:a,company_total:n})},bindKeyInput:function(e){console.log(e),this.setData({inputValue:e.detail.value})},onRateChange:function(e,t,a){var n=a.detail.value,r=this.insurance.slice();r[e][t]=n,this.setData({insurance:r}),this.total()},toNumber:function(e){var t=parseFloat(e);return isNaN(t)?0:t},formatAmount:function(e){var t=parseFloat(e);return isNaN(t)?"0.00":t.toFixed(2)},modalView:function(t){e.showModal({title:"Warning",content:t,showCancel:!1,success:function(e){e.confirm&&console.log("用户点击确定")}})},startCount:function(){var e=this.inputValue;if(e)if(e/1)if(e>0){var t=this.array[this.index],a=this.cityBaseRange[t]||{min:0,max:Number.MAX_SAFE_INTEGER},n=parseFloat(e);e=Math.min(Math.max(n,a.min),a.max),this.setData({salary:e,focus:!1})}else this.modalView("别开玩笑了，你还欠老板钱？");else this.modalView("请输入数字，OK？");else this.modalView("输入不能为空，请重新输入！")},resetData:function(){this.setData({salary:0,focus:!0,inputValue:""})}}};t.default=a}).call(this,a(2)["default"])},462:function(e,t,a){"use strict";a.r(t);var n=a(463),r=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){a.d(t,e,(function(){return n[e]}))}(i);t["default"]=r.a},463:function(e,t,a){}},[[456,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages_tool/pages/wxyj/index.js.map