1 line
6.7 KiB
JavaScript
1 line
6.7 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/newSche/newSche"],{2575:function(e,t,i){"use strict";i.r(t);var n=i("b8b0"),a=i("54e0");for(var l in a)["default"].indexOf(l)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(l);i("97ee"),i("e620");var o=i("f0c5"),s=Object(o["a"])(a["default"],n["b"],n["c"],!1,null,"2e103666",null,!1,n["a"],void 0);t["default"]=s.exports},"4a2d":function(e,t,i){"use strict";(function(e){var n=i("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a,l=n(i("9523")),o=(i("76dd"),i("dc92")),s=(i("db68"),i("c7eb")),r={components:{selectCustomer:function(){Promise.all([i.e("common/vendor"),i.e("components/selectCustomer")]).then(function(){return resolve(i("5bcd"))}.bind(null,i)).catch(i.oe)},selectLink:function(){i.e("components/selectLink").then(function(){return resolve(i("4c35"))}.bind(null,i)).catch(i.oe)},selectContract:function(){i.e("components/selectContract").then(function(){return resolve(i("e630"))}.bind(null,i)).catch(i.oe)},selectClue:function(){Promise.all([i.e("common/vendor"),i.e("components/selectClue")]).then(function(){return resolve(i("b9b5"))}.bind(null,i)).catch(i.oe)}},data:function(){return{schedule_list:["未开始","执行中","已结束","已取消"],level_list:[{id:1,name:"重要"},{id:2,name:"紧急"},{id:3,name:"普通"},{id:4,name:"重要且紧急"}],levelIndex:null,remind_list:["准时提醒","5分钟前","15分钟前","30分钟前","一个小时前","两个小时前","一天前","两天前","一周前"],relation_List:[{id:"1",name:"客户"},{id:"2",name:"联系人"},{id:"3",name:"合同"},{id:"4",name:"线索"}],guanlianName:"",title:"",start_time:"",end_time:"",status:"",auto_end:"",level:"",remindtype:"",remark:"",relation_type:"",relation_id:"",relationName:"",dateTimeArray:null,dateTime:null,dateArr:null,noClick:!0,isRequired:!1}},onLoad:function(){this.initTime()},methods:(a={changeRequired:function(e){this.isRequired=e.detail.value},initTime:function(){var e=new Date,t=e.getFullYear(),i=(0,s.dateTimePicker)(this.startYear,t);i.dateTimeArray.pop(),i.dateTime.pop(),i.dateArray.pop();this.dateTimeArray=i.dateTimeArray,this.dateArr=i.dateArray,this.dateTime=i.dateTime},changeStartTime:function(t){var i=t.detail.value;if(i.includes(-1))e.showToast({title:"请选择正确的时间",icon:"none"});else{var n=this.handleTime(i);this.start_time=n}},changeAlipayStartTime:function(e){this.start_time=e.detail.value},changeTime:function(e){var t=e.detail.value,i=this.handleTime(t);this.start_time=i},handleTime:function(e){var t=this.dateArr[0][e[0]],i=this.dateArr[1][e[1]],n=this.dateArr[2][e[2]],a=this.dateArr[3][e[3]],l=this.dateArr[4][e[4]],o=t+"-"+i+"-"+n+" "+a+":"+l;return o},changeendTimeh5:function(e){var t=e.detail.value,i=this.handleTime(t);this.end_time=i},changeEndTime:function(t){var i=t.detail.value;if(i.includes(-1))e.showToast({title:"请选择正确的时间",icon:"none"});else{var n=this.handleTime(i);this.end_time=n}},changeAlipayEndTime:function(e){this.end_time=e.detail.value}},(0,l.default)(a,"handleTime",(function(e){var t=this.dateArr[0][e[0]],i=this.dateArr[1][e[1]],n=this.dateArr[2][e[2]],a=this.dateArr[3][e[3]],l=this.dateArr[4][e[4]],o=t+"-"+i+"-"+n+" "+a+":"+l;return o})),(0,l.default)(a,"changeAuto",(function(e){this.auto_end=e.detail.value})),(0,l.default)(a,"changeSchedule",(function(e){this.status=e.detail.value})),(0,l.default)(a,"changeLevel",(function(e){this.levelIndex=e.detail.value,this.level=this.level_list[e.detail.value].id})),(0,l.default)(a,"changeRemind",(function(e){this.remindtype=e.detail.value})),(0,l.default)(a,"changeRelation",(function(e){this.relation_id="",this.guanlianid="",this.guanlianName="",this.relation_type=e.detail.value,1==this.relation_type?this.relationName="关联客户":2==this.relation_type?this.relationName="关联联系人":3==this.relation_type?this.relationName="关联合同":4==this.relation_type&&(this.relationName="关联线索")})),(0,l.default)(a,"toSelectGuanglian",(function(){1==this.relation_type?this.toSelectCustomer():2==this.relation_type?this.toSelectLink():3==this.relation_type?this.toSelectContract():this.toSelectClue()})),(0,l.default)(a,"toSelectCustomer",(function(){this.$refs.customerChild.init()})),(0,l.default)(a,"getCustomerinfo",(function(e){this.relation_id=e.id,this.guanlianName=e.name})),(0,l.default)(a,"toSelectLink",(function(){this.$refs.linkChild.init()})),(0,l.default)(a,"linkInfo",(function(e){this.relation_id=e.id,this.guanlianName=e.name})),(0,l.default)(a,"toSelectContract",(function(){this.$refs.contractChild.init()})),(0,l.default)(a,"contractInfo",(function(e){this.relation_id=e.id,this.guanlianName=e.name})),(0,l.default)(a,"toSelectClue",(function(){this.$refs.clueChild.init()})),(0,l.default)(a,"clueInfo",(function(e){this.relation_id=e.id,this.guanlianName=e.name})),(0,l.default)(a,"toAdd",(function(){var t=this.title,i=this.start_time,n=this.end_time,a=this.status,l=this.auto_end,s=this.level,r=this.remindtype,u=this.remark,c=this.relation_type,d=this.relation_id;if(t)if(i)if(n)if(null!=a&&""!=a||0==a)if(l)if(s)if(null!=r&&""!=r||0==r)if(c)if(d){var h={title:t,start_time:i,end_time:n,status:a,auto_end:l,level:s,remindtype:r,remark:u,relation_type:c,relation_id:d};(0,o.netAddSchedule)(h).then((function(t){e.showToast({title:t.msg,icon:"none"}),setTimeout((function(){e.navigateBack({delta:1})}),2e3)}))}else e.showToast({title:"请选择"+this.relationName,icon:"none"});else e.showToast({title:"请选择关联类型",icon:"none"});else e.showToast({title:"请选择提醒时间",icon:"none"});else e.showToast({title:"请选择紧要程度",icon:"none"});else e.showToast({title:"请选择是否自动结束",icon:"none"});else e.showToast({title:"请选择日程状态",icon:"none"});else e.showToast({title:"请选择结束时间",icon:"none"});else e.showToast({title:"请选择开始时间",icon:"none"});else e.showToast({title:"请输入标题",icon:"none"})})),a)};t.default=r}).call(this,i("543d")["default"])},"54e0":function(e,t,i){"use strict";i.r(t);var n=i("4a2d"),a=i.n(n);for(var l in n)["default"].indexOf(l)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(l);t["default"]=a.a},9558:function(e,t,i){},"97ee":function(e,t,i){"use strict";var n=i("9558"),a=i.n(n);a.a},b330:function(e,t,i){},b8b0:function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this.$createElement;this._self._c},a=[]},e620:function(e,t,i){"use strict";var n=i("b330"),a=i.n(n);a.a},f27b:function(e,t,i){"use strict";(function(e,t){var n=i("4ea4");i("8886");n(i("66fd"));var a=n(i("2575"));e.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])}},[["f27b","common/runtime","common/vendor"]]]); |