require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_user/user/addDoc"],{650:function(t,n,e){"use strict";(function(t,n){var o=e(4);e(26);o(e(25));var i=o(e(651));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e(1)["default"],e(2)["createPage"])},651:function(t,n,e){"use strict";e.r(n);var o=e(652),i=e(654);for(var r in i)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(r);e(656);var c,s=e(34),u=Object(s["default"])(i["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],c);u.options.__file="pages_user/user/addDoc.vue",n["default"]=u.exports},652:function(t,n,e){"use strict";e.r(n);var o=e(653);e.d(n,"render",(function(){return o["render"]})),e.d(n,"staticRenderFns",(function(){return o["staticRenderFns"]})),e.d(n,"recyclableRender",(function(){return o["recyclableRender"]})),e.d(n,"components",(function(){return o["components"]}))},653:function(t,n,e){"use strict";var o;e.r(n),e.d(n,"render",(function(){return i})),e.d(n,"staticRenderFns",(function(){return c})),e.d(n,"recyclableRender",(function(){return r})),e.d(n,"components",(function(){return o}));var i=function(){var t=this,n=t.$createElement;t._self._c},r=!1,c=[];i._withStripped=!0},654:function(t,n,e){"use strict";e.r(n);var o=e(655),i=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(r);n["default"]=i.a},655:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e(647),i={data:function(){return{type:null,patientId:null,form:{userName:null,idCard:null,sex:null,birthday:null,remark:null}}},onLoad:function(t){this.type=t.type,console.log(this.type),"edit"==this.type&&(this.docId=t.docId,this.getDocDetails())},methods:{sexChange:function(t){this.form.sex=t},getDocDetails:function(){var n=this,e={docId:this.docId};(0,o.getDocDetails)(e).then((function(e){200==e.code?n.form=e.data:t.showToast({title:e.msg})}),(function(t){}))},submit:function(){null!=this.form.userName?null!=this.form.idCard?null!=this.form.sex?null!=this.form.birthday?"add"==this.type?this.addDoc():"edit"==this.type&&this.editDoc():t.showToast({icon:"none",title:"出生年月不能为空"}):t.showToast({icon:"none",title:"性别不能为空"}):t.showToast({icon:"none",title:"身份证号不能为空"}):t.showToast({icon:"none",title:"姓名不能为空"})},editDoc:function(){(0,o.editDoc)(this.form).then((function(n){200==n.code?(t.showToast({icon:"success",title:"操作成功"}),setTimeout((function(){t.$emit("refreshDoc"),t.navigateBack({delta:1})}),500)):t.showToast({icon:"none",title:n.msg})}),(function(t){}))},addDoc:function(){(0,o.addDoc)(this.form).then((function(n){200==n.code?(t.showToast({icon:"success",title:"操作成功"}),setTimeout((function(){t.$emit("refreshDoc"),t.navigateBack({delta:1})}),500)):t.showToast({icon:"none",title:n.msg})}),(function(t){}))},bindDateChange:function(t){this.form.birthday=t.target.value}}};n.default=i}).call(this,e(2)["default"])},656:function(t,n,e){"use strict";e.r(n);var o=e(657),i=e.n(o);for(var r in o)["default"].indexOf(r)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(r);n["default"]=i.a},657:function(t,n,e){}},[[650,"common/runtime","common/vendor","pages_user/common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages_user/user/addDoc.js.map