(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06f21f18"],{4099:function(t,e,i){t.exports=i.p+"img/nodata.cbb42a95.png"},"793d":function(t,e,i){t.exports=i.p+"img/p_img.5b8a7a07.png"},"7b067":function(t,e,i){"use strict";i("b3c5")},"9a0f":function(t,e,i){"use strict";i.r(e);i("b0c0");var n=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(n,s){return e("div",{key:s,staticClass:"info-body",on:{click:function(e){t.activeIndex=s}}},[e("h2",{staticClass:"title"},[e("i",{staticClass:"iconfont icon-chenggong1 icon-select",class:t.activeIndex==s?"active":""}),t._v(t._s(n.name)),e("img",{attrs:{src:i("793d")}})]),e("p",{staticClass:"item"},[e("label",[t._v("生产厂家：")]),e("span",[t._v(t._s(n.manufacturer))])]),e("p",{staticClass:"item"},[e("label",[t._v("供应商编号：")]),e("span",[t._v(t._s(n.supplierNo))])]),e("p",{staticClass:"item"},[e("label",[t._v("供应商名称：")]),e("span",[t._v(t._s(n.supplierName))])]),e("p",{staticClass:"item"},[e("label",[t._v("规格：")]),e("span",[t._v(t._s(n.spec))])]),e("p",{staticClass:"item"},[e("label",[t._v("总数：")]),e("span",[t._v(t._s(n.quantity))])]),e("p",{staticClass:"item"},[e("label",[t._v("每件包装数：")]),e("span",[t._v(t._s(n.packQuantity))])]),e("p",{staticClass:"item"},[e("label",[t._v("是否一物一码：")]),e("span",[t._v(t._s(n.isOneBarcode?"是":"否"))])]),e("p",{staticClass:"item"},[e("label",[t._v("采购时间：")]),e("span",[t._v(t._s(n.purchaseTime))])]),e("p",{staticClass:"item"},[e("label",[t._v("入库时间：")]),e("span",[t._v(t._s(n.stockedTime))])])])})),0):e("div",{staticClass:"no-data"},[e("img",{attrs:{src:i("4099")}}),e("p",[t._v("暂无数据哦~")])])]),t.list.length>0&&!t.list[t.activeIndex].isOneBarcode?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-radio-group",{attrs:{name:"buyer"},on:{change:t.changeUnit},model:{value:t.form.buyer,callback:function(e){t.$set(t.form,"buyer",e)},expression:"form.buyer"}},[e("a-radio",{attrs:{value:2}},[t._v("医疗机构")]),e("a-radio",{attrs:{value:1}},[t._v("供应商")])],1)],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(i,n){return e("a-select-option",{key:n,attrs:{value:i.userNo}},[t._v(t._s(i.nickname))])})),1)],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-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)},s=[],o=i("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:null,isSplit:!1,buyer:2},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?(1==this.form.buyer?this.hide=this.$message.loading("正在生成二维码...",0):this.hide=this.$message.loading("保存中...",0),void Object(o["w"])(this.form).then((function(e){200==e.code&&(setTimeout(t.hide,0),t.clearForm(),t.popShow=!1,2==t.form.buyer&&(t.imgList=e.data),setTimeout((function(i){t.hide=t.$message.success(e.msg,0),setTimeout(t.hide,1200),2==t.form.buyer&&t.$emit("showCode",t.imgList)}),500))})).catch((function(e){setTimeout(t.hide,0),setTimeout((function(i){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},changeUnit:function(t){this.unitList=[],this.form.purchaseNo=void 0,this.getUnitList()},getUnitList:function(){var t=this;Object(o["q"])(this.form.buyer).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(o["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,c=(i("7b067"),i("2877")),u=Object(c["a"])(r,n,s,!1,null,"32fc7769",null);e["default"]=u.exports},b3c5:function(t,e,i){},b7a6:function(t,e,i){"use strict";i.d(e,"p",(function(){return r})),i.d(e,"c",(function(){return c})),i.d(e,"i",(function(){return u})),i.d(e,"o",(function(){return l})),i.d(e,"b",(function(){return d})),i.d(e,"h",(function(){return p})),i.d(e,"f",(function(){return m})),i.d(e,"u",(function(){return f})),i.d(e,"d",(function(){return h})),i.d(e,"v",(function(){return b})),i.d(e,"j",(function(){return v})),i.d(e,"a",(function(){return g})),i.d(e,"g",(function(){return _})),i.d(e,"r",(function(){return y})),i.d(e,"q",(function(){return C})),i.d(e,"w",(function(){return j})),i.d(e,"y",(function(){return O})),i.d(e,"e",(function(){return w})),i.d(e,"z",(function(){return k})),i.d(e,"A",(function(){return I})),i.d(e,"s",(function(){return N})),i.d(e,"x",(function(){return S})),i.d(e,"n",(function(){return x})),i.d(e,"t",(function(){return T})),i.d(e,"m",(function(){return $})),i.d(e,"k",(function(){return L})),i.d(e,"l",(function(){return q}));i("99af");var n=i("bc3a"),s=i.n(n),o=i("b775"),a=i("9fb0");function r(){return Object(o["b"])({url:"/api/sys-menu/list",method:"get"})}function c(t,e){return Object(o["b"])({url:"/api/sys-menu",method:e,data:t})}function u(t){var e=t.id;return Object(o["b"])({url:"/api/sys-menu/".concat(e),method:"delete"})}function l(t){return Object(o["b"])({url:"/api/dept/list",method:"post",data:t})}function d(t){return Object(o["b"])({url:"/api/dept/save",method:"post",data:t})}function p(t){var e=t.id;return Object(o["b"])({url:"/api/dept/".concat(e),method:"delete"})}function m(t){var e=t.userId;return Object(o["b"])({url:"/api/user/".concat(e),method:"delete"})}function f(t){return Object(o["b"])({url:"/api/sys/user/resetpwd",method:"post",data:t})}function h(t){return Object(o["b"])({url:"/api/role/save",method:"post",data:t})}function b(){return Object(o["b"])({url:"/api/sys-role/list",method:"get"})}function v(t){var e=t.roleIds;return Object(o["b"])({url:"/api/system/role/".concat(e),method:"delete"})}function g(t){return Object(o["b"])({url:"/api/sys/user/save",method:"post",data:t})}function _(t){var e=t.id;return Object(o["b"])({url:"/api/sys/user/".concat(e),method:"delete"})}function y(t){return Object(o["b"])({url:"/api/consumable/list?udi=".concat(t),method:"get"})}function C(t){return Object(o["b"])({url:"/api/sys-user/list?type=".concat(t),method:"get"})}function j(t){return Object(o["b"])({url:"/api/purchase",method:"post",data:t})}function O(t){return Object(o["b"])({url:"/api/qrcode/scan/".concat(t),method:"get"})}function w(t){return Object(o["b"])({url:"/api/qrcode/".concat(t),method:"get"})}function k(t){return Object(o["b"])({url:"/api/qrcode/usage",method:"post",data:t})}function I(t){return Object(o["b"])({url:"/api/qrcode/charge",method:"post",data:t})}function N(t){return Object(o["b"])({url:"/api/open/qrcode/query?patientIdCard=".concat(t.idCard,"&outpatientNo=").concat(t.outpatientNo),method:"get"})}function S(t){return Object(o["b"])({url:"/api/consumable",method:"post",data:t})}function x(){return Object(o["b"])({url:"/api/sys-dept/list?pid=1",method:"get"})}function T(t){return Object(o["b"])({url:"/api/purchase/batch/".concat(t),method:"get"})}function $(t){return s.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,i=t.entSendName;return Object(o["b"])({url:"/api/bill/query?billCode=".concat(e,"&entSendName=").concat(i),method:"get"})}function q(t){var e=t.code;return Object(o["b"])({url:"/api/bill/storage/".concat(e),method:"get"})}}}]);