(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38c624fa"],{4099:function(t,e,n){t.exports=n.p+"img/nodata.cbb42a95.png"},"468b":function(t,e,n){"use strict";n("ec60")},"604e":function(t,e,n){"use strict";n.r(e);n("b0c0");var i=function(){var t=this,e=t._self._c;return e("div",{staticClass:"result"},[e("div",{staticClass:"m-head"},[e("i",{staticClass:"iconfont icon-zuobian",on:{click:t.colseResult}}),t._v(" 扫描结果 "),t.imgList.length>0?e("span",{staticClass:"iconfont icon-erweima",on:{click:t.showCodeImg}}):t._e()]),e("a-spin",{attrs:{tip:"正在请求数据...",spinning:t.spinning}},[t.list.length>0?e("div",{staticClass:"list"},t._l(t.list,(function(i,o){return e("div",{key:o,staticClass:"info-body"},[e("h2",{staticClass:"title"},[e("i",{staticClass:"iconfont icon-chenggong1 icon-select",class:t.activeIndex==o?"active":""}),t._v(t._s(i.name)),e("img",{attrs:{src:n("793d")}})]),e("p",{staticClass:"item"},[e("label",[t._v("生产厂家：")]),e("span",[t._v(t._s(i.manufacturer))])]),e("p",{staticClass:"item"},[e("label",[t._v("供应商编号：")]),e("span",[t._v(t._s(i.supplierNo))])]),e("p",{staticClass:"item"},[e("label",[t._v("供应商名称：")]),e("span",[t._v(t._s(i.supplierName))])]),e("p",{staticClass:"item"},[e("label",[t._v("规格：")]),e("span",[t._v(t._s(i.spec))])]),e("p",{staticClass:"item"},[e("label",[t._v("总件数：")]),e("span",[t._v(t._s(i.quantity))])])])})),0):e("div",{staticClass:"no-data"},[e("img",{attrs:{src:n("4099")}}),e("p",[t._v("暂无数据哦~")])])]),t.list.length>0?e("div",{staticClass:"bottom-btn"},[e("a-button",{attrs:{type:"primary"},on:{click:t.setCode}},[t._v("生成二维码")])],1):t._e(),e("div",{staticClass:"pop-main",class:t.popShow?"pop-show":""},[e("div",{staticClass:"mask",on:{click:function(e){t.popShow=!1}}}),e("div",{staticClass:"div-pop"},[e("div",{staticClass:"pop-head"},[e("span",[t._v("生成二维码")]),e("i",{staticClass:"iconfont icon-guanbi close",on:{click:function(e){t.popShow=!1}}})]),e("div",{staticClass:"pop-body"},[e("div",{staticClass:"form-model"},[e("div",{staticClass:"form-item"},[e("label",[t._v("耗材UDI码")]),e("a-input",{attrs:{disabled:""},model:{value:t.form.udi,callback:function(e){t.$set(t.form,"udi",e)},expression:"form.udi"}})],1),e("div",{staticClass:"form-item"},[e("label",[t._v("出库数量")]),e("a-input",{attrs:{type:"number",placeholder:"出库数量"},model:{value:t.form.outQuantity,callback:function(e){t.$set(t.form,"outQuantity",t._n(e))},expression:"form.outQuantity"}})],1),e("div",{staticClass:"form-item"},[e("label",[t._v("选择机构")]),e("a-select",{attrs:{placeholder:"请选择",allowClear:""},model:{value:t.form.purchaseNo,callback:function(e){t.$set(t.form,"purchaseNo",e)},expression:"form.purchaseNo"}},t._l(t.unitList,(function(n,i){return e("a-select-option",{key:i,attrs:{value:n.userNo}},[t._v(t._s(n.nickname))])})),1)],1),e("div",{staticClass:"form-item"},[e("label",[t._v("是否拆零")]),e("a-radio-group",{attrs:{name:"isSplit"},model:{value:t.form.isSplit,callback:function(e){t.$set(t.form,"isSplit",e)},expression:"form.isSplit"}},[e("a-radio",{attrs:{value:!0}},[t._v("是")]),e("a-radio",{attrs:{value:!1}},[t._v("否")])],1)],1)]),e("a-button",{attrs:{type:"primary"},on:{click:t.saveCode}},[t._v("确定")])],1)])])],1)},o=[],s=n("b7a6"),a={name:"result",props:["userType","decodeResult"],data:function(){return{userType_:this.userType,decodeResult_:this.decodeResult,list:[],ypName:0,spinning:!1,activeIndex:0,popShow:!1,form:{consumableId:null,udi:"",purchaseNo:void 0,outQuantity:0,isSplit:!1},jgList:[],unitList:[],hide:null,imgList:[]}},watch:{decodeResult_:function(t,e){t&&(this.decodeResult_=t,this.getInfo())}},mounted:function(){},created:function(){this.getInfo()},methods:{showCodeImg:function(){this.$emit("showCode",this.imgList)},saveCode:function(){var t=this;return this.form.outQuantity<1?(this.hide=this.$message.warning("出库数量不能为0",0),void setTimeout(this.hide,1200)):this.form.purchaseNo?(this.hide=this.$message.loading("正在生成二维码...",0),void Object(s["w"])(this.form).then((function(e){200==e.code&&(setTimeout(t.hide,0),t.imgList=e.data,t.popShow=!1,t.clearForm(),setTimeout((function(n){t.hide=t.$message.success(e.msg,0),setTimeout(t.hide,1200),t.$emit("showCode",t.imgList)}),500))})).catch((function(e){setTimeout(t.hide,0),setTimeout((function(n){t.hide=t.$message.error(e.msg,0),setTimeout(t.hide,1200)}),500)}))):(this.hide=this.$message.warning("请选择医疗机构",0),void setTimeout(this.hide,1200))},clearForm:function(){this.form.purchaseNo=void 0,this.form.outQuantity=0,this.form.isSplit=!1},getUnitList:function(){var t=this;Object(s["q"])().then((function(e){200==e.code&&(t.unitList=e.data)}))},setCode:function(){this.popShow=!0,this.getUnitList()},colseResult:function(){this.$emit("colseResult")},getInfo:function(){var t=this;this.spinning=!0,Object(s["r"])(this.decodeResult_).then((function(e){t.spinning=!1,200==e.code&&(t.list=e.data,t.form.udi=t.list[0].udi,t.form.consumableId=t.list[0].id)})).catch((function(e){t.spinning=!1}))}},beforeDestroy:function(){}},r=a,u=(n("468b"),n("2877")),c=Object(u["a"])(r,i,o,!1,null,"35120d5d",null);e["default"]=c.exports},"793d":function(t,e,n){t.exports=n.p+"img/p_img.5b8a7a07.png"},b7a6:function(t,e,n){"use strict";n.d(e,"p",(function(){return r})),n.d(e,"c",(function(){return u})),n.d(e,"i",(function(){return c})),n.d(e,"o",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"h",(function(){return p})),n.d(e,"f",(function(){return f})),n.d(e,"u",(function(){return m})),n.d(e,"d",(function(){return h})),n.d(e,"v",(function(){return b})),n.d(e,"j",(function(){return v})),n.d(e,"a",(function(){return g})),n.d(e,"g",(function(){return _})),n.d(e,"r",(function(){return C})),n.d(e,"q",(function(){return y})),n.d(e,"w",(function(){return j})),n.d(e,"y",(function(){return O})),n.d(e,"e",(function(){return w})),n.d(e,"z",(function(){return k})),n.d(e,"A",(function(){return S})),n.d(e,"s",(function(){return I})),n.d(e,"x",(function(){return N})),n.d(e,"n",(function(){return T})),n.d(e,"t",(function(){return $})),n.d(e,"m",(function(){return x})),n.d(e,"k",(function(){return L})),n.d(e,"l",(function(){return q}));n("99af");var i=n("bc3a"),o=n.n(i),s=n("b775"),a=n("9fb0");function r(){return Object(s["b"])({url:"/api/sys-menu/list",method:"get"})}function u(t,e){return Object(s["b"])({url:"/api/sys-menu",method:e,data:t})}function c(t){var e=t.id;return Object(s["b"])({url:"/api/sys-menu/".concat(e),method:"delete"})}function d(t){return Object(s["b"])({url:"/api/dept/list",method:"post",data:t})}function l(t){return Object(s["b"])({url:"/api/dept/save",method:"post",data:t})}function p(t){var e=t.id;return Object(s["b"])({url:"/api/dept/".concat(e),method:"delete"})}function f(t){var e=t.userId;return Object(s["b"])({url:"/api/user/".concat(e),method:"delete"})}function m(t){return Object(s["b"])({url:"/api/sys/user/resetpwd",method:"post",data:t})}function h(t){return Object(s["b"])({url:"/api/role/save",method:"post",data:t})}function b(){return Object(s["b"])({url:"/api/sys-role/list",method:"get"})}function v(t){var e=t.roleIds;return Object(s["b"])({url:"/api/system/role/".concat(e),method:"delete"})}function g(t){return Object(s["b"])({url:"/api/sys/user/save",method:"post",data:t})}function _(t){var e=t.id;return Object(s["b"])({url:"/api/sys/user/".concat(e),method:"delete"})}function C(t){return Object(s["b"])({url:"/api/consumable/list?udi=".concat(t),method:"get"})}function y(t){return Object(s["b"])({url:"/api/sys-user/list?type=".concat(t),method:"get"})}function j(t){return Object(s["b"])({url:"/api/purchase",method:"post",data:t})}function O(t){return Object(s["b"])({url:"/api/qrcode/scan/".concat(t),method:"get"})}function w(t){return Object(s["b"])({url:"/api/qrcode/".concat(t),method:"get"})}function k(t){return Object(s["b"])({url:"/api/qrcode/usage",method:"post",data:t})}function S(t){return Object(s["b"])({url:"/api/qrcode/charge",method:"post",data:t})}function I(t){return Object(s["b"])({url:"/api/open/qrcode/query?patientIdCard=".concat(t.idCard,"&outpatientNo=").concat(t.outpatientNo),method:"get"})}function N(t){return Object(s["b"])({url:"/api/consumable",method:"post",data:t})}function T(){return Object(s["b"])({url:"/api/sys-dept/list?pid=1",method:"get"})}function $(t){return Object(s["b"])({url:"/api/purchase/batch/".concat(t),method:"get"})}function x(t){return o.a.post("/api/consumable/excel/import",t,{headers:{Authorization:sessionStorage.getItem(a["a"]),"Content-Type":"multipart/form-data"}})}function L(t){var e=t.billCode,n=t.entSendName;return Object(s["b"])({url:"/api/bill/query?billCode=".concat(e,"&entSendName=").concat(n),method:"get"})}function q(t){var e=t.code;return Object(s["b"])({url:"/api/bill/storage/".concat(e),method:"get"})}},ec60:function(t,e,n){}}]);