You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
7.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["component/serviceArchive/service-archive"],{505:function(e,t,n){"use strict";n.r(t);var r=n(506),i=n(508);for(var o in i)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(o);n(510);var c,u=n(35),s=Object(u["default"])(i["default"],r["render"],r["staticRenderFns"],!1,null,"6cb5f3c8",null,!1,r["components"],c);s.options.__file="component/serviceArchive/service-archive.vue",t["default"]=s.exports},506:function(e,t,n){"use strict";n.r(t);var r=n(507);n.d(t,"render",(function(){return r["render"]})),n.d(t,"staticRenderFns",(function(){return r["staticRenderFns"]})),n.d(t,"recyclableRender",(function(){return r["recyclableRender"]})),n.d(t,"components",(function(){return r["components"]}))},507:function(e,t,n){"use strict";var r;n.r(t),n.d(t,"render",(function(){return i})),n.d(t,"staticRenderFns",(function(){return c})),n.d(t,"recyclableRender",(function(){return o})),n.d(t,"components",(function(){return r}));try{r={uPopup:function(){return n.e("uview-ui/components/u-popup/u-popup").then(n.bind(null,366))},uForm:function(){return n.e("uview-ui/components/u-form/u-form").then(n.bind(null,397))},uFormItem:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-form-item/u-form-item")]).then(n.bind(null,404))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,415))},uRadioGroup:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-radio-group/u-radio-group")]).then(n.bind(null,453))},uRadio:function(){return n.e("uview-ui/components/u-radio/u-radio").then(n.bind(null,460))},uButton:function(){return n.e("uview-ui/components/u-button/u-button").then(n.bind(null,345))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范文档https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var e=this,t=e.$createElement;e._self._c},o=!1,c=[];i._withStripped=!0},508:function(e,t,n){"use strict";n.r(t);var r=n(509),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=i.a},509:function(e,t,n){"use strict";(function(e){var r=n(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n(30)),o=r(n(32)),c=r(n(11));function u(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var a={data:function(){var e=this;return{btnStyle:(0,c.default)({"background-image":"linear-gradient(-90deg, #e26165 0%, #c10d12 94%, #c10d12 100%)","font-weight":"500","font-size":"28rpx",color:"#fff",width:"436rpx",margin:"0 auto","letter-spacing":"2rpx"},"width","80%"),btnStyle1:(0,c.default)({"background-image":"linear-gradient(-90deg, #ddd 0%, #ccc 94%, #eee 100%)","font-weight":"500","font-size":"28rpx",color:"#fff",width:"436rpx",margin:"0 auto","letter-spacing":"2rpx"},"width","80%"),isShow:!1,form:{name:"",idcard:"",mobile:"",is_move:1,address:"",remark:"",province:"",province_id:"",city:"",city_id:"",district:"",district_id:""},rules:{name:[{required:!0,message:"请输入姓名",trigger:["blur","change"]}],mobile:[{required:!0,message:"请输入手机号",trigger:["blur","change"]},{validator:function(t,n,r){return e.$u.test.mobile(n)},message:"手机号码不正确",trigger:["change","blur"]}],address:[{validator:function(t,n,r){e.form.address?r():r(new Error("请完善地址信息"))},trigger:["blur","change"]}]},isShowArea:!1,areaColumns:[],areaData:[],provinceList:[],cityList:[],districtList:[],isShowProvince:!1,isShowCity:!1,isShowDistrict:!1,selectedProvinceIndex:0,selectedCityIndex:0}},watch:{mobile:{handler:function(e){console.log("mobile prop changed:",e)},immediate:!0}},onReady:function(){this.$refs.uForm1.setRules(this.rules)},methods:{loadProvinceList:function(){var e=this;return(0,o.default)(i.default.mark((function t(){var n;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$u.api.userArchiveArea({level:1});case 2:n=t.sent,e.provinceList=n.data;case 4:case"end":return t.stop()}}),t)})))()},openMap:function(){console.log("chooseLocation");var t=this;e.chooseLocation({success:function(e){console.log("chooseLocationres",e),"chooseLocation:ok"===e.errMsg&&(t.form.address=e.address,console.log("位置名称:"+e.name),console.log("详细地址:"+e.address),console.log("纬度:"+e.latitude),console.log("经度:"+e.longitude))},fail:function(t){e.showToast({title:"打开地图失败",icon:"none"}),console.log("err",t)}})},save:function(){var t=this;this.$refs.uForm1.validate((function(n){var r=t;n?(console.log("验证通过"),console.log("form",t.form),console.log("that.$u.api.userArchiveSave",r.$u.api.userArchiveSave),console.log("this.$u.api.userArchiveSave",t.$u.api.userArchiveSave),t.$u.api.userArchiveSave(s(s({},r.form),{},{user_mobile:t.mobile})).then((function(t){e.showToast({title:"更新成功",icon:"none",success:function(){r.cancel(),r.$emit("addSuccess",!0)}})})).then((function(e){console.log("err",e)}))):console.log("验证失败")}))},cancel:function(){this.$refs.uForm1.resetFields(),this.form={name:"",idcard:"",mobile:"",is_move:1,address:"",remark:"",province:"",province_id:"",city:"",city_id:"",district:"",district_id:""},this.isShow=!1},openAreaPicker:function(){this.isShowArea=!0},onAreaColumnChange:function(e,t){this.areaData[e]=t},onAreaConfirm:function(){this.isShowArea=!1,this.form.address=this.areaData.join("")},onProvinceChange:function(e){var t=this;return(0,o.default)(i.default.mark((function n(){var r,o,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.detail.value,o=t.provinceList[r],t.form.province=o.name,t.form.province_id=o.code,n.next=6,t.$u.api.userArchiveArea({level:2,pcode:o.code});case 6:c=n.sent,t.cityList=c.data,t.form.city="",t.form.city_id="",t.form.district="",t.form.district_id="",t.districtList=[];case 13:case"end":return n.stop()}}),n)})))()},onCityChange:function(e){var t=this;return(0,o.default)(i.default.mark((function n(){var r,o,c;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.detail.value,o=t.cityList[r],t.form.city=o.name,t.form.city_id=o.code,n.next=6,t.$u.api.userArchiveArea({level:3,pcode:o.code});case 6:c=n.sent,t.districtList=c.data,t.form.district="",t.form.district_id="";case 10:case"end":return n.stop()}}),n)})))()},onDistrictChange:function(e){var t=e.detail.value,n=this.districtList[t];this.form.district=n.name,this.form.district_id=n.code}},props:{mobile:{type:String,default:""}}};t.default=a}).call(this,n(2)["default"])},510:function(e,t,n){"use strict";n.r(t);var r=n(511),i=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=i.a},511:function(e,t,n){}}]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/component/serviceArchive/service-archive.js.map
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'component/serviceArchive/service-archive-create-component',
{
'component/serviceArchive/service-archive-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('2')['createComponent'](__webpack_require__(505))
})
},
[['component/serviceArchive/service-archive-create-component']]
]);