1 line
6.4 KiB
JavaScript
1 line
6.4 KiB
JavaScript
require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesA/crm/salesTarget/myTarget"],{"09f2":function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("8886");i(n("66fd"));var a=i(n("e104"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},"16ae":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.isSet=!t.isSet})},a=[]},"1ba2":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("76dd"),a=n("dc92"),r=n("0c59"),o=n("8683"),u={mixins:[o.commonF],components:{fixedApproval:function(){n.e("components/fixedApproval").then(function(){return resolve(n("d3f7"))}.bind(null,n)).catch(n.oe)}},data:function(){return{optionsMoney:[{text:"成交金额",value:1},{text:"回款金额",value:2}],noClick:!0,optionsTime:[],valueTime:0,valueMoney:0,roleType:"",rules:"",info:null,isSet:!1,remindPeople:[],remindType:"record",BASE_IMG_URL:r.BASE_IMG_URL,approvalPro:{}}},created:function(){this.roleType=t.getStorageSync("roleType"),this.rules=t.getStorageSync("rules"),this.getSelect(),this.getProcess()},methods:{getProcess:function(){var t=this;(0,a.netApprovalProcess)({type:"achievement"}).then((function(e){t.approvalPro=e.data}))},moreClick:function(){t.navigateTo({url:"/pagesA/crm/selectMember/selectMember"})},toHistory:function(){t.navigateTo({url:"/pagesA/crm/salesTarget/history_edit"})},getSelect:function(){var t=this;(0,i.netGetTargetSelect)().then((function(e){e=e.data.years,e.forEach((function(e,n){e.selected&&(t.valueTime=n)})),t.optionsTime=e,t.getMydetail()}))},changeTime:function(t){this.valueTime=t.detail.value,this.getMydetail()},changeTopMoney:function(t){this.valueMoney=t.detail.value,this.getMydetail()},getMydetail:function(){var t=this,e={year:this.optionsTime[this.valueTime].name,status:this.optionsMoney[this.valueMoney].value};(0,i.netGetDefaultSelfDetail)(e).then((function(e){var n=e.data;t.info=n||{january:0,february:0,march:0,april:0,may:0,june:0,july:0,august:0,september:0,october:0,november:0,december:0,yeartarget:0}}))},handelMoney:function(t){var e=this.info.yeartarget,n=(Number(e)/12).toFixed(2);this.info.january=n,this.info.february=n,this.info.march=n,this.info.april=n,this.info.may=n,this.info.june=n,this.info.july=n,this.info.august=n,this.info.september=n,this.info.october=n,this.info.november=n,this.info.december=n},check:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.yeartarget=t.target.value}))},check1:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.january=t.target.value}))},check2:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.february=t.target.value}))},check3:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.march=t.target.value}))},check4:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.april=t.target.value}))},check5:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.may=t.target.value}))},check6:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.june=t.target.value}))},check7:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.july=t.target.value}))},check8:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.august=t.target.value}))},check9:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.september=t.target.value}))},check10:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.october=t.target.value}))},check11:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.november=t.target.value}))},check12:function(t){var e=this;t.target.value=t.target.value.match(/^\d*(\.?\d{0,2})/g)[0]||null,this.$nextTick((function(){e.info.december=t.target.value}))},changeMoney:function(){var t=Number(this.info.january)+Number(this.info.february)+Number(this.info.march)+Number(this.info.april)+Number(this.info.may)+Number(this.info.june)+Number(this.info.july)+Number(this.info.august)+Number(this.info.september)+Number(this.info.october)+Number(this.info.november)+Number(this.info.december);this.info.yeartarget=t.toFixed(2)},submitdata:function(){var e=this,n={january:this.info.january,february:this.info.february,march:this.info.march,april:this.info.april,may:this.info.may,june:this.info.june,july:this.info.july,august:this.info.august,september:this.info.september,october:this.info.october,november:this.info.november,december:this.info.december,yeartarget:this.info.yeartarget},a=this.remindPeople;if(0!=a.length||0!=this.approvalPro.status){var r=[];a.forEach((function(t){r.push(t.id)}));var o={year:this.optionsTime[this.valueTime].name,status:this.optionsMoney[this.valueMoney].value,achievements:n,flow_staff_ids:0==this.approvalPro.status?r.join(","):"",yeartarget:this.info.yeartarget};(0,i.netSetMymubiao)(o).then((function(n){t.showToast({title:n.msg,icon:"none"}),e.isSet=!1,setTimeout((function(){t.navigateTo({url:"/pagesA/crm/salesTarget/history_edit"})}),2e3)}))}else t.showToast({title:"请选择审核人",icon:"none"})}}};e.default=u}).call(this,n("543d")["default"])},"3e37":function(t,e,n){},9795:function(t,e,n){"use strict";var i=n("3e37"),a=n.n(i);a.a},a8bb:function(t,e,n){"use strict";n.r(e);var i=n("1ba2"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a},e104:function(t,e,n){"use strict";n.r(e);var i=n("16ae"),a=n("a8bb");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("9795");var o=n("f0c5"),u=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"7f1ed141",null,!1,i["a"],void 0);e["default"]=u.exports}},[["09f2","common/runtime","common/vendor"]]]); |