webpackJsonp([19],{Jh9y:function(t,a,e){"use strict";Object.defineProperty(a,"__esModule",{value:!0});var r=e("mvHQ"),o=e.n(r),l=(e("ftAF"),{created:function(){var t=this;this.$route.query.id&&this.$http.get({url:"/tableShouyiYaopinxinxi/getOne",data:{id:this.$route.query.id}}).then(function(a){a.success&&(t.formData=a.data)})},data:function(){return{saving:!1,formData:{},rules:{}}},methods:{onSave:function(){var t=this;this.$refs.form.validate(function(a){if(!a)return!1;t.submit()})},submit:function(){var t=this,a=JSON.parse(o()(this.formData));this.$http.post({url:this.formData.id?"/tableShouyiYaopinxinxi/update":"/tableShouyiYaopinxinxi/save",data:a}).then(function(a){a.success?(t.$message.success("成功"),t.$router.go(-1)):t.$message.warning("失败")})}}}),i={render:function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("el-form",{ref:"form",staticStyle:{"max-width":"500px"},attrs:{model:t.formData,rules:t.rules,"label-width":"80px","label-position":"right",size:"small"}},[e("el-form-item",{attrs:{prop:"药品编号",label:"药品编号"}},[e("el-input",{model:{value:t.formData.药品编号,callback:function(a){t.$set(t.formData,"药品编号",a)},expression:"formData.药品编号"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"药品名称",label:"药品名称"}},[e("el-input",{model:{value:t.formData.药品名称,callback:function(a){t.$set(t.formData,"药品名称",a)},expression:"formData.药品名称"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"计量单位",label:"计量单位"}},[e("el-input",{model:{value:t.formData.计量单位,callback:function(a){t.$set(t.formData,"计量单位",a)},expression:"formData.计量单位"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"规格",label:"规格"}},[e("el-input",{model:{value:t.formData.规格,callback:function(a){t.$set(t.formData,"规格",a)},expression:"formData.规格"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"主要成分",label:"主要成分"}},[e("el-input",{model:{value:t.formData.主要成分,callback:function(a){t.$set(t.formData,"主要成分",a)},expression:"formData.主要成分"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"有效成分",label:"有效成分"}},[e("el-input",{model:{value:t.formData.有效成分,callback:function(a){t.$set(t.formData,"有效成分",a)},expression:"formData.有效成分"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"单价",label:"单价"}},[e("el-input",{model:{value:t.formData.单价,callback:function(a){t.$set(t.formData,"单价",a)},expression:"formData.单价"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"生产厂家",label:"生产厂家"}},[e("el-input",{model:{value:t.formData.生产厂家,callback:function(a){t.$set(t.formData,"生产厂家",a)},expression:"formData.生产厂家"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"药品制定部门",label:"药品制定部门"}},[e("el-input",{model:{value:t.formData.药品制定部门,callback:function(a){t.$set(t.formData,"药品制定部门",a)},expression:"formData.药品制定部门"}})],1),t._v(" "),e("el-form-item",{attrs:{prop:"flagcolumn",label:"FlagColumn"}},[e("el-input",{model:{value:t.formData.flagcolumn,callback:function(a){t.$set(t.formData,"flagcolumn",a)},expression:"formData.flagcolumn"}})],1),t._v(" "),e("el-form-item",[e("el-button",{attrs:{loading:t.$store.state.fetchingData,type:"primary"},on:{click:t.onSave}},[t._v("保存")]),t._v(" "),e("el-button",{on:{click:function(a){t.$router.go(-1)}}},[t._v("取消")])],1)],1)],1)},staticRenderFns:[]};var n=e("VU/8")(l,i,!1,function(t){e("YNcx")},"data-v-1cf5cda0",null);a.default=n.exports},YNcx:function(t,a){},ftAF:function(t,a,e){"use strict";a.a={phone:{validator:function(t,a,e){a&&(/^1[3-9]\d{9}$/.test(a)?e():e(new Error("请输入正确的手机号")))},trigger:"blur"},number:{validator:function(t,a,e){a&&(/(^[0-9]*$)|(^[0-9]*\.[0-9]*$)/.test(a)?e():e(new Error("请输入正确的数值")))},trigger:"blur"},url:{validator:function(t,a,e){a&&(/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/.test(a)?e():e(new Error("请输入正确的网址")))},trigger:"blur"},email:{validator:function(t,a,e){a&&(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(a)?e():e(new Error("请输入正确的邮箱地址")))},trigger:"blur"},idCard:{validator:function(t,a,e){a&&(/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$/.test(a)?e():e(new Error("请输入正确的身份证")))},trigger:"blur"},english:{validator:function(t,a,e){a&&(/[A-Za-z]/.test(a)?e():e(new Error("请输入正确的英文字符")))},trigger:"blur"}}},mvHQ:function(t,a,e){t.exports={default:e("qkKv"),__esModule:!0}},qkKv:function(t,a,e){var r=e("FeBl"),o=r.JSON||(r.JSON={stringify:JSON.stringify});t.exports=function(t){return o.stringify.apply(o,arguments)}}});