1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/cust/mycreate"],{"2e9e":function(e,n,t){"use strict";(function(e,t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r={data:function(){return{isEdit:!1,form:{name:null,realname:null,phone:null,sex:"male",record_level:"",remark:null,estate_id:null,estate_name:null,saler_id:null,saler_name:null},customer_id:null,submitButtonDisabled:!0,rules:{record_level:[{required:!0,message:"客户级别不得为空",trigger:["change","blur"]}],name:[{required:!0,message:"姓名不得为空",trigger:["change","blur"]}],phone:[{required:!0,message:"手机号不得为空",trigger:["change","blur"]},{len:11,message:"手机号格式不正确",trigger:["change","blur"]}],remark:[{required:!0,message:"备注不能为空",trigger:["change"]}]},recordLevelList:[],propertySelectShow:!1,propertySelectList:[],salerSelectShow:!1,salerSelectList:[],submitModalShow:!1,modalShow:!1,modalContent:""}},onLoad:function(n){var t=this,r=t.getOpenerEventChannel();r.on&&r.on("data",(function(n){n&&(t.form.name=n.info.name,t.form.realname=n.info.realname,t.form.phone=n.info.phone,t.form.sex=n.info.sex,t.form.record_level=n.info.record_level,t.form.remark=n.info.remark,t.form.id=n.info.id,t.isEdit=!0,e.setNavigationBarTitle({title:"编辑客户-"+n.info.name}))}))},created:function(){var e=t.getStorageSync("MD_dict");this.recordLevelList=e.record_level||[]},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{propertySelectConfirm:function(e){var n=this;e.map((function(e,t){n.form.estate_id=e.value,n.form.estate_name=e.label}))},submitHandle:function(){var e=this,n=this;this.$refs.uForm.validate((function(r){if(r){var u="apiprivatecustomeradd",o={name:n.form.name,realname:n.form.realname,phone:n.form.phone.replace(/\s+/g,""),sex:n.form.sex,record_level:n.form.record_level,remark:n.form.remark};n.isEdit&&(u="apiprivatecustomeredit",o.id=n.form.id),t.api.cust[u](o).then((function(r){n.isEdit?t.$msgConfirm("编辑成功",(function(){t.reLaunch({url:"/pages/cust/my"})}),(function(){t.reLaunch({url:"/pages/cust/my"})})):t.$msgConfirm("添加成功,是否前往客户列表?",(function(){t.reLaunch({url:"/pages/cust/my"})}),(function(){e.form={name:null,realname:null,phone:null,sex:"male",record_level:"",remark:null,estate_id:null,estate_name:null}}))}))}else console.log("验证失败")}))},getPhoneNumber:function(n){var t=this;if("getPhoneNumber:fail user deny"==n.detail.errMsg)return t.$refs.uToast.show({title:"您可以在个人设置中再次绑定",type:"warning"}),void setTimeout((function(){t.reLunchUser()}),1500);console.log(n.detail.errMsg),console.log(n.detail.iv),console.log(n.detail.encryptedData);var r=n.detail.iv,u=n.detail.encryptedData;e.login({success:function(e){e.code?t.setUserPhoneNumber(u,r,e.code):(this.$refs.uToast.show({title:e.errMsg,type:"warning"}),console.log("登录失败!"+e.errMsg))}})},hideKeyboard:function(){t.hideKeyboard()},getFormatDate:function(e){if(void 0==e||""==e)return"";var n=e;return parseInt(e)<10&&(n="0"+e),n}}};n.default=r}).call(this,t("bc2e")["default"],t("543d")["default"])},"5ebc":function(e,n,t){"use strict";var r=t("abc9"),u=t.n(r);u.a},8745:function(e,n,t){"use strict";t.r(n);var r=t("9b93"),u=t("e2f2");for(var o in u)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(o);t("5ebc");var i=t("f0c5"),l=Object(i["a"])(u["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);n["default"]=l.exports},"9b93":function(e,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return o})),t.d(n,"a",(function(){return r}));var r={uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"e893"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"a81d"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(t.bind(null,"830c"))},uRadioGroup:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-radio-group/u-radio-group")]).then(t.bind(null,"f0c0"))},uRadio:function(){return t.e("uni_modules/vk-uview-ui/components/u-radio/u-radio").then(t.bind(null,"79d4"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"9db7"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"51b1b"))},uSelect:function(){return t.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(t.bind(null,"17bf"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"85bf"))},uToast:function(){return t.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(t.bind(null,"9568"))}},u=function(){var e=this.$createElement;this._self._c},o=[]},abc9:function(e,n,t){},c8bf:function(e,n,t){"use strict";(function(e,n){var r=t("4ea4");t("2ab2");r(t("66fd"));var u=r(t("8745"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},e2f2:function(e,n,t){"use strict";t.r(n);var r=t("2e9e"),u=t.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(o);n["default"]=u.a}},[["c8bf","common/runtime","common/vendor"]]]);
|