myrecordedit.js 3.5 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/cust/myrecordedit"],{"0a35":function(e,n,u){"use strict";(function(e,n){var t=u("4ea4");u("b159");t(u("66fd"));var r=t(u("dff3"));e.__webpack_require_UNI_MP_PLUGIN__=u,n(r.default)}).call(this,u("bc2e")["default"],u("543d")["createPage"])},"5f8b":function(e,n,u){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u={data:function(){return{curImgUrl:"",form:{record_remark:null},customer_id:null,rules:{record_remark:[{required:!0,message:"备注不能为空",trigger:["change"]}]},remarkTips:"请输入:购房预算(总价/均价/面积段)~现居住区域~现居住产品/面积段~工作类型~购房需求/关注点~已经看过的房源情况",propertySelectShow:!1,propertySelectList:[]}},onLoad:function(e){this.customer_id=e.id},created:function(){},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{addImg:function(){var n=e.getStorageSync("MD_token"),u=this;e.chooseImage({count:1,sizeType:["compressed"],sourceType:["album","camera"],success:function(t){var r=t.tempFilePaths;e.uploadFile({url:e.baseUrl+"api/upload/cloud",filePath:r[0],name:"upload",formData:{token:n},success:function(e){var n=JSON.parse(e.data);u.curImgUrl=n.data.url}})}})},submitHandle:function(){var n=this,u=this;this.$refs.uForm.validate((function(t){if(t){var r="apiprivaterecordadd",o={record_remark:u.form.record_remark,customer_id:u.customer_id};u.curImgUrl&&(o.record_img=u.curImgUrl),u.isEdit&&(r="apiprivaterecordedit",o.id=u.form.id),e.api.cust[r](o).then((function(t){u.isEdit?e.$msgConfirm("编辑成功",(function(){e.reLaunch({url:"/pages/cust/my"})}),(function(){e.reLaunch({url:"/pages/cust/my"})})):e.$msgConfirm("添加跟进记录成功,是否前往列表?",(function(){e.navigateBack()}),(function(){n.form={record_remark:null}}))}))}else console.log("验证失败")}))}}};n.default=u}).call(this,u("543d")["default"])},"63cb":function(e,n,u){},7741:function(e,n,u){"use strict";var t=u("63cb"),r=u.n(t);r.a},bcce:function(e,n,u){"use strict";u.d(n,"b",(function(){return r})),u.d(n,"c",(function(){return o})),u.d(n,"a",(function(){return t}));var t={uForm:function(){return u.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(u.bind(null,"a0c0"))},uFormItem:function(){return Promise.all([u.e("common/vendor"),u.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(u.bind(null,"470d"))},uInput:function(){return Promise.all([u.e("common/vendor"),u.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(u.bind(null,"f017"))},uGap:function(){return u.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(u.bind(null,"2bea"))},uButton:function(){return u.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(u.bind(null,"479c"))},uSelect:function(){return u.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(u.bind(null,"2911"))},uToast:function(){return u.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(u.bind(null,"d498"))}},r=function(){var e=this.$createElement;this._self._c},o=[]},cff4:function(e,n,u){"use strict";u.r(n);var t=u("5f8b"),r=u.n(t);for(var o in t)["default"].indexOf(o)<0&&function(e){u.d(n,e,(function(){return t[e]}))}(o);n["default"]=r.a},dff3:function(e,n,u){"use strict";u.r(n);var t=u("bcce"),r=u("cff4");for(var o in r)["default"].indexOf(o)<0&&function(e){u.d(n,e,(function(){return r[e]}))}(o);u("7741");var i=u("f0c5"),c=Object(i["a"])(r["default"],t["b"],t["c"],!1,null,null,null,!1,t["a"],void 0);n["default"]=c.exports}},[["0a35","common/runtime","common/vendor"]]]);