1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesEnroll/enrolledForm"],{"1c21":function(e,t,n){},"209f":function(e,t,n){"use strict";n.r(t);var r=n("3205"),i=n("4894");for(var a in i)"default"!==a&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("fd2d"),n("737d");var o,s=n("f0c5"),u=Object(s["a"])(i["default"],r["b"],r["c"],!1,null,"131233e2",null,!1,r["a"],o);t["default"]=u.exports},3205:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var r={uForm:function(){return n.e("uview-ui/components/u-form/u-form").then(n.bind(null,"3b0c"))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,"c9c6"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,"7bd3"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"c500"))},uUpload:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-upload/u-upload")]).then(n.bind(null,"cac0"))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,"3a6d"))},uRadio:function(){return n.e("uview-ui/components/u-radio/u-radio").then(n.bind(null,"2c40"))},uCheckboxGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(n.bind(null,"cdb0"))},uCheckbox:function(){return n.e("uview-ui/components/u-checkbox/u-checkbox").then(n.bind(null,"1fc3"))},uActionSheet:function(){return n.e("uview-ui/components/u-action-sheet/u-action-sheet").then(n.bind(null,"999b"))},uPicker:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-picker/u-picker")]).then(n.bind(null,"c643"))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,"4058"))},uTopTips:function(){return n.e("uview-ui/components/u-top-tips/u-top-tips").then(n.bind(null,"83e4"))}},i=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){e.payTypeShow=!0},e.e1=function(t){e.timeShow=!0},e.e2=function(t){e.sexShow=!0},e.e3=function(t){e.birthdayShow=!0},e.e4=function(t){e.saleShow=!0},e.e5=function(t){e.talkerShow=!0})},a=[]},"3bd8":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n("2f62");function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n("bf52"),u=n("8335"),c={computed:a({},(0,r.mapGetters)(["customStyle"])),data:function(){return{uploadUrl:u.uploadFile,uploadHeader:{Authorization:e.getStorageSync("token")},payTypeCode:"",fileList:[],form:{imageFileId:"",contractFileId:"",time:"",coachName:"",parentsName:"",studentName:"",sex:"",age:"",birthday:"",phone:"",classId:"",className:"",courseNumber:"",coursePrice:"",sumPrice:"",orderNo:"",lessonsGiveNumber:"",giftId:[],saleId:"",saleName:"",talkerId:"",talkerName:"",payTypeId:"",payTypeName:"",remark:""},rules:{coachName:[{required:!0,message:"请输入接收人",trigger:"change"}],parentsName:[{required:!0,message:"请输入家长姓名",trigger:"change"}],studentName:[{required:!0,message:"请输入学员姓名",trigger:"change"}],sex:[{required:!0,message:"请选择学员性别",trigger:"change"}],age:[{required:!0,type:"number",message:"请输入学员年龄",trigger:"change"}],birthday:[{required:!0,message:"请选择学生生日",trigger:"change"}],time:[{required:!0,message:"请选择有效期",trigger:"change"}],phone:[{required:!0,message:"请输入手机号码",trigger:"change"},{pattern:/^1[0-9]{10}$/g,transform:function(e){return String(e)},message:"请输入正确格式的手机号码"}],className:[{required:!0,message:"请选择报名班级",trigger:"change"}],courseNumber:[{required:!0,message:"请输入课时数",trigger:"change"}],coursePrice:[{required:!0,message:"请输入课时单价",trigger:"change"}],sumPrice:[{required:!0,message:"请输入课时总价",trigger:"change"}],orderNo:[{required:!0,message:"请输入订单号",trigger:"change"}],saleName:[{required:!0,message:"请选择销售员",trigger:"change"}],talkerName:[{required:!0,message:"请选择谈单人",trigger:"change"}],payTypeName:[{required:!0,message:"请选择支付方式",trigger:"change"}]},sexShow:!1,sexList:[{text:"男"},{text:"女"}],timeShow:!1,timeParams:{year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0},birthdayShow:!1,birthdayParams:{year:!0,month:!0,day:!0,hour:!1,minute:!1,second:!1},classShow:!1,classList:[],giftList:[],saleShow:!1,saleList:[],talkerShow:!1,talkerList:[],payTypeShow:!1,payTypeList:[]}},onShow:function(){e.getStorageSync("defaultClass")&&(this.form.classId=e.getStorageSync("defaultClass").classId,this.form.className=e.getStorageSync("defaultClass").className)},onReady:function(){var t=this;this.form.coachName=e.getStorageSync("userData").nickName,this.$refs.form.setRules(this.rules),s.request(u.getClassList,{page:1,size:1e3},"POST").then((function(e){t.classList=e.data.row})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),s.request(u.getGiftList,{},"POST").then((function(e){e.data.forEach((function(e){1==e?e.value="":e.itemList.forEach((function(e){e.checked=!1}))})),t.giftList=e.data})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),s.request(u.getSaleList,{page:1,size:1e3},"POST").then((function(e){t.saleList=e.data.row})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),s.request(u.getTalkerList,{page:1,size:1e3},"POST").then((function(e){t.talkerList=e.data.row})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})})),s.request(u.getPayTypeList,{},"POST").then((function(e){t.payTypeList=e.data})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))},methods:{scanQRCode:function(){var t=this;e.scanCode({onlyFromCamera:!0,success:function(e){s.request(u.getQrCodeInfo,{orderNo:e.result},"POST").then((function(e){if(t.form.parentsName=e.data.parentsName,t.form.studentName=e.data.studentName,t.form.sex=e.data.sex,t.form.age=e.data.age,t.form.birthday=e.data.birthday,t.form.phone=e.data.phone,e.data.payTypeId){var n=t.payTypeList.find((function(t){return t.id==e.data.payTypeId}));t.form.payTypeId=e.data.payTypeId,t.form.payTypeName=n.name,t.form.payTypeCode=n.other}e.data.imageFileId&&(t.form.imageFileId=e.data.imageFileId,t.fileList=[{url:e.data.imageFileUrl}]),t.form.orderNo=e.data.orderNo})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))}})},uploadSuccess:function(e,t,n,r){return 1==r?this.form.imageFileId=e.data.id:2==r&&(this.form.contractFileId=e.data.id),this.$refs.uTips.show({title:"文件上传成功",type:"success"}),!0},uploadError:function(e,t,n,r){this.$refs.uTips.show({title:error.message,type:"warning"})},uploadRemove:function(e,t,n){1==n?this.form.imageFileId="":2==n&&(this.form.contractFileId="")},setSex:function(e){this.form.sex=this.sexList[e].text},setTime:function(e){this.form.time=e.year+"-"+e.month+"-"+e.day+" "+e.hour+":"+e.minute+":"+e.second},setBirthday:function(e){this.form.birthday=e.year+"-"+e.month+"-"+e.day},selectClass:function(){e.navigateTo({url:"/pagesEnroll/classList"})},setClass:function(e){this.form.classId=this.classList[e[0]].id,this.form.className=this.classList[e[0]].name},setSale:function(e){this.form.saleId=this.saleList[e[0]].id,this.form.saleName=this.saleList[e[0]].name},setTalker:function(e){this.form.talkerId=this.talkerList[e[0]].id,this.form.talkerName=this.talkerList[e[0]].name},setPayType:function(e){this.form.payTypeId=this.payTypeList[e[0]].id,this.form.payTypeName=this.payTypeList[e[0]].name,this.payTypeCode=this.payTypeList[e[0]].other},setCoursePrice:function(){this.form.courseNumber&&this.form.sumPrice&&(this.form.coursePrice=(this.form.sumPrice/this.form.courseNumber).toFixed(2))},submitForm:function(){var t=this;this.$refs.form.validate((function(n){if(n){var r=[];t.giftList.forEach((function(e){1==e.type&&e.value?r.push(e.value):0==e.type&&(r=r.concat(e.itemList.filter((function(e){return e.checked})).map((function(e){return e.id}))))})),s.request(u.submitEnrolledForm,a(a({},t.form),{},{giftId:r}),"POST").then((function(n){t.$refs.uTips.show({title:"提交成功",type:"success"}),setTimeout((function(){e.navigateBack()}),1e3)})).catch((function(e){t.$refs.uTips.show({title:e.message,type:"warning"})}))}}))}}};t.default=c}).call(this,n("543d")["default"])},4894:function(e,t,n){"use strict";n.r(t);var r=n("3bd8"),i=n.n(r);for(var a in r)"default"!==a&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},"737d":function(e,t,n){"use strict";var r=n("1c21"),i=n.n(r);i.a},b113:function(e,t,n){"use strict";(function(e){n("43f2");r(n("66fd"));var t=r(n("209f"));function r(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},df15:function(e,t,n){},fd2d:function(e,t,n){"use strict";var r=n("df15"),i=n.n(r);i.a}},[["b113","common/runtime","common/vendor"]]]);
|