require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_user/user/addDoc"],{"0ac6":function(t,n,e){},5215:function(t,n,e){"use strict";var o=e("0ac6"),i=e.n(o);i.a},"68a9":function(t,n,e){"use strict";e.r(n);var o=e("8140"),i=e.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(c);n["default"]=i.a},7796:function(t,n,e){"use strict";(function(t,n){var o=e("47a9");e("584a");o(e("3240"));var i=o(e("8d77"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},8140:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("4837"),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("df3c")["default"])},"8d77":function(t,n,e){"use strict";e.r(n);var o=e("966f"),i=e("68a9");for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);e("5215");var a=e("828b"),s=Object(a["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=s.exports},"966f":function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var o=function(){var t=this.$createElement;this._self._c},i=[]}},[["7796","common/runtime","common/vendor","pages_user/common/vendor"]]]);