1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/agent/recommend/visitimg"],{"113b":function(e,n,t){"use strict";var u=t("328e"),r=t.n(u);r.a},"11fe":function(e,n,t){"use strict";(function(e){function t(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(e);n&&(u=u.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,u)}return t}function u(e){for(var n=1;n<arguments.length;n++){var u=null!=arguments[n]?arguments[n]:{};n%2?t(Object(u),!0).forEach((function(n){r(e,n,u[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(u)):t(Object(u)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(u,n))}))}return e}function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i={data:function(){return{maskShow:!1,idCardFront:"",idCardRevers:"",form:{visit_des:"",img1:null,img2:null},curId:"",cObj:{},submitButtonDisabled:!1,rules:{visit_des:[{required:!0,message:"备注不得为空",trigger:["change","blur"]}],img1:[{required:!0,message:"第三方水印照片不得为空",trigger:["change","blur"]}],img2:[{required:!0,message:"带看单照片不得为空",trigger:["change","blur"]}]},submitModalShow:!1}},onLoad:function(e){this.curId=e.id,this.getData()},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{getData:function(){var n=this;e.api.cust.apireportvisitdetail({report_id:this.curId}).then((function(e){var t=e||{};if(t.id){n.idCardFront=t.img1,n.idCardRevers=t.img2;var r={visit_des:t.visit_des,img1:t.img1,img2:t.img2};n.form=u({},r),n.cObj=u({},t)}}))},uploadImgHandle:function(n){e.chooseImage({count:1,sizeType:["compressed"],success:function(t){var u=t.tempFilePaths[0],r=e.getStorageSync("MD_token")||"";e.uploadFile({url:e.baseUrl+"api/upload/cloud",filePath:u,name:"upload",formData:{token:r},success:function(e){var t=JSON.parse(e.data);0===t.errno?n&&"function"===typeof n&&n(t.data):uin.$msg(t.errmsg||"未知错误-".concat(t.errno))}})}})},uploadFrontImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.img1=n.url,e.idCardFront=n.url}))},uploadBackImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.img2=n.url,e.idCardRevers=n.url}))},submitHandle:function(){var n=this;this.$refs.uForm.validate((function(t){if(t){var r=u({},n.form);r.report_id=n.curId,e.api.cust.apireportvisitchange(r).then((function(t){e.$msgConfirm("编辑成功",(function(){e.reLaunch({url:"/pages/agent/recommend/detail?id=".concat(n.curId)})}),(function(){e.reLaunch({url:"/pages/agent/recommend/detail?id=".concat(n.curId)})}))}))}}))},getFormatDate:function(e){if(void 0==e||""==e)return"";var n=e;return parseInt(e)<10&&(n="0"+e),n}}};n.default=i}).call(this,t("543d")["default"])},"328e":function(e,n,t){},"4f51":function(e,n,t){"use strict";t.r(n);var u=t("11fe"),r=t.n(u);for(var i in u)"default"!==i&&function(e){t.d(n,e,(function(){return u[e]}))}(i);n["default"]=r.a},"733d":function(e,n,t){"use strict";t.r(n);var u=t("e8d5"),r=t("4f51");for(var i in r)"default"!==i&&function(e){t.d(n,e,(function(){return r[e]}))}(i);t("113b");var o,a=t("f0c5"),c=Object(a["a"])(r["default"],u["b"],u["c"],!1,null,null,null,!1,u["a"],o);n["default"]=c.exports},dc8e:function(e,n,t){"use strict";(function(e){t("3690");u(t("66fd"));var n=u(t("733d"));function u(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t("543d")["createPage"])},e8d5:function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return u}));var u={uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"ce96"))},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,"23cb"))},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,"6943"))},uIcon:function(){return t.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(t.bind(null,"ba35"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"dc7f"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"ce9e"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"f813"))},uMask:function(){return t.e("uni_modules/vk-uview-ui/components/u-mask/u-mask").then(t.bind(null,"fb76"))},uToast:function(){return t.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(t.bind(null,"934c"))}},r=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.submitModalShow=!0},e.e1=function(n){e.maskShow=!1},e.e2=function(n){e.maskShow=!1})},i=[]}},[["dc8e","common/runtime","common/vendor"]]]);
|