(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-66d4789d"],{4099:function(t,e,a){t.exports=a.p+"img/nodata.cbb42a95.png"},b018:function(t,e,a){"use strict";var n=a("5530"),i=(a("99af"),a("a15b"),a("d3b7"),a("ac1f"),a("5319"),a("c1df")),r=a.n(i),s={data:function(){return{advanced:!1,exportLoading:!1,selectedRowKeys:[],pageNum:1,pageSize:10,total:0,tableData:[],tableLoading:!1,queryParams:{},otherParams:{}}},mounted:function(){this.isCancelHttp||this.loadData()},methods:{handleSubmit:function(t){t&&t.preventDefault();var e=this.queryParams,a={};for(var n in e)(e[n]||0===e[n])&&("rangeTime"===n?(a.beginTime=r()(e[n][0]).format("YYYY-MM-DD"),a.endTime=r()(e[n][1]).format("YYYY-MM-DD")):"f3"===n?a.startTime=r()(e[n]).format("YYYY-MM-DD"):a[n]=e[n]);this.queryParams=a,1!==this.pageNum&&(this.pageNum=1),this.loadData()},handleReset:function(){"{}"!==JSON.stringify(this.queryParams)&&(this.queryParams={},this.handleSubmit())},toggleAdvanced:function(){this.advanced=!this.advanced},setUrlQuery:function(t){var e=t.query,a="";if(e){var n=[];for(var i in e)e.hasOwnProperty(i)&&n.push("".concat(i,"=").concat(e[i]));a=-1!==a.indexOf("?")?"".concat(a,"&").concat(n.join("&")):"".concat(a,"?").concat(n.join("&"))}return a},loadData:function(){var t=this;if(this.queryUrl||this.otherParams.queryUrl){var e=Object.assign({pageNum:this.pageNum,pageSize:this.pageSize},this.queryParams,this.otherParams);this.tableLoading=!0;var a=this.otherParams.method||"POST",i="";"get"==a&&(i=this.setUrlQuery({query:Object(n["a"])(Object(n["a"])({},this.queryParams),{},{pageNum:this.pageNum,pageSize:this.pageSize})}),i=i.replace(/undefined/g,"")),this.$http({url:this.otherParams.queryUrl||this.queryUrl+i,method:a,data:"POST"==a?e:{},params:"GET"==a?e:{}}).then((function(e){if(Array.isArray(e.data)){var a=e.data;t.tableData=a}else if(e.data){var n=e.data,i=n.rows,r=n.total,s=n.records,o=n.items;t.tableData=i||s||o||[],t.total=r||0}else{var c=e.rows,d=e.total,u=e.records,l=e.items;t.tableData=c||u||l||[],t.total=d||0}})).catch((function(e){t.$notification.error({message:"失败",description:e.msg})})).finally((function(){t.tableLoading=!1}))}},handleCurrentChange:function(t){this.loadData()},onPageShowSizeChange:function(t,e){Object.assign(this,{pageNum:t,pageSize:e}),this.loadData()},onSelectChange:function(t){this.selectedRowKeys=t},pcsChangeHandle:function(t,e){var a={},n=Object.assign({},this.queryParams);e||(delete n.provinceId,delete n.provinceName,delete n.cityId,delete n.cityName,delete n.strictId,delete n.strictName),e&&1===e.length&&(a.provinceId=e[0].code,a.provinceName=e[0].label,delete n.cityId,delete n.cityName,delete n.strictId,delete n.strictName),e&&2===e.length&&(a.cityId=e[1].code,a.cityName=e[1].label,delete n.strictId,delete n.strictName),e&&3===e.length&&(a.strictId=e[2].code,a.strictName=e[2].label),this.queryParams=Object.assign({},n,a)},rangDateChangeHandle:function(t,e){var a={},n=Object.assign({},this.queryParams);e&&e[0]&&(a.beginTime=e[0]),e&&e[1]&&(a.endTime=e[1]),"{}"===JSON.stringify(a)&&(delete n.beginTime,delete n.endTime),this.queryParams=Object.assign({},n,a)},handleDateQuickChange:function(t){t.startDate?(this.$set(this.queryParams,"rangDate",[r()(t.startDate),r()(t.endDate)]),this.queryParams.beginTime=t.startDate,this.queryParams.endTime=t.endDate):(delete this.queryParams.beginTime,delete this.queryParams.endTime,this.$set(this.queryParams,"rangDate",void 0))}}};e["a"]=s},b7a6:function(t,e,a){"use strict";a.d(e,"p",(function(){return o})),a.d(e,"c",(function(){return c})),a.d(e,"i",(function(){return d})),a.d(e,"o",(function(){return u})),a.d(e,"b",(function(){return l})),a.d(e,"h",(function(){return p})),a.d(e,"f",(function(){return m})),a.d(e,"u",(function(){return f})),a.d(e,"d",(function(){return h})),a.d(e,"v",(function(){return b})),a.d(e,"j",(function(){return g})),a.d(e,"a",(function(){return v})),a.d(e,"g",(function(){return y})),a.d(e,"r",(function(){return O})),a.d(e,"q",(function(){return j})),a.d(e,"w",(function(){return _})),a.d(e,"y",(function(){return w})),a.d(e,"e",(function(){return C})),a.d(e,"z",(function(){return I})),a.d(e,"A",(function(){return D})),a.d(e,"s",(function(){return q})),a.d(e,"x",(function(){return N})),a.d(e,"n",(function(){return S})),a.d(e,"t",(function(){return x})),a.d(e,"m",(function(){return P})),a.d(e,"k",(function(){return k})),a.d(e,"l",(function(){return T}));a("99af");var n=a("bc3a"),i=a.n(n),r=a("b775"),s=a("9fb0");function o(){return Object(r["b"])({url:"/api/sys-menu/list",method:"get"})}function c(t,e){return Object(r["b"])({url:"/api/sys-menu",method:e,data:t})}function d(t){var e=t.id;return Object(r["b"])({url:"/api/sys-menu/".concat(e),method:"delete"})}function u(t){return Object(r["b"])({url:"/api/dept/list",method:"post",data:t})}function l(t){return Object(r["b"])({url:"/api/dept/save",method:"post",data:t})}function p(t){var e=t.id;return Object(r["b"])({url:"/api/dept/".concat(e),method:"delete"})}function m(t){var e=t.userId;return Object(r["b"])({url:"/api/user/".concat(e),method:"delete"})}function f(t){return Object(r["b"])({url:"/api/sys/user/resetpwd",method:"post",data:t})}function h(t){return Object(r["b"])({url:"/api/role/save",method:"post",data:t})}function b(){return Object(r["b"])({url:"/api/sys-role/list",method:"get"})}function g(t){var e=t.roleIds;return Object(r["b"])({url:"/api/system/role/".concat(e),method:"delete"})}function v(t){return Object(r["b"])({url:"/api/sys/user/save",method:"post",data:t})}function y(t){var e=t.id;return Object(r["b"])({url:"/api/sys/user/".concat(e),method:"delete"})}function O(t){return Object(r["b"])({url:"/api/consumable/list?udi=".concat(t),method:"get"})}function j(t){return Object(r["b"])({url:"/api/sys-user/list?type=".concat(t),method:"get"})}function _(t){return Object(r["b"])({url:"/api/purchase",method:"post",data:t})}function w(t){return Object(r["b"])({url:"/api/qrcode/scan/".concat(t),method:"get"})}function C(t){return Object(r["b"])({url:"/api/qrcode/".concat(t),method:"get"})}function I(t){return Object(r["b"])({url:"/api/qrcode/usage",method:"post",data:t})}function D(t){return Object(r["b"])({url:"/api/qrcode/charge",method:"post",data:t})}function q(t){return Object(r["b"])({url:"/api/open/qrcode/query?patientIdCard=".concat(t.idCard,"&outpatientNo=").concat(t.outpatientNo),method:"get"})}function N(t){return Object(r["b"])({url:"/api/consumable",method:"post",data:t})}function S(){return Object(r["b"])({url:"/api/sys-dept/list?pid=1",method:"get"})}function x(t){return Object(r["b"])({url:"/api/purchase/batch/".concat(t),method:"get"})}function P(t){return i.a.post("/api/consumable/excel/import",t,{headers:{Authorization:sessionStorage.getItem(s["a"]),"Content-Type":"multipart/form-data"}})}function k(t){var e=t.billCode,a=t.entSendName;return Object(r["b"])({url:"/api/bill/query?billCode=".concat(e,"&entSendName=").concat(a),method:"get"})}function T(t){var e=t.code;return Object(r["b"])({url:"/api/bill/storage/".concat(e),method:"get"})}},da01:function(t,e,a){},f19a:function(t,e,a){"use strict";a("da01")},f535:function(t,e,a){"use strict";a.r(e);a("99af");var n=function(){var t=this,e=t._self._c;return e("div",{},[e("div",{staticClass:"table-page-search-wrapper"},[e("a-form",{attrs:{layout:"inline"}},[e("a-row",{attrs:{type:"flex",gutter:24}},[e("a-col",{staticStyle:{width:"320px"}},[e("a-form-item",{attrs:{label:"追溯码"}},[e("a-input",{ref:"code",attrs:{placeholder:"输入追溯码"},on:{pressEnter:t.pressEnter},model:{value:t.params.code,callback:function(e){t.$set(t.params,"code",e)},expression:"params.code"}})],1)],1),e("a-col",[e("span",{staticClass:"table-page-search-submitButtons"},[e("a-button",{attrs:{type:"primary",size:"large"},on:{click:t.handleSubmit}},[t._v("确认")])],1)])],1)],1)],1),e("div",{staticClass:"card-body"},[t.tableData.length>0?e("div",{staticClass:"back-box"},[e("div",{staticClass:"info",staticStyle:{"margin-top":"20px"}},[e("p",{staticClass:"title"},[t._v("药品信息")]),e("div",{staticClass:"row"},[e("a-table",{attrs:{bordered:"",columns:t.columns,"row-key":"code","data-source":t.tableData,pagination:!1},scopedSlots:t._u([{key:"id",fn:function(a,n,i){return[e("span",[t._v(t._s(parseInt(i)+1))])]}},{key:"status",fn:function(a){return[e("span",[t._v(t._s(a?"是":"否"))])]}},{key:"operation",fn:function(a,n){return[e("a-popover",{attrs:{placement:"leftTop"}},[e("template",{slot:"content"},[e("div",{staticClass:"code-box"},t._l(n.codeInfos,(function(a,n){return e("p",{key:n},[t._v(t._s(a.code))])})),0)]),e("template",{slot:"title"},[e("span",[t._v("追溯码")])]),e("a",{staticStyle:{color:"#1890ff"}},[t._v("查看追溯码")])],2)]}}],null,!1,2555762050)}),e("div",{staticStyle:{"text-align":"right","margin-top":"24px"}},[e("a-pagination",{attrs:{total:t.total,"show-size-changer":"","show-quick-jumper":"","show-total":function(e){return"共".concat(e,"条记录  第 ").concat(t.pageNum,"页")}},on:{change:t.handleCurrentChange,showSizeChange:t.onPageShowSizeChange},model:{value:t.pageNum,callback:function(e){t.pageNum=e},expression:"pageNum"}})],1)],1)])]):e("div",{staticClass:"no-data"},[e("img",{attrs:{src:a("4099")}}),e("p",[t._v("暂无单据信息！")])])]),t.dataInfo?e("div",{staticClass:"card-body"},[e("a-spin",{attrs:{spinning:t.spinning}},[t.dataInfo?[e("div",{staticClass:"back-box"},[e("div",{staticClass:"info"},[e("p",{staticClass:"title"},[t._v("单据信息")]),e("div",{staticClass:"row"},[e("div",{staticClass:"item"},[e("div",[e("p",[e("label",[t._v("单据编码：")]),e("span",[t._v(t._s(t.dataInfo.billCode))])]),e("p",[e("label",[t._v("单据类型：")]),e("span",[t._v(t._s(t.dataInfo.billType))])]),e("p",[e("label",[t._v("单据类型描述：")]),e("span",[t._v(t._s(t.dataInfo.billTypeName))])]),e("p",[e("label",[t._v("单据日期：")]),e("span",[t._v(t._s(t.dataInfo.storeOutDate))])])]),e("div",[e("p",[e("label",[t._v("发货企业名称：")]),e("span",[t._v(t._s(t.dataInfo.entSendName))])]),e("p",[e("label",[t._v("收货企业名称：")]),e("span",[t._v(t._s(t.dataInfo.entRecvName))])]),e("p",[e("label",[t._v("最后更新时间：")]),e("span",[t._v(t._s(t.dataInfo.updateDate))])])])])])])]),e("a-button",{staticClass:"save-btn",attrs:{type:"primary",icon:"plus"},on:{click:t.save}},[t._v("入库")])]:e("div",{staticClass:"no-data"},[e("img",{attrs:{src:a("4099")}}),e("p",[t._v("暂无单据信息！")])])],2)],1):t._e()])},i=[],r=a("b018"),s=a("b7a6"),o=[{title:"序号",dataIndex:"id",align:"center",width:70,ellipsis:!0,scopedSlots:{customRender:"id"}},{title:"追溯码",dataIndex:"code",align:"center",width:220,ellipsis:!0},{title:"单据编号",dataIndex:"billCode",align:"center",width:240,ellipsis:!0},{title:"药品名称",dataIndex:"prodName",align:"center",width:220,ellipsis:!0},{title:"药品类型",dataIndex:"physicTypeName",align:"center",width:120,ellipsis:!0},{title:"有效期至",dataIndex:"validEndDate",align:"center",width:120,ellipsis:!0},{title:"供应商",dataIndex:"entSendName",align:"center",width:200,ellipsis:!0},{title:"单据日期",dataIndex:"updateDate",align:"center",width:160,ellipsis:!0},{title:"码等级",dataIndex:"codeLevel",align:"center",width:180,ellipsis:!0},{title:"包装数量",dataIndex:"pkgAmount",align:"center",width:100,ellipsis:!0},{title:"制剂数量",dataIndex:"prepnAmount",align:"center",width:100,ellipsis:!0},{title:"是否核验",dataIndex:"status",align:"center",width:100,fixed:"right",scopedSlots:{customRender:"status"}}],c={props:["modelData"],mixins:[r["a"]],computed:{},data:function(){return{columns:o,queryUrl:"",dataInfo:null,params:{code:""},queryParams:{keyword:""},otherParams:{method:"get"},spinning:!1}},created:function(){var t=this;this.$nextTick((function(){t.$refs.code.focus()}))},methods:{handleSubmit:function(){this.save()},getData:function(){var t=this;Object(s["k"])({billCode:this.modelData.billCode,entSendName:this.modelData.entSendName}).then((function(e){200==e.code&&(t.dataInfo=e.data)}))},pressEnter:function(t){this.save()},save:function(){var t=this;Object(s["l"])({code:this.params.code}).then((function(e){200==e.code?(t.$notification.success({message:"成功",description:"入库成功！"}),t.queryUrl="/api/code-info/list",t.loadData(),t.$nextTick((function(){t.$refs.code.focus()}))):t.$notification.error({message:"失败",description:e.msg})})).catch((function(e){t.$notification.error({message:"失败",description:e.msg})}))}}},d=c,u=(a("f19a"),a("2877")),l=Object(u["a"])(d,n,i,!1,null,"79c4ff84",null);e["default"]=l.exports}}]);