addVisit.35ec866f.js 28 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["addVisit"],{"01ab":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"addVisit"},[e.statusList.headerStatus?r("m-header",{attrs:{name:e.name}}):e._e(),r("van-cell-group",[r("van-field",{attrs:{label:"回访老师",readonly:"","input-align":"right",placeholder:"请选择"},model:{value:e.teacherName,callback:function(t){e.teacherName=t},expression:"teacherName"}})],1),r("van-cell-group",[r("van-field",{attrs:{label:"学员姓名",readonly:"","input-align":"right","is-link":!(e.id||e.userId||e.studentId),placeholder:"请选择"},on:{click:e.onCheckStudent},scopedSlots:e._u([{key:"right-icon",fn:function(){return[e.studentPhone?r("a",{staticClass:"phone_section",attrs:{href:"tel:"+e.studentPhone},on:{click:function(e){return e.stopPropagation(),function(){}.apply(null,arguments)}}},[r("img",{staticClass:"iconPhone",attrs:{src:a("5657"),alt:""}})]):e._e()]},proxy:!0}]),model:{value:e.studentName,callback:function(t){e.studentName=t},expression:"studentName"}}),r("van-field",{attrs:{label:"回访类型",readonly:"","input-align":"right","is-link":!e.id&&!e.userId,placeholder:"请选择"},on:{click:function(t){return e.onChange("type")}},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}}),r("van-field",{attrs:{label:"回访目的",readonly:"","input-align":"right","is-link":!e.id&&!e.userId,placeholder:"请选择"},on:{click:function(t){return e.onChange("purpose")}},model:{value:e.form.purpose,callback:function(t){e.$set(e.form,"purpose",t)},expression:"form.purpose"}}),"小课回访"==e.form.type?r("van-field",{attrs:{label:"家长反馈",readonly:"","input-align":"right","is-link":!e.id,placeholder:"请选择"},on:{click:function(t){return e.onChange("feedbackType")}},model:{value:e.form.feedbackTypeName,callback:function(t){e.$set(e.form,"feedbackTypeName",t)},expression:"form.feedbackTypeName"}}):e._e(),"小课回访"!=e.form.type||"THINKING"!=e.form.feedbackType&&"LOST"!=e.form.feedbackType?e._e():r("van-field",{attrs:{label:"反馈详情",readonly:"","input-align":"right","is-link":!e.id,placeholder:"请选择"},on:{click:function(t){return e.onChange("feedbackTypeDesc")}},model:{value:e.form.feedbackTypeDescName,callback:function(t){e.$set(e.form,"feedbackTypeDescName",t)},expression:"form.feedbackTypeDescName"}}),r("van-field",{attrs:{label:"问题状态",readonly:"","input-align":"right","is-link":!e.id,placeholder:"请选择"},on:{click:function(t){return e.onChange("probStatus")}},model:{value:e.form.probStatusName,callback:function(t){e.$set(e.form,"probStatusName",t)},expression:"form.probStatusName"}})],1),r("van-cell-group",[r("div",{staticClass:"dot"}),r("van-field",{staticClass:"textarea",attrs:{label:"当前学生情况",readonly:!!e.id,rows:"2",autosize:"",type:"textarea",maxlength:"50",placeholder:"请输入留言","show-word-limit":!e.id},model:{value:e.form.overview,callback:function(t){e.$set(e.form,"overview",t)},expression:"form.overview"}})],1),r("van-cell-group",[r("div",{staticClass:"dot"}),r("van-field",{staticClass:"textarea",attrs:{label:"沟通后家长反馈",readonly:!!e.id,rows:"2",autosize:"",type:"textarea",maxlength:"50",placeholder:"请输入留言","show-word-limit":!e.id},model:{value:e.form.feedback,callback:function(t){e.$set(e.form,"feedback",t)},expression:"form.feedback"}})],1),r("van-cell-group",[r("van-field",{staticClass:"visiTimer",attrs:{label:"回访时间",readonly:"","input-align":"right","is-link":!e.id,placeholder:"请选择"},on:{click:e.onEnListShow},model:{value:e.form.visitTime,callback:function(t){e.$set(e.form,"visitTime",t)},expression:"form.visitTime"}})],1),e.id&&e.uploader[0]&&e.uploader[0].url||!e.id?r("van-cell-group",[r("div",{staticClass:"visiWrap"},[r("p",[e._v("回访图片")]),r("van-uploader",{attrs:{"before-read":e.beforeRead,"after-read":e.afterRead,disabled:!!e.id,deletable:!e.id,accept:"image/*",multiple:"","max-count":5},model:{value:e.uploader,callback:function(t){e.uploader=t},expression:"uploader"}}),e.id?e._e():r("p",{staticClass:"submit"},[e._v("上传文件大小不能超过5MB且最多上传五张")])],1)]):e._e(),e.id?e._e():r("div",{staticClass:"button-group"},[r("van-button",{attrs:{type:"primary",round:"",size:"large"},on:{click:e.onSubmit}},[e._v("确认")])],1),r("van-action-sheet",{attrs:{actions:e.visit.data,"cancel-text":"取消"},on:{cancel:function(t){e.visit.status=!1},select:e.onModeSelect},model:{value:e.visit.status,callback:function(t){e.$set(e.visit,"status",t)},expression:"visit.status"}}),r("van-popup",{attrs:{position:"bottom"},model:{value:e.dataForm.status,callback:function(t){e.$set(e.dataForm,"status",t)},expression:"dataForm.status"}},[r("van-datetime-picker",{attrs:{type:"date","min-date":e.dataForm.minDate,"max-date":e.dataForm.maxDate,formatter:e.formatter},on:{cancel:function(t){e.dataForm.status=!1},confirm:e.onCurrentConfirm},model:{value:e.dataForm.currentDate,callback:function(t){e.$set(e.dataForm,"currentDate",t)},expression:"dataForm.currentDate"}})],1),r("van-popup",{style:{height:"180%"},attrs:{"lock-scroll":!0,position:"bottom"},model:{value:e.statusList.studentStatus,callback:function(t){e.$set(e.statusList,"studentStatus",t)},expression:"statusList.studentStatus"}},[r("van-sticky",[r("van-search",{attrs:{"show-action":"",shape:"round","left-icon":e.searchIcon,placeholder:"请输入学生名或手机号"},on:{search:e.onSearch},scopedSlots:e._u([{key:"action",fn:function(){return[r("div",{on:{click:e.onSearch}},[e._v("搜索")])]},proxy:!0}]),model:{value:e.params.search,callback:function(t){e.$set(e.params,"search",t)},expression:"params.search"}})],1),r("div",{staticClass:"paddingB80"},[e.dataShow?r("van-list",{key:"data",staticClass:"studentContainer",attrs:{finished:e.finished,"finished-text":""},on:{load:e.getStudent},model:{value:e.loading,callback:function(t){e.loading=t},expression:"loading"}},[r("van-radio-group",{model:{value:e.radioSelect,callback:function(t){e.radioSelect=t},expression:"radioSelect"}},[r("van-cell-group",e._l(e.dataList,(function(t,n){return r("van-cell",{key:n,staticClass:"input-cell",attrs:{center:!0},on:{click:function(a){return e.onCheckboxSelect(t)}}},[r("template",{slot:"icon"},[t.avatar?r("img",{staticClass:"logo",attrs:{src:t.avatar,alt:""}}):r("img",{staticClass:"logo",attrs:{src:a("a7ed"),alt:""}})]),r("template",{slot:"title"},[r("div",{staticClass:"studentName"},[e._v("\n "+e._s(t.userName)+"\n ")])]),r("template",{slot:"label"},[r("span",[e._v(e._s(e.desensitPhone(t.phone)))])]),r("template",{slot:"default"},[r("van-radio",{attrs:{name:t.userId}})],1)],2)})),1)],1)],1):r("m-empty",{key:"data",staticClass:"empty"})],1),r("div",{staticClass:"button-group-popup"},[r("span",{staticClass:"btn",on:{click:e.onPopupCancel}},[e._v("取消")]),r("span",{staticClass:"btn primary",on:{click:e.onPopupSubmit}},[e._v("确认选择")])])],1)],1)},n=[],i=a("6e6e"),o=a("ff51"),s=a("d678"),c=a("5a0c"),u=a.n(c),l=a("9afb"),d=a("b562"),p=a("4efa"),f=a("3908"),h=a("bc3a"),m=a.n(h);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}var y=["visitFlag"];function v(e,t){if(null==e)return{};var a,r,n=A(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}function A(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function k(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?g(Object(a),!0).forEach((function(t){S(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function S(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function w(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */w=function(){return e};var e={},t=Object.prototype,a=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",o=r.toStringTag||"@@toStringTag";function s(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(T){s=function(e,t,a){return e[t]=a}}function c(e,t,a,r){var n=t&&t.prototype instanceof d?t:d,i=Object.create(n.prototype),o=new G(r||[]);return i._invoke=function(e,t,a){var r="suspendedStart";return function(n,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw i;return L()}for(a.method=n,a.arg=i;;){var o=a.delegate;if(o){var s=k(o,a);if(s){if(s===l)continue;return s}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===r)throw r="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);r="executing";var c=u(e,t,a);if("normal"===c.type){if(r=a.done?"completed":"suspendedYield",c.arg===l)continue;return{value:c.arg,done:a.done}}"throw"===c.type&&(r="completed",a.method="throw",a.arg=c.arg)}}}(e,a,o),i}function u(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(T){return{type:"throw",arg:T}}}e.wrap=c;var l={};function d(){}function p(){}function f(){}var h={};s(h,n,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(M([])));y&&y!==t&&a.call(y,n)&&(h=y);var v=f.prototype=d.prototype=Object.create(h);function A(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function g(e,t){function r(n,i,o,s){var c=u(e[n],e,i);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==b(d)&&a.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(d).then((function(e){l.value=e,o(l)}),(function(e){return r("throw",e,o,s)}))}s(c.arg)}var n;this._invoke=function(e,a){function i(){return new t((function(t,n){r(e,a,t,n)}))}return n=n?n.then(i,i):i()}}function k(e,t){var a=e.iterator[t.method];if(void 0===a){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var r=u(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,l;var n=r.arg;return n?n.done?(t[e.resultName]=n.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):n:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function G(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function M(e){if(e){var t=e[n];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(a.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=f,s(v,"constructor",f),s(f,"constructor",p),p.displayName=s(f,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,s(e,o,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},A(g.prototype),s(g.prototype,i,(function(){return this})),e.AsyncIterator=g,e.async=function(t,a,r,n,i){void 0===i&&(i=Promise);var o=new g(c(t,a,r,n),i);return e.isGeneratorFunction(a)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(v),s(v,o,"Generator"),s(v,n,(function(){return this})),s(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var r=t.pop();if(r in e)return a.value=r,a.done=!1,a}return a.done=!0,a}},e.values=M,G.prototype={constructor:G,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(a,r){return o.type="throw",o.arg=e,t.next=a,r&&(t.method="next",t.arg=void 0),!!r}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),c=a.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,l):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),x(a),l}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;x(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,a){return this.delegate={iterator:M(e),resultName:t,nextLoc:a},"next"===this.method&&(this.arg=void 0),l}},e}function x(e,t,a,r,n,i,o){try{var s=e[i](o),c=s.value}catch(u){return void a(u)}s.done?t(c):Promise.resolve(c).then(r,n)}function G(e){return function(){var t=this,a=arguments;return new Promise((function(r,n){var i=e.apply(t,a);function o(e){x(i,r,n,o,s,"next",e)}function s(e){x(i,r,n,o,s,"throw",e)}o(void 0)}))}}var M={name:"addVisit",components:{MHeader:i["a"],MEmpty:s["a"]},data:function(){var e=this.$route.query;return{id:e.id,name:e.name,userId:e.userId,studentId:e.studentId,beforeId:e.beforeId,inside:e.inside||0,visitFlag:Number(e.visitFlag)||0,uploader:[],dataForm:{status:!1,minDate:new Date(2e3,0,1),maxDate:new Date,currentDate:new Date},statusList:{headerStatus:!0,studentStatus:!1},typeList:[{name:"课程推荐"},{name:"常规回访"},{name:"小课回访"},{name:"云教练"},{name:"其它"}],visit:{status:!1,type:null,data:[]},studentName:e.username||null,studentPhone:e.phone||null,teacherName:null,form:{teacherId:null,studentId:e.userId||e.studentId||e.beforeId||null,type:e.userId?"云教练":e.beforeId?"常规回访":null,purpose:e.userId?"体验回访":e.beforeId?"教学内容未达标":null,overview:"",feedback:"",visitTime:e.userId||e.id||e.beforeId?u()().format("YYYY年MM月DD日"):null,visiterType:"TEACHER",feedbackTypeDesc:"",feedbackType:"",probStatus:""},loading:!1,finished:!1,params:{search:null,page:1,rows:20},dataShow:!0,radioSelect:null,radioSelectName:null,radioSelectPhone:null,clickStatus:!1,dataList:[],searchIcon:a("1b61"),ossUploadUrl:"https://ks3-cn-beijing.ksyuncs.com/daya",dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},feedbackTypeList:[{name:"考虑中",value:"THINKING"},{name:"确认缴费待缴费",value:"PENDING_PAYMENT"},{name:"回访流失",value:"LOST"},{name:"暂停",value:"PAUSE"},{name:"其他",value:"OTHER"},{name:"在读",value:"NORMAL"}],feedbackTypeDescList:[{name:"价格原因",value:"PRICE"},{name:"时间原因",value:"TIME"},{name:"教学不满意",value:"TEACHING"},{name:"其他",value:"OTHER"}],probStatusList:[{name:"已解决",value:1},{name:"待跟进",value:0}]}},mounted:function(){var e=this.$route.query;e.Authorization&&(localStorage.setItem("Authorization",decodeURI(e.Authorization)),localStorage.setItem("userInfo",decodeURI(e.Authorization))),(Object(o["b"])().android||Object(o["b"])().iPhone)&&(this.statusList.headerStatus=!1),document.title=this.name||"新增回访记录",this.__init()},methods:{__init:function(){var e=G(w().mark((function e(){var t,a,r,n,i,o,s,c,p=this;return w().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(d["m"])();case 2:if(t=e.sent,a=t.data,200==t.status?(this.teacherName=a.realName,this.form.teacherId=a.id):this.$toast(t.msg),!this.id){e.next=14;break}return Object(f["a"])(!0),e.next=9,Object(l["db"])({id:this.id});case 9:r=e.sent,n=r.data,i=this.form,Object(f["a"])(!1),200==n.code?(o=n.data,this.studentName=o.studentName,i.studentId=o.studentId,i.type=o.type,i.purpose=o.purpose,i.overview=o.overview,i.feedback=o.feedback,i.visitTime=u()(o.visitTime).format("YYYY年MM月DD日"),i.visiterType=o.visiterType,i.feedbackType=o.feedbackType,i.feedbackTypeDesc=o.feedbackTypeDesc,i.probStatus=o.probStatus,i.feedbackType&&(i.feedbackTypeName="",this.feedbackTypeList.forEach((function(e){e.value==i.feedbackType&&(i.feedbackTypeName=e.name)}))),i.feedbackTypeDesc&&(i.feedbackTypeDescName="",this.feedbackTypeDescList.forEach((function(e){e.value==i.feedbackType&&(i.feedbackTypeDescName=e.name)}))),i.probStatus?i.probStatusName="已解决":i.probStatusName="待跟进",i.probStatus=o.probStatus,s=o.attachments.split(","),this.uploader=s.map((function(e){return{url:e}}))):this.$toast(t.msg);case 14:if(c=this.userId||this.studentId||this.beforeId,!c){e.next=18;break}return e.next=18,Object(l["M"])({userId:c}).then((function(e){var t=e.data;p.studentPhone=t.phone,p.studentName=t.username}));case 18:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onSubmit:function(){var e=G(w().mark((function e(){var t,a,r,n,i,o,s=this;return w().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this.form,t.studentId){e.next=6;break}return this.$toast("请选择学员"),e.abrupt("return");case 6:if(t.type){e.next=11;break}return this.$toast("请选择回访类型"),e.abrupt("return");case 11:if(t.purpose){e.next=16;break}return this.$toast("请选择回访目的"),e.abrupt("return");case 16:if(t.overview){e.next=21;break}return this.$toast("请输入当前学生情况"),e.abrupt("return");case 21:if(t.feedback){e.next=26;break}return this.$toast("请输入沟通后家长反馈"),e.abrupt("return");case 26:if(t.visitTime){e.next=31;break}return this.$toast("请选择回访时间"),e.abrupt("return");case 31:if(t.feedbackTypeDesc||"小课回访"!=t.type){e.next=36;break}return this.$toast("请选择反馈详情"),e.abrupt("return");case 36:if(t.feedbackType||"小课回访"!=t.type){e.next=41;break}return this.$toast("请选择家长反馈"),e.abrupt("return");case 41:if(t.probStatus+""){e.next=44;break}return this.$toast("请选择问题状态"),e.abrupt("return");case 44:if(!this.clickStatus){e.next=46;break}return e.abrupt("return");case 46:return this.clickStatus=!0,Object(f["a"])(!0),a=u()(this.dataForm.currentDate).format("YYYY-MM-DD"),r=this.uploader.map((function(e){return e.url})),n=k(k({},t),{},{visitTime:a,attachments:r.join(",")}),this.beforeId&&(n.objectId=this.$route.query.objectId),e.next=54,Object(l["cb"])(k({},n));case 54:if(i=e.sent,o=i.data,Object(f["a"])(!1),200!=o.code){e.next=62;break}this.$toast("添加成功"),setTimeout((function(){if(s.inside)s.onAppBack();else if(s.userId){var e=s.$route.query,t=e.visitFlag,a=v(e,y);t=0,s.$router.replace({path:"/trainDetail",query:k(k({},a),{},{visitFlag:t})})}else if(s.beforeId){var r=Object.assign({},s.$route.query);s.$router.replace({path:"/visitList",query:k({userId:s.beforeId},r)})}else s.$router.replace("visitList")}),800),e.next=65;break;case 62:return this.$toast(o.msg),this.clickStatus=!1,e.abrupt("return");case 65:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),onAppBack:function(){Object(o["b"])().android?DAYA.postMessage(JSON.stringify({api:"back"})):Object(o["b"])().iPhone&&window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"back"}))},onCheckStudent:function(){this.id||this.userId||this.studentId||this.beforeId||(this.statusList.studentStatus=!0)},onChange:function(e){if(!this.id&&(!this.userId&&!this.beforeId||"probStatus"==e)){var t=this.visit,a=this.form;if("type"==e)t.data=this.typeList;else if("purpose"==e)if("其它"==a.type)t.data=[{name:"其它"},{name:"会员续费"}];else if("课程推荐"==a.type)t.data=[{name:"新课推荐"},{name:"续费提醒"}];else if("常规回访"==a.type)t.data=[{name:"课后及作业回访"},{name:"练习及乐团表现"},{name:"考勤申诉"},{name:"异常请假回访"}];else if("小课回访"==a.type)t.data=[{name:"VIP课回访"},{name:"乐理课回访"},{name:"网管课回访"}];else{if("云教练"!=a.type)return void this.$toast("请选择回访类型");t.data=[{name:"体验回访"}]}else"feedbackType"==e?t.data=this.feedbackTypeList:"feedbackTypeDesc"==e?t.data=this.feedbackTypeDescList:"probStatus"==e&&(t.data=this.probStatusList);t.status=!0,t.type=e}},onSearch:function(){this.params.page=1,this.dataList=[],this.dataShow=!0,this.loading=!0,this.finished=!1,this.getStudent()},onCheckboxSelect:function(e){this.radioSelect=e.userId,this.radioSelectName=e.userName,this.radioSelectPhone=e.phone},onPopupCancel:function(){this.statusList.studentStatus=!1},onPopupSubmit:function(){this.form.studentId=this.radioSelect,this.studentName=this.radioSelectName,this.studentPhone=this.radioSelectPhone,this.statusList.studentStatus=!1},onCurrentConfirm:function(e){e&&(this.form.visitTime=u()(e).format("YYYY年MM月DD日")),this.dataForm.status=!1},onEnListShow:function(){this.id||this.visitFlag||(this.dataForm.status=!0)},getStudent:function(){var e=this,t=this.params;Object(l["J"])(t).then((function(a){var r=a.data;e.loading=!1,200==r.code&&r.data?(t.page=r.data.pageNo,e.dataList=e.dataList.concat(r.data.rows),t.page>=r.data.totalPage&&(e.finished=!0),e.params.page++):e.finished=!0,e.dataList.length<=0&&(e.dataShow=!1)}))},onModeSelect:function(e){var t=this.visit,a=this.form;"type"==t.type?(a.type=e.name,a.purpose=null,a.feedbackTypeDescName=null,a.feedbackTypeDesc=null,a.probStatus=null,a.probStatusName=null,a.feedbackTypeDescName=null,a.feedbackTypeDesc=null):"purpose"==t.type?a.purpose=e.name:"feedbackType"==t.type?(a.feedbackType=e.value,a.feedbackTypeName=e.name):"feedbackTypeDesc"==t.type?(a.feedbackTypeDescName=e.name,a.feedbackTypeDesc=e.value):"probStatus"==t.type&&(a.probStatus=e.value,a.probStatusName=e.name),t.status=!1},formatter:function(e,t){return"year"===e?"".concat(t,"年"):"month"===e?"".concat(t,"月"):"day"===e?"".concat(t,"日"):t},desensitPhone:function(e){var t=e.substr(0,3),a=e.substr(-4);return t+"****"+a},beforeRead:function(e){var t=this;if(e.length)e.map((function(e){var a=e.size/1e3/1e3<5;if(!a)return t.$toast("上传文件大小不能超过 5MB"),!1}));else{var a=e.size/1e3/1e3<5;if(!a)return this.$toast("上传文件大小不能超过 5MB"),!1}return!0},uploadFile:function(){var e=G(w().mark((function e(t){var a,r,n,i,o,s,c,u,l;return w().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,t.status="uploading",t.message="上传中...",a=t.file.name||"",r=a&&a.replace(/ /gi,"_"),n=(new Date).getTime()+r,i={filename:r,bucketName:this.bucket_name,postData:{filename:r,acl:"public-read",key:n,unknowValueField:[]}},e.next=9,Object(p["e"])(i);case 9:for(u in o=e.sent,s={policy:o.data.policy,signature:o.data.signature,key:n,KSSAccessKeyId:o.data.kssAccessKeyId,acl:"public-read",name:r},c=new FormData,s)c.append(u,s[u]);return c.append("file",t.file),e.next=16,m()({method:"post",url:this.ossUploadUrl,data:c});case 16:l=this.ossUploadUrl+"/"+n,t.url=l,t.status="done",e.next=27;break;case 21:e.prev=21,e.t0=e["catch"](0),console.log(e.t0),t.status="failed",t.message="上传失败",this.uploader=[];case 27:case"end":return e.stop()}}),e,this,[[0,21]])})));function t(t){return e.apply(this,arguments)}return t}(),afterRead:function(){var e=G(w().mark((function e(t){var a=this;return w().wrap((function(e){while(1)switch(e.prev=e.next){case 0:this.form,e.prev=1,t&&t.length?t.forEach((function(e){a.uploadFile(e)})):this.uploadFile(t),e.next=9;break;case 5:return e.prev=5,e.t0=e["catch"](1),console.log(e.t0),e.abrupt("return",!1);case 9:case"end":return e.stop()}}),e,this,[[1,5]])})));function t(t){return e.apply(this,arguments)}return t}()}},L=M,T=(a("7093"),a("2877")),O=Object(T["a"])(L,r,n,!1,null,"1065bac9",null);t["default"]=O.exports},"0bed":function(e,t,a){},"4efa":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"f",(function(){return i})),a.d(t,"c",(function(){return o})),a.d(t,"b",(function(){return s})),a.d(t,"d",(function(){return c})),a.d(t,"e",(function(){return u}));var r=a("2b7c"),n=function(e){return Object(r["a"])({url:"/imSendGroupMessage/queryPage",method:"post",requestType:"form",data:e})},i=function(e){return Object(r["a"])({url:"/imSendGroupMessage/queryGroupPage1",method:"post",requestType:"form",data:e})},o=function(e){return Object(r["a"])({url:"/imSendGroupMessage/send",method:"post",data:e})},s=function(e){return Object(r["a"])({url:"/imSendGroupMessage/delete",method:"post",requestType:"form",data:e})},c=function(e){return Object(r["a"])({url:"/imSendGroupMessage/update",method:"post",data:e})};function u(e){return Object(r["a"])({method:"post",url:"/getUploadSign",data:e})}},5657:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAqCAMAAADhynmdAAAAAXNSR0IArs4c6QAAAhBQTFRFAAAAAP8AAP//AICAAP//AP+qAL+/AMzMANWqANXVALa2AMbGALOzAMyzALm5ANG5AL+qAMi2ALuqAMa4ALyuAL+zAMyzAMK2ALyxAMi8AMK4AMazAMG5AL+3AMG5AL22AL+4AMO1AMS3AL+zAL+0AMW5AMG1AL6zAMW1AMW6AMO0AMS1AMKzAMK4AMO1AMS2AMK2AMC0AMG2AMO4AMC1AMG2AMK3AMG3AMK4AMC2AMG3AMK2AMO3AMG0AMG3AMO3AMG1AMK3AMG2AMK3AMC1AMG2AMG3AMO2AMC0AMG1AMO4AMO1AMK2AMK1AMO1AMG0AMK1AMG3AMK2AMK2AMG1AMC0AMO1AsG1AMK1AsC1AsG2AsK1AsK3AsK2AsK1AsK2AsK2AsK2AsG1AsG2AsK3AsC1AsK1AsG1AsK2AsG1AsK2AsG1AsK2AcK2AcK2AcG1AcG2AcG1AcG1AcG0AcG1AcG2AcG2AcK2AcK1AcG2AcG1AcG1AcG1AcG2AcG1AcK2AcG1AcG1AcG2AcG1AcK1AcG1AcG1AcC0AcK2AcG1AcK1AcK2AcG1AcG2AcK1AcG1AcK1AcG1AcG1AcG0AcG2AcG1AcG1AcG1AcG1AcG1AcK2AcG1AcG2AcK1AcG1AcG0AcG2AcG1AcK1AcG1AcG1AcC1AcG1AcK1AcG1AcC1AcG1AcG1AcK1AcG1AcK2AcG179a5bwAAAK90Uk5TAAEBAgIDBAUGBgcJCgoLCwwODxITFBQVFxcZGx0gISMkJicoLCwtLzAwMzQ2Njc4Oz1CREVGR0pLTU5QUVJSVVZYW1xdXl9iaWtrbnBxcnR1eHp9f4KDg4aGiIqKi42PkpOVmZuen6WnqKipqqyvsLGytLW2tri5u72+wcLGyMjJysrMzM7T1NTV2Nja29ze4OPk5eXm5+jq6+3u8PHy8/P09fb3+Pj5+/z8/f3+/p5CDVUAAAHISURBVBgZjcGHX4xxAMfxb9kZicLJqGRd9ooUJSsjKyNk7+w9ooQTychMVskors+/6Hnufnf3PM/d9fJ+KyTraGvbhenqQ3kblg6/kpl4nbAGJVH+jYilSmhuD1EPlNApHIqUyEscHqXIll93es1IRXXgtFy2vUB75RAZ7TjVyTblVjfQMk1hAZy6FDam4i18KVRILU5vFDHiMPyYI9tmnKpl8V/dP1NSRZBWnyxTcTgzSJbjEDyZIe2BY7K9IOLX1lTZ5j8GmrLUv5HfebJUY7QWKMJ/D25KC+GILDl/CPuQpqi021AiPeOdbJcxVitmQhc3pAOQI8tijLtyOM/PAVoLhbKkBDBmK2Y3jNcSWCVbMcYdxeyDTC2DMoXcxyhWVA1t0npYoJBFGC2DFTFq4yxpEz1jFXYN45Bc0reXypj8nbDelUpmB8bnXCWR1ozxPFuW/MotM+Qxrxuj2afRJ4LQe1Aeu4gIrHtPSJXcBjbiFSyVW+5XvDoL5LYiiNfrbLntJM7DYXJJvUicGrmlN+D1qZ/csprwGi6PcU9we6o4mfU4BUsUb2gtMR/LlNCGToyzPiUx6dxfLK+K1Ie8qktXtmXov/0DiRGUJGKQvrEAAAAASUVORK5CYII="},7093:function(e,t,a){"use strict";a("0bed")}}]);