|
|
(function(t){function e(e){for(var i,l,r=e[0],n=e[1],c=e[2],u=0,d=[];u<r.length;u++)l=r[u],Object.prototype.hasOwnProperty.call(s,l)&&s[l]&&d.push(s[l][0]),s[l]=0;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);p&&p(e);while(d.length)d.shift()();return o.push.apply(o,c||[]),a()}function a(){for(var t,e=0;e<o.length;e++){for(var a=o[e],i=!0,l=1;l<a.length;l++){var r=a[l];0!==s[r]&&(i=!1)}i&&(o.splice(e--,1),t=n(n.s=a[0]))}return t}var i={},l={app:0},s={app:0},o=[];function r(t){return n.p+"js/"+({home:"home"}[t]||t)+"."+{home:"fd43d6b8"}[t]+".js"}function n(e){if(i[e])return i[e].exports;var a=i[e]={i:e,l:!1,exports:{}};return t[e].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.e=function(t){var e=[],a={home:1};l[t]?e.push(l[t]):0!==l[t]&&a[t]&&e.push(l[t]=new Promise((function(e,a){for(var i="css/"+({home:"home"}[t]||t)+"."+{home:"5235ad9e"}[t]+".css",s=n.p+i,o=document.getElementsByTagName("link"),r=0;r<o.length;r++){var c=o[r],u=c.getAttribute("data-href")||c.getAttribute("href");if("stylesheet"===c.rel&&(u===i||u===s))return e()}var d=document.getElementsByTagName("style");for(r=0;r<d.length;r++){c=d[r],u=c.getAttribute("data-href");if(u===i||u===s)return e()}var p=document.createElement("link");p.rel="stylesheet",p.type="text/css",p.onload=e,p.onerror=function(e){var i=e&&e.target&&e.target.src||s,o=new Error("Loading CSS chunk "+t+" failed.\n("+i+")");o.code="CSS_CHUNK_LOAD_FAILED",o.request=i,delete l[t],p.parentNode.removeChild(p),a(o)},p.href=s;var m=document.getElementsByTagName("head")[0];m.appendChild(p)})).then((function(){l[t]=0})));var i=s[t];if(0!==i)if(i)e.push(i[2]);else{var o=new Promise((function(e,a){i=s[t]=[e,a]}));e.push(i[2]=o);var c,u=document.createElement("script");u.charset="utf-8",u.timeout=120,n.nc&&u.setAttribute("nonce",n.nc),u.src=r(t);var d=new Error;c=function(e){u.onerror=u.onload=null,clearTimeout(p);var a=s[t];if(0!==a){if(a){var i=e&&("load"===e.type?"missing":e.type),l=e&&e.target&&e.target.src;d.message="Loading chunk "+t+" failed.\n("+i+": "+l+")",d.name="ChunkLoadError",d.type=i,d.request=l,a[1](d)}s[t]=void 0}};var p=setTimeout((function(){c({type:"timeout",target:u})}),12e4);u.onerror=u.onload=c,document.head.appendChild(u)}return Promise.all(e)},n.m=t,n.c=i,n.d=function(t,e,a){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(a,i,function(e){return t[e]}.bind(null,i));return a},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n.oe=function(t){throw console.error(t),t};var c=window["webpackJsonp"]=window["webpackJsonp"]||[],u=c.push.bind(c);c.push=e,c=c.slice();for(var d=0;d<c.length;d++)e(c[d]);var p=u;o.push([0,"chunk-vendors"]),a()})({0:function(t,e,a){t.exports=a("56d7")},"0019":function(t,e,a){},"01fd":function(t,e,a){},"02b1":function(t,e,a){"use strict";a("7129")},"0563":function(t,e,a){"use strict";a("668f")},"074f":function(t,e,a){"use strict";a("65ab")},"07cf":function(t,e,a){"use strict";a("9cb8")},"0930":function(t,e,a){},"0d61":function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"g",(function(){return s})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return r})),a.d(e,"d",(function(){return n})),a.d(e,"e",(function(){return c})),a.d(e,"f",(function(){return u}));var i=a("a27e");function l(t){return Object(i["a"])({url:"/warehouse/info/company",method:"get",params:t})}function s(t){return Object(i["a"])({url:"/warehouse/info/modifyCompany",method:"post",data:t})}function o(t){return Object(i["a"])({url:"/sale/info/refid",method:"get",params:t})}function r(t){return Object(i["a"])({url:"/salewarehouse/register/checkCompany",method:"get",params:t})}function n(t){return Object(i["a"])({url:"/salewarehouse/register/getRegisterConfig",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/sale/info/getSubCompany",method:"get",params:t})}function u(t){return Object(i["a"])({url:"/sale/info/getSubCompany2",method:"get",params:t})}},"0f13":function(t,e,a){},"0f56":function(t,e,a){"use strict";a("d9f5")},1164:function(t,e,a){"use strict";a("7da8")},"11d0":function(t,e,a){},"12c6":function(t,e,a){"use strict";a("1678")},"135d":function(t,e,a){},"14b3":function(t,e,a){},1558:function(t,e,a){},1678:function(t,e,a){},"178e":function(t,e,a){},"17af":function(t,e,a){"use strict";a("e130")},"1d4b":function(t,e,a){},"1edb":function(t,e,a){},"214c":function(t,e,a){},"22c3":function(t,e,a){"use strict";a("bb5e")},"265e":function(t,e,a){},2852:function(t,e,a){},"28f8":function(t,e,a){"use strict";a("5b27")},"2aae":function(t,e,a){},"2dae":function(t,e,a){},"2ea8":function(t,e,a){"use strict";a("ea54")},"2eef":function(t,e,a){},"2fd6":function(t,e,a){},"319d":function(t,e,a){"use strict";a("646d")},3340:function(t,e,a){},"337a":function(t,e,a){"use strict";a("ecd9")},3439:function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return r}));a("863e"),a("8058");var i=a("bc3a"),l=a.n(i),s=a("a27e"),o="",r="",n="";l.a.get("./config.json").then((function(t){o=t.data.BASE_URL,r=t.data.SERVER_IP,s["a"].defaults.baseURL=o}))},3991:function(t,e,a){"use strict";a("5b08")},"39e2":function(t,e,a){t.exports=a.p+"img/glxplogo.b6cb1645.png"},"3c47":function(t,e,a){"use strict";a("2dae")},"3ea7":function(t,e,a){"use strict";a("74b8")},"3f2c":function(t,e,a){"use strict";a("135d")},4266:function(t,e,a){"use strict";a("bbd0")},4360:function(t,e,a){"use strict";a("8bbf");var i,l=a("5880"),s=a.n(l),o=a("63e0"),r=a("94d5"),n=(a("ac4d"),a("8a81"),a("5df3"),a("1c4c"),a("6b54"),a("ade3")),c=a("3835"),u=(a("ac6a"),a("7f7f"),a("2909")),d=a("da6f"),p="TOGGLE_SIDEBAR",m="SHOW_SIDEBAR",h="ADD_VISITED_VIEWS",f="DEL_VISITED_VIEWS",g="RECEIVE_ADMIN_ID",y="RECEIVE_ADMIN_TOKEN",b="RECEIVE_ADMIN_NAME",v="RECEIVE_ADMIN_EMPLOYEE_NAME",w="RECEIVE_ADMIN_AVATAR",x="RECEIVE_ADMIN_AUTH_RULES",D="RECEIVE_ROUTERS",C="RECEIVE_CUSTOMERID",k="RECEIVE_COMPANYNAME";function Q(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=S(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var i=0,l=function(){};return{s:l,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,r=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){r=!0,s=t},f:function(){try{o||null==a.return||a.return()}finally{if(r)throw s}}}}function S(t,e){if(t){if("string"===typeof t)return _(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=new Array(e);a<e;a++)i[a]=t[a];return i}var $,T={sidebar:{opened:!+Object(d["a"])("sidebarStatus")},visitedViews:[]},L={sidebar:function(t){return t.sidebar},visitedViews:function(t){return t.visitedViews}},O={ToggleSideBar:function(t){var e=t.commit;e(p)},ShowSideBar:function(t){var e=t.commit;e(m)},addVisitedViews:function(t,e){var a=t.commit;a(h,e)},delVisitedViews:function(t,e){var a=t.commit,i=t.state;return new Promise((function(t){a(f,e),t(Object(u["a"])(i.visitedViews))}))}},z=(i={},Object(n["a"])(i,p,(function(t){t.sidebar.opened?Object(d["c"])("sidebarStatus",1,365):Object(d["c"])("sidebarStatus",0,365),t.sidebar.opened=!t.sidebar.opened})),Object(n["a"])(i,m,(function(t){t.sidebar.opened&&Object(d["c"])("sidebarStatus",1,365),t.sidebar.opened=!1})),Object(n["a"])(i,h,(function(t,e){t.visitedViews.some((function(t){return t.path===e.path}))||t.visitedViews.push({name:e.name,path:e.path})})),Object(n["a"])(i,f,(function(t,e){var a,i,l=Q(t.visitedViews.entries());try{for(l.s();!(i=l.n()).done;){var s=Object(c["a"])(i.value,2),o=s[0],r=s[1];if(r.path===e.path){a=o;break}}}catch(n){l.e(n)}finally{l.f()}t.visitedViews.splice(a,1)})),i),I={state:T,getters:L,actions:O,mutations:z},N=a("7401"),F=a("a18c"),q=a("5f87"),V=a("5f72"),R={adminId:Object(q["a"])(),userName:"",employeeName:"",avatar:"",token:Object(q["d"])(),authRules:[],routers:F["b"],customerId:Object(q["c"])(),companyName:Object(q["b"])()},E={adminId:function(t){return t.adminId},userName:function(t){return t.userName},employeeName:function(t){return t.employeeName},avatar:function(t){return t.avatar},token:function(t){return t.token},authRules:function(t){return t.authRules},routers:function(t){return t.routers},customerId:function(t){return t.customerId},companyName:function(t){return t.companyName}},j={loginName:function(t,e){var a=t.commit;console.log(e.userName+"=----"+e.pwd);var i=e.userName?e.userName.trim():"",l=e.pwd?e.pwd:"";return new Promise((function(t,e){Object(N["a"])(i,l).then((function(e){if(console.log(e),2e4!=e.code)Object(V["Message"])({message:e.message,type:"error",duration:5e3});else{var i=e.data;a(g,i.id),a(y,i.token),a(x,[]),a(C,""),a(k,"")}t(e)})).catch((function(t){e(t)}))}))},userInfo:function(t){var e=t.commit;return new Promise((function(t,a){Object(N["d"])().then((function(i){console.log("````````1````````"),console.log("````````2````````"),console.log("````````3````````"),console.log(i),console.log("````````3````````"),console.log("````````2````````"),console.log("````````1````````"),console.log(i.code+"---"+i.data),console.log(i.data),2e4!==i.code&&a("登录失效");var l=i.data||{};console.log(l.userName+"--"+l.authRules),e(b,l.userName),e(v,l.employeeName),e(w,l.avatar),e(x,l.authRules),e(C,l.customerId),e(k,l.companyName),t(l)})).catch((function(t){a(t)}))}))},loginOut:function(t){var e=t.commit;return new Promise((function(t,a){Object(N["b"])().then((function(){e(g,""),e(y,""),e(x,[]),e(C,""),e(k,""),t()})).catch((function(t){a(t)}))}))},fedLogout:function(t){var e=t.commit;return new Promise((function(t){e(g,""),e(y,""),e(x,[]),e(C,""),e(k,""),t()}))},filterRouter:function(t,e){var a=t.commit,i=e.accessedRouters;i&&i.length>0&&a(D,i)}},P=($={},Object(n["a"])($,g,(function(t,e){t.adminId=e,""===e?Object(q["e"])():Object(q["i"])(e)})),Object(n["a"])($,y,(function(t,e){t.token=e,""===e?Object(q["h"])():Object(q["l"])(e)})),Object(n["a"])($,C,(function(t,e){t.customerId=e,""===e?Object(q["g"])():Object(q["k"])(e)})),Object(n["a"])($,k,(function(t,e){t.companyName=e,""===e?Object(q["f"])():Object(q["j"])(e)})),Object(n["a"])($,b,(function(t,e){t.userName=e})),Object(n["a"])($,v,(function(t,e){t.employeeName=e})),Object(n["a"])($,w,(function(t,e){t.avatar=e})),Object(n["a"])($,x,(function(t,e){t.authRules=e})),Object(n["a"])($,D,(function(t,e){var a=F["b"].concat(e);t.routers=JSON.parse(JSON.stringify(a))})),$),B={state:R,getters:E,actions:j,mutations:P};var U=!1;e["a"]=new s.a.Store({actions:o,getters:r,modules:{app:I,admin:B},strict:U})},"43ef":function(t,e,a){"use strict";a.r(e),a.d(e,"timeAgo",(function(){return s})),a.d(e,"parseTime",(function(){return o})),a.d(e,"rTime",(function(){return r})),a.d(e,"formatTime",(function(){return n})),a.d(e,"nFormatter",(function(){return c})),a.d(e,"html2Text",(function(){return u})),a.d(e,"toThousandslsFilter",(function(){return d})),a.d(e,"renderSize",(function(){return p}));a("6b54"),a("a481");var i=a("53ca");a("c5f6");function l(t,e){return 1===t?t+e:t+e+"s"}function s(t){var e=Date.now()/1e3-Number(t);return e<3600?l(~~(e/60)," minute"):e<86400?l(~~(e/3600)," hour"):l(~~(e/86400)," day")}function o(t,e){if(0===arguments.length)return null;10===(t+"").length&&(t=1e3*+t);var a,l=e||"{y}-{m}-{d} {h}:{i}:{s}";a="object"===Object(i["a"])(t)?t:new Date(parseInt(t));var s={y:a.getFullYear(),m:a.getMonth()+1,d:a.getDate(),h:a.getHours(),i:a.getMinutes(),s:a.getSeconds(),a:a.getDay()},o=l.replace(/{(y|m|d|h|i|s|a)+}/g,(function(t,e){var a=s[e];return"a"===e?["一","二","三","四","五","六","日"][a-1]:(t.length>0&&a<10&&(a="0"+a),a||0)}));return o}function r(t){var e=new Date(t).toJSON();return new Date(new Date(e)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"")}function n(t,e){t=1e3*+t;var a=new Date(t),i=Date.now(),l=(i-a)/1e3;return l<30?"刚刚":l<3600?Math.ceil(l/60)+"分钟前":l<86400?Math.ceil(l/3600)+"小时前":l<172800?"1天前":e?o(t,e):a.getMonth()+1+"月"+a.getDate()+"日"+a.getHours()+"时"+a.getMinutes()+"分"}function c(t,e){for(var a=[{value:1e18,symbol:"E"},{value:1e15,symbol:"P"},{value:1e12,symbol:"T"},{value:1e9,symbol:"G"},{value:1e6,symbol:"M"},{value:1e3,symbol:"k"}],i=0;i<a.length;i++)if(t>=a[i].value)return(t/a[i].value+.1).toFixed(e).replace(/\.0+$|(\.[0-9]*[1-9])0+$/,"$1")+a[i].symbol;return t.toString()}function u(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}function d(t){return(+t||0).toString().replace(/^-?\d+/g,(function(t){return t.replace(/(?=(?!\b)(\d{3})+$)/g,",")}))}function p(t){if(!t||null===t||""===t)return"";var e=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],a=parseFloat(t),i=Math.floor(Math.log(a)/Math.log(1024)),l=a/Math.pow(1024,i);return l=l.toFixed(0),l+e[i]}},"449c":function(t,e,a){},"456c":function(t,e,a){},"485b":function(t,e,a){"use strict";a.d(e,"d",(function(){return l})),a.d(e,"e",(function(){return s})),a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return n})),a.d(e,"f",(function(){return c}));var i=a("a27e");function l(t){return Object(i["a"])({url:"/salewarehouse/register/list",method:"get",params:t})}function s(t){return Object(i["a"])({url:"/salewarehouse/register/save",method:"post",data:t})}function o(t){return Object(i["a"])({url:"/salewarehouse/register/check",method:"post",data:t})}function r(t){return Object(i["a"])({url:"/salewarehouse/register/getCheckcode",method:"post",data:t})}function n(t){return Object(i["a"])({url:"/salewarehouse/register/deleteResiter",method:"post",data:t})}function c(t){return Object(i["a"])({url:"/salewarehouse/reset/passwd",method:"post",data:t})}},4926:function(t,e,a){"use strict";a("cbba")},"4e21":function(t,e,a){"use strict";a("b255")},"50a2":function(t,e,a){"use strict";a("1edb")},"56d7":function(t,e,a){"use strict";a.r(e);a("456d"),a("ac6a"),a("cadf"),a("551c"),a("f751"),a("097d"),a("db4d");var i=a("8bbf"),l=a.n(i),s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"app"}},[a("router-view")],1)},o=[],r={name:"app"},n=r,c=(a("5c0b"),a("2877")),u=Object(c["a"])(n,s,o,!1,null,null,null),d=u.exports,p=a("5f72"),m=a.n(p),h=(a("0fae"),a("a18c")),f=a("4360");a("0fae"),l.a.use(m.a,{size:"small",zIndex:3e3}),l.a.use(p["Pagination"]),l.a.use(p["Dialog"]),l.a.use(p["Autocomplete"]),l.a.use(p["Dropdown"]),l.a.use(p["DropdownMenu"]),l.a.use(p["DropdownItem"]),l.a.use(p["Menu"]),l.a.use(p["Submenu"]),l.a.use(p["MenuItem"]),l.a.use(p["MenuItemGroup"]),l.a.use(p["Input"]),l.a.use(p["InputNumber"]),l.a.use(p["Radio"]),l.a.use(p["RadioGroup"]),l.a.use(p["RadioButton"]),l.a.use(p["Checkbox"]),l.a.use(p["CheckboxButton"]),l.a.use(p["CheckboxGroup"]),l.a.use(p["Switch"]),l.a.use(p["Select"]),l.a.use(p["Option"]),l.a.use(p["OptionGroup"]),l.a.use(p["Button"]),l.a.use(p["ButtonGroup"]),l.a.use(p["Table"]),l.a.use(p["TableColumn"]),l.a.use(p["DatePicker"]),l.a.use(p["TimeSelect"]),l.a.use(p["TimePicker"]),l.a.use(p["Popover"]),l.a.use(p["Tooltip"]),l.a.use(p["Breadcrumb"]),l.a.use(p["BreadcrumbItem"]),l.a.use(p["Form"]),l.a.use(p["FormItem"]),l.a.use(p["Tabs"]),l.a.use(p["TabPane"]),l.a.use(p["Tag"]),l.a.use(p["Tree"]),l.a.use(p["Alert"]),l.a.use(p["Slider"]),l.a.use(p["Icon"]),l.a.use(p["Row"]),l.a.use(p["Col"]),l.a.use(p["Upload"]),l.a.use(p["Progress"]),l.a.use(p["Badge"]),l.a.use(p["Card"]),l.a.use(p["Rate"]),l.a.use(p["Steps"]),l.a.use(p["Step"]),l.a.use(p["Carousel"]),l.a.use(p["CarouselItem"]),l.a.use(p["Collapse"]),l.a.use(p["CollapseItem"]),l.a.use(p["Cascader"]),l.a.use(p["ColorPicker"]),l.a.use(p["Transfer"]),l.a.use(p["Container"]),l.a.use(p["Header"]),l.a.use(p["Aside"]),l.a.use(p["Main"]),l.a.use(p["Footer"]),l.a.use(p["Loading"].directive),l.a.prototype.$loading=p["Loading"].service,l.a.prototype.$msgbox=p["MessageBox"],l.a.prototype.$alert=p["MessageBox"].alert,l.a.prototype.$confirm=p["MessageBox"].confirm,l.a.prototype.$prompt=p["MessageBox"].prompt,l.a.prototype.$notify=p["Notification"],l.a.prototype.$message=p["Message"];var g=a("43ef"),y=(a("8e6e"),a("ade3")),b=a("323e"),v=a.n(b),w=(a("a5d8"),a("5f87"));function x(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function D(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?x(Object(a),!0).forEach((function(e){Object(y["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function C(t,e){return!(!t||t.length<=0)&&(t.indexOf("admin")>=0||(!e||t.some((function(t){return e.indexOf(t)>=0}))))}function k(t,e){return t.indexOf("admin")>=0||!e.meta||!e.meta.authRule||t.some((function(t){return e.meta.authRule.indexOf(t)>=0}))}function Q(t,e){var a=t.filter((function(t){return!!k(e,t)&&(t.children&&t.children.length&&(t.children=Q(t.children,e)),!0)}));return a}var S=["/login","/401","/404","/500","/register","/registerApp","/forgetPasswd","/pcIntent"];h["c"].beforeEach((function(t,e,a){if(v.a.start(),-1===S.indexOf(t.path)){var i=Object(w["a"])();if(console.log("-----------------"+i+"啥情况"),"undefined"!==i&&""!==i&&i)return"/login"===t.path?(a({path:"/"}),void v.a.done()):f["a"].getters.userName||f["a"].getters.authRules&&0!==f["a"].getters.authRules.length?C(f["a"].getters.authRules,t.meta.authRule)?void a():(a({path:"/401",query:{noGoBack:!0}}),void v.a.done()):void f["a"].dispatch("userInfo").then((function(e){var i=e.authRules||[];if(!(i instanceof Array)||0===i.length)return p["Message"].error("权限验证失败,请联系管理员~"),a({path:"/login",query:{noGoBack:!0}}),void v.a.done();var l=Q(h["a"],i);h["c"].addRoutes(l),a(D({},t)),f["a"].dispatch("filterRouter",{accessedRouters:l}).then((function(){}))})).catch((function(){f["a"].dispatch("fedLogout").then((function(){p["Message"].error("验证失败,请重新登录");var e=t.fullPath;f["a"].dispatch("loginOut").then((function(){a({path:"/login",query:{redirect:e}})}))}))}));var l=t.fullPath;f["a"].dispatch("loginOut").then((function(){a({path:"/login",query:{redirect:l}})})),v.a.done()}else a()})),h["c"].afterEach((function(){v.a.done()}));var _={install:function(t,e){t.prototype.$isBlank=function(t){return void 0===t||null===t||""===t},t.prototype.$isNotBlank=function(t){return void 0!==t&&null!==t&&""!==t}}},$=(a("6f3b"),function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.iconClass?a("svg",{staticClass:"svg-icon",attrs:{"aria-hidden":"true"}},[a("use",{attrs:{"xlink:href":t.iconName}})]):t._e()}),T=[],L={name:"icon-svg",props:{iconClass:{type:String,required:!0}},computed:{iconName:function(){return"#icon-".concat(this.iconClass)}}},O=L,z=Object(c["a"])(O,$,T,!1,null,null,null),I=z.exports,N=(a("3439"),a("bc3a")),F=a.n(N),q=(a("8058"),a("a27e"));l.a.component("icon-svg",I),F.a.defaults.withCredentials=!0,Object.keys(g).forEach((function(t){l.a.filter(t,g[t])})),l.a.use(_),l.a.use(m.a),l.a.config.productionTip=!1;var V="",R=function(){F.a.get("./config.json").then((function(t){V=t.data.BASE_URL,q["a"].defaults.baseURL=V,new l.a({router:h["c"],store:f["a"],render:function(t){return t(d)}}).$mount("#app")}))};R()},"575e":function(t,e,a){"use strict";a("2852")},5830:function(t,e,a){"use strict";a("d4ff")},5880:function(t,e){t.exports=Vuex},"5b08":function(t,e,a){},"5b27":function(t,e,a){},"5c0b":function(t,e,a){"use strict";a("5e27")},"5da4":function(t,e,a){"use strict";a("5e36")},"5e27":function(t,e,a){},"5e36":function(t,e,a){},"5f72":function(t,e){t.exports=ELEMENT},"5f87":function(t,e,a){"use strict";a.d(e,"d",(function(){return n})),a.d(e,"l",(function(){return c})),a.d(e,"h",(function(){return u})),a.d(e,"a",(function(){return d})),a.d(e,"i",(function(){return p})),a.d(e,"e",(function(){return m})),a.d(e,"c",(function(){return h})),a.d(e,"k",(function(){return f})),a.d(e,"g",(function(){return g})),a.d(e,"b",(function(){return y})),a.d(e,"j",(function(){return b})),a.d(e,"f",(function(){return v}));var i=a("da6f"),l="ADMIN-ID",s="ADMIN-TOKEN",o="customerId",r="companyName";function n(){return Object(i["a"])(s)}function c(t){return Object(i["c"])(s,t,365)}function u(){return Object(i["b"])(s)}function d(){return Object(i["a"])(l)}function p(t){return Object(i["c"])(l,t,365)}function m(){return Object(i["b"])(l)}function h(){return Object(i["a"])(o)}function f(t){return Object(i["c"])(o,t)}function g(){return Object(i["b"])(o)}function y(){return Object(i["a"])(r)}function b(t){return Object(i["c"])(r,t)}function v(){return Object(i["b"])(r)}},6194:function(t,e,a){"use strict";a("11d0")},6389:function(t,e){t.exports=VueRouter},"63e0":function(t,e){},"646d":function(t,e,a){},"65ab":function(t,e,a){},"668f":function(t,e,a){},"683b":function(t,e,a){},"69a2":function(t,e,a){},"6f3b":function(t,e){(function(t){var e='<svg><symbol id="icon-tongyong" viewBox="0 0 1024 1024"><path d="M733.717333 550.08c-101.418667 0-183.616 82.218667-183.616 183.594667 0 101.418667 82.218667 183.637333 183.616 183.637333C835.093333 917.333333 917.333333 835.114667 917.333333 733.696 917.333333 632.298667 835.114667 550.08 733.717333 550.08zM733.717333 874.133333c-77.589333 0-140.416-62.869333-140.416-140.437333s62.826667-140.416 140.416-140.416c77.546667 0 140.416 62.848 140.416 140.416S811.242667 874.133333 733.717333 874.133333z" ></path><path d="M401.28 473.024 199.722667 473.024C160.170667 473.024 128 440.853333 128 401.301333L128 199.722667C128 160.170667 160.170667 128 199.722667 128l201.557333 0c39.552 0 71.722667 32.170667 71.722667 71.722667l0 201.557333C473.024 440.853333 440.832 473.024 401.28 473.024zM199.722667 170.666667C183.701333 170.666667 170.666667 183.701333 170.666667 199.722667l0 201.557333c0 16.021333 13.034667 29.056 29.056 29.056l201.557333 0c16.021333 0 29.056-13.034667 29.056-29.056L430.336 199.722667C430.336 183.701333 417.301333 170.666667 401.28 170.666667L199.722667 170.666667z" ></path><path d="M824.256 473.024l-201.536 0c-39.552 0-71.744-32.170667-71.744-71.722667L550.976 199.722667c0-39.552 32.213333-71.722667 71.744-71.722667l201.536 0C863.786667 128 896 160.170667 896 199.722667l0 201.557333C896 440.853333 863.786667 473.024 824.256 473.024zM622.698667 170.666667c-16.042667 0-29.077333 13.034667-29.077333 29.056l0 201.557333c0 16.021333 13.034667 29.056 29.077333 29.056l201.493333 0c16.085333 0 29.077333-13.034667 29.077333-29.056L853.269333 199.722667C853.290667 183.701333 840.298667 170.666667 824.213333 170.666667L622.698667 170.666667z" ></path><path d="M401.28 896 199.722667 896C160.170667 896 128 863.808 128 824.277333L128 622.72c0-39.552 32.170667-71.722667 71.722667-71.722667l201.557333 0c39.552 0 71.722667 32.192 71.722667 71.722667l0 201.536C473.024 863.808 440.832 896 401.28 896zM199.722667 593.642667C183.701333 593.642667 170.666667 606.677333 170.666667 622.677333l0 201.578667c0 16 13.034667 29.034667 29.056 29.034667l201.557333 0c16.021333 0 29.056-13.034667 29.056-29.034667l0-201.578667c0-16-13.034667-29.034667-29.056-29.034667L199.722667 593.642667z" ></path></symbol><symbol id="icon-wxbzhanghu" viewBox="0 0 1024 1024"><path d="M917.901055 147.245575 128.015094 147.245575c-32.090882 0-58.18826 26.075889-58.18826 58.125839l0 567.459103c0 32.04688 26.097378 58.125839 58.18826 58.125839l789.885961 0c32.132838 0 58.168818-26.076912 58.168818-58.125839L976.069873 205.371414C976.068849 173.321464 950.033893 147.245575 917.901055 147.245575M932.999938 772.830517c0 8.243755-6.771217 15.056927-15.099906 15.056927L128.015094 787.887444c-8.3072 0-15.120372-6.813173-15.120372-15.056927L112.894721 205.371414c0-8.243755 6.813173-15.057951 15.120372-15.057951l789.885961 0c8.328689 0 15.099906 6.814196 15.099906 15.057951L933.000961 772.830517z" ></path><path d="M432.709631 511.054465c31.585369-24.14184 52.405557-61.827137 52.405557-104.474446 0-72.677253-59.092863-131.813095-131.729184-131.813095-72.636321 0-131.729184 59.134819-131.729184 131.813095 0 42.647309 20.797675 80.332606 52.405557 104.474446-70.406536 30.703279-119.846552 100.857059-119.846552 182.535313 0 11.861142 9.610892 21.534456 21.534456 21.534456 11.881608 0 21.534456-9.673313 21.534456-21.534456 0-84.706217 67.818595-153.515373 151.937434-155.701155 1.429559 0 2.734274 0.419556 4.163833 0.419556 1.428535 0 2.734274-0.419556 4.119831-0.419556 84.201727 2.187829 152.000879 70.994937 152.000879 155.701155 0 11.861142 9.631358 21.534456 21.534456 21.534456s21.534456-9.673313 21.534456-21.534456C552.577672 611.911524 503.116167 541.757744 432.709631 511.054465M264.726755 406.581042c0-48.957015 39.745213-88.745207 88.661296-88.745207 48.872081 0 88.660272 39.788192 88.660272 88.745207 0 47.441499-37.600363 85.967954-84.538395 88.23867-1.385557-0.083911-2.691295-0.420579-4.119831-0.420579-1.429559 0-2.735297 0.336668-4.163833 0.420579C302.285163 492.547972 264.726755 454.022541 264.726755 406.581042" ></path><path d="M846.863139 314.13556 558.886355 314.13556c-11.945053 0-21.534456 9.673313-21.534456 21.533432 0 11.861142 9.589402 21.534456 21.534456 21.534456l287.976784 0c11.904121 0 21.534456-9.673313 21.534456-21.534456C868.397594 323.808874 858.76726 314.13556 846.863139 314.13556" ></path><path d="M846.863139 446.957635 558.886355 446.957635c-11.945053 0-21.534456 9.589402-21.534456 21.533432 0 11.861142 9.589402 21.534456 21.534456 21.534456l287.976784 0c11.904121 0 21.534456-9.673313 21.534456-21.534456C868.397594 456.547037 858.76726 446.957635 846.863139 446.957635" ></path><path d="M846.863139 579.778686 601.954243 579.778686c-11.94403 0-21.533432 9.589402-21.533432 21.533432 0 11.861142 9.589402 21.534456 21.533432 21.534456l244.908896 0c11.904121 0 21.534456-9.673313 21.534456-21.534456C868.397594 589.369112 858.76726 579.778686 846.863139 579.778686" ></path></symbol><symbol id="icon-gongyongquan1" viewBox="0 0 1024 1024"><path d="M512.01842 848.076268c-185.231725 0-335.908446-151.291728-335.908446-336.375074 0-185.045483 150.675698-335.608617 335.908446-335.608617 185.213305 0 335.890027 150.544715 335.890027 335.608617C847.908446 696.78454 697.231725 848.076268 512.01842 848.076268zM512 138.493238c-206.290343 0-373.506762 167.216419-373.506762 373.506762s167.216419 373.507786 373.506762 373.507786c206.291366 0 373.506762-167.216419 373.506762-373.507786S718.291366 138.493238 512 138.493238z" ></path></symbol><symbol id="icon-user" viewBox="0 0 1024 1024"><path d="M576 706.624l0-52.768c70.496-39.712 128-138.784 128-237.824 0-159.072 0-288-192-288s-192 128.928-192 288c0 99.072 57.504 198.112 128 237.824l0 52.768c-217.088 17.76-384 124.416-384 253.376l896 0c0-128.96-166.912-235.648-384-253.376z" ></path></symbol><symbol id="icon-shezhi1" viewBox="0 0 1024 1024"><path d="M512.008698 392.128889c-66.216097 0-119.872135 53.674457-119.872135 119.872135s53.657061 119.872135 119.872135 119.872135c66.179258 0 119.871111-53.674457 119.871111-119.872135S578.187957 392.128889 512.008698 392.128889zM512.008698 583.923076c-39.72577 0-71.924099-32.19833-71.924099-71.923076 0-39.72577 32.19833-71.923076 71.924099-71.923076 39.70735 0 71.90568 32.197306 71.90568 71.923076C583.913355 551.724747 551.715025 583.923076 512.008698 583.923076zM818.252521 405.810492l-5.619998-1.837858c-3.441379-9.614985-7.330966-19.033495-11.629875-28.219715l2.64013-5.208629c12.719696-15.269775 19.62292-34.302247 19.62292-54.441936 0-22.778796-8.865925-44.185338-24.974811-60.273758l-30.127158-30.128181c-16.10684-16.107863-37.512359-24.972764-60.274782-24.972764-20.120246 0-39.153742 6.938016-54.440913 19.639293l-5.190209 2.639107c-9.169847-4.316306-18.587334-8.205892-28.220738-11.648294l-1.855254-5.653767c-3.994987-43.275619-40.546461-77.292364-84.874039-77.292364l-42.614563 0c-44.344974 0-80.895425 34.035164-84.891436 77.345576l-1.818415 5.583159c-9.614985 3.426029-18.99768 7.313569-28.149107 11.595083l-5.439896-2.693342c-15.251356-12.629645-34.231639-19.514449-54.299697-19.514449-22.744004 0-44.131103 8.864902-60.238966 24.955368l-30.146601 30.146601c-16.10684 16.089443-24.991184 37.495986-24.991184 60.273758 0 20.068058 6.885827 39.065737 19.550265 54.317093l2.674922 5.423523c-4.281513 9.097192-8.133238 18.444071-11.558244 28.02324l-5.816472 1.944282c-43.23878 4.102435-77.166497 40.61707-77.166497 84.873016l0 42.632983c0 44.255946 33.927717 80.770582 77.166497 84.873016l5.816472 1.943258c3.425006 9.579169 7.312546 18.944468 11.558244 28.024264l-2.693342 5.458315c-12.647041 15.233959-19.532869 34.249035-19.532869 54.299697 0 22.7614 8.884344 44.166919 24.991184 60.257385l30.128181 30.146601c16.090467 16.10684 37.495986 24.972764 60.257385 24.972764 20.067035 0 39.065737-6.885827 54.299697-19.514449l5.439896-2.710738c9.133008 4.281513 18.48091 8.133238 28.04166 11.559267l1.961678 5.867638c4.085038 43.185568 40.581254 77.096912 84.85562 77.096912l42.614563 0c44.274366 0 80.771605-33.911344 84.874039-77.096912l1.962701-5.867638c9.577123-3.443425 18.97926-7.313569 28.077475-11.595083l5.244444 2.64013c15.287171 12.700253 34.320667 19.621896 54.423517 19.621896 22.780843 0 44.167942-8.865925 60.274782-24.972764l30.127158-30.146601c16.108886-16.090467 24.974811-37.495986 24.974811-60.257385 0-20.139689-6.921643-39.172161-19.640316-54.459333l-2.64013-5.191232c4.317329-9.168824 8.188496-18.587334 11.648294-28.238135l5.655813-1.836835c43.293015-4.01443 77.30976-40.546461 77.30976-84.873016l0-42.632983C895.598096 446.373327 861.562932 409.822876 818.252521 405.810492zM847.720669 532.995173c0 23.190165-18.782785 41.955554-41.955554 41.955554l-31.216979 10.239202c-5.976108 21.47715-14.412244 41.865503-25.133424 60.845787l14.806217 29.201066c16.393365 16.374946 16.393365 42.954301 0 59.329247l-29.665647 29.683043c-8.204869 8.205892-18.943444 12.290931-29.68202 12.290931s-21.47715-4.085038-29.665647-12.290931l-29.235858-14.806217c-18.889209 10.70276-39.189557 19.086707-60.540841 25.045419l-10.488889 31.323403c0 23.153326-18.784832 41.919738-41.955554 41.919738l-41.97295 0c-23.172769 0-41.955554-18.766412-41.955554-41.919738l-10.488889-31.323403c-21.280676-5.921873-41.508369-14.270005-60.346413-24.902156l-29.433356 14.662955c-8.187473 8.205892-18.944468 12.290931-29.68202 12.290931-10.738575 0-21.459754-4.085038-29.664623-12.290931l-29.664623-29.683043c-16.393365-16.374946-16.393365-42.954301 0-59.329247l14.645558-29.469172c-10.613732-18.801205-18.944468-39.065737-24.920576-60.327994l-31.270191-10.488889c-23.171746 0-41.955554-18.765389-41.955554-41.955554l0-41.97295c0-23.171746 18.783809-41.97295 41.955554-41.97295l31.270191-10.488889c5.957689-21.263279 14.288424-41.509393 24.920576-60.329017l-14.645558-29.413913c-16.393365-16.394389-16.393365-42.990117 0-59.383482l29.664623-29.6636c8.205892-8.188496 18.926048-12.290931 29.664623-12.290931 10.737552 0 18.801205 0.034792 27.131941 8.348132l29.913287 14.895245c19.194154-10.863419 39.850613-19.354813 61.57745-25.384134l11.326976-27.113521c0-23.172769 18.782785-41.955554 41.955554-41.955554l41.97295 0c23.170722 0 41.955554 18.782785 41.955554 41.955554l10.254551 31.215956c21.441335 5.976108 41.86755 14.394848 60.82839 25.151843l29.182646-14.82259c8.188496-8.188496 21.781072-16.429181 32.680307-16.429181s18.463514 8.240685 26.668383 16.429181l29.665647 29.6636c16.393365 16.394389 16.393365 42.990117 0 59.383482l-14.770402 29.218462c10.721179 18.961864 19.138896 39.368636 25.115004 60.809971l31.198559 10.204409c23.172769 0 41.955554 18.801205 41.955554 41.97295L847.719646 532.995173z" ></path></symbol><symbol id="icon-user-guanli" viewBox="0 0 1024 1024"><path d="M532.136998 608.915021c16.870605 2.780601 33.617222-8.342819 36.644784-25.645352 3.089557-17.179561-8.403797-33.617222-25.645352-36.644784-24.285541-4.325379-48.139154-6.736046-70.941911-7.106997-132.614136-1.544778-245.640076 38.128584-325.356735 116.547425-81.385425 80.025614-126.188061 196.573039-126.188061 328.19933 0 17.488516 14.150982 31.639499 31.639499 31.639499s31.639499-14.150982 31.639499-31.639499c0-114.508724 38.128584-215.050417 107.277739-283.087738 68.346277-67.234443 165.057529-100.294731 279.936187-98.379003C490.548924 603.106858 511.065003 605.207553 532.136998 608.915021zM858.977533 862.526966c-17.241555 3.151551-28.611937 19.589212-25.521364 36.768773 4.943291 27.31412 7.47693 55.864062 7.47693 84.969921 0 17.488516 14.150982 31.639499 31.639499 31.639499 17.488516 0 31.639499-14.150982 31.639499-31.639499 0-32.875321-2.842595-65.25672-8.465792-96.216313C892.594755 870.745797 875.3532 859.807343 858.977533 862.526966zM446.920116 514.429469c137.249487 0 248.9146-111.666129 248.9146-248.9146S584.169603 16.599253 446.920116 16.599253 198.005516 128.265382 198.005516 265.513853 309.671645 514.429469 446.920116 514.429469zM446.920116 79.87825c102.334449 0 185.635602 83.301154 185.635602 185.635602s-83.301154 185.635602-185.635602 185.635602-185.635602-83.301154-185.635602-185.635602S344.585668 79.87825 446.920116 79.87825zM505.101345 856.108006c-14.225172 14.225172-14.225172 37.28607 0 51.511242 14.225172 14.221107 37.282005 14.221107 51.507177 0 14.225172-14.225172 14.225172-37.28607 0-51.511242C542.384366 841.886899 519.326518 841.886899 505.101345 856.108006zM982.222385 534.358125c-0.300825-0.877068-0.583357-1.703321-0.969552-2.557015-0.06606-0.143299-0.096549-0.297776-0.165657-0.440059-0.289646-0.617911-0.845563-0.980731-1.169763-1.572218-1.417741-2.599699-2.750112-5.252246-4.947356-7.450506-0.347575-0.347575-0.815074-0.452254-1.173828-0.78052-0.587422-0.532542-1.321192-0.806943-1.943168-1.289687-6.098825-4.781699-13.282045-7.253344-20.640067-6.929144-0.073174 0.004065-0.146347 0.038619-0.216472 0.042685-3.932071 0.201228-7.766576 1.08541-11.42018 2.746047-0.208342 0.088418-0.428879 0.061994-0.633156 0.154478-1.263263 0.598602-2.078337 1.672832-3.22066 2.409651-1.849669 1.197203-3.870076 2.023456-5.492093 3.645474l-85.340871 85.401849-38.004595-38.004595 85.649827-85.587832c12.359243-12.359243 12.359243-32.381399 0-44.740642-2.224684-2.224684-4.904671-3.58043-7.534859-5.005285-0.819139-0.482743-1.355746-1.255132-2.228749-1.668767-0.220537-0.104679-0.452254-0.154478-0.671775-0.259157-0.023375-0.011179-0.053864-0.015245-0.077239-0.02744-78.832476-37.185456-173.029398-20.840279-234.694509 40.88581-57.829589 57.829589-73.502991 141.3899-48.521283 213.938583L543.723852 742.310693c-40.233344-3.16273-80.029679 10.07663-109.03899 39.139804-54.1333 54.1333-54.1333 142.254772 0 196.388072 27.067158 27.067158 62.599092 40.600229 98.194036 40.600229 35.53295 0 71.0659-13.533071 98.132042-40.600229 28.584496-28.584496 41.975285-67.608442 39.356276-107.216761l55.883371-55.926056c21.884021 7.531811 44.609539 12.050287 67.531203 12.050287 53.021466 0 106.041916-20.207123 146.395184-60.560391C1001.084942 705.340692 1017.646591 612.604195 982.222385 534.358125zM616.05708 835.459808c-0.308956 0.308956-0.397374 0.725639-0.691085 1.042725-2.54177 2.672873-4.511362 5.631327-5.987032 9.010529-0.127038 0.30489-0.246961 0.590471-0.366885 0.896378-1.398431 3.490996-2.089516 7.118176-2.14338 11.003497-0.004065 0.293711-0.004065 0.568113 0.004065 0.860807 0.02744 2.004147-0.386195 3.94325 0.038619 5.982967 5.129274 25.027441-2.595634 50.796782-20.640067 68.841216-29.476809 29.476809-77.491974 29.35282-106.845811 0-29.476809-29.476809-29.476809-77.430996 0-106.907805 18.353389-18.291395 44.49368-25.769341 69.706088-20.393106 1.111834 0.246961 2.147445-0.06606 3.252165 0.061994 1.177893 0.131103 2.297858 0.679906 3.483882 0.679906 0.969552 0 1.885239-0.467499 2.850726-0.555917 2.224684-0.189032 4.28676-0.598602 6.373227-1.239888 1.637262-0.502053 3.16273-1.100655 4.719704-1.873044 2.248059-1.115899 4.225782-2.460466 6.140494-4.082483 0.718525-0.602667 1.610838-0.841498 2.286678-1.518354l52.024475-51.98179c5.453474 7.102931 10.563438 14.39896 17.063702 20.898208 6.500264 6.500264 13.796293 11.610229 20.898208 17.063702L616.05708 835.459808zM895.43735 721.446022c-56.111023 56.049029-147.260057 56.173017-203.37108 0-56.049029-56.049029-56.049029-147.322051 0-203.37108 31.477907-31.52364 75.178872-45.628889 117.879797-40.847191l-56.392539 56.357984c-9.701614 9.701614-15.016871 22.555796-14.954877 36.27485 0 13.719054 5.376235 26.510225 14.954877 36.026872l55.184156 55.307129c9.949592 9.825603 22.987724 14.768894 36.088867 14.768894s26.201269-4.943291 36.212856-14.892882l55.195335-55.233955C940.2471 647.785505 926.350193 690.533179 895.43735 721.446022z" ></path></symbol><symbol id="icon-pwd" viewBox="0 0 1024 1024"><path d="M812.8 409.6H356.266667v-170.666667c0-55.466667 68.266667-119.466667 153.6-119.466666s153.6 64 153.6 119.466666v51.2c4.266667 29.866667 29.866667 51.2 55.466666 51.2 29.866667 0 55.466667-21.333333 59.733334-51.2V238.933333C778.666667 106.666667 659.2 0 509.866667 0S241.066667 106.666667 241.066667 238.933333v170.666667h-34.133334C151.466667 409.6 104.533333 456.533333 104.533333 512v409.6C104.533333 977.066667 151.466667 1024 206.933333 1024h610.133334c55.466667 0 102.4-46.933333 102.4-102.4V512c-4.266667-55.466667-51.2-102.4-106.666667-102.4z m-251.733333 379.733333v46.933334c0 29.866667-21.333333 51.2-51.2 51.2s-51.2-25.6-51.2-51.2v-46.933334c-38.4-21.333333-68.266667-59.733333-68.266667-106.666666 0-64 51.2-119.466667 119.466667-119.466667 64 0 119.466667 51.2 119.466666 119.466667 0 46.933333-29.866667 85.333333-68.266666 106.666666z" ></path></symbol><symbol id="icon-eye" viewBox="0 0 2389 1024"><path d="M2389.333333 457.927683l-54.805799 65.426623-223.506733-215.761159A1062.669188 1062.669188 0 0 1 1754.489714 613.191221l104.037133 233.59945-75.754055 40.810956-105.621454-237.178843a1248.621626 1248.621626 0 0 1-447.541574 100.897828V1023.941321h-69.886195v-272.855423c-202.441121 5.251733-372.902412-37.877027-515.021947-105.621455L536.90906 887.454931l-75.842072-40.810956 107.587187-241.609077c-133.640479-77.309037-238.645808-175.419632-318.507364-270.273566l-195.341012 188.592974L0 457.927683l197.042691-190.235975C89.015415 122.051458 41.89651 0 41.89651 0h139.743052C539.842989 641.004871 1159.752908 614.423471 1159.752908 614.423471 1801.637958 644.261532 2137.836915 0 2137.836915 0h139.743052a1279.193169 1279.193169 0 0 1-117.650565 236.445361l229.433271 221.482322z" fill="#2C2C2C" ></path></symbol><symbol id="icon-guanggao" viewBox="0 0 1024 1024"><path d="M897.432 264.198c0-106.86-86.868-193.459-194.023-193.459H318.916c-107.157 0-194.05 86.598-194.05 193.46v384.275h772.566V264.198zM848.96 600.136H173.365V264.198c0-80.024 65.312-145.121 145.552-145.121h384.492c80.24 0 145.55 65.097 145.55 145.121v335.938zM69.71 706.242v48.337H486.94v199.01h48.445v-199.01h417.23v-48.336H69.71z m315.973-462.198L296.66 475.17h41.656l24.41-67.09h86.114l25.92 67.09h44l-94.843-231.126h-38.233z m-10.885 130.517l21.932-58.469c3.125-8.406 5.82-16.974 8.11-25.543 2.883 8.623 6.44 18.377 10.535 29.208l20.693 54.804H374.8z m311.958-110.309c-9.539-8.137-21.179-13.795-34.597-16.92-9.538-2.21-22.849-3.288-40.632-3.288h-81.37V475.17h84.982c13.795 0 26.161-1.346 36.832-3.933 10.858-2.642 20.288-6.63 28.048-11.802 7.787-5.174 14.981-12.341 21.448-21.286 6.466-8.891 11.801-20.208 15.87-33.68 4.069-13.364 6.117-28.83 6.117-46.074 0-20.209-3.045-38.53-9.026-54.32-6.063-16.113-15.386-29.477-27.672-39.823z m-8.892 134.828c-3.61 10.94-8.703 19.777-15.089 26.136-4.39 4.365-10.454 7.814-17.997 10.293-7.815 2.533-18.915 3.826-32.98 3.826h-42.546V279.879h41.791c16.813 0 28.992 1.401 36.266 4.15 9.862 3.826 18.402 11.586 25.435 23.064 7.114 11.586 10.724 28.722 10.724 50.87 0 16.113-1.885 29.962-5.604 41.117z" ></path></symbol><symbol id="icon-guanliyuan" viewBox="0 0 1024 1024"><path d="M460.204 720.592c0-62.552-0.1-121.888-0.1-196.796 60.412-19.156 126.072-41.456 210.312-62.692 1.852-5.676 3.704-11.54 5.5-17.62 5.94-1.8 11.636-5.044 17.076-9.688 4.756-4.18 9.148-9.98 13.04-17.22 3.86-7.384 6.452-17.328 7.604-29.648 1.296-9.436 1.044-17.328-0.396-23.848-1.516-6.52-3.46-11.816-5.804-15.996a32.34 32.34 0 0 0-9.94-11.42 576.8 576.8 0 0 0-4.504-71.58c-2.984-20.644-8.14-42.292-15.272-64.916-7.204-22.768-18.584-43.412-34.224-62.324-6.556-8.252-15.74-16.5-27.38-24.712-11.744-8.252-25.072-15.632-40.02-22.156-14.988-6.376-31.16-11.564-48.164-15.384a236.544 236.544 0 0 0-51.696-5.764c-13.796 0-28.024 1.008-42.76 3.06a188.756 188.756 0 0 0-44.02 11.924c-14.736 5.908-29.072 14.048-43.264 24.352-14.084 10.34-26.748 23.74-38.256 40.204-12.516 17.112-21.94 36.528-28.28 58.288-6.324 21.76-10.588 42.076-13.04 61.024a434.212 434.212 0 0 0-3.62 67.112c-5.42 5.908-9.276 12.068-11.62 18.552-2.448 5.908-4.124 12.932-5.044 21.18-0.9 8.216 0.524 17.436 4.144 27.416 2.952 9.94 6.592 17.688 10.716 22.984 4.268 5.296 8.14 9.332 11.744 12.284 4.14 2.956 8.392 5.044 12.536 6.268a1329.172 1329.172 0 0 0 9.044 28.316 291.612 291.612 0 0 0 9.94 22.48c3.496 7.384 7.748 13.04 12.536 17.22 10.196 8.252 19.504 16.356 27.9 24.356 8.392 7.852 13.184 18.656 14.336 32.204 0.648 9.476 0.9 17.936 0.9 25.58 0 7.744-1.424 14.984-4.52 22.116-2.972 7.024-7.744 14.156-14.336 21.184-6.592 7.132-16.156 14.48-28.8 22.12-16.14 9.936-34.764 17.72-55.8 22.98a733.42 733.42 0 0 0-60.7 18.084c-19.504 6.772-36.564 15.852-51.28 27.452-14.588 11.416-23.504 28.132-26.48 49.892-5.944 38.224-7.368 69.492-4.016 93.7 3.244 24.1 7.888 38.472 13.832 43.3 3.62 2.952 12.392 5.908 26.1 8.86 13.816 2.812 30.6 5.764 50.36 8.72 19.884 2.952 41.84 5.764 66.12 8.468 24.428 2.6 48.884 4.944 73.364 7.024a2266.12 2266.12 0 0 0 71.564 4.9c22.984 1.116 43.3 1.728 60.7 1.728 17.324 0 37.864-0.608 61.636-1.728a2679.32 2679.32 0 0 0 34.32-2.004c-63.096-51.34-111.988-127.088-111.988-229.836z" fill="" ></path><path d="M497.296 723.108c0-52.96-0.084-103.204-0.084-166.628 60.164-19.076 126.396-41.844 217.264-62.488 90.876 20.644 157.104 43.416 217.268 62.488 0 63.424-0.084 113.668-0.084 166.628 0 149.216-121.712 231.296-217.18 256.892-95.472-25.592-217.184-107.68-217.184-256.892z" fill="" ></path></symbol><symbol id="icon-cloud-permissions" viewBox="0 0 1024 1024"><path d="M512.063 88.535l-331.544 105.332c-12.185 3.959-20.838 15.212-20.838 28.486 0 0.044 0 0.088 0 0.132l1.697 414.040 0.388 4.724c0.639 2.871 14.206 72.143 82.021 138.879 52.142 51.419 180.041 118.616 234.604 147.291 8.58 4.526 14.982 7.847 18.637 9.9l6.234 3.373c2.019 1.121 4.427 1.781 6.989 1.781 2.42 0 4.702-0.588 6.712-1.63l9.003-4.572c31.89-15.652 194.132-96.689 254.414-156.102 67.899-66.788 81.466-136.039 82.043-138.921l2.095-418.751c0-0.047 0-0.102 0-0.157 0-13.274-8.653-24.528-20.627-28.426l-331.828-105.38zM808.552 633.519c-2.557 10.173-17.161 60.356-66.621 109.062-47.773 47.145-177.285 114.478-224.368 138.187-1.909 0.987-4.166 1.566-6.559 1.566-2.512 0-4.876-0.638-6.937-1.761l0.002 0.038c-47.983-25.207-175.368-92.111-221.854-137.988-49.596-48.768-64.096-98.879-66.653-109.062l-1.519-384.639c0-0.011 0-0.024 0-0.037 0-5.877 3.822-10.861 9.116-12.602l279.946-88.953c2.677-0.88 5.758-1.388 8.957-1.388s6.281 0.508 9.167 1.447l279.643 88.867c5.431 1.743 9.293 6.749 9.293 12.657 0 0.003 0 0.006 0 0.009l-1.593 384.608-0.020-0.011zM517.092 288.241c0.109 0 0.238-0.001 0.367-0.001 33.592 0 64.019 13.55 86.114 35.482 21.966 21.653 35.579 51.745 35.579 85.016 0 33.524-13.82 63.82-36.074 85.501-18.616 18.085-42.994 30.277-70.117 33.561l13.694 48.16 50.592 0.116c0.074-0.001 0.162-0.001 0.249-0.001 16.689 0 30.225 13.502 30.28 30.179-0.035 8.385-3.507 15.947-9.078 21.36-5.499 5.412-13.098 8.775-21.483 8.775-0.048 0-0.096 0-0.143 0l-50.585-0.116-0.23 84.243c-0.035 8.379-3.506 15.941-9.076 21.354-5.501 5.419-13.105 8.787-21.496 8.787-0.044 0-0.087 0-0.131 0-0.068 0.001-0.157 0.001-0.246 0.001-8.3 0-15.82-3.34-21.288-8.75-5.539-5.477-8.974-13.076-8.987-21.477l0.743-195.242c-26.819-6.777-49.464-21.727-65.747-42.004-12.176-10.831-25.812-40.956-25.812-74.266 0-33.531 13.818-63.835 36.070-85.528 22.129-21.753 52.465-35.166 85.935-35.166 0.298 0 0.596 0.001 0.893 0.003l-0.023 0.013zM590.679 407.758c0.001-0.122 0.001-0.267 0.001-0.411 0-19.505-8.020-37.138-20.942-49.779-28.278-27.745-73.515-27.834-101.887-0.211-13.094 12.644-21.225 30.355-21.225 49.965 0 0.014 0 0.028 0 0.042 0 0.067 0 0.149 0 0.231 0 19.588 8.015 37.304 20.945 50.047 12.963 12.856 30.802 20.795 50.496 20.795 0.11 0 0.22 0 0.331-0.001 38.683 0.135 72.178-32.823 72.272-70.728l0.009 0.051z" ></path></symbol><symbol id="icon-shouye" viewBox="0 0 1024 1024"><path d="M834.8 450L574 180.1c-16.2-16.7-37.9-26-61-26-23.2 0-44.9 9.2-61 26L191.3 450c-26.9 27.9-23.5 51.9-19 62 3.2 7.2 13.9 26.7 44.7 26.7h38.2v207.6c0 47.2 34 91.6 82.4 91.6h111V618.2c0-23.5-3.6-36.7 20.6-36.7h87.7c24.2 0 20.6 13.1 20.6 36.7V838h110.9c48.3 0 82.4-44.4 82.4-91.6V538.8H809c30.8 0 41.5-19.6 44.7-26.7 4.4-10.1 7.9-34.2-18.9-62.1zM809 496H727.8v250.4c0 23.5-15.3 48.7-39.5 48.7h-68V618.2c0-47.2-15.2-79.5-63.5-79.5h-87.7c-48.3 0-63.5 32.3-63.5 79.5v177h-68c-24.2 0-39.5-25.2-39.5-48.7V496.1H216.9c-0.8 0-1.4-2.9-2-3 1.5-2.6 4.1-9.1 8.4-13.5L484 209.8c7.7-8.1 18.7-13 29.4-12.9 10.7-0.1 21 4.9 28.8 12.9l260.6 269.7c4.3 4.4 6.8 11 8.3 13.5-0.6 0.1-1.3 3-2.1 3z" ></path></symbol><symbol id="icon-shijiebei" viewBox="0 0 1024 1024"><path d="M561.850182 76.148364c-82.850909-42.728727-164.770909-37.003636-245.76 17.221818C235.101091 147.642182 210.245818 220.765091 241.570909 312.785455c5.585455-14.801455 17.501091-32.861091 35.933091-54.225455 27.601455-32.069818 104.727273-51.758545 135.307636-51.758545 13.777455 0 38.632727-3.165091 41.425455-14.801455 2.746182-11.636364 35.188364-82.664727 82.850909-98.629818 14.708364-4.933818 22.993455-10.705455 24.808727-17.221818z m21.364363-41.425455l33.69891 17.408-10.24 36.538182c-7.214545 25.879273-26.763636 39.424-54.923637 48.872727-19.223273 6.423273-48.64 49.710545-52.270545 65.163637-9.867636 41.518545-43.52 50.641455-86.714182 50.641454-27.508364 0-86.481455 19.828364-100.072727 35.607273-15.127273 17.547636-24.296727 31.371636-27.554909 40.122182l-45.614546 122.274909-42.030545-123.578182c-38.074182-111.988364-5.771636-207.127273 92.718545-273.082182C385.117091-8.843636 485.096727-15.825455 583.214545 34.769455zM735.604364 94.999273c-17.687273-8.471273-34.722909-6.330182-50.967273 6.376727-24.389818 19.083636-68.747636 82.618182-64.325818 131.397818 4.468364 48.733091 21.224727 95.325091 39.936 101.701818 18.664727 6.330182 31.045818 4.189091 44.311272-6.376727 8.843636-7.074909 34.769455-24.669091 77.591273-52.968727 16.290909-7.074909 22.202182-29.649455 17.733818-67.816727-4.421818-38.167273-25.832727-75.543273-64.232727-112.314182z m-2.048 269.498182c-26.251636 20.945455-55.249455 25.274182-88.296728 14.056727-42.589091-14.522182-65.070545-73.309091-71.261091-141.591273-5.445818-59.624727 38.260364-138.100364 81.92-172.218182 29.975273-23.458909 65.815273-27.927273 99.74691-11.729454l6.74909 3.258182 5.352728 5.12c45.707636 43.659636 72.564364 90.577455 78.382545 140.567272 6.283636 54.365091-3.584 94.952727-41.099636 113.850182-39.796364 26.251636-64.325818 43.008-71.493818 48.686546z" ></path><path d="M485.655273 364.450909c-1.536-21.969455-26.903273-25.413818-76.148364-10.286545-49.198545 15.080727-73.821091 41.192727-73.821091 78.242909 9.262545 31.604364 29.230545 57.669818 59.997091 78.242909a215.831273 215.831273 0 0 1 71.493818 78.289454c43.054545 89.227636 76.893091 139.357091 101.469091 150.341819 36.957091 16.477091 58.321455 16.477091 99.234909 16.47709 2.327273 0-96.814545-30.580364-85.364363-168.866909 3.072-37.096727 16.942545-66.606545 41.518545-88.576 41.518545-41.192727 59.997091-65.908364 55.389091-74.146909-4.654545-8.238545-19.223273-1.396364-43.845818 20.619637-30.72 32.954182-61.486545 42.542545-92.253091 28.811636-30.766545-13.730909-49.989818-50.129455-57.716364-109.149091zM562.269091 431.104c10.612364 4.747636 20.992 1.489455 42.356364-21.038545 15.36-13.730909 28.299636-23.272727 40.587636-29.044364 26.577455-12.520727 57.623273-10.286545 74.798545 20.433454 21.876364 39.098182 3.351273 63.906909-64.977454 131.584-15.36 13.730909-24.017455 32.116364-26.112 57.716364-4.096 49.012364 7.633455 81.221818 28.997818 102.865455a88.203636 88.203636 0 0 0 25.693091 18.152727l2.141091 0.930909c0.837818 0.325818 0.837818 0.325818 3.909818 1.861818 2.513455 0.744727 2.513455 0.744727 17.221818 15.778909l3.025455 5.306182 3.909818 12.381091-2.420364 24.389818-13.498182 18.897455-6.795636 4.747636c-17.966545 6.562909-17.966545 6.562909-23.226182 6.237091-57.576727 0-78.661818-2.885818-118.178909-20.526545-38.912-17.361455-76.101818-72.517818-123.531636-170.868364a169.285818 169.285818 0 0 0-56.366546-61.579636c-39.563636-26.484364-66.373818-61.44-78.801454-103.84291l-1.861818-6.423272V432.407273c0-60.090182 39.703273-102.167273 106.728727-122.740364 74.100364-22.760727 130.606545-15.36 136.098909 49.943273 5.864727 43.845818 17.501091 65.768727 30.301091 71.493818z" ></path><path d="M361.006545 669.323636c19.502545 72.285091 17.035636 124.881455-7.354181 157.789091-12.101818 16.290909-69.445818 71.447273-98.722909 73.914182-30.161455 2.56-44.776727 9.960727-43.892364 22.202182 21.969455 31.185455 110.917818 48.453818 266.984727 51.758545 234.077091 4.933818 274.292364-56.692364 263.307637-54.225454-41.518545 9.309091-86.621091 8.517818-135.307637-2.466909-48.779636-11.496727-84.107636-34.536727-106.077091-69.026909-21.922909-34.536727-68.235636-94.487273-138.938182-179.944728z m35.84-29.696c71.912727 86.900364 119.109818 148.014545 142.429091 184.645819 14.987636 23.645091 39.889455 39.842909 76.986182 48.593454 42.216727 9.541818 80.337455 10.24 114.874182 2.466909 38.493091-8.657455 67.723636 28.066909 55.528727 62.696727-3.630545 10.286545-9.681455 18.059636-17.594182 25.274182-11.822545 10.752-29.044364 20.619636-50.920727 28.997818-53.76 20.48-133.259636 31.511273-241.105454 29.230546-173.474909-3.677091-269.498182-22.295273-304.081455-71.540364l-7.400727-10.519272-0.930909-12.8c-3.630545-49.012364 33.000727-67.490909 86.388363-72.005819 6.749091-0.605091 53.154909-38.958545 65.256728-55.342545 14.149818-19.037091 15.918545-57.949091-0.232728-117.899636l-55.808-206.894546 136.610909 165.096727z" ></path></symbol><symbol id="icon-jiaose" viewBox="0 0 1024 1024"><path d="M815.3 459.8h-47.1c1.7 1.9 3.4 3.8 5 5.7 19.6 24.8 26.2 53.5 19.1 82.7l-72 298.1c10 3.2 20.2 5 30.5 5h44.4c49.1 0 98.3-39 109.9-87l52.6-217.5c11.6-48.1-52.1-87-142.4-87z m109.1 107.9l-41.9 177.1c-8.9 38.1-36.5 79.1-75.4 79.1h-35.3c-8.1 0-10.6 1.4-18.2-1.1l-0.3 1.2v-1.3c0.1 0 0.2 0.1 0.3 0.1l60.9-249.9c5.4-23.2 17.1-55.8 1.5-75.5-1.2-1.6-2.6-4.4-3.9-6l20.1 1.4c76.8 4.6 101.2 36.7 92.2 74.9zM774.2 416.3c60.1 0 108.8-48.7 108.8-108.8 0-60-48.7-108.7-108.8-108.7-60.1 0-108.7 48.7-108.7 108.7 0 60.1 48.6 108.8 108.7 108.8z m0-190c45.7 0 82.8 37 82.8 82.7s-37.1 82.7-82.8 82.7c-45.7 0-82.7-37.1-82.7-82.7 0-45.7 37-82.7 82.7-82.7z" ></path><path d="M568.2 421.9h-112c-123.7 0-211.5 53.4-196.1 119.3L330 839.4c15.4 65.9 82.5 119.3 149.7 119.3h61c67.3 0 134.7-53.4 150.6-119.3l72-298.2c16-65.9-71.4-119.3-195.1-119.3zM724 564.5L663.2 816c-13.4 55.5-44.9 108.2-127.1 108.2h-51.4c-79.8 0-113.3-52.6-126.3-108.2l-59-251.5c-16-61.8 27.7-108.2 165.4-108.2h94.5c138.8 0 185.2 48.3 164.7 108.2zM511.8 362.2c82.3 0 149.1-66.7 149.1-149.1 0-82.3-66.7-149.1-149.1-149.1-82.3 0-149.1 66.7-149.1 149.1 0 82.4 66.7 149.1 149.1 149.1z m0-262.4c62.6 0 113.4 50.8 113.4 113.4 0 62.6-50.8 113.4-113.4 113.4-62.6 0-113.4-50.8-113.4-113.4 0-62.7 50.8-113.4 113.4-113.4zM358.2 307.5c0-60-48.7-108.7-108.7-108.7-60.1 0-108.8 48.7-108.8 108.7 0 60.1 48.6 108.8 108.8 108.8 60 0 108.7-48.7 108.7-108.8z m-108.8 82.8c-45.7 0-82.7-37.1-82.7-82.7 0-45.7 37-82.7 82.7-82.7s82.7 37 82.7 82.7c0 45.6-37 82.7-82.7 82.7z" ></path><path d="M116.8 764.3c11.2 48 60.2 87 109.3 87h44.4c10.3 0 20.5-1.8 30.5-5v-0.1L231.1 548c-6.8-29.2-0.1-57.7 19.6-82.5 1.6-2.1 3.3-3.8 4.9-5.7h-46.8c-80.8 0-140.6 31.2-144.1 72.3v7.7c0.2 2.3 0.6 4.6 1.1 7l51 217.5zM190 492.9l20.1-1.4c-1.3 1.5-2.7 4.3-3.9 6-15.6 19.7-3.9 52.3 1.5 75.5l60.9 249.9c0.1 0 0.2-0.1 0.3-0.1v1.3l-0.3-1.2c-7.7 2.4-10.1 1.1-18.2 1.1H215c-39 0-66.5-40.9-75.4-79.1L97.7 567.7c-9-38.2 15.4-70.3 92.3-74.8z" ></path><path d="M268.9 822.7c-0.1 0-0.2 0.1-0.3 0.1l0.3 1.2v-1.3zM753.2 824.1l0.3-1.2c-0.1 0-0.2-0.1-0.3-0.1v1.3z" ></path><path d="M641.5 634.5L492.8 782.9c-10.1 10.1-26.8 10.1-36.9 0l-73.8-73.7c-10.1-10.4-10.1-26.8 0-36.9 10.4-10.4 26.8-10.4 37.2-0.3l55.5 55.5 129.8-129.8c10-10 26.8-10 36.9 0 10 10 10 26.7 0 36.8z m0 0" ></path></symbol><symbol id="icon-guanliyuan1" viewBox="0 0 1024 1024"><path d="M721.3 338.6c0-110.8-90.2-201-201-201s-201 90.2-201 201c0 72.5 38.6 136.1 96.2 171.5-10.4 3.3-20.6 7.1-30.7 11.3-42.1 17.8-79.9 43.3-112.4 75.8s-58 70.3-75.8 112.4c-18.4 43.6-27.8 89.9-27.8 137.6h46c0-169.6 138-307.6 307.6-307.6 109.9-1.2 198.9-90.9 198.9-201z m-356 0c0-85.5 69.5-155 155-155s155 69.5 155 155-69.5 155-155 155-155-69.5-155-155zM765.5 682v-50.2H843v-46h-77.4v-58H843v-46H719.5v204.8c-40.7 13.8-69.6 52.3-69.6 97.2 0 56.6 46 102.6 102.6 102.6 56.6 0 102.6-46 102.6-102.6 0.1-52.2-39.1-95.4-89.6-101.8z m-13 158.4c-31.2 0-56.6-25.4-56.6-56.6 0-30 23.4-54.8 53.3-56.6 1.1-0.1 2.2-0.1 3.3-0.1 31.2 0 56.6 25.4 56.6 56.6s-25.3 56.7-56.6 56.7z" ></path></symbol><symbol id="icon-tiku" viewBox="0 0 1024 1024"><path d="M806.912 366.08H312.32c-42.496 0-77.312-33.792-77.312-74.752S269.824 216.064 312.32 216.064h441.856c9.728 0 17.92-8.192 17.92-17.92s-8.192-17.92-17.92-17.92H312.32c-62.464 0-112.64 49.664-112.64 110.592v485.376c0 65.536 50.688 119.296 112.64 119.296h13.824c9.728 0 17.92-8.192 17.92-17.92s-8.192-17.92-17.92-17.92H312.32c-42.496 0-77.312-37.376-77.312-83.456V371.2c19.968 18.432 47.616 30.208 77.312 30.208H788.992v458.24H463.872c-9.728 0-17.92 8.192-17.92 17.92s8.192 17.92 17.92 17.92h343.04c9.728 0 17.92-8.192 17.92-17.92V384c-0.512-10.24-8.192-17.92-17.92-17.92z" fill="#969696" ></path></symbol><symbol id="icon-xiaochengxu" viewBox="0 0 1024 1024"><path d="M512 128c-211.7 0-384 172.3-384 384s172.3 384 384 384 384-172.3 384-384-172.3-384-384-384z m0 717.4c-183.8 0-333.4-149.6-333.4-333.4S328.2 178.6 512 178.6 845.4 328.2 845.4 512 695.8 845.4 512 845.4z" ></path><path d="M702.9 334.9c-24.9-14.2-54.6-17.1-81.6-8.1-26.4 8.8-48 28.3-59.5 53.6L418 618.9l-1.6 3c-5.6 12.9-16.5 22.9-29.8 27.4-13.5 4.5-27.9 3.1-40.5-4.1-19.8-11.3-29.4-35.4-22.7-57.2 7.1-23 28.3-26.5 75.1-29l3.5-0.2c14-0.8 24.7-12.7 23.9-26.6-0.8-14-12.7-24.6-26.6-23.9l-3.4 0.2c-45.7 2.4-102.6 5.5-120.8 64.7-13.6 44.3 5.7 93.1 46 116 15.4 8.8 32.7 13.3 50 13.3 10.7 0 21.3-1.7 31.6-5.1 26.4-8.8 48-28.3 59.5-53.6L606 405.1l1.6-3c5.6-12.9 16.5-22.9 29.8-27.4 13.5-4.5 27.9-3.1 40.5 4.1 19.8 11.3 29.4 35.4 22.7 57.2-7.1 23.2-28.5 26.6-75.7 29.1l-2.8 0.1c-14 0.7-24.7 12.6-24 26.6 0.7 14 12.6 24.8 26.6 24l2.8-0.1c46-2.4 103.2-5.3 121.5-64.7 13.5-44.4-5.8-93.2-46.1-116.1z" ></path></symbol></svg>',a=function(){var t=document.getElementsByTagName("script");return t[t.length-1]}(),i=a.getAttribute("data-injectcss"),l=function(e){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(e,0);else{var a=function t(){document.removeEventListener("DOMContentLoaded",t,!1),e()};document.addEventListener("DOMContentLoaded",a,!1)}else document.attachEvent&&i(t,e);function i(t,e){var a=t.document,i=!1,l=function(){i||(i=!0,e())},s=function t(){try{a.documentElement.doScroll("left")}catch(e){return void setTimeout(t,50)}l()};s(),a.onreadystatechange=function(){"complete"==a.readyState&&(a.onreadystatechange=null,l())}}},s=function(t,e){e.parentNode.insertBefore(t,e)},o=function(t,e){e.firstChild?s(t,e.firstChild):e.appendChild(t)};function r(){var t,a;t=document.createElement("div"),t.innerHTML=e,e=null,a=t.getElementsByTagName("svg")[0],a&&(a.setAttribute("aria-hidden","true"),a.style.position="absolute",a.style.width=0,a.style.height=0,a.style.overflow="hidden",o(a,document.body))}if(i&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(n){console&&console.log(n)}}l(r)})(window)},"6f7b":function(t,e,a){"use strict";a("ef3e")},7129:function(t,e,a){},7252:function(t,e,a){"use strict";a("0019")},7401:function(t,e,a){"use strict";a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return r}));var i=a("a27e");function l(t,e){return Object(i["a"])({url:"/admin/auth/login/userInfo",method:"get",params:{id:t,token:e}})}function s(t,e){return console.log(t+" "+e),Object(i["a"])({url:"/login",method:"post",data:{username:t,password:e}})}function o(t,e){return Object(i["a"])({url:"/admin/auth/login/out",method:"post",data:{uid:t,token:e}})}function r(t){return Object(i["a"])({url:"/admin/auth/login/password",method:"post",data:t})}},"74b8":function(t,e,a){},"74bf":function(t,e,a){"use strict";a("eafe")},"74e7":function(t,e,a){"use strict";a("2fd6")},7524:function(t,e,a){"use strict";a("1d4b")},"7da8":function(t,e,a){},8058:function(t){t.exports=JSON.parse("{}")},"80f5":function(t,e,a){"use strict";a("f63d")},8451:function(t,e,a){"use strict";a("9fe6")},"863e":function(t,e){window.global_config={BASE_URL:"http://139.159.187.130:8080"}},8849:function(t,e,a){"use strict";a("456c")},"88de":function(t,e,a){"use strict";a("a612")},"8b7e":function(t,e,a){},"8bbf":function(t,e){t.exports=Vue},"8fb5":function(t,e,a){},9140:function(t,e,a){},"93e5":function(t,e,a){"use strict";a("9acc")},"94d5":function(t,e){},"956b":function(t,e,a){"use strict";a("1558")},"95bd":function(t,e,a){"use strict";a("449c")},9776:function(t,e,a){},"9acc":function(t,e,a){},"9af1":function(t,e,a){"use strict";a("9af7")},"9af7":function(t,e,a){},"9ba4":function(t,e,a){"use strict";a("683b")},"9cb8":function(t,e,a){},"9fe6":function(t,e,a){},a18c:function(t,e,a){"use strict";a.d(e,"b",(function(){return my})),a.d(e,"a",(function(){return hy}));var i=a("8bbf"),l=a.n(i),s=a("6389"),o=a.n(s),r=a("3439"),n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-container",{staticClass:"wrapper"},[i("el-scrollbar",{staticClass:"container-left",class:{"slide-hide":t.isCollapse,"slide-in-left":t.menuShow},attrs:{"wrap-class":"container-left-wrap"}},[i("div",{staticClass:"logo"},[i("img",{staticStyle:{width:"100px",height:"100px",margin:"15px 15px 0px 15px"},attrs:{alt:"element-logo",src:a("39e2")}}),i("span",[t._v("医院供应商自助平台")])]),i("el-menu",{staticClass:"menu",staticStyle:{border:"none"},attrs:{"default-active":t.onRoutes,collapse:t.isCollapse,"text-color":"#696969","background-color":"#F5F5F5","active-text-color":"#B22222","unique-opened":"",router:""}},t._l(t.routers,(function(t){return i("sidebar-item",{key:t.path,attrs:{item:t}})})),1)],1),i("el-container",{staticClass:"container-box",class:{"slide-hide":t.isCollapse,"slide-in-left":t.menuShow}},[i("el-header",{staticClass:"header"},[i("div",{staticClass:"header-left"},[i("div",{staticClass:"header-toggle",on:{click:function(e){t.menuShow=!t.menuShow,t.showSideBar()}}},[i("span"),i("span"),i("span")]),i("div",{staticClass:"slide-toggle",class:{"slide-toggle-open":t.isCollapse},on:{click:t.toggleSideBar}},[i("span"),i("span"),i("span")])]),i("div",{staticClass:"header-tabs-box"},[i("el-breadcrumb",{staticClass:"app-levelbar",attrs:{separator:"/"}},t._l(t.levelList,(function(e){return i("el-breadcrumb-item",{key:e.path},[i("span",[t._v(t._s(e.name))]),i("router-link",[t._v(t._s(e.name))])],1)})),1)],1),i("div",{staticClass:"header-right"},[i("span",{staticStyle:{"margin-right":"10px","margin-top":"2px"}},[t._v(t._s(t.company.Name))]),i("el-dropdown",{attrs:{trigger:"click"}},[i("span",[t._v(t._s(t.username)),i("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),i("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[i("el-dropdown-item",[i("span",{on:{click:t.handlePassword}},[t._v("修改密码")])]),i("el-dropdown-item",[i("span",{on:{click:t.loginOut}},[t._v("退出登录")])])],1)],1)],1),i("el-dialog",{attrs:{title:"修改密码","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.passwordFormVisible,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.passwordFormVisible=e}}},[i("el-form",{ref:"passwordFormData",attrs:{model:t.passwordFormData,rules:t.passwordFormDataRules}},[i("el-form-item",{attrs:{label:"原始密码",prop:"oldPassword"}},[i("el-input",{attrs:{type:"password","auto-complete":"off"},model:{value:t.passwordFormData.oldPassword,callback:function(e){t.$set(t.passwordFormData,"oldPassword",e)},expression:"passwordFormData.oldPassword"}})],1),i("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[i("el-input",{attrs:{type:"password","auto-complete":"off"},model:{value:t.passwordFormData.newPassword,callback:function(e){t.$set(t.passwordFormData,"newPassword",e)},expression:"passwordFormData.newPassword"}})],1),i("el-form-item",{attrs:{label:"确认密码",prop:"check_new_password"}},[i("el-input",{attrs:{type:"password","auto-complete":"off"},model:{value:t.passwordFormData.check_new_password,callback:function(e){t.$set(t.passwordFormData,"check_new_password",e)},expression:"passwordFormData.check_new_password"}})],1)],1),i("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{nativeOn:{click:function(e){t.passwordFormVisible=!t.passwordFormVisible}}},[t._v("取消\n ")]),i("el-button",{attrs:{type:"primary",loading:t.passwordLoading},nativeOn:{click:function(e){return t.addSubmit("passwordFormData")}}},[t._v("提交\n ")])],1)],1)],1),i("div",{directives:[{name:"show",rawName:"v-show",value:t.menuShow,expression:"menuShow"}],staticClass:"main-mask",on:{click:function(e){t.menuShow=!t.menuShow}}}),i("el-main",{staticClass:"main"},[i("div",{staticClass:"content-box",class:{"content-collapse":t.collapse}},[i("div",{staticClass:"content"},[i("transition",{attrs:{name:"move",mode:"out-in"}},[i("keep-alive",{attrs:{include:t.tagsList}},[i("router-view")],1)],1),i("el-backtop",{attrs:{target:".content"}})],1)])]),i("div",{staticStyle:{position:"absolute",bottom:"0",left:"50%",transform:"translate(-50%, -50%)"}},[i("a",{staticStyle:{color:"#000000","font-size":"12px"},attrs:{href:"http://www.beian.gov.cn/portal/registerSystemInfo"}},[t._v("\n 技术支持:厦门高立新鹏软件科技有限公司 闽公网安备35020302034269号 \n ")]),i("a",{staticStyle:{color:"#000000","font-size":"10px"},attrs:{href:"http://beian.miit.gov.cn"}},[t._v("闽ICP备17019234号")])])],1)],1)},c=[],u=(a("8e6e"),a("ac6a"),a("456d"),a("7f7f"),a("ade3")),d=a("5880"),p=function(){var t=this,e=t.$createElement,a=t._self._c||e;return!t.item.hidden&&t.item.children?a("div",[t.item.hidden||!t.item.noDropdown||t.item.children[0].children?t.item.noDropdown||t.item.hidden?t._e():a("el-submenu",{staticClass:"nest-menu",attrs:{index:t.item.path}},[a("template",{slot:"title"},[t.item.icon?a("icon-svg",{attrs:{"icon-class":t.item.icon}}):t._e(),t.item.name?a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.item.name))]):t._e()],1),t._l(t.item.children,(function(e){return e.hidden?t._e():[e.children&&e.children.length>0?a("sidebar-item",{key:e.path,attrs:{item:e}}):a("router-link",{key:e.path,attrs:{to:t.item.path+"/"+e.path}},[a("el-menu-item",{attrs:{index:t.item.path+"/"+e.path}},[e.icon?a("icon-svg",{attrs:{"icon-class":e.icon}}):t._e(),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.name))])],1)],1)]}))],2):a("router-link",{attrs:{to:t.item.path+"/"+t.item.children[0].path}},[a("el-menu-item",{staticClass:"submenu-title-noDropdown",attrs:{index:t.item.path+"/"+t.item.children[0].path}},[t.item.icon?a("icon-svg",{attrs:{"icon-class":t.item.icon}}):t._e(),a("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(t.item.name))])],1)],1)],1):t._e()},m=[],h={name:"SidebarItem",props:{item:{}},methods:{hasFilterChildrenHidden:function(t){var e=t.filter((function(t){return!t.hidden}));return 1===e.length}}},f=h,g=a("2877"),y=Object(g["a"])(f,p,m,!1,null,null,null),b=y.exports,v=a("7401"),w=a("5f87"),x=a("0d61"),D=function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.showTags?a("div",{staticClass:"tags"},[a("ul",t._l(t.tagsList,(function(e,i){return a("li",{key:i,staticClass:"tags-li",class:{active:t.isActive(e.path)}},[a("router-link",{staticClass:"tags-li-title",attrs:{to:e.path}},[t._v("\n "+t._s(e.title)+"\n ")]),a("span",{staticClass:"tags-li-icon",on:{click:function(e){return t.closeTags(i)}}},[a("i",{staticClass:"el-icon-close"})])],1)})),0),a("div",{staticClass:"tags-close-box"},[a("el-dropdown",{on:{command:t.handleTags}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("\n 标签选项"),a("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),a("el-dropdown-menu",{attrs:{slot:"dropdown",size:"small"},slot:"dropdown"},[a("el-dropdown-item",{attrs:{command:"other"}},[t._v("关闭其他")]),a("el-dropdown-item",{attrs:{command:"all"}},[t._v("关闭所有")])],1)],1)],1)]):t._e()},C=[],k=new l.a,Q=k,S={data:function(){return{tagsList:[]}},methods:{isActive:function(t){return t===this.$route.fullPath},closeTags:function(t){var e=this.tagsList.splice(t,1)[0],a=this.tagsList[t]?this.tagsList[t]:this.tagsList[t-1];a?e.path===this.$route.fullPath&&this.$router.push(a.path):this.$router.push("/")},closeAll:function(){this.tagsList=[],this.$router.push("/")},closeOther:function(){var t=this,e=this.tagsList.filter((function(e){return e.path===t.$route.fullPath}));this.tagsList=e},setTags:function(t){var e=this.tagsList.some((function(e){return e.path===t.fullPath}));e||(this.tagsList.length>=8&&this.tagsList.shift(),console.log("路由---"+t.name+"----"+t.fullPath+"---"+t.matched[1].components.default.name),this.tagsList.push({title:t.name,path:t.fullPath,name:t.name})),Q.$emit("tags",this.tagsList)},handleTags:function(t){"other"===t?this.closeOther():this.closeAll()}},computed:{showTags:function(){return this.tagsList.length>0}},watch:{$route:function(t,e){console.log("路由---"+t.meta.title+"----"+t.fullPath+"---"+t.matched[1].components.default.name),this.setTags(t)}},created:function(){var t=this;this.setTags(this.$route),Q.$on("close_current_tags",(function(){for(var e=0,a=t.tagsList.length;e<a;e++){var i=t.tagsList[e];if(i.path===t.$route.fullPath){e<a-1?t.$router.push(t.tagsList[e+1].path):e>0?t.$router.push(t.tagsList[e-1].path):t.$router.push("/"),t.tagsList.splice(e,1);break}}}))}},_=S,$=(a("74bf"),Object(g["a"])(_,D,C,!1,null,null,null)),T=$.exports,L=a("4360");function O(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function z(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?O(Object(a),!0).forEach((function(e){Object(u["a"])(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):O(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}var I={data:function(){var t=this,e=function(e,a,i){""===a?i(new Error("请输入密码")):(""!==t.passwordFormData.check_new_password&&t.$refs.passwordFormData.validateField("check_new_password"),i())},a=function(e,a,i){""===a?i(new Error("请再次输入密码")):a!==t.passwordFormData.newPassword?i(new Error("两次输入密码不一致!")):i()};return{tagsList:[],collapse:!1,menuShow:!1,levelList:null,passwordLoading:!1,passwordFormVisible:!1,company:"",passwordFormData:{oldPassword:"",newPassword:"",check_new_password:""},employName:"",name:"",passwordFormDataRules:{oldPassword:[{required:!0,message:"请输入原始密码",trigger:"blur"}],newPassword:[{required:!0,message:"请输入新密码",trigger:"blur"},{validator:e,trigger:"blur"}],check_new_password:[{required:!0,message:"请再次输入密码",trigger:"blur"},{validator:a,trigger:"blur"}]}}},components:{SidebarItem:b,vTags:T},computed:z(z({},Object(d["mapGetters"])({routers:"routers"})),{},{onRoutes:function(){return this.$route.path},username:function(){var t=this.$store.state.admin.userName;this.employName=t;var e=t||this.name;return e+"("+this.$store.state.admin.employeeName+")"},isCollapse:function(){return!1}}),mounted:function(){},methods:{toggleSideBar:function(){this.$store.dispatch("ToggleSideBar")},showSideBar:function(){this.$store.dispatch("ShowSideBar")},getBreadcrumb:function(){var t=this.$route.matched.filter((function(t){return t.name})),e=t[0];!e||"首页"===e.name&&""===e.path||(t=[{name:"首页",path:"/"}].concat(t)),this.levelList=t},loginOut:function(){var t=this;this.$confirm("此操作将退出系统, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$store.dispatch("loginOut").then((function(){location.reload()}))})).catch((function(){}))},getCompanyData:function(){var t=this;this.loading=!0;var e={customerId:L["a"].getters.customerId};Object(x["b"])(e).then((function(e){t.loading=!1,t.company=e.data}))},handlePassword:function(){this.passwordFormVisible=!0,this.passwordFormData={oldPassword:"",newPassword:"",check_new_password:""}},addSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(t){e.passwordLoading=!0;var a=Object.assign({},e.passwordFormData);a.adminId=Object(w["a"])(),Object(v["c"])(a).then((function(t){e.passwordLoading=!1,2e4!==t.code?e.$message({message:t.message,type:"error"}):(e.$message({message:"修改成功",type:"success"}),e.$refs["passwordFormData"].resetFields(),e.passwordFormVisible=!1,e.$store.dispatch("loginOut").then((function(){location.reload()})))})).catch((function(){}))}}))}},created:function(){var t=this;this.getBreadcrumb(),this.getCompanyData(),Q.$on("collapse-content",(function(e){t.collapse=e})),Q.$on("tags",(function(e){for(var a=[],i=0,l=e.length;i<l;i++)e[i].name&&a.push(e[i].name);t.tagsList=a}))},watch:{$route:function(){this.getBreadcrumb()}}},N=I,F=(a("7252"),Object(g["a"])(N,n,c,!1,null,null,null)),q=F.exports,V=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("router-view")},R=[],E={name:"Empty"},j=E,P=Object(g["a"])(j,V,R,!1,null,"0020bb90",null),B=P.exports,U=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"text item",domProps:{innerHTML:t._s(t.content)}})])],1)},A=[],M={name:"showText",data:function(){return{content:""}},created:function(){this.content=this.$route.query.content,console.log(this.$route),console.log(this.content)}},W=M,H=(a("de21"),Object(g["a"])(W,U,A,!1,null,"769e276a",null)),K=H.exports,J=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("router-view")},G=[],X={},Y=Object(g["a"])(X,J,G,!1,null,null,null),Z=(Y.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"用户账号"},model:{value:t.query.userName,callback:function(e){t.$set(t.query,"userName",e)},expression:"query.userName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.query.userFlag,callback:function(e){t.$set(t.query,"userFlag",e)},expression:"query.userFlag"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"禁用",value:"0"}}),a("el-option",{attrs:{label:"正常",value:"1"}}),a("el-option",{attrs:{label:"未验证",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"用户账号",prop:"userName",fixed:""}}),a("el-table-column",{attrs:{label:"用户名称",prop:"employeeName",fixed:""}}),a("el-table-column",{attrs:{label:"状态",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(e.row.userFlag)}},[t._v(t._s(t._f("statusFilterName")(e.row.userFlag))+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"备注",prop:"comments",fixed:""}}),a("el-table-column",{attrs:{label:"登录时间",with:"300","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(" "+t._s(e.row.lastLoginTime))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:1===e.row.id},nativeOn:{click:function(a){return t.handleDel(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"before-close":t.hideForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户账号",prop:"userName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.userName,callback:function(e){t.$set(t.formData,"userName",e)},expression:"formData.userName"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户名称",prop:"employeeName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.employeeName,callback:function(e){t.$set(t.formData,"employeeName",e)},expression:"formData.employeeName"}})],1)],1)])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"登录密码",prop:"passWord"}},[a("el-input",{attrs:{type:"password",size:"small"},model:{value:t.formData.passWord,callback:function(e){t.$set(t.formData,"passWord",e)},expression:"formData.passWord"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"确认密码",prop:"checkPassword"}},[a("el-input",{attrs:{type:"password",size:"small"},model:{value:t.formData.checkPassword,callback:function(e){t.$set(t.formData,"checkPassword",e)},expression:"formData.checkPassword"}})],1)],1)])])],1),a("el-form-item",{attrs:{label:"状态",prop:"userFlag"}},[a("el-radio-group",{attrs:{disabled:1===t.formData.id},model:{value:t.formData.userFlag,callback:function(e){t.$set(t.formData,"userFlag",e)},expression:"formData.userFlag"}},[a("el-radio",{attrs:{label:0}},[t._v("禁用")]),a("el-radio",{attrs:{label:1}},[t._v("正常")]),a("el-radio",{attrs:{label:2}},[t._v("未验证")])],1)],1),a("el-form-item",{attrs:{label:"角色"}},[a("el-checkbox-group",{attrs:{disabled:1===t.formData.id},model:{value:t.formData.roles,callback:function(e){t.$set(t.formData,"roles",e)},expression:"formData.roles"}},t._l(t.roles,(function(e){return a("el-checkbox",{key:e.id,attrs:{label:e.id}},[t._v(t._s(e.name)+"\n ")])})),1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1)],1)],1)}),tt=[],et=a("a27e");function at(t){return Object(et["a"])({url:"/admin/auth/admin/index",method:"get",params:t})}function it(t){return Object(et["a"])({url:"/admin/auth/admin/roleCustomers",method:"get",params:t})}function lt(t){return Object(et["a"])({url:"/admin/auth/admin/customerRoles",method:"get",params:t})}function st(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="add"===e?"/admin/auth/admin/save":"/admin/auth/admin/edit";return Object(et["a"])({url:i,method:a,data:t})}function ot(t){return Object(et["a"])({url:"/admin/auth/admin/delete",method:"post",data:t})}var rt={id:"",passWord:"",userName:"",checkPassword:"",employeeName:"",userFlag:1,roles:[]},nt={data:function(){var t=this,e=function(t,e,a){""===e?a(new Error("请输入密码")):a()},a=function(e,a,i){""===a?i(new Error("请再次输入密码")):a!==t.formData.passWord?i(new Error("两次输入密码不一致!")):i()};return{roles:[],query:{userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:L["a"].getters.customerId},list:[],total:0,loading:!0,index:null,formName:null,formMap:{add:"新增",edit:"编辑"},formLoading:!1,formVisible:!1,formData:rt,formRules:{},addRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}],passWord:[{required:!0,message:"请输入密码",trigger:"blur"},{validator:e,trigger:"blur"}],checkPassword:[{required:!0,message:"请再次输入密码",trigger:"blur"},{validator:a,trigger:"blur"}],userFlag:[{required:!0,message:"请选择状态",trigger:"change"}]},editRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}],userFlag:[{required:!0,message:"请选择状态",trigger:"change"}]},deleteLoading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:L["a"].getters.customerId},this.getList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},getList:function(){var t=this;this.loading=!0,at(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0,t.roles=[]}))},getRoleList:function(){var t=this;it(this.query).then((function(e){t.roles=e.data.list||[]})).catch((function(){t.roles=[]}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields())},hideForm:function(){return this.formVisible=!this.formVisible,this.$refs["dataForm"].resetFields(),!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(rt)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",this.formRules=this.addRules,null!==t&&(this.index=t,this.formName="edit",this.formRules=this.editRules)},formSubmit:function(){var t=this;console.log(this.formData.userName+"-----"+this.formData.employeeName+this.formData.userFlag),this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);st(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm()}))}}))},handleDel:function(t,e){var a=this;e.id&&this.$confirm("确认删除该记录吗?","提示",{type:"warning"}).then((function(){var i={id:e.id};a.deleteLoading=!0,ot(i).then((function(e){if(a.deleteLoading=!1,2e4!==e.code)return a.$message.error(e.message),!1;a.$message.success("操作成功"),a.list.splice(t,1)})).catch((function(){a.deleteLoading=!1}))})).catch((function(){a.$message.info("取消删除")}))}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},mounted:function(){},created:function(){var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.getList(),this.getRoleList()}},ct=nt,ut=Object(g["a"])(ct,Z,tt,!1,null,null,null),dt=ut.exports,pt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"角色名称"},model:{value:t.query.name,callback:function(e){t.$set(t.query,"name",e)},expression:"query.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"禁用",value:"0"}}),a("el-option",{attrs:{label:"正常",value:"1"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"角色名称",prop:"name"}}),a("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(e.row.status)}},[t._v(t._s(t._f("statusFilterName")(e.row.status))+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"是否客户角色",prop:"isCustomer"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.isTip[e.row.isCustomer]))])]}}])}),a("el-table-column",{attrs:{label:"备注说明","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.remark))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleAuth(e.row.id)}}},[t._v("授权\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:16===e.row.id,loading:t.deleteLoading},nativeOn:{click:function(a){return t.handleDel(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-dialog",{staticClass:"dialog",attrs:{title:"授权","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.authFormVisible},on:{"update:visible":function(e){t.authFormVisible=e}}},[a("el-tree",{ref:"tree",staticStyle:{"max-height":"75vh","overflow-y":"auto"},attrs:{data:t.authList,"show-checkbox":"","default-expand-all":"","node-key":"id",props:t.defaultProps,"default-checked-keys":t.authDefaultCheckedKeys}}),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){t.authFormVisible=!t.authFormVisible}}},[t._v("取消\n ")]),a("el-button",{attrs:{type:"primary",loading:t.authLoading},nativeOn:{click:function(e){return t.authSubmit()}}},[t._v("提交\n ")])],1)],1),a("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,title:t.formMap[t.formName],visible:t.formVisible,"before-close":t.hideForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-form-item",{attrs:{label:"角色名称",prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("el-form-item",{attrs:{label:"排序",prop:"listorder"}},[a("el-input",{attrs:{type:"","auto-complete":"off"},model:{value:t.formData.listorder,callback:function(e){t.$set(t.formData,"listorder",e)},expression:"formData.listorder"}})],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-radio-group",{attrs:{disabled:16===t.formData.id},model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},[a("el-radio",{attrs:{label:0}},[t._v("禁用")]),a("el-radio",{attrs:{label:1}},[t._v("正常")])],1)],1),a("el-form-item",{attrs:{label:"是否客户用户",prop:"isCustomer"}},[a("el-radio-group",{attrs:{disabled:16===t.formData.id},model:{value:t.formData.isCustomer,callback:function(e){t.$set(t.formData,"isCustomer",e)},expression:"formData.isCustomer"}},[a("el-radio",{attrs:{label:0}},[t._v("否")]),a("el-radio",{attrs:{label:1}},[t._v("是")])],1)],1),a("el-form-item",{attrs:{label:"备注说明"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1)],1)},mt=[],ht=(a("ac4d"),a("8a81"),a("1c4c"),a("6b54"),a("2909"));a("5df3"),a("4f7f");function ft(t){return Object(et["a"])({url:"/admin/auth/role/index",method:"get",params:t})}function gt(t){return Object(et["a"])({url:"/admin/auth/role/authList",method:"get",params:t})}function yt(t){return Object(et["a"])({url:"/admin/auth/role/auth",method:"post",data:t})}function bt(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="add"===e?"/admin/auth/role/save":"/admin/auth/role/edit";return Object(et["a"])({url:i,method:a,data:t})}function vt(t){return Object(et["a"])({url:"/admin/auth/role/delete",method:"post",data:t})}function wt(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=xt(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var i=0,l=function(){};return{s:l,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,r=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){r=!0,s=t},f:function(){try{o||null==a.return||a.return()}finally{if(r)throw s}}}}function xt(t,e){if(t){if("string"===typeof t)return Dt(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Dt(t,e):void 0}}function Dt(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=new Array(e);a<e;a++)i[a]=t[a];return i}var Ct={id:"",name:"",status:1,remark:"",listorder:"",isCustomer:0},kt={data:function(){return{query:{name:"",status:"",page:1,limit:20},list:[],total:0,loading:!0,authList:[],defaultProps:{children:"children",label:"title"},authLoading:!1,authFormVisible:!1,authFormData:{role_id:"",auth_rules:[]},authDefaultCheckedKeys:[],index:null,formName:null,formMap:{add:"新增",edit:"编辑"},isTip:{0:"否",1:"是"},formLoading:!1,formVisible:!1,formData:Ct,formRules:{name:[{required:!0,message:"请输入名称",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"change"}]},deleteLoading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={name:"",status:"",page:1,limit:20},this.getList()},onSubmit:function(){this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},getList:function(){var t=this;this.loading=!0,ft(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},handleAuth:function(t){var e=this;this.authFormData.role_id=t,this.authFormData.auth_rules=[],this.authList=[],gt({id:t}).then((function(t){if(2e4!==t.code)return e.authFormVisible=!1,void e.$message({message:t.message,type:"error"});e.authFormVisible=!0,e.authList=t.data.list||[],console.log("this.authList="+e.authList);var a=t.data.checkedKeys||[],i=[],l=null,s=null,o=function t(e,a){for(var i in e){var l=e[i];l.id===a&&(s=l),t(l.children,a)}};for(var r in a)l=a[r],o(e.authList,l),s&&s.children.length<=0&&i.push(l);e.authDefaultCheckedKeys=[],e.authDefaultCheckedKeys=i})).catch((function(){}))},authSubmit:function(){var t=this;this.authLoading=!0;var e,a=function t(e){var a=[],i=e.data.id||null;return i&&a.push(e.data.id),e.parent&&(a=a.concat(t(e.parent))),a},i=this.$refs.tree.getCheckedKeys(),l=[],s=wt(i);try{for(s.s();!(e=s.n()).done;){var o=e.value,r=this.$refs.tree.getNode(o);l=l.concat(a(r))}}catch(c){s.e(c)}finally{s.f()}var n=new Set(l);if(this.authFormData.auth_rules=Object(ht["a"])(n),!this.authFormData)return this.$alert("请至少选择一个权限","提示",{confirmButtonText:"确定"}),!1;yt(this.authFormData).then((function(e){if(t.authLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("授权成功"),t.authFormVisible=!1,t.getList()})).catch((function(){t.authLoading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(Ct)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",null!==t&&(this.index=t,this.formName="edit")},formSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);bt(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList()})).catch((function(){t.formLoading=!1}))}}))},handleDel:function(t,e){var a=this;e.id&&this.$confirm("确认删除该记录吗?","提示",{type:"warning"}).then((function(){a.deleteLoading=!0;var i={id:e.id};vt(i).then((function(e){if(a.deleteLoading=!1,2e4!==e.code)return a.$message.error(e.message),!1;a.$message.success("删除成功"),a.list.splice(t,1)})).catch((function(){a.deleteLoading=!1}))})).catch((function(){a.$message.info("取消删除")}))}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常"};return e[t]}},mounted:function(){},created:function(){this.getList()}},Qt=kt,St=Object(g["a"])(Qt,pt,mt,!1,null,null,null),_t=St.exports,$t=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"禁用",value:"0"}}),a("el-option",{attrs:{label:"正常",value:"1"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增\n ")])],1)],1)],1),a("el-tree",{attrs:{data:t.mergeList,props:t.defaultProps,"node-key":"id","default-expand-all":"","expand-on-click-node":!1,"render-content":t.renderContent}})],1),a("el-dialog",{attrs:{title:t.formMap[t.formName],"close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.formVisible,"before-close":t.hideForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-form-item",{attrs:{label:"父ID",prop:"pid"}},[a("el-select",{attrs:{placeholder:"顶级"},model:{value:t.formData.pid,callback:function(e){t.$set(t.formData,"pid",e)},expression:"formData.pid"}},t._l(t.treeList,(function(e){return a("el-option",{key:e.id,attrs:{label:e.title,value:e.id}},[a("span",{staticStyle:{float:"left"}},[a("span",{domProps:{innerHTML:t._s(e.html)}}),t._v(t._s(e.title))])])})),1)],1),a("el-form-item",{attrs:{label:"功能模块",prop:"name"}},[a("el-input",{attrs:{type:"","auto-complete":"off"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("el-form-item",{attrs:{label:"功能名",prop:"title"}},[a("el-input",{attrs:{type:"","auto-complete":"off"},model:{value:t.formData.title,callback:function(e){t.$set(t.formData,"title",e)},expression:"formData.title"}})],1),a("el-form-item",{attrs:{label:"状态",prop:"status"}},[a("el-radio-group",{model:{value:t.formData.status,callback:function(e){t.$set(t.formData,"status",e)},expression:"formData.status"}},[a("el-radio",{attrs:{label:0}},[t._v("禁用")]),a("el-radio",{attrs:{label:1}},[t._v("正常")])],1)],1),a("el-form-item",{attrs:{label:"排序",prop:"listorder"}},[a("el-input",{attrs:{type:"","auto-complete":"off"},model:{value:t.formData.listorder,callback:function(e){t.$set(t.formData,"listorder",e)},expression:"formData.listorder"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1)],1)},Tt=[];a("20d6");function Lt(t){return Object(et["a"])({url:"/admin/auth/permission_rule/index",method:"get",params:t})}function Ot(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="edit"!==e?"/admin/auth/permission_rule/save":"/admin/auth/permission_rule/edit";return Object(et["a"])({url:i,method:a,data:t})}function zt(t){return Object(et["a"])({url:"/admin/auth/permission_rule/delete",method:"post",data:t})}var It={id:"",pid:"2",name:"",title:"",status:1,condition:"",listorder:""},Nt={data:function(){return{query:{name:"",status:""},mergeList:[],node:null,defaultProps:{children:"children",label:"title"},treeList:[],loading:!0,index:null,formName:null,formMap:{add:"新增",edit:"编辑"},formLoading:!1,formVisible:!1,formData:It,formRules:{name:[{required:!0,message:"请输入规则名",trigger:"blur"}],title:[{required:!0,message:"请输入标题",trigger:"blur"}],status:[{required:!0,message:"请选择状态",trigger:"change"}]},pidData:{},deleteLoading:!1}},methods:{renderContent:function(t,e){var a=this,i=e.node,l=e.data;e.store;return t("span",{style:"flex: 1; display: flex; align-items: center; justify-content: space-between; font-size: 14px; padding-right: 8px;"},[t("span",[t("span",{attrs:{title:l.name}},[i.label])]),t("span",[t("el-button",{style:"font-size: 12px;",attrs:{type:"text"},on:{click:function(){return a.handleForm(i,l,"add")}}},["添加子菜单"]),t("el-button",{style:"font-size: 12px;",attrs:{type:"text"},on:{click:function(){return a.handleForm(i,l,"edit")}}},["编辑"]),t("el-button",{style:"font-size: 12px;",attrs:{type:"text"},on:{click:function(){return a.handleDel(i,l)}}},["删除"])])])},onReset:function(){this.$router.push({path:""}),this.query={name:"",status:""},this.getList()},onSubmit:function(){this.getList()},getList:function(){var t=this;this.loading=!0,Lt(this.query).then((function(e){t.loading=!1,t.mergeList=e.data.list||[],t.treeList=e.data.tree_list||[]})).catch((function(){t.loading=!1,t.mergeList=[],t.treeList=[]}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},handleForm:function(t,e,a){this.formVisible=!0,this.pidData=e||null,It.pid=e&&parseInt(e.id)||"",this.formData=JSON.parse(JSON.stringify(It)),"edit"===a&&(this.formData=Object.assign({},e),this.node=t),this.formData.pid=this.formData.pid?this.formData.pid:"",this.formName=a,e&&e.id&&(this.index=this.mergeList.findIndex((function(t){return t.id===e.id})))},formSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);Ot(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;if(t.$message.success("操作成功"),t.formVisible=!1,"edit"!==t.formName)e.data&&e.data.id&&(a.id=e.data.id,t.pidData?(t.pidData.children||t.$set(t.pidData,"children",[]),t.pidData.children.push(a)):t.mergeList.push(a));else{var i=t.node.parent,l=i.data.children||i.data,s=l.findIndex((function(t){return t.id===a.id}));l.splice(s,1,a)}t.resetForm()})).catch((function(){t.formLoading=!1}))}}))},handleDel:function(t,e){var a=this;if(e.children&&e.children.length>0)return this.$alert("请先删除子节点","提示",{confirmButtonText:"确定"}),!1;e.id&&this.$confirm("确认删除该记录吗?","提示",{type:"warning"}).then((function(){a.deleteLoading=!0;var i={id:e.id};zt(i).then((function(i){if(a.deleteLoading=!1,2e4!==i.code)return a.$message.error(i.message),!1;a.$message.success("删除成功");var l=t.parent,s=l.data.children||l.data,o=s.findIndex((function(t){return t.id===e.id}));s.splice(o,1)})).catch((function(){a.deleteLoading=!1}))})).catch((function(){a.$message.info("取消删除")}))}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常"};return e[t]}},mounted:function(){},created:function(){this.getList()}},Ft=Nt,qt=Object(g["a"])(Ft,$t,Tt,!1,null,null,null),Vt=qt.exports,Rt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"参数名",prop:"paramName",width:"200"}}),a("el-table-column",{attrs:{label:"参数键",prop:"paramKey",width:"200"}}),a("el-table-column",{attrs:{label:"参数值",prop:"paramValue",width:"300"}}),a("el-table-column",{attrs:{label:"参数说明","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.paramExplain))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("设置\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:t.formMap[t.formName],"close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.formVisible,"before-close":t.hideForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-form-item",{attrs:{label:"参数名",prop:"paramName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.paramName,callback:function(e){t.$set(t.formData,"paramName",e)},expression:"formData.paramName"}})],1),a("el-form-item",{attrs:{label:"参数键",prop:"paramKey"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.paramKey,callback:function(e){t.$set(t.formData,"paramKey",e)},expression:"formData.paramKey"}})],1),a("el-form-item",{attrs:{label:"参数值",prop:"paramValue"}},[a("el-input",{attrs:{type:"","auto-complete":"off"},model:{value:t.formData.paramValue,callback:function(e){t.$set(t.formData,"paramValue",e)},expression:"formData.paramValue"}})],1),a("el-form-item",{attrs:{label:"参数说明"}},[a("el-input",{attrs:{type:"textarea",disabled:!0,rows:"6"},model:{value:t.formData.paramExplain,callback:function(e){t.$set(t.formData,"paramExplain",e)},expression:"formData.paramExplain"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1)],1)},Et=[];function jt(t){return Object(et["a"])({url:"/system/param/config/list",method:"get",params:t})}function Pt(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="add"===e?"/system/param/config/save":"/system/param/config/update";return Object(et["a"])({url:i,method:a,data:t})}function Bt(t){return Object(et["a"])({url:"/udiwms/sys/config/selectByKey",method:"get",params:t})}function Ut(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/selectIp",method:"get",params:t})}var At={id:"",parentId:"",paramName:"",paramKey:"",paramValue:"",paramStatus:1,paramType:1,paramExplain:""},Mt={data:function(){return{query:{paramName:"",paramStatus:1,page:1,limit:20},list:[],total:0,loading:!0,index:null,formName:null,formMap:{add:"新增",update:"设置"},formLoading:!1,formVisible:!1,formData:At,formRules:{paramValue:[{required:!0,message:"请输入参数值",trigger:"blur"}]},deleteLoading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={paramName:"",paramStatus:1,page:1,limit:20},this.getList()},onSubmit:function(){this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},getList:function(){var t=this;this.loading=!0,jt(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,console.log("------------"),console.log(e)})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(At)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",null!==t&&(this.index=t,this.formName="update")},formSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);console.log("------2------"),a.paramValue=a.paramValue.trim(),Pt(a,t.formName).then((function(e){if(console.log(e),t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList()})).catch((function(){t.formLoading=!1}))}}))}},filters:{paramStatusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},paramStatusFilterName:function(t){var e={0:"禁用",1:"正常"};return e[t]}},mounted:function(){},created:function(){this.getList()}},Wt=Mt,Ht=Object(g["a"])(Wt,Rt,Et,!1,null,null,null),Kt=Ht.exports,Jt=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"企业名称"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.filterQuery.checkType,callback:function(e){t.$set(t.filterQuery,"checkType",e)},expression:"filterQuery.checkType"}},[a("el-option",{attrs:{label:"未审核",value:"0"}}),a("el-option",{attrs:{label:"已审核",value:"1"}}),a("el-option",{attrs:{label:"未通过",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"用户名称",prop:"nickName",width:"220"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName",width:"230"}}),a("el-table-column",{attrs:{label:"联系人",prop:"realName",width:"160"}}),a("el-table-column",{attrs:{label:"手机",prop:"mobile",width:"120"}}),a("el-table-column",{attrs:{label:"电话",prop:"tel",width:"120"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email",width:"180"}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.bussinessFlag[e.row.bussinessStatus]))])]}}])}),a("el-table-column",{attrs:{label:"所属地区",prop:"area",width:"200"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"checkType",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.checkFlag[e.row.checkType]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[1!==e.row.checkType?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog(e.row)}}},[t._v("审核\n ")]):t._e()]}}])})],1),a("el-dialog",{attrs:{title:"新用户审核",visible:t.centerDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("el-form",{ref:"rowDataForm",staticStyle:{margin:"0 20px"},attrs:{model:t.rowData,rules:t.rowDataRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("用户名称: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.nickName,callback:function(e){t.$set(t.rowData,"nickName",e)},expression:"rowData.nickName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("企业名称: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",disabled:null!=t.rowData.companyName,clearable:"true","reserve-keyword":"",placeholder:"请输入企业名称","remote-method":t.findMethod,size:"small",loading:t.loading},model:{value:t.rowData.companyName,callback:function(e){t.$set(t.rowData,"companyName",e)},expression:"rowData.companyName"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.name}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("联系人: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.realName,callback:function(e){t.$set(t.rowData,"realName",e)},expression:"rowData.realName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("企业类型: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.bussinessFlag[t.rowData.bussinessStatus],callback:function(e){t.$set(t.bussinessFlag,t.rowData.bussinessStatus,e)},expression:"bussinessFlag[rowData.bussinessStatus]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("电话: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.tel,callback:function(e){t.$set(t.rowData,"tel",e)},expression:"rowData.tel"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("所属地区: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.area,callback:function(e){t.$set(t.rowData,"area",e)},expression:"rowData.area"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("手机: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.mobile,callback:function(e){t.$set(t.rowData,"mobile",e)},expression:"rowData.mobile"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("邮箱: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.email,callback:function(e){t.$set(t.rowData,"email",e)},expression:"rowData.email"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("所属供应商: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",[a("el-select",{staticStyle:{width:"100%"},attrs:{multiple:!1,filterable:"",remote:"","reserve-keyword":"",placeholder:"请输入供应商名称","remote-method":t.remoteMethod,loading:t.sLoading,disabled:t.registerConfigMap.companyCheckStatus},on:{change:t.selectOne},model:{value:t.sValue,callback:function(e){t.sValue=e},expression:"sValue"}},t._l(t.sOptions,(function(e){return a("el-option",{key:t.idx,attrs:{label:e.name,value:e}})})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("营业执照: ")])])]),a("el-col",{attrs:{span:3}},[a("el-button",{attrs:{size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.licenseUrl)}}},[t._v("查看文件\n ")])],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"div-text"},[a("span",[t._v("分配角色: ")])])]),a("el-col",{attrs:{span:7}},[a("el-form",{attrs:{model:t.checkQuery}},[a("el-form-item",{staticStyle:{"margin-top":"5px"},attrs:{label:""}},[a("el-radio-group",{on:{change:t.handleCheckedChange},model:{value:t.check,callback:function(e){t.check=e},expression:"check"}},t._l(t.roles,(function(e){return a("el-radio",{key:e.id,attrs:{label:e.id}},[t._v(t._s(e.name)+"\n ")])})),1)],1)],1)],1)],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.passRegister}},[t._v("通过")]),a("el-button",{attrs:{type:"primary"},on:{click:t.noPassRegister}},[t._v("不通过")])],1)],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Gt=[],Xt=a("485b"),Yt=a("bcba"),Zt={data:function(){return{filterQuery:{companyName:"",checkType:"0",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},bussinessFlag:{1:"医院",2:"经营企业"},checkQuery:{id:"",checkType:"",roles:""},rowDataRules:{nickName:[{required:!0,message:"请输入用户名称",trigger:"blur"}]},list:[],roles:[],addDialogVisible:!1,centerDialogVisible:!1,check:"",rowData:{},sOptions:[],sValue:[],sList:[],sLoading:!1,sSelectStatus:!1,registerConfigMap:{companyCheckStatus:!0},fileUrl:"",fromOptions:[]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",checkType:"",page:1,limit:20},this.getList()},onSubmit:function(){this.getList()},getList:function(){var t=this;this.loading=!0,Object(Xt["d"])(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},selectOne:function(t){this.rowData.companyName=t.name,this.rowData.companyId=t.value,this.checkQuery.companyName=t.name,this.checkQuery.companyId=t.value,this.sSelectStatus=!0},remoteMethod:function(t){var e=this;if(""!==t){this.sLoading=!0;var a={key:t,page:1,limit:20};Object(Yt["g"])(a).then((function(t){console.log(t),e.sLoading=!1,e.sOptions=t.data.list})).catch((function(){e.sLoading=!1,e.sOptions=[]}))}else this.sOptions=[]},cancelDialog:function(){this.addDialogVisible=!1},handleCheckedChange:function(t){console.log(t)},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))},checkRegister:function(){var t=this;this.loading=!0,Object(Xt["a"])(this.checkQuery).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"更新成功!"})):(t.$message.warning("更新失败"),t.loading=!1)})).catch((function(){}))},checkDialog:function(t){console.log(this.checkQuery.roles),this.check=t.roles,this.checkQuery={id:t.id+"",checkType:1,roles:t.roles},console.log(this.check+"---"+t.roles+"---"+this.checkQuery.roles),this.rowData=t,this.registerConfigMap.companyCheckStatus&&(this.sValue=this.rowData.companyName),console.log(this.rowData),this.centerDialogVisible=!0},passRegister:function(){return this.checkQuery.roles=this.check,this.$isBlank(this.checkQuery.roles)?this.$message.warning("请选择当前供应商角色"):this.$isBlank(this.sValue)||!this.sSelectStatus?this.$message.warning("请选择所属供应商"):this.$isBlank(this.rowData.companyName)?this.$message.warning("请输入企业名称"):(this.checkRegister(),void(this.centerDialogVisible=!1))},noPassRegister:function(){this.checkQuery.roles=this.check,this.checkQuery.checkType=2,this.checkRegister(),this.centerDialogVisible=!1},deleteDialog:function(t){var e=this;this.$confirm("是否删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};Object(Xt["b"])(a).then((function(){e.getList()}))})).catch((function(){}))},getRoleList:function(){var t=this;lt().then((function(e){t.roles=e.data.list||[],console.log("888---"+t.checkQuery.roles)})).catch((function(){t.checkQuery.roles=[]}))},registerConfig:function(){var t=this;Object(x["d"])().then((function(e){2e4===e.code&&(t.registerConfigMap=e.data,t.sSelectStatus=t.registerConfigMap.companyCheckStatus)}))},openFile:function(t){window.open(this.fileUrl+t)}},mounted:function(){},created:function(){this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.getList(),this.getRoleList(),this.registerConfig()}},te=Zt,ee=(a("c5bf"),Object(g["a"])(te,Jt,Gt,!1,null,null,null)),ae=ee.exports,ie=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.filterQuery.isCheck,callback:function(e){t.$set(t.filterQuery,"isCheck",e)},expression:"filterQuery.isCheck"}},[a("el-option",{attrs:{label:"未审核",value:"0"}}),a("el-option",{attrs:{label:"已审核",value:"1"}}),a("el-option",{attrs:{label:"未通过",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"IMEI唯一识别码",prop:"imei",width:"230"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName",width:"160"}}),a("el-table-column",{attrs:{label:"联系方式",prop:"phone",width:"120"}}),a("el-table-column",{attrs:{label:"联系人",prop:"contact",width:"120"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"isCheck",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.checkFlag[e.row.isCheck]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[1!==e.row.isCheck?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog(e.row)}}},[t._v("审核\n ")]):t._e()]}}])})],1),a("el-dialog",{attrs:{title:"审核","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.centerDialogVisible,width:"30%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary"},on:{click:t.passRegister}},[t._v("通过")]),a("el-button",{attrs:{type:"primary"},on:{click:t.noPassRegister}},[t._v("不通过")])],1)]),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},le=[];function se(t){return Object(et["a"])({url:"/sale/device/registerList",method:"get",params:t})}function oe(t){return Object(et["a"])({url:"/sale/device/check",method:"post",data:t})}var re={data:function(){return{filterQuery:{isCheck:"0",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},list:[],addDialogVisible:!1,centerDialogVisible:!1,check:""}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={isCheck:"",page:1,limit:20},this.getList()},onSubmit:function(){this.getList()},getList:function(){var t=this;this.loading=!0,se(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},cancelDialog:function(){this.addDialogVisible=!1},handleCheckedChange:function(t){console.log(t)},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},checkRegister:function(){var t=this;this.loading=!0,oe(this.checkQuery).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"更新成功!"})):(t.$message.warning("更新失败"),t.loading=!1)})).catch((function(){}))},checkDialog:function(t){this.checkQuery={id:t.id+"",isCheck:1},console.log(this.check+"---"+t.roles+"---"+this.checkQuery.roles),this.centerDialogVisible=!0},passRegister:function(){this.checkRegister(),this.centerDialogVisible=!1},noPassRegister:function(){this.checkQuery.isCheck=2,this.checkRegister(),this.centerDialogVisible=!1}},mounted:function(){},created:function(){this.getList()}},ne=re,ce=Object(g["a"])(ne,ie,le,!1,null,null,null),ue=(ce.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"用户账号"},model:{value:t.query.userName,callback:function(e){t.$set(t.query,"userName",e)},expression:"query.userName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.query.userFlag,callback:function(e){t.$set(t.query,"userFlag",e)},expression:"query.userFlag"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"禁用",value:"0"}}),a("el-option",{attrs:{label:"正常",value:"1"}}),a("el-option",{attrs:{label:"未验证",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50",fixed:""}}),a("el-table-column",{attrs:{label:"用户账号",prop:"userName",fixed:""}}),a("el-table-column",{attrs:{label:"用户名称",prop:"employeeName",fixed:""}}),a("el-table-column",{attrs:{label:"状态",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(e.row.userFlag)}},[t._v(t._s(t._f("statusFilterName")(e.row.userFlag))+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"备注",prop:"comments",fixed:""}}),a("el-table-column",{attrs:{label:"登录时间",with:"300","show-overflow-tooltip":!0},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(" "+t._s(e.row.lastLoginTime))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleDel(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"before-close":t.hideForm,width:"70%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户账号",prop:"userName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.userName,callback:function(e){t.$set(t.formData,"userName",e)},expression:"formData.userName"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户名称",prop:"employeeName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.employeeName,callback:function(e){t.$set(t.formData,"employeeName",e)},expression:"formData.employeeName"}})],1)],1)])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"登录密码",prop:"passWord"}},[a("el-input",{attrs:{type:"password",size:"small"},model:{value:t.formData.passWord,callback:function(e){t.$set(t.formData,"passWord",e)},expression:"formData.passWord"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"确认密码",prop:"checkPassword"}},[a("el-input",{attrs:{type:"password",size:"small"},model:{value:t.formData.checkPassword,callback:function(e){t.$set(t.formData,"checkPassword",e)},expression:"formData.checkPassword"}})],1)],1)])])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1)],1)}),de=[],pe={id:"",passWord:"",userName:"",checkPassword:"",employeeName:"",userFlag:1,customerId:"",roles:[]},me={data:function(){var t=this,e=function(t,e,a){""===e?a(new Error("请输入密码")):a()},a=function(e,a,i){""===a?i(new Error("请再次输入密码")):a!==t.formData.passWord?i(new Error("两次输入密码不一致!")):i()};return{roles:[],query:{userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:"",companyName:""},list:[],total:0,loading:!0,index:null,formName:null,formMap:{add:"新增",edit:"编辑"},userInfo:{customerId:"",companyName:"",userId:"",roles:[]},formLoading:!1,formVisible:!1,formData:pe,formRules:{},addRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}],passWord:[{required:!0,message:"请输入密码",trigger:"blur"},{validator:e,trigger:"blur"}],checkPassword:[{required:!0,message:"请再次输入密码",trigger:"blur"},{validator:a,trigger:"blur"}]},editRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}]},deleteLoading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:this.userInfo.customerId,companyName:this.userInfo.companyName},this.getList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},getList:function(){var t=this;this.loading=!0,at(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0,t.roles=[]}))},getRoleList:function(){var t=this;lt(this.query).then((function(e){t.roles=e.data.list||[]})).catch((function(){t.roles=[]}))},getUserInfo:function(){var t=this;Object(v["d"])().then((function(e){t.userInfo={customerId:e.data.customerId,companyName:e.data.companyName,userId:e.data.id,roles:e.data.roleIds},t.query.customerId=e.data.customerId,t.query.companyName=e.data.companyName,t.getList()})).catch((function(){t.customerId="",t.companyName=""}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields())},hideForm:function(){return this.formVisible=!this.formVisible,this.$refs["dataForm"].resetFields(),!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(pe)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",this.formRules=this.addRules,null!==t&&(this.index=t,this.formName="edit",this.formRules=this.addRules)},formSubmit:function(){var t=this;console.log(this.formData.userName+"--222---"+this.formData.employeeName+this.formData.userFlag+this.formData.id),this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0,t.formData.userFlag=1,t.formData.roles=t.userInfo.roles,t.formData.customerId=t.userInfo.customerId,t.formData.companyName=t.userInfo.companyName;var a=Object.assign({},t.formData),i={id:t.formData.id,userFlag:1,roles:t.userInfo.roles,customerId:t.userInfo.customerId,companyName:t.userInfo.companyName,passWord:t.formData.passWord,userName:t.formData.userName,employeeName:t.formData.employeeName};console.log(i.id+"---"),st(i,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm()}))}else console.log("参数错误")}))},handleDel:function(t,e){var a=this;e.id===this.userInfo.userId?this.$message.warning("不能删除自己"):e.id&&this.$confirm("确认删除该记录吗?","提示",{type:"warning"}).then((function(){var i={id:e.id};a.deleteLoading=!0,ot(i).then((function(e){if(a.deleteLoading=!1,2e4!==e.code)return a.$message.error(e.message),!1;a.$message.success("操作成功"),a.list.splice(t,1)})).catch((function(){a.deleteLoading=!1}))})).catch((function(){a.$message.info("取消删除")}))}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},mounted:function(){},created:function(){this.getUserInfo();var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit)}},he=me,fe=Object(g["a"])(he,ue,de,!1,null,null,null),ge=fe.exports,ye=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"客户名称"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"企业名称",prop:"companyName",width:"230"}}),a("el-table-column",{attrs:{label:"社会统一信用号",prop:"creditNum",width:"160"}}),a("el-table-column",{attrs:{label:"所属地区",prop:"area",width:"180"}}),a("el-table-column",{attrs:{label:"详细地址",prop:"detailAddr",width:"230","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.bussinessFlag[e.row.bussinessStatus]))])]}}])}),a("el-table-column",{attrs:{label:"客户状态",prop:"userFlag",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(e.row.userFlag)}},[t._v(t._s(t._f("statusFilterName")(e.row.userFlag))+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"角色",prop:"role",width:"120"}}),a("el-table-column",{attrs:{label:"最大用户数",prop:"userMax",width:"120"}}),a("el-table-column",{attrs:{label:"当前用户数",prop:"count",width:"120"}}),a("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button-group",[a("el-button",{attrs:{type:"text",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.customerkDialog(e.row)}}},[t._v("查看用户\n ")]),a("el-button",{attrs:{type:"text",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.contractDialog(e.row)}}},[t._v("查看联系人\n ")])],1)]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-dialog",{attrs:{title:"客户信息编辑",visible:t.formVisible,width:"60%"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"客户名称",prop:"userName"}},[a("el-input",{staticStyle:{width:"60%"},attrs:{size:"small",disabled:!0},model:{value:t.formData.customerName,callback:function(e){t.$set(t.formData,"customerName",e)},expression:"formData.customerName"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"最大用户数",prop:"employeeName"}},[a("el-input",{staticStyle:{width:"40%"},attrs:{size:"small",type:"number"},model:{value:t.formData.userMax,callback:function(e){t.$set(t.formData,"userMax",e)},expression:"formData.userMax"}})],1)],1)])])],1),a("el-form-item",{attrs:{label:"状态:",prop:"userFlag"}},[a("el-radio-group",{model:{value:t.formData.userFlag,callback:function(e){t.$set(t.formData,"userFlag",e)},expression:"formData.userFlag"}},[a("el-radio",{attrs:{label:0}},[t._v("禁用")]),a("el-radio",{attrs:{label:1}},[t._v("正常")]),a("el-radio",{attrs:{label:2}},[t._v("未验证")])],1)],1),a("el-form-item",{attrs:{label:"分配角色:"}},[a("el-radio-group",{on:{change:t.handleCheckedChange},model:{value:t.check,callback:function(e){t.check=e},expression:"check"}},t._l(t.roles,(function(e){return a("el-radio",{key:e.id,attrs:{label:e.id}},[t._v(t._s(e.name)+"\n ")])})),1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.cancelDialog.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1),a("el-dialog",{attrs:{title:"客户联系人",visible:t.contractVisible,width:"60%"},on:{"update:visible":function(e){t.contractVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.contractData}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"真实姓名",prop:"userName"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",disabled:!0},model:{value:t.contractData.contacts,callback:function(e){t.$set(t.contractData,"contacts",e)},expression:"contractData.contacts"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"手机",prop:"employeeName"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",type:"number",disabled:!0},model:{value:t.contractData.mobile,callback:function(e){t.$set(t.contractData,"mobile",e)},expression:"contractData.mobile"}})],1)],1)])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"联系电话",prop:"tel"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",disabled:!0},model:{value:t.contractData.tel,callback:function(e){t.$set(t.contractData,"tel",e)},expression:"contractData.tel"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",disabled:!0},model:{value:t.contractData.email,callback:function(e){t.$set(t.contractData,"email",e)},expression:"contractData.email"}})],1)],1)])])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.cancelDialog.apply(null,arguments)}}},[t._v("确定")])],1)],1),t.customerVisible?a("div",[a("el-dialog",{attrs:{title:"客户用户",visible:t.customerVisible,width:"70%","append-to-body":"","modal-append-to-body":!1},on:{"update:visible":function(e){t.customerVisible=e},close:t.closeCustomerDialog}},[a("customerUser",{attrs:{currentCustomer:t.currentCustomer}})],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},be=[];function ve(t){return Object(et["a"])({url:"/system/pdf/template/list",method:"get",params:t})}function we(t){return Object(et["a"])({url:"/system/pdf/module/list",method:"get",params:t})}function xe(t){return Object(et["a"])({url:"/system/pdf/module/pdfModules",method:"get",params:t})}function De(t){return Object(et["a"])({url:"/system/pdf/template/pdfTemplates",method:"get",params:t})}function Ce(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="add"===e?"/system/pdf/template/save":"/system/pdf/template/update";return Object(et["a"])({url:i,method:a,data:t})}function ke(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",i="add"===e?"/system/pdf/module/save":"/system/pdf/module/update";return Object(et["a"])({url:i,method:a,data:t})}function Qe(t){return Object(et["a"])({url:"/system/pdf/template/delete",method:"get",params:t})}function Se(t){return Object(et["a"])({url:"/spms/customer/list",method:"get",params:t})}function _e(t){return Object(et["a"])({url:"/salewarehouse/customer/list",method:"get",params:t})}function $e(t){return Object(et["a"])({url:"/salewarehouse/customer/update",method:"post",data:t})}function Te(t){return Object(et["a"])({url:"/salewarehouse/customer/delete",method:"post",data:t})}var Le=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"用户账号"},model:{value:t.query.userName,callback:function(e){t.$set(t.query,"userName",e)},expression:"query.userName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.query.userFlag,callback:function(e){t.$set(t.query,"userFlag",e)},expression:"query.userFlag"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"禁用",value:"0"}}),a("el-option",{attrs:{label:"正常",value:"1"}}),a("el-option",{attrs:{label:"未验证",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"用户账号",prop:"userName",fixed:""}}),a("el-table-column",{attrs:{label:"用户名称",prop:"employeeName",fixed:""}}),a("el-table-column",{attrs:{label:"状态",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(e.row.userFlag)}},[t._v(t._s(t._f("statusFilterName")(e.row.userFlag)))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleDel(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"before-close":t.hideForm,"append-to-body":"","modal-append-to-body":!1,width:"70%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户账号",prop:"userName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.userName,callback:function(e){t.$set(t.formData,"userName",e)},expression:"formData.userName"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"用户名称",prop:"employeeName"}},[a("el-input",{attrs:{size:"small"},model:{value:t.formData.employeeName,callback:function(e){t.$set(t.formData,"employeeName",e)},expression:"formData.employeeName"}})],1)],1)])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"登录密码",prop:"passWord"}},[a("el-input",{attrs:{type:"password",size:"small",disabled:!0},model:{value:t.formData.passWord,callback:function(e){t.$set(t.formData,"passWord",e)},expression:"formData.passWord"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"text item"},[a("el-form-item",{attrs:{label:"确认密码",prop:"checkPassword"}},[a("el-input",{attrs:{type:"password",size:"small",disabled:!0},model:{value:t.formData.checkPassword,callback:function(e){t.$set(t.formData,"checkPassword",e)},expression:"formData.checkPassword"}})],1)],1)])])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交")])],1)],1)],1)},Oe=[],ze={id:"",passWord:"",userName:"",checkPassword:"",employeeName:"",userFlag:1,customerId:"",roles:[]},Ie={name:"currentCustomer",props:{currentCustomer:""},data:function(){var t=this,e=function(t,e,a){""===e?a(new Error("请输入密码")):a()},a=function(e,a,i){""===a?i(new Error("请再次输入密码")):a!==t.formData.passWord?i(new Error("两次输入密码不一致!")):i()};return{roles:[],query:{userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:""},list:[],total:0,loading:!0,index:null,formName:null,formMap:{add:"新增",edit:"编辑"},userInfo:{customerId:"",userId:"",roles:[]},formLoading:!1,formVisible:!1,formData:ze,formRules:{},addRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}],passWord:[{required:!0,message:"请输入密码",trigger:"blur"},{validator:e,trigger:"blur"}],checkPassword:[{required:!0,message:"请再次输入密码",trigger:"blur"},{validator:a,trigger:"blur"}],userFlag:[{required:!0,message:"请选择状态",trigger:"change"}]},editRules:{userName:[{required:!0,message:"请输入姓名",trigger:"blur"}],userFlag:[{required:!0,message:"请选择状态",trigger:"change"}]},deleteLoading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={userName:"",userFlag:"",page:1,limit:20,roleId:"",customerId:this.currentCustomer},this.getList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},getList:function(){var t=this;this.loading=!0,at(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0,t.roles=[]}))},getRoleList:function(){var t=this;lt(this.query).then((function(e){t.roles=e.data.list||[]})).catch((function(){t.roles=[]}))},getUserInfo:function(){var t=this;Object(v["d"])().then((function(e){t.userInfo={customerId:e.data.customerId,userId:e.data.id,roles:e.data.roleIds},t.query.customerId=e.data.customerId,t.getList()})).catch((function(){t.customerId=""}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields())},hideForm:function(){return this.formVisible=!this.formVisible,this.$refs["dataForm"].resetFields(),!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(ze)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",this.formRules=this.addRules,null!==t&&(this.index=t,this.formName="edit",this.formRules=this.editRules)},formSubmit:function(){var t=this;console.log(this.formData.userName+"-----"+this.formData.employeeName+this.formData.userFlag+this.formData.id),this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0,t.formData.userFlag=1,t.formData.roles=t.userInfo.roles,t.formData.customerId=t.currentCustomer;var a=Object.assign({},t.formData),i={id:t.formData.id,userFlag:1,roles:t.userInfo.roles,customerId:t.currentCustomer,passWord:t.formData.passWord,userName:t.formData.userName,employeeName:t.formData.employeeName};st(i,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm()}))}}))},handleDel:function(t,e){var a=this;e.id===this.userInfo.userId?this.$message.warning("主账号不能删除"):e.id&&this.$confirm("确认删除该记录吗?","提示",{type:"warning"}).then((function(){var i={id:e.id};a.deleteLoading=!0,ot(i).then((function(e){if(a.deleteLoading=!1,2e4!==e.code)return a.$message.error(e.message),!1;a.$message.success("操作成功"),a.list.splice(t,1)})).catch((function(){a.deleteLoading=!1}))})).catch((function(){a.$message.info("取消删除")}))}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){console.log("----"+this.currentCustomer+"2---"),this.query.customerId=this.currentCustomer,this.getList()},destroyed:function(){}},Ne=Ie,Fe=Object(g["a"])(Ne,Le,Oe,!1,null,null,null),qe=Fe.exports,Ve={data:function(){return{filterQuery:{companyName:"",checkType:"",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},userflag:{0:"禁用",1:"正常",2:"未验证"},bussinessFlag:{1:"医院",2:"经营企业"},list:[],isTip:{0:"否",1:"是"},formVisible:!1,contractVisible:!1,customerVisible:!1,timer:"",formData:{customerName:"111",userMax:"",isInfoLink:"",infoLink:"",customerId:"",userFlag:"",roleId:"",pdfTemplateId:""},contractData:{contacts:"",mobile:"",tel:"",email:""},currentCustomer:"",check:"",roles:[],pdfTemplates:[]}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",page:1,limit:20},this.getList()},formSubmit:function(){var t=this;this.formData.roleId=this.check,$e(this.formData).then((function(e){t.loading=!1,t.cancelDialog(),t.getList(),2e4===e.code?t.$message({type:"success",message:"更新成功!"}):t.$message.warning("更新失败")})).catch((function(){t.cancelDialog(),t.loading=!1}))},onSubmit:function(){this.getList()},getList:function(){var t=this;this.loading=!0,_e(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[];for(var a=0;a<t.list.length;a++)if(t.$isNotBlank(t.list[a].pdfTemplateId))for(var i=0;i<t.pdfTemplates.length;i++)if(t.list[a].pdfTemplateId===t.pdfTemplates[i].idStr){t.list[a].pdfTemplateName=t.pdfTemplates[i].name;break}t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},hideForm:function(){this.customerVisible=!1},cancelDialog:function(){this.formVisible=!1,this.contractVisible=!1},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleCheckedChange:function(t){console.log(t),console.log(this.check)},checkRegister:function(t){var e=this;this.loading=!0,Object(Xt["a"])(t).then((function(t){2e4===t.code?(e.getList(),e.$message({type:"success",message:"更新成功!"})):(e.$message.warning("更新失败"),e.loading=!1)})).catch((function(){}))},customerkDialog:function(t){this.currentCustomer=t.customerId,this.timer=(new Date).getTime(),console.log("this.currentCustomer = "+this.currentCustomer),this.customerVisible=!0},closeCustomerDialog:function(){console.log("this.currentCustomer 关闭 = "+this.currentCustomer),this.currentCustomer=null},checkDialog:function(t){console.log(t),console.log(t.customerName),this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),console.log(this.check),this.formVisible=!0},contractDialog:function(t){this.contractData={contacts:t.contacts,mobile:t.mobile,tel:t.tel,email:t.email},this.contractVisible=!0},deleteDialog:function(t){var e=this;this.$confirm("删除后将清空该客户下所有用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.customerId};Te(a).then((function(){e.getList()}))})).catch((function(){}))},getRoleList:function(){var t=this;lt().then((function(e){t.roles=e.data.list||[],console.log("888---"+t.checkQuery.roles)})).catch((function(){}))},getPDFTemplateList:function(){var t=this;De().then((function(e){t.pdfTemplates=e.data.list})).catch((function(){}))}},components:{customerUser:qe},mounted:function(){},created:function(){this.getList(),this.getRoleList()}},Re=Ve,Ee=Object(g["a"])(Re,ye,be,!1,null,null,null),je=Ee.exports,Pe=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"企业名称"},model:{value:t.filterQuery.companyName,callback:function(e){t.$set(t.filterQuery,"companyName",e)},expression:"filterQuery.companyName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"社会信用号"},model:{value:t.filterQuery.creditNum,callback:function(e){t.$set(t.filterQuery,"creditNum",e)},expression:"filterQuery.creditNum"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"row-click":t.getProductAndSalesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName"}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNum"}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.bussinessFlag[e.row.bussinessStatus]))])]}}])}),a("el-table-column",{attrs:{label:"企业法人",prop:"contacts"}}),a("el-table-column",{attrs:{label:"所属地区",prop:"area"}}),a("el-table-column",{attrs:{label:"详细地址",prop:"detailAddr","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:"6"!==e.row.auditStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog2(e.row)}}},[t._v("审核\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.productQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.productQuery.cpmctymc,callback:function(e){t.$set(t.productQuery,"cpmctymc",e)},expression:"productQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号"},model:{value:t.productQuery.ggxh,callback:function(e){t.$set(t.productQuery,"ggxh",e)},expression:"productQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产厂家"},model:{value:t.productQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.productQuery,"ylqxzcrbarmc",e)},expression:"productQuery.ylqxzcrbarmc"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.productOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.productOnSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.productLoading,expression:"productLoading"}],staticStyle:{width:"100%"},attrs:{data:t.productList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.selectProduct(e.row)}}},[t._v("审核\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.productQuery.limit,layout:"prev, pager, next",total:t.productTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.salesmanQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"业务员姓名"},model:{value:t.salesmanQuery.name,callback:function(e){t.$set(t.salesmanQuery,"name",e)},expression:"salesmanQuery.name"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.salesmanOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.salesmanOnSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.salesmanLoading,expression:"salesmanLoading"}],staticStyle:{width:"100%"},attrs:{data:t.salesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"姓名",prop:"name"}}),a("el-table-column",{attrs:{label:"电话",prop:"tel"}}),a("el-table-column",{attrs:{label:"手机",prop:"phone"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}}),a("el-table-column",{attrs:{label:"证件类型",prop:"certType",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.certTypeMap[e.row.certType]))])]}}])}),a("el-table-column",{attrs:{label:"证件号",prop:"certCode"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.addSalesman(e.row)}}},[t._v("审核\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.salesmanQuery.limit,layout:"prev, pager, next",total:t.salesmanTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-dialog",{attrs:{title:"审核","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.centerDialogVisible,width:"85%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("div",{staticStyle:{display:"flex","margin-top":"-30px"}},[a("el-button",{staticStyle:{margin:"0 20px 0 auto"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.formSubmit(null,1)}}},[t._v("通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.formSubmit(null,2)}}},[t._v("不通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")])],1),a("el-card",[a("el-form",{ref:"rowDataForm",staticStyle:{margin:"0 20px"},attrs:{model:t.rowData}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业名称:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.companyName,callback:function(e){t.$set(t.rowData,"companyName",e)},expression:"rowData.companyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"统一社会信用代码:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.creditNum,callback:function(e){t.$set(t.rowData,"creditNum",e)},expression:"rowData.creditNum"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业类别:","label-width":"150px",prop:"classes"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.bussinessFlag[t.rowData.bussinessStatus],callback:function(e){t.$set(t.bussinessFlag,t.rowData.bussinessStatus,e)},expression:"bussinessFlag[rowData.bussinessStatus]"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所属地区:","label-width":"150px",prop:"area"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.area,callback:function(e){t.$set(t.rowData,"area",e)},expression:"rowData.area"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系人:","label-width":"150px",prop:"contacts"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contacts,callback:function(e){t.$set(t.rowData,"contacts",e)},expression:"rowData.contacts"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"详细地址:","label-width":"150px",prop:"detailAddr"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.detailAddr,callback:function(e){t.$set(t.rowData,"detailAddr",e)},expression:"rowData.detailAddr"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系电话:","label-width":"150px",prop:"mobile"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.mobile,callback:function(e){t.$set(t.rowData,"mobile",e)},expression:"rowData.mobile"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"邮箱:","label-width":"150px",prop:"email"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.email,callback:function(e){t.$set(t.rowData,"email",e)},expression:"rowData.email"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件类型:","label-width":"150px",prop:"contactsPapersType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"证件类型",disabled:!0},model:{value:t.rowData.contactsPapersType,callback:function(e){t.$set(t.rowData,"contactsPapersType",e)},expression:"rowData.contactsPapersType"}},[a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件号码:","label-width":"150px",prop:"contactsPapersCode"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contactsPapersCode,callback:function(e){t.$set(t.rowData,"contactsPapersCode",e)},expression:"rowData.contactsPapersCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"登记状态:","label-width":"150px",prop:"registerStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"登记状态",disabled:!0},model:{value:t.rowData.registerStatus,callback:function(e){t.$set(t.rowData,"registerStatus",e)},expression:"rowData.registerStatus"}},[a("el-option",{attrs:{label:"续存(在营,开业,在册)",value:"1"}}),a("el-option",{attrs:{label:"吊销",value:"2"}}),a("el-option",{attrs:{label:"注销",value:"3"}}),a("el-option",{attrs:{label:"迁出",value:"4"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证号:","label-width":"150px",prop:"jyxkzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzh,callback:function(e){t.$set(t.rowData,"jyxkzh",e)},expression:"rowData.jyxkzh"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证发证机关:","label-width":"150px",prop:"jyxkzfzjg"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzfzjg,callback:function(e){t.$set(t.rowData,"jyxkzfzjg",e)},expression:"rowData.jyxkzfzjg"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证有效期至:","label-width":"150px",prop:"jyxkzyxq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!0,type:"date",placeholder:""},model:{value:t.rowData.jyxkzyxq,callback:function(e){t.$set(t.rowData,"jyxkzyxq",e)},expression:"rowData.jyxkzyxq"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案凭证号:","label-width":"150px",prop:"jybapzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybapzh,callback:function(e){t.$set(t.rowData,"jybapzh",e)},expression:"rowData.jybapzh"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案部门:","label-width":"150px",prop:"jybabm"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybabm,callback:function(e){t.$set(t.rowData,"jybabm",e)},expression:"rowData.jybabm"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"发证日期:","label-width":"150px",prop:"fzrq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"",disabled:!0},model:{value:t.rowData.fzrq,callback:function(e){t.$set(t.rowData,"fzrq",e)},expression:"rowData.fzrq"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"税号:","label-width":"150px",prop:"suihao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.suihao,callback:function(e){t.$set(t.rowData,"suihao",e)},expression:"rowData.suihao"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行:","label-width":"150px",prop:"kaihuhang"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuhang,callback:function(e){t.$set(t.rowData,"kaihuhang",e)},expression:"rowData.kaihuhang"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户账号:","label-width":"150px",prop:"kaihuzhanghao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuzhanghao,callback:function(e){t.$set(t.rowData,"kaihuzhanghao",e)},expression:"rowData.kaihuzhanghao"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"营业执照电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath||""===t.rowData.filePath,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath2||""===t.rowData.filePath2,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath2)}}},[t._v("查看文件\n ")])],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath3||""===t.rowData.filePath3,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath3)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath4||""===t.rowData.filePath4,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath4)}}},[t._v("查看文件\n ")])],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"30px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"拒绝原因:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{type:"textarea",size:"small",splaceholder:""},model:{value:t.rowData.noPassCause,callback:function(e){t.$set(t.rowData,"noPassCause",e)},expression:"rowData.noPassCause"}})],1)],1)],1)],1)],1)],1),t.selectLocalVisible?a("el-dialog",{attrs:{title:"医疗器械信息","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.selectLocalVisible,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectProduct",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,hid:t.hid}})],1):t._e(),t.addSalesmanVisible?a("el-dialog",{attrs:{title:"业务员",visible:t.addSalesmanVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.addSalesmanVisible=e},close:t.closeDialog}},[a("companyAddSalesman",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e()],1)},Be=[],Ue=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[!0===t.hiddenAdd&&!0!==t.hiddenAdd2?a("div",{staticStyle:{display:"flex","margin-top":"-30px"}},[a("el-button",{staticStyle:{margin:"0 20px 0 auto"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.updateAuditStatus(1)}}},[t._v("通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.updateAuditStatus(2)}}},[t._v("不通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")])],1):t._e(),a("el-card",[!0!==t.hiddenAdd?a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submitUpload()}}},[t._v("提交\n ")])],1):t._e(),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"姓名:","label-width":"150px",prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.hiddenAdd},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"电话:","label-width":"150px",prop:"tel"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.hiddenAdd},model:{value:t.formData.tel,callback:function(e){t.$set(t.formData,"tel",e)},expression:"formData.tel"}},[t._v(">")])],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"手机:","label-width":"150px",prop:"phone"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.hiddenAdd},model:{value:t.formData.phone,callback:function(e){t.$set(t.formData,"phone",e)},expression:"formData.phone"}},[t._v(">")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"邮箱:","label-width":"150px",prop:"email"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.hiddenAdd},model:{value:t.formData.email,callback:function(e){t.$set(t.formData,"email",e)},expression:"formData.email"}},[t._v(">")])],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件类型:","label-width":"150px",prop:"certType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"证件类型",disabled:t.hiddenAdd},model:{value:t.formData.certType,callback:function(e){t.$set(t.formData,"certType",e)},expression:"formData.certType"}},[t._v("\n >\n "),a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件号码:","label-width":"150px",prop:"certCode"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.hiddenAdd},model:{value:t.formData.certCode,callback:function(e){t.$set(t.formData,"certCode",e)},expression:"formData.certCode"}},[t._v(">")])],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件电子档:","label-width":"150px"}},[!0!==t.hiddenAdd?a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"file-list":t.fileList,data:{type:"image5"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1):t._e(),!0===t.hiddenAdd?a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{disabled:null===t.formData.filePath,type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.openFile(t.formData.filePath)}}},[t._v("查看\n ")]):t._e()],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"授权书电子档:","label-width":"150px"}},[!0!==t.hiddenAdd?a("el-upload",{ref:"upload2",staticClass:"upload-demo2",attrs:{action:this.uploadUrl,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess2,"file-list":t.fileList2,data:{type:"image5"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1):t._e(),!0===t.hiddenAdd?a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{disabled:null===t.formData.filePath2,type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.openFile(t.formData.filePath2)}}},[t._v("查看\n ")]):t._e()],1)],1)],1)],1)],1)],1)},Ae=[],Me=a("1516"),We=a.n(Me),He=a("21a6"),Ke=a("43ef");function Je(t){return Object(et["a"])({url:"/sale/info/company/salesman/filter",method:"get",params:t})}function Ge(t){return Object(et["a"])({url:"/sale/info/insertCompanySalesman",method:"post",data:t})}function Xe(t){return Object(et["a"])({url:"/sale/info/updateCompanySalesman",method:"post",data:t})}function Ye(t){return Object(et["a"])({url:"/sale/info/deleteCompanySalesman",method:"post",data:t})}var Ze={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",formData:{certType:"1"},formRules:{name:[{required:!0,message:"请输入姓名",trigger:"blur"}],tel:[{required:!0,message:"请输入电话",trigger:"blur"}],certType:[{required:!0,message:"请选择证件类型",trigger:"blur"}],certCode:[{required:!0,message:"请输入证件号码",trigger:"blur"}]},loading:!1,uploadUrl:"",fileList:[],fileList2:[],hiddenAdd:!1,hiddenAdd2:!1}},components:{draggable:We.a},methods:{submitUpload:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.$refs.upload2.uploadFiles.length>0?t.$refs.upload2.submit():t.$isBlank(t.idQuery)?t.$message.warning("请选择文件"):t.onSubmit())}))},openFile:function(t){window.open(r["a"]+"/udiwms/image/register/file/getImage?type=image5&name="+t)},updateAuditStatus:function(t){var e=this;this.formData.auditStatus=t,Xe(this.formData).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("成功"),e.closeDialog(!0)):e.$message.error(t.message)}))},onSubmit:function(){var t=this;this.loading=!0,this.$isBlank(this.idQuery)?(this.formData.customerId=L["a"].getters.customerId,Ge(this.formData).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("添加成功"),t.closeDialog(!0)):t.$message.error(e.message)}))):Xe(this.formData).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("修改成功"),t.closeDialog(!0)):t.$message.error(e.message)}))},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){2e4===t.code?(this.$isBlank(this.idQuery)?this.formData.filePath=t.data.name:this.formData.newFilePath=t.data.name,this.$refs.upload2.uploadFiles.length>0?this.$refs.upload2.submit():this.onSubmit()):this.$message.error("文件上传失败:"+t.message)},uploadHandleSuccess2:function(t,e,a){2e4===t.code?(this.$isBlank(this.idQuery)?this.formData.filePath2=t.data.name:this.formData.newFilePath2=t.data.name,this.onSubmit()):this.$message.error("文件上传失败:"+t.message)}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.uploadUrl=r["a"]+"/udiwms/upload/register/file",this.$isNotBlank(this.idQuery)&&(this.formData=this.idQuery.formData,this.$isNotBlank(this.idQuery.toView)?(this.hiddenAdd=!0,this.$isNotBlank(this.idQuery.toView2)&&(this.hiddenAdd2=!0)):this.hiddenAdd=!1)}},ta=Ze,ea=(a("4266"),Object(g["a"])(ta,Ue,Ae,!1,null,null,null)),aa=ea.exports,ia=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[!0===t.hiddenAdd?a("div",{staticStyle:{display:"flex","margin-top":"-30px"}},[a("el-button",{staticStyle:{margin:"0 20px 0 auto"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.updateAuditStatus(1)}}},[t._v("通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.updateAuditStatus(2)}}},[t._v("不通过")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")])],1):t._e(),a("el-card",{staticClass:"el-card"},[a("div",[null===this.uuid?a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.unionQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{size:"mini",placeholder:"最小单元销售标识"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.unionQuery.nameCode,callback:function(e){t.$set(t.unionQuery,"nameCode",e)},expression:"unionQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{size:"mini",placeholder:"产品通用名"},model:{value:t.unionQuery.cpmctymc,callback:function(e){t.$set(t.unionQuery,"cpmctymc",e)},expression:"unionQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{size:"mini",placeholder:"医疗器械注册人"},model:{value:t.unionQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.unionQuery,"ylqxzcrbarmc",e)},expression:"unionQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",size:"mini"},model:{value:t.unionQuery.ggxh,callback:function(e){t.$set(t.unionQuery,"ggxh",e)},expression:"unionQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search",size:"mini"},on:{click:t.getList}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.combine}},[t._v("确定\n ")])],1)],1)],1)],1):t._e(),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.udidlList,"highlight-current-row":"true","row-class-name":t.tableRowClassName},on:{"row-click":t.intentDetail,"current-change":t.handleErpChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"医疗器械注册人",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册证编号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.unionQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)]),a("el-card",{staticClass:"el-card"},[a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.data.cpmctymc,callback:function(e){t.$set(t.data,"cpmctymc",e)},expression:"data.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.nameCode,callback:function(e){t.$set(t.data,"nameCode",e)},expression:"data.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ggxh,callback:function(e){t.$set(t.data,"ggxh",e)},expression:"data.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.data.ylqxzcrbarmc,callback:function(e){t.$set(t.data,"ylqxzcrbarmc",e)},expression:"data.ylqxzcrbarmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ylqxzcrbarywmc,callback:function(e){t.$set(t.data,"ylqxzcrbarywmc",e)},expression:"data.ylqxzcrbarywmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.qxlb,callback:function(e){t.$set(t.data,"qxlb",e)},expression:"data.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.cplb,callback:function(e){t.$set(t.data,"cplb",e)},expression:"data.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.flbm,callback:function(e){t.$set(t.data,"flbm",e)},expression:"data.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.sptm,callback:function(e){t.$set(t.data,"sptm",e)},expression:"data.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ybbm,callback:function(e){t.$set(t.data,"ybbm",e)},expression:"data.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.tyshxydm,callback:function(e){t.$set(t.data,"tyshxydm",e)},expression:"data.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.zczbhhzbapzbh,callback:function(e){t.$set(t.data,"zczbhhzbapzbh",e)},expression:"data.zczbhhzbapzbh"}})],1)])],1)],1)])],1)},la=[];function sa(t){return Object(et["a"])({url:"/udiwms/basic/instrument/maintain/filterProduct",method:"get",params:t})}function oa(t){return Object(et["a"])({url:"/sale/info/company/product/relevance/filter",method:"get",params:t})}function ra(t){return Object(et["a"])({url:"/sale/info/insertCompanyProductRelevance",method:"post",data:t})}function na(t){return Object(et["a"])({url:"/sale/info/insertFilter",method:"post",data:t})}function ca(t){return Object(et["a"])({url:"/sale/info/updateCompanyProductRelevance",method:"post",data:t})}function ua(t){return Object(et["a"])({url:"/sale/info/deleteCompanyProductRelevance",method:"post",data:t})}var da={name:"closeDialog",props:{closeDialog:{type:Function,required:!0},uuid:{type:String,required:!0},hid:{type:String,required:!0}},data:function(){return{unionQuery:{page:1,limit:10,nameCode:"",cpmctymc:"",ylqxzcrbarmc:"",ggxh:""},combineQuery:{},checked:!0,udidlList:[],erpList:[],pageTotal:1,total:1,currentRow:null,loading:!1,erpLloading:!1,multipleUdiSelection:[],data:{},hiddenAdd:!1}},created:function(){this.$isNotBlank(this.uuid)&&(this.unionQuery.uuid=this.uuid,this.getList(),this.$isNotBlank(this.hid)?this.hiddenAdd=!0:this.hiddenAdd=!1)},methods:{getList:function(){var t=this;""!==this.unionQuery.nameCode||""!==this.unionQuery.cpmctymc||""!==this.unionQuery.ylqxzcrbarmc||""!==this.unionQuery.ggxh||""!==this.unionQuery.uuid?(this.loading=!0,sa(this.unionQuery).then((function(e){console.log(e),t.loading=!1,t.udidlList=e.data.list||[],t.total=e.data.total||0,console.log(t.total)})).catch((function(){t.loading=!1,t.udidlList=[],t.total=0}))):this.$message.warning("请输入查询条件")},intentDetail:function(t){this.data=t},keyup_submit:function(t){console.log("全选----"),this.getList(),t.target.select()},checkSelectable:function(t,e){return!t.check},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.checked?"warning-row":""},handleErpChange:function(t){console.log(t),this.currentRow=t},intentBack:function(){this.closeDialog()},updateAuditStatus:function(t){var e=this,a={auditStatus:t,id:this.hid};ca(a).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("成功"),e.closeDialog(!0)):e.$message.error(t.message)}))},combine:function(){var t=this;this.combineQuery.productUuid=this.currentRow.uuid,this.combineQuery.customerId=L["a"].getters.customerId,ra(this.combineQuery).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("添加成功"),t.closeDialog(!0)):t.$message.error(e.message)}))},handleSelectionUdiChange:function(t){console.log("----"+t),this.multipleUdiSelection=t}}},pa=da,ma=(a("6f7b"),Object(g["a"])(pa,ia,la,!1,null,"083c602c",null)),ha=ma.exports;function fa(t){return Object(et["a"])({url:"/sale/info/company/cert/filter",method:"get",params:t})}function ga(t){return Object(et["a"])({url:"/sale/info/insertCompanyCert",method:"post",data:t})}function ya(t){return Object(et["a"])({url:"/sale/info/deleteCompanyCert",method:"post",data:t})}function ba(t){return Object(et["a"])({url:"/sale/info/company/salesman/update/log/filter",method:"get",params:t})}function va(t){return Object(et["a"])({url:"/sale/info/insertCompanySalesmanUpdateLog",method:"post",data:t})}function wa(t){return Object(et["a"])({url:"/sale/info/updateCompanySalesmanUpdateLog",method:"post",data:t})}var xa={data:function(){return{filterQuery:{companyName:"",checkType:"",creditNum:"",auditStatus:"6",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},userflag:{0:"禁用",1:"正常",2:"未验证"},bussinessFlag:{1:"医院",2:"经营企业"},list:[],isTip:{0:"否",1:"是"},formVisible:!1,contractVisible:!1,customerVisible:!1,timer:"",formData:{customerName:"111",userMax:"",isInfoLink:"",infoLink:"",customerId:"",userFlag:"",roleId:"",pdfTemplateId:""},contractData:{contacts:"",mobile:"",tel:"",email:""},currentCustomer:"",check:"",roles:[],pdfTemplates:[],centerDialogVisible:!1,rowData:{},rowDataRules:{nickName:[{required:!0,message:"请输入用户名称",trigger:"blur"}]},fileUrl:"",checkQuery:{id:"",checkType:"",roles:""},certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,certFileUrl:"",addCertVisible:!1,certTypeMap:{1:"身份证"},auditStatusMap:{4:"申请变更",3:"允许变更",5:"拒绝变更",6:"待审核",1:"通过",2:"不通过"},idQuery:{id:""},salesmanQuery:{name:"",auditStatus:"6",page:1,limit:20},salesmanList:[],salesmanTotal:0,salesmanLoading:!1,addSalesmanVisible:!1,selectLocalVisible:!1,productQuery:{ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"6",page:1,limit:20},productList:[],productTotal:0,productLoading:!1,uuid:null,hid:!0}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",creditNum:"",auditStatus:"6",page:1,limit:20},this.getList(),this.productList=[],this.salesmanList=[]},formSubmit:function(t,e){var a=this;if(2===e&&this.$isBlank(this.rowData.noPassCause))return this.$message.warning("请输入拒绝原因");var i=1===e?"是否允许通过":"是否拒绝通过";this.$confirm(i,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$isNotBlank(t)&&(a.rowData=t),a.rowData.auditStatus=e,a.rowData.auditor=L["a"].getters.employeeName,Object(x["g"])(a.rowData).then((function(t){a.loading=!1,a.cancelDialog(),a.getList(),2e4===t.code?a.$message({type:"success",message:"更新成功!"}):a.$message.warning("更新失败")})).catch((function(){a.cancelDialog(),a.loading=!1}))})).catch((function(){}))},onSubmit:function(){this.getList()},openFile:function(t){window.open(this.fileUrl+t)},getList:function(){var t=this;this.loading=!0,Object(x["f"])(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},closeDialog:function(t){this.addSalesmanVisible=!1,this.selectLocalVisible=!1},getProductAndSalesmanList:function(t){this.getProductRelevanceList(t),this.getCompanySalesmanList(t)},salesmanOnReset:function(){var t=this.salesmanQuery.customerId;this.salesmanQuery={name:"",auditStatus:"6",page:1,limit:20},this.salesmanQuery.customerId=t,this.getCompanySalesmanList()},salesmanOnSubmit:function(){this.getCompanySalesmanList()},productOnReset:function(){var t=this.productQuery.customerId;this.productQuery={ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"6",page:1,limit:20},this.productQuery.customerId=t,this.getProductRelevanceList()},productOnSubmit:function(){this.getProductRelevanceList()},selectProduct:function(t){this.$isNotBlank(t)&&(this.hid=t.id,this.uuid=t.uuid,this.selectLocalVisible=!0)},addSalesman:function(t){this.$isNotBlank(t)&&this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.toView=!0,this.idQuery.formData=t,this.addSalesmanVisible=!0)},updateProductAuditStatus:function(t,e){var a=this,i={auditStatus:e,id:t.id};ca(i).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getProductRelevanceList(a.productQuery)):a.$message.error(t.message)}))},updateAuditStatus:function(t,e){var a=this;this.$confirm("是否进行反审?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={customerId:L["a"].getters.customerId,salesmanId:t.id,status:2,name:t.name};a.loading=!0,wa(e).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getCompanySalesmanList()):a.$message.error(t.message)}))})).catch((function(){}))},salesmanHandleCurrentChange:function(t){this.salesmanQuery.page=t,this.getCompanySalesmanList(this.salesmanQuery)},productHandleCurrentChange:function(t){this.productQuery.page=t,this.getProductRelevanceList(this.productQuery)},getCompanySalesmanList:function(t){var e=this;this.$isNotBlank(t)&&(this.salesmanQuery.customerId=t.customerId),this.$isBlank(this.salesmanQuery.customerId)||(this.salesmanLoading=!0,Je(this.salesmanQuery).then((function(t){e.salesmanLoading=!1,e.salesmanList=t.data.list||[]})).catch((function(){e.salesmanLoading=!1,e.salesmanList=[]})))},getProductRelevanceList:function(t){var e=this;this.$isNotBlank(t)&&(this.productQuery.customerId=t.customerId),this.$isBlank(this.productQuery.customerId)||(this.erpDisplay=!1,this.productLoading=!0,oa(this.productQuery).then((function(t){e.productLoading=!1,e.productList=t.data.list||[],console.log(e.productList),e.productTotal=t.data.total||0})).catch((function(){e.productLoading=!1,e.productList=[],e.productTotal=0})))},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},getCompanyCertList:function(){var t=this;this.certQuery.customerId=this.rowData.customerId,this.$isBlank(this.certQuery.customerId)||(this.certLoading=!0,fa(this.certQuery).then((function(e){t.certLoading=!1,t.certList=e.data.list||[]})).catch((function(){t.certLoading=!1,t.certList=[]})))},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},hideForm:function(){this.customerVisible=!1},cancelDialog:function(){this.formVisible=!1,this.contractVisible=!1,this.centerDialogVisible=!1},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleCheckedChange:function(t){console.log(t),console.log(this.check)},checkRegister:function(t){var e=this;this.loading=!0,Object(Xt["a"])(t).then((function(t){2e4===t.code?(e.getList(),e.$message({type:"success",message:"更新成功!"})):(e.$message.warning("更新失败"),e.loading=!1)})).catch((function(){}))},customerkDialog:function(t){this.currentCustomer=t.customerId,this.timer=(new Date).getTime(),console.log("this.currentCustomer = "+this.currentCustomer),this.customerVisible=!0},closeCustomerDialog:function(){console.log("this.currentCustomer 关闭 = "+this.currentCustomer),this.currentCustomer=null},checkDialog:function(t){console.log(t),console.log(t.customerName),this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),console.log(this.check),this.formVisible=!0},checkDialog2:function(t){this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),this.checkQuery={id:t.id+"",checkType:1,roles:t.roles},this.rowData=t,this.fileUrl="",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.centerDialogVisible=!0},contractDialog:function(t){this.contractData={contacts:t.contacts,mobile:t.mobile,tel:t.tel,email:t.email},this.contractVisible=!0},deleteDialog:function(t){var e=this;this.$confirm("删除后将清空该客户下所有用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.customerId};Te(a).then((function(){e.getList()}))})).catch((function(){}))},getRoleList:function(){var t=this;lt().then((function(e){t.roles=e.data.list||[],console.log("888---"+t.checkQuery.roles)})).catch((function(){}))},getPDFTemplateList:function(){var t=this;De().then((function(e){t.pdfTemplates=e.data.list})).catch((function(){}))}},components:{customerUser:qe,companyAddSalesman:aa,selectProduct:ha},mounted:function(){},created:function(){this.getList(),this.getRoleList(),this.certFileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image2&name="}},Da=xa,Ca=Object(g["a"])(Da,Pe,Be,!1,null,null,null),ka=Ca.exports,Qa=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"企业名称"},model:{value:t.filterQuery.companyName,callback:function(e){t.$set(t.filterQuery,"companyName",e)},expression:"filterQuery.companyName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"社会信用号"},model:{value:t.filterQuery.creditNum,callback:function(e){t.$set(t.filterQuery,"creditNum",e)},expression:"filterQuery.creditNum"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"row-click":t.getProductAndSalesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName"}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNum"}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.bussinessFlag[e.row.bussinessStatus]))])]}}])}),a("el-table-column",{attrs:{label:"企业法人",prop:"contacts"}}),a("el-table-column",{attrs:{label:"所属地区",prop:"area"}}),a("el-table-column",{attrs:{label:"详细地址",prop:"detailAddr","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:"4"!==e.row.auditStatus||null===e.row.auditStatus||""===e.row.auditStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog2(e.row)}}},[t._v("变更\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.productQuery,size:"mini"}}),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.productLoading,expression:"productLoading"}],staticStyle:{width:"100%"},attrs:{data:t.productList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.selectProduct(e.row)}}},[t._v("变更\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.productQuery.limit,layout:"prev, pager, next",total:t.productTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.salesmanQuery,size:"mini"}}),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.salesmanLoading,expression:"salesmanLoading"}],staticStyle:{width:"100%"},attrs:{data:t.salesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"姓名",prop:"name"}}),a("el-table-column",{attrs:{label:"电话",prop:"tel"}}),a("el-table-column",{attrs:{label:"手机",prop:"phone"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}}),a("el-table-column",{attrs:{label:"证件类型",prop:"certType",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.certTypeMap[e.row.certType]))])]}}])}),a("el-table-column",{attrs:{label:"证件号",prop:"certCode"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.addSalesman(e.row)}}},[t._v("变更\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.salesmanQuery.limit,layout:"prev, pager, next",total:t.salesmanTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-dialog",{attrs:{title:"供应商变更申请",visible:t.centerDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("div",{staticStyle:{display:"flex","margin-top":"-30px"}},[a("el-button",{staticStyle:{margin:"0 20px 0 auto"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.formSubmit(2)}}},[t._v("允许变更")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return t.formSubmit(3)}}},[t._v("拒绝变更")]),a("el-button",{staticStyle:{margin:"0 20px 0 0"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("取消")])],1),a("el-card",[a("el-form",{ref:"rowDataForm",staticStyle:{margin:"0 20px"},attrs:{model:t.rowData}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业名称:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.companyName,callback:function(e){t.$set(t.rowData,"companyName",e)},expression:"rowData.companyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"统一社会信用代码:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.creditNum,callback:function(e){t.$set(t.rowData,"creditNum",e)},expression:"rowData.creditNum"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业类别:","label-width":"150px",prop:"classes"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.bussinessFlag[t.rowData.bussinessStatus],callback:function(e){t.$set(t.bussinessFlag,t.rowData.bussinessStatus,e)},expression:"bussinessFlag[rowData.bussinessStatus]"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所属地区:","label-width":"150px",prop:"area"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.area,callback:function(e){t.$set(t.rowData,"area",e)},expression:"rowData.area"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系人:","label-width":"150px",prop:"contacts"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contacts,callback:function(e){t.$set(t.rowData,"contacts",e)},expression:"rowData.contacts"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"详细地址:","label-width":"150px",prop:"detailAddr"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.detailAddr,callback:function(e){t.$set(t.rowData,"detailAddr",e)},expression:"rowData.detailAddr"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系电话:","label-width":"150px",prop:"mobile"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.mobile,callback:function(e){t.$set(t.rowData,"mobile",e)},expression:"rowData.mobile"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"邮箱:","label-width":"150px",prop:"email"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.email,callback:function(e){t.$set(t.rowData,"email",e)},expression:"rowData.email"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件类型:","label-width":"150px",prop:"contactsPapersType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"证件类型",disabled:!0},model:{value:t.rowData.contactsPapersType,callback:function(e){t.$set(t.rowData,"contactsPapersType",e)},expression:"rowData.contactsPapersType"}},[a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件号码:","label-width":"150px",prop:"contactsPapersCode"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contactsPapersCode,callback:function(e){t.$set(t.rowData,"contactsPapersCode",e)},expression:"rowData.contactsPapersCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"登记状态:","label-width":"150px",prop:"registerStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"登记状态",disabled:!0},model:{value:t.rowData.registerStatus,callback:function(e){t.$set(t.rowData,"registerStatus",e)},expression:"rowData.registerStatus"}},[a("el-option",{attrs:{label:"续存(在营,开业,在册)",value:"1"}}),a("el-option",{attrs:{label:"吊销",value:"2"}}),a("el-option",{attrs:{label:"注销",value:"3"}}),a("el-option",{attrs:{label:"迁出",value:"4"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证号:","label-width":"150px",prop:"jyxkzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzh,callback:function(e){t.$set(t.rowData,"jyxkzh",e)},expression:"rowData.jyxkzh"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证发证机关:","label-width":"150px",prop:"jyxkzfzjg"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzfzjg,callback:function(e){t.$set(t.rowData,"jyxkzfzjg",e)},expression:"rowData.jyxkzfzjg"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证有效期至:","label-width":"150px",prop:"jyxkzyxq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!0,type:"date",placeholder:""},model:{value:t.rowData.jyxkzyxq,callback:function(e){t.$set(t.rowData,"jyxkzyxq",e)},expression:"rowData.jyxkzyxq"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案凭证号:","label-width":"150px",prop:"jybapzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybapzh,callback:function(e){t.$set(t.rowData,"jybapzh",e)},expression:"rowData.jybapzh"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案部门:","label-width":"150px",prop:"jybabm"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybabm,callback:function(e){t.$set(t.rowData,"jybabm",e)},expression:"rowData.jybabm"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"发证日期:","label-width":"150px",prop:"fzrq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"",disabled:!0},model:{value:t.rowData.fzrq,callback:function(e){t.$set(t.rowData,"fzrq",e)},expression:"rowData.fzrq"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"税号:","label-width":"150px",prop:"suihao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.suihao,callback:function(e){t.$set(t.rowData,"suihao",e)},expression:"rowData.suihao"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行:","label-width":"150px",prop:"kaihuhang"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuhang,callback:function(e){t.$set(t.rowData,"kaihuhang",e)},expression:"rowData.kaihuhang"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户账号:","label-width":"150px",prop:"kaihuzhanghao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuzhanghao,callback:function(e){t.$set(t.rowData,"kaihuzhanghao",e)},expression:"rowData.kaihuzhanghao"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"营业执照电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath||""===t.rowData.filePath,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath2||""===t.rowData.filePath2,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath2)}}},[t._v("查看文件\n ")])],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath3||""===t.rowData.filePath3,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath3)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath4||""===t.rowData.filePath4,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath4)}}},[t._v("查看文件\n ")])],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"变更原因:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{type:"textarea",size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.updateCause,callback:function(e){t.$set(t.rowData,"updateCause",e)},expression:"rowData.updateCause"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"拒绝原因:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{type:"textarea",size:"small",splaceholder:""},model:{value:t.rowData.noPassCause,callback:function(e){t.$set(t.rowData,"noPassCause",e)},expression:"rowData.noPassCause"}})],1)],1)],1)],1)],1)],1),t.selectLocalVisible?a("el-dialog",{attrs:{title:"医疗器械信息",visible:t.selectLocalVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectProduct",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,hid:t.hid}})],1):t._e(),t.addSalesmanVisible?a("el-dialog",{attrs:{title:"业务员",visible:t.addSalesmanVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.addSalesmanVisible=e},close:t.closeDialog}},[a("companyAddSalesman",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e()],1)},Sa=[];function _a(t){return Object(et["a"])({url:"/sale/info/company/update/log/filter",method:"get",params:t})}function $a(t){return Object(et["a"])({url:"/sale/info/getCompanyUpdateLogOne",method:"get",params:t})}function Ta(t){return Object(et["a"])({url:"/sale/info/addCompanyUpdateLog",method:"post",data:t})}function La(t){return Object(et["a"])({url:"/sale/info/applyUpdate",method:"post",data:t})}function Oa(t){return Object(et["a"])({url:"/sale/info/applyUpdateManage",method:"post",data:t})}var za={data:function(){return{filterQuery:{companyName:"",checkType:"",creditNum:"",auditStatus:"4",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},userflag:{0:"禁用",1:"正常",2:"未验证"},bussinessFlag:{1:"医院",2:"经营企业"},list:[],isTip:{0:"否",1:"是"},formVisible:!1,contractVisible:!1,customerVisible:!1,timer:"",formData:{customerName:"111",userMax:"",isInfoLink:"",infoLink:"",customerId:"",userFlag:"",roleId:"",pdfTemplateId:""},contractData:{contacts:"",mobile:"",tel:"",email:""},currentCustomer:"",check:"",roles:[],pdfTemplates:[],centerDialogVisible:!1,rowData:{},rowDataRules:{nickName:[{required:!0,message:"请输入用户名称",trigger:"blur"}]},fileUrl:"",checkQuery:{id:"",checkType:"",roles:""},certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,certFileUrl:"",addCertVisible:!1,certTypeMap:{1:"身份证"},auditStatusMap:{1:"通过",2:"不通过",3:"反审",4:"申请变更",5:"拒绝反审"},idQuery:{id:""},salesmanQuery:{name:"",auditStatus:"4",page:1,limit:20},salesmanList:[],salesmanTotal:0,salesmanLoading:!1,addSalesmanVisible:!1,selectLocalVisible:!1,productQuery:{ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"4",page:1,limit:20},productList:[],productTotal:0,productLoading:!1,uuid:null,hid:!0}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",creditNum:"",auditStatus:"4",page:1,limit:20},this.getList(),this.productList=[],this.salesmanList=[]},formSubmit:function(t){var e=this;if(3===t&&this.$isBlank(this.rowData.noPassCause))return this.$message.warning("请输入拒绝原因");var a=2===t?"是否允许变更":"是否拒绝变更";this.$confirm(a,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:e.rowData.applyUpdateId,customerId:e.rowData.customerId,status:t,noPassCause:e.rowData.noPassCause,auditor:L["a"].getters.employeeName};Oa(a).then((function(t){e.loading=!1,e.cancelDialog(),e.getList(),2e4===t.code?e.$message({type:"success",message:"成功!"}):e.$message.warning("失败")})).catch((function(){e.cancelDialog(),e.loading=!1}))})).catch((function(){}))},onSubmit:function(){this.getList()},openFile:function(t){window.open(this.fileUrl+t)},getList:function(){var t=this;this.loading=!0,Object(x["f"])(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},closeDialog:function(t){this.addSalesmanVisible=!1,this.selectLocalVisible=!1},getProductAndSalesmanList:function(t){},salesmanOnReset:function(){var t=this.salesmanQuery.customerId;this.salesmanQuery={name:"",auditStatus:"4",page:1,limit:20},this.salesmanQuery.customerId=t,this.getCompanySalesmanList()},salesmanOnSubmit:function(){this.getCompanySalesmanList()},productOnReset:function(){var t=this.productQuery.customerId;this.productQuery={ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"4",page:1,limit:20},this.productQuery.customerId=t,this.getProductRelevanceList()},productOnSubmit:function(){this.getProductRelevanceList()},selectProduct:function(t){this.$isNotBlank(t)&&(this.hid=t.id,this.uuid=t.uuid,this.selectLocalVisible=!0)},addSalesman:function(t){this.$isNotBlank(t)&&this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.toView=!0,this.idQuery.formData=t,this.addSalesmanVisible=!0)},updateProductAuditStatus:function(t,e){var a=this,i={auditStatus:e,id:t.id};ca(i).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getProductRelevanceList(a.productQuery)):a.$message.error(t.message)}))},updateAuditStatus:function(t,e){var a=this;this.$confirm("是否进行反审?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={customerId:L["a"].getters.customerId,salesmanId:t.id,status:2,name:t.name};a.loading=!0,wa(e).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getCompanySalesmanList()):a.$message.error(t.message)}))})).catch((function(){}))},salesmanHandleCurrentChange:function(t){this.salesmanQuery.page=t,this.getCompanySalesmanList(this.salesmanQuery)},productHandleCurrentChange:function(t){this.productQuery.page=t,this.getProductRelevanceList(this.productQuery)},getCompanySalesmanList:function(t){var e=this;this.$isNotBlank(t)&&(this.salesmanQuery.customerId=t.customerId),this.$isBlank(this.salesmanQuery.customerId)||(this.salesmanLoading=!0,Je(this.salesmanQuery).then((function(t){e.salesmanLoading=!1,e.salesmanList=t.data.list||[]})).catch((function(){e.salesmanLoading=!1,e.salesmanList=[]})))},getProductRelevanceList:function(t){var e=this;this.$isNotBlank(t)&&(this.productQuery.customerId=t.customerId),console.log(this.productQuery),this.$isBlank(this.productQuery.customerId)||(this.erpDisplay=!1,this.productLoading=!0,oa(this.productQuery).then((function(t){e.productLoading=!1,e.productList=t.data.list||[],console.log(e.productList),e.productTotal=t.data.total||0})).catch((function(){e.productLoading=!1,e.productList=[],e.productTotal=0})))},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},getCompanyCertList:function(){var t=this;this.certQuery.customerId=this.rowData.customerId,this.$isBlank(this.certQuery.customerId)||(this.certLoading=!0,fa(this.certQuery).then((function(e){t.certLoading=!1,t.certList=e.data.list||[]})).catch((function(){t.certLoading=!1,t.certList=[]})))},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},hideForm:function(){this.customerVisible=!1},cancelDialog:function(){this.formVisible=!1,this.contractVisible=!1,this.centerDialogVisible=!1},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleCheckedChange:function(t){console.log(t),console.log(this.check)},checkRegister:function(t){var e=this;this.loading=!0,Object(Xt["a"])(t).then((function(t){2e4===t.code?(e.getList(),e.$message({type:"success",message:"更新成功!"})):(e.$message.warning("更新失败"),e.loading=!1)})).catch((function(){}))},customerkDialog:function(t){this.currentCustomer=t.customerId,this.timer=(new Date).getTime(),console.log("this.currentCustomer = "+this.currentCustomer),this.customerVisible=!0},closeCustomerDialog:function(){console.log("this.currentCustomer 关闭 = "+this.currentCustomer),this.currentCustomer=null},checkDialog:function(t){console.log(t),console.log(t.customerName),this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),console.log(this.check),this.formVisible=!0},checkDialog2:function(t){this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),this.checkQuery={id:t.id+"",checkType:1,roles:t.roles},this.rowData=t,this.centerDialogVisible=!0,this.getCompanyApply(t.customerId)},getCompanyApply:function(t){var e=this,a={customerId:t};$a(a).then((function(t){console.log(t),2e4===t.code?(e.rowData.applyUpdateId=t.data.id,e.rowData.updateCause=t.data.updateCause,e.rowData.noPassCause=t.data.noPassCause):e.$message.warning(t.message)})).catch((function(){}))}},components:{customerUser:qe,companyAddSalesman:aa,selectProduct:ha},mounted:function(){},created:function(){this.getList()}},Ia=za,Na=Object(g["a"])(Ia,Qa,Sa,!1,null,null,null),Fa=Na.exports,qa=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"企业名称"},model:{value:t.filterQuery.companyName,callback:function(e){t.$set(t.filterQuery,"companyName",e)},expression:"filterQuery.companyName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"社会信用号"},model:{value:t.filterQuery.creditNum,callback:function(e){t.$set(t.filterQuery,"creditNum",e)},expression:"filterQuery.creditNum"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.filterQuery.auditStatus,callback:function(e){t.$set(t.filterQuery,"auditStatus",e)},expression:"filterQuery.auditStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"通过",value:"1"}}),a("el-option",{attrs:{label:"允许变更",value:"3"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"row-click":t.getProductAndSalesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName"}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNum"}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.bussinessFlag[e.row.bussinessStatus]))])]}}])}),a("el-table-column",{attrs:{label:"企业法人",prop:"contacts"}}),a("el-table-column",{attrs:{label:"所属地区",prop:"area"}}),a("el-table-column",{attrs:{label:"详细地址",prop:"detailAddr","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:"0"===e.row.auditStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.checkDialog2(e.row)}}},[t._v("详情\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.productQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.productQuery.cpmctymc,callback:function(e){t.$set(t.productQuery,"cpmctymc",e)},expression:"productQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号"},model:{value:t.productQuery.ggxh,callback:function(e){t.$set(t.productQuery,"ggxh",e)},expression:"productQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产厂家"},model:{value:t.productQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.productQuery,"ylqxzcrbarmc",e)},expression:"productQuery.ylqxzcrbarmc"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.productOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.productOnSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.productLoading,expression:"productLoading"}],staticStyle:{width:"100%"},attrs:{data:t.productList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.selectProduct(e.row)}}},[t._v("详情\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.productQuery.limit,layout:"prev, pager, next",total:t.productTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.salesmanQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"业务员姓名"},model:{value:t.salesmanQuery.name,callback:function(e){t.$set(t.salesmanQuery,"name",e)},expression:"salesmanQuery.name"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.salesmanOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.salesmanOnSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.salesmanLoading,expression:"salesmanLoading"}],staticStyle:{width:"100%"},attrs:{data:t.salesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"姓名",prop:"name"}}),a("el-table-column",{attrs:{label:"电话",prop:"tel"}}),a("el-table-column",{attrs:{label:"手机",prop:"phone"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}}),a("el-table-column",{attrs:{label:"证件类型",prop:"certType",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.certTypeMap[e.row.certType]))])]}}])}),a("el-table-column",{attrs:{label:"证件号",prop:"certCode"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.addSalesman(e.row)}}},[t._v("详情\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.salesmanQuery.limit,layout:"prev, pager, next",total:t.salesmanTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),a("el-dialog",{attrs:{title:"详情","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.centerDialogVisible,width:"85%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("el-card",[a("el-form",{ref:"rowDataForm",staticStyle:{margin:"0 20px"},attrs:{model:t.rowData}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业名称:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.companyName,callback:function(e){t.$set(t.rowData,"companyName",e)},expression:"rowData.companyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"统一社会信用代码:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{size:"small",splaceholder:"",disabled:!0},model:{value:t.rowData.creditNum,callback:function(e){t.$set(t.rowData,"creditNum",e)},expression:"rowData.creditNum"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业类别:","label-width":"150px",prop:"classes"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.bussinessFlag[t.rowData.bussinessStatus],callback:function(e){t.$set(t.bussinessFlag,t.rowData.bussinessStatus,e)},expression:"bussinessFlag[rowData.bussinessStatus]"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所属地区:","label-width":"150px",prop:"area"}},[a("el-input",{attrs:{size:"small",disabled:!0},model:{value:t.rowData.area,callback:function(e){t.$set(t.rowData,"area",e)},expression:"rowData.area"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系人:","label-width":"150px",prop:"contacts"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contacts,callback:function(e){t.$set(t.rowData,"contacts",e)},expression:"rowData.contacts"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"详细地址:","label-width":"150px",prop:"detailAddr"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.detailAddr,callback:function(e){t.$set(t.rowData,"detailAddr",e)},expression:"rowData.detailAddr"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系电话:","label-width":"150px",prop:"mobile"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.mobile,callback:function(e){t.$set(t.rowData,"mobile",e)},expression:"rowData.mobile"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"邮箱:","label-width":"150px",prop:"email"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.email,callback:function(e){t.$set(t.rowData,"email",e)},expression:"rowData.email"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件类型:","label-width":"150px",prop:"contactsPapersType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"证件类型",disabled:!0},model:{value:t.rowData.contactsPapersType,callback:function(e){t.$set(t.rowData,"contactsPapersType",e)},expression:"rowData.contactsPapersType"}},[a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件号码:","label-width":"150px",prop:"contactsPapersCode"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.contactsPapersCode,callback:function(e){t.$set(t.rowData,"contactsPapersCode",e)},expression:"rowData.contactsPapersCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"登记状态:","label-width":"150px",prop:"registerStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"登记状态",disabled:!0},model:{value:t.rowData.registerStatus,callback:function(e){t.$set(t.rowData,"registerStatus",e)},expression:"rowData.registerStatus"}},[a("el-option",{attrs:{label:"续存(在营,开业,在册)",value:"1"}}),a("el-option",{attrs:{label:"吊销",value:"2"}}),a("el-option",{attrs:{label:"注销",value:"3"}}),a("el-option",{attrs:{label:"迁出",value:"4"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证号:","label-width":"150px",prop:"jyxkzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzh,callback:function(e){t.$set(t.rowData,"jyxkzh",e)},expression:"rowData.jyxkzh"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证发证机关:","label-width":"150px",prop:"jyxkzfzjg"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jyxkzfzjg,callback:function(e){t.$set(t.rowData,"jyxkzfzjg",e)},expression:"rowData.jyxkzfzjg"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证有效期至:","label-width":"150px",prop:"jyxkzyxq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{disabled:!0,type:"date",placeholder:""},model:{value:t.rowData.jyxkzyxq,callback:function(e){t.$set(t.rowData,"jyxkzyxq",e)},expression:"rowData.jyxkzyxq"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案凭证号:","label-width":"150px",prop:"jybapzh"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybapzh,callback:function(e){t.$set(t.rowData,"jybapzh",e)},expression:"rowData.jybapzh"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案部门:","label-width":"150px",prop:"jybabm"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.jybabm,callback:function(e){t.$set(t.rowData,"jybabm",e)},expression:"rowData.jybabm"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"发证日期:","label-width":"150px",prop:"fzrq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"",disabled:!0},model:{value:t.rowData.fzrq,callback:function(e){t.$set(t.rowData,"fzrq",e)},expression:"rowData.fzrq"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"税号:","label-width":"150px",prop:"suihao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.suihao,callback:function(e){t.$set(t.rowData,"suihao",e)},expression:"rowData.suihao"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行:","label-width":"150px",prop:"kaihuhang"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuhang,callback:function(e){t.$set(t.rowData,"kaihuhang",e)},expression:"rowData.kaihuhang"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户账号:","label-width":"150px",prop:"kaihuzhanghao"}},[a("el-input",{attrs:{size:"small",placeholder:"",disabled:!0},model:{value:t.rowData.kaihuzhanghao,callback:function(e){t.$set(t.rowData,"kaihuzhanghao",e)},expression:"rowData.kaihuzhanghao"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"营业执照电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath||""===t.rowData.filePath,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath2||""===t.rowData.filePath2,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath2)}}},[t._v("查看文件\n ")])],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案证电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath3||""===t.rowData.filePath3,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath3)}}},[t._v("查看文件\n ")])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行电子档案:","label-width":"150px"}},[a("el-button",{attrs:{disabled:null===t.rowData.filePath4||""===t.rowData.filePath4,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.rowData.filePath4)}}},[t._v("查看文件\n ")])],1)],1)],1)],1)],1)],1),t.selectLocalVisible?a("el-dialog",{attrs:{title:"医疗器械信息",visible:t.selectLocalVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectProduct",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,hid:t.hid}})],1):t._e(),t.addSalesmanVisible?a("el-dialog",{attrs:{title:"业务员",visible:t.addSalesmanVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addSalesmanVisible=e},close:t.closeDialog}},[a("companyAddSalesman",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e()],1)},Va=[],Ra={data:function(){return{filterQuery:{companyName:"",checkType:"",creditNum:"",auditStatus:"",page:1,limit:20},value:"",total:0,checkFlag:{0:"未审核",1:"已通过",2:"已拒绝"},userflag:{0:"禁用",1:"正常",2:"未验证"},bussinessFlag:{1:"医院",2:"经营企业"},list:[],isTip:{0:"否",1:"是"},formVisible:!1,contractVisible:!1,customerVisible:!1,timer:"",formData:{customerName:"111",userMax:"",isInfoLink:"",infoLink:"",customerId:"",userFlag:"",roleId:"",pdfTemplateId:""},contractData:{contacts:"",mobile:"",tel:"",email:""},currentCustomer:"",check:"",roles:[],pdfTemplates:[],centerDialogVisible:!1,rowData:{},rowDataRules:{nickName:[{required:!0,message:"请输入用户名称",trigger:"blur"}]},fileUrl:"",checkQuery:{id:"",checkType:"",roles:""},certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,certFileUrl:"",addCertVisible:!1,certTypeMap:{1:"身份证"},auditStatusMap:{3:"允许变更",5:"拒绝变更",1:"通过",2:"不通过"},idQuery:{id:""},salesmanQuery:{name:"",auditStatus:"",page:1,limit:20},salesmanList:[],salesmanTotal:0,salesmanLoading:!1,addSalesmanVisible:!1,selectLocalVisible:!1,productQuery:{ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"",page:1,limit:20},productList:[],productTotal:0,productLoading:!1,uuid:null,hid:!0}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",creditNum:"",auditStatus:"",page:1,limit:20},this.getList(),this.productList=[],this.salesmanList=[]},formSubmit:function(t,e){var a=this;this.$isNotBlank(t)&&(this.rowData=t),this.rowData.auditStatus=e,Object(x["g"])(this.rowData).then((function(t){a.loading=!1,a.cancelDialog(),a.getList(),2e4===t.code?a.$message({type:"success",message:"更新成功!"}):a.$message.warning("更新失败")})).catch((function(){a.cancelDialog(),a.loading=!1}))},onSubmit:function(){this.getList()},openFile:function(t){window.open(this.fileUrl+t)},getList:function(){var t=this;this.loading=!0,this.$isBlank(this.filterQuery.auditStatus)?this.filterQuery.auditStatusList="1,3":this.filterQuery.auditStatusList="",Object(x["e"])(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},closeDialog:function(t){this.addSalesmanVisible=!1,this.selectLocalVisible=!1},getProductAndSalesmanList:function(t){this.getCompanySalesmanList(t)},salesmanOnReset:function(){var t=this.salesmanQuery.customerId;this.salesmanQuery={name:"",auditStatus:"",page:1,limit:20},this.salesmanQuery.customerId=t,this.getCompanySalesmanList()},salesmanOnSubmit:function(){this.getCompanySalesmanList()},productOnReset:function(){var t=this.productQuery.customerId;this.productQuery={ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"",page:1,limit:20},this.productQuery.customerId=t,this.getProductRelevanceList()},productOnSubmit:function(){this.getProductRelevanceList()},selectProduct:function(t){this.$isNotBlank(t)&&(this.hid=t.id,this.uuid=t.uuid,this.selectLocalVisible=!0)},addSalesman:function(t){this.$isNotBlank(t)&&this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.toView=!0,this.idQuery.toView2=!0,this.idQuery.formData=t,this.addSalesmanVisible=!0)},updateProductAuditStatus:function(t,e){var a=this,i={auditStatus:e,id:t.id};ca(i).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getProductRelevanceList(a.productQuery)):a.$message.error(t.message)}))},updateAuditStatus:function(t,e){var a=this;this.$confirm("是否进行反审?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={customerId:L["a"].getters.customerId,salesmanId:t.id,status:2,name:t.name};a.loading=!0,wa(e).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success("成功"),a.getCompanySalesmanList()):a.$message.error(t.message)}))})).catch((function(){}))},salesmanHandleCurrentChange:function(t){this.salesmanQuery.page=t,this.getCompanySalesmanList(this.salesmanQuery)},productHandleCurrentChange:function(t){this.productQuery.page=t,this.getProductRelevanceList(this.productQuery)},getCompanySalesmanList:function(t){var e=this;this.$isNotBlank(t)&&(this.salesmanQuery.customerId=t.customerId),this.$isBlank(this.salesmanQuery.customerId)||(this.salesmanLoading=!0,Je(this.salesmanQuery).then((function(t){e.salesmanLoading=!1,e.salesmanList=t.data.list||[]})).catch((function(){e.salesmanLoading=!1,e.salesmanList=[]})))},getProductRelevanceList:function(t){var e=this;this.$isNotBlank(t)&&(this.productQuery.customerId=t.customerId),console.log(this.productQuery),this.$isBlank(this.productQuery.customerId)||(this.erpDisplay=!1,this.productLoading=!0,oa(this.productQuery).then((function(t){e.productLoading=!1,e.productList=t.data.list||[],console.log(e.productList),e.productTotal=t.data.total||0})).catch((function(){e.productLoading=!1,e.productList=[],e.productTotal=0})))},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},getCompanyCertList:function(){var t=this;this.certQuery.customerId=this.rowData.customerId,this.$isBlank(this.certQuery.customerId)||(this.certLoading=!0,fa(this.certQuery).then((function(e){t.certLoading=!1,t.certList=e.data.list||[]})).catch((function(){t.certLoading=!1,t.certList=[]})))},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},hideForm:function(){this.customerVisible=!1},cancelDialog:function(){this.formVisible=!1,this.contractVisible=!1,this.centerDialogVisible=!1},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleCheckedChange:function(t){console.log(t),console.log(this.check)},checkRegister:function(t){var e=this;this.loading=!0,Object(Xt["a"])(t).then((function(t){2e4===t.code?(e.getList(),e.$message({type:"success",message:"更新成功!"})):(e.$message.warning("更新失败"),e.loading=!1)})).catch((function(){}))},customerkDialog:function(t){this.currentCustomer=t.customerId,this.timer=(new Date).getTime(),console.log("this.currentCustomer = "+this.currentCustomer),this.customerVisible=!0},closeCustomerDialog:function(){console.log("this.currentCustomer 关闭 = "+this.currentCustomer),this.currentCustomer=null},checkDialog:function(t){console.log(t),console.log(t.customerName),this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),console.log(this.check),this.formVisible=!0},checkDialog2:function(t){this.formData={customerName:t.companyName,userMax:t.userMax,isInfoLink:t.isInfoLink+"",infoLink:t.infoLink,customerId:t.customerId,userFlag:t.userFlag,pdfTemplateId:t.pdfTemplateId},this.check=parseInt(t.roleId),this.checkQuery={id:t.id+"",checkType:1,roles:t.roles},this.rowData=t,this.fileUrl="",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.centerDialogVisible=!0},contractDialog:function(t){this.contractData={contacts:t.contacts,mobile:t.mobile,tel:t.tel,email:t.email},this.contractVisible=!0},deleteDialog:function(t){var e=this;this.$confirm("删除后将清空该客户下所有用户?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.customerId};Te(a).then((function(){e.getList()}))})).catch((function(){}))},getRoleList:function(){var t=this;lt().then((function(e){t.roles=e.data.list||[],console.log("888---"+t.checkQuery.roles)})).catch((function(){}))},getPDFTemplateList:function(){var t=this;De().then((function(e){t.pdfTemplates=e.data.list})).catch((function(){}))}},components:{customerUser:qe,companyAddSalesman:aa,selectProduct:ha},mounted:function(){},created:function(){this.getList(),this.getRoleList(),this.certFileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image2&name="}},Ea=Ra,ja=Object(g["a"])(Ea,qa,Va,!1,null,null,null),Pa=ja.exports,Ba=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"模板名称"},model:{value:t.query.name,callback:function(e){t.$set(t.query,"name",e)},expression:"query.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"模板类型"},model:{value:t.query.module,callback:function(e){t.$set(t.query,"module",e)},expression:"query.module"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"标签",value:"0"}}),a("el-option",{attrs:{label:"报表",value:"1"}}),a("el-option",{attrs:{label:"单据",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.handleAddForm(null)}}},[t._v("新增模板")])],1)],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"模板名称",prop:"name",width:"260"}}),a("el-table-column",{attrs:{label:"模板类型",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.moduleNameMap[e.row.module])+"\n ")]}}])}),a("el-table-column",{attrs:{label:"更新时间",prop:"update_time",width:"180"}}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("设置\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteTemplate(e.row)}}},[t._v("删除\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.jumpDl(e.row)}}},[t._v("模板下载\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.hideForm,width:"75%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("模板名称:")])])]),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("备注:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"module"}},[a("el-select",{attrs:{placeholder:"模板类型"},model:{value:t.formData.module,callback:function(e){t.$set(t.formData,"module",e)},expression:"formData.module"}},[a("el-option",{attrs:{label:"标签",value:"0"}}),a("el-option",{attrs:{label:"报表",value:"1"}}),a("el-option",{attrs:{label:"单据",value:"2"}})],1)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("备注:")])])]),a("el-col",{attrs:{span:20}},[a("el-form-item",[a("el-input",{attrs:{type:"textarea",rows:"6"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("选择jasper模板:")])])]),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:""}},[a("el-upload",{ref:"uploadJasper",staticClass:"upload-demo",attrs:{action:this.uploadUrl,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jasper","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"auto-upload":!0,"file-list":t.fileList}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.uploadDisabled},slot:"trigger"},[t._v("选取文件\n ")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传 jasper 文件,且不超过 2 MB")])],1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("选择jrxml模板:")])])]),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:""}},[a("el-upload",{ref:"uploadJrxml",staticClass:"upload-demo",attrs:{action:this.uploadJrxmlUrl,limit:1,"on-exceed":t.uploadJrxmlHandleExceed,accept:".jrxml","on-change":t.uploadJrxmlOnchange,"on-success":t.uploadJrxmlHandleSuccess,"file-list":t.jrxmlFileList,"auto-upload":!0}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.uploadDisabled},slot:"trigger"},[t._v("选取文件\n ")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传 jrxml 文件,且不超过 2 MB")])],1)],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.submitUpload()}}},[t._v("提交\n ")])],1),a("div",{staticStyle:{"margin-top":"18px",color:"#F71616"}},[a("span",[t._v("提示:模板字体支持宋体,华文宋体,微软雅黑 ")])])],1),a("el-dialog",{attrs:{title:"选择模板","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.moduleFormVisible,"before-close":t.moduleHideForm,width:"45%",top:"5vh"},on:{"update:visible":function(e){t.moduleFormVisible=e}}},[a("el-form",{ref:"singleTable"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.selectTemplateLoading,expression:"selectTemplateLoading"}],staticStyle:{width:"100%"},attrs:{data:t.selectTemplateList,"highlight-current-row":""},on:{"current-change":t.moduleSelectHandleCurrentChange}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"模板名称",prop:"name",width:"200"}}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}})],1),a("el-pagination",{attrs:{"page-size":t.selectTemplateQuery.limit,layout:"prev, pager, next",total:t.selectTemplateTotal},on:{"current-change":t.moduleHandleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.moduleHideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.moduleFormLoading},nativeOn:{click:function(e){return t.moduleSubmitSelectTemplate()}}},[t._v("确定\n ")])],1)],1),a("el-dialog",{attrs:{title:"字段说明",visible:t.centerDialogVisible,width:"80%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("span",{staticStyle:{"white-space":"pre-wrap"}},[t._v(t._s(t.currentRow))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("确 定")])],1)])],1)},Ua=[],Aa=(a("a481"),{id:"",name:"",type:"2",module:null,param:"",path:"",jrxmlPath:null,rowCount:10,qrcodeCount:1,remark:""}),Ma={id:"",templateId:0},Wa={data:function(){return{query:{name:"",module:null,page:1,limit:20},list:[],total:0,moduleQuery:{name:"",page:1,limit:20},currentRow:null,moduleList:[],moduleNameList:[],moduleTotal:0,selectTemplateQuery:{name:"",module:null,page:1,limit:20},centerDialogVisible:!1,selectTemplateList:[],selectTemplateTotal:0,selectTemplateLoading:!1,moduleSelectQuery:{name:"",page:1,limit:20},moduleSelectList:[],moduleSelectTotal:0,loading:!0,index:null,formName:null,moduleFormName:null,formMap:{add:"新增",update:"设置"},formLoading:!1,formVisible:!1,moduleFormLoading:!1,moduleFormVisible:!1,formData:Aa,moduleFormData:Ma,formRules:{name:[{required:!0,message:"请输入模板名称",trigger:"blur"}],module:[{required:!0,message:"请选择模板类型",trigger:"blur"}]},deleteLoading:!1,uploadUrl:"",uploadJrxmlUrl:"",fileList:[],jrxmlFileList:[],uploadDisabled:!1,moduleLoading:!1,moduleNameMap:{0:"标签",1:"报表",2:"单据"}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={name:"",page:1,limit:20},this.getList()},onSubmit:function(){this.getList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},moduleHandleCurrentChange:function(t){this.moduleQuery.page=t,this.getModuleList()},getList:function(){var t=this;this.loading=!0,ve(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},moduleClick:function(t){this.query={module:t.id,page:1,limit:20},this.getList()},jumpDl:function(t){console.log(r["a"]),console.log(t.templateDlUrl+"----"),this.handleDownload(r["a"]+"/udiwms/donwload/file?fileName="+t.jrxmlPath,t.name+".jrxml")},handleDownload:function(t,e){return this.getBlob(t).then((function(t){Object(He["saveAs"])(t,e)})),!1},getBlob:function(t){return new Promise((function(e){var a=new XMLHttpRequest;a.open("GET",t,!0),a.responseType="blob",a.onload=function(){200===a.status&&e(a.response)},a.send()}))},getModuleList:function(){var t=this;this.moduleLoading=!0,we(this.moduleQuery).then((function(e){t.moduleLoading=!1,t.moduleList=e.data.list||[],t.moduleTotal=e.data.total||0})).catch((function(){t.moduleLoading=!1,t.moduleList=[],t.moduleTotal=0}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.fileList=null,this.jrxmlFileList=null,this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},moduleHideForm:function(){return this.moduleFormVisible=!this.moduleFormVisible,this.selectTemplateQuery.module=null,!0},moduleSelectTemplate:function(t){this.moduleFormData={id:t.id,templateId:t.templateId},this.moduleFormVisible=!0,this.selectTemplateQuery={name:"",module:t.id,page:1,limit:20},this.selectTemplateGetList()},selectTemplateGetList:function(){var t=this;console.log(this.selectTemplateQuery),this.selectTemplateLoading=!0,ve(this.selectTemplateQuery).then((function(e){t.selectTemplateLoading=!1,t.selectTemplateList=e.data.list||[],t.selectTemplateTotal=e.data.total||0})).catch((function(){t.selectTemplateLoading=!1,t.selectTemplateList=[],t.selectTemplateTotal=0}))},previewTemplate:function(t){console.log(t)},showFieldExpain:function(t){this.currentRow=t.fieldExplain.replace("\\\n","<br>"),this.centerDialogVisible=!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(Aa)),this.fileList=[],null!==e&&(this.formData=Object.assign({},e),this.formData.module=e.module+""),this.index=t,this.formName="update",this.uploadDisabled=!0},handleAddForm:function(t){this.formVisible=!0,this.fileList=[],this.formName="add",this.uploadDisabled=!1},templateConfig:function(t){},submitUpload:function(){var t=this;this.$refs.uploadJasper.uploadFiles.length<1&&!this.uploadDisabled&&this.$message.warning("请选择jasper文件"),this.$refs.uploadJrxml.uploadFiles.length<1&&!this.uploadDisabled&&this.$message.warning("请选择jasper文件"),console.log(this.formName),this.$refs["dataForm"].validate((function(e){e&&t.submitTemplate()}))},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jasper"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 jasper 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?this.formData.path=t.data.path:this.$message.error("上传失败:"+t.message)},uploadJrxmlHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadJrxmlOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jrxml"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 jrxml 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadJrxmlHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?this.formData.jrxmlPath=t.data.path:this.$message.error("上传失败:"+t.message)},submitTemplate:function(){var t=this;console.log(this.formData),this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);a.name=a.name.trim(),Ce(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList(),t.getModuleList()})).catch((function(){t.formLoading=!1}))}}))},deleteTemplate:function(t){var e=this;this.$confirm("此操作将永久删除该模板, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Qe({id:t.id,path:t.path}).then((function(t){console.log(t),2e4===t.code?(e.$message.success(t.data),e.resetForm(),e.getList()):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},moduleSelectSetCurrent:function(t){this.$refs.singleTable.setCurrentRow(t)},moduleSelectHandleCurrentChange:function(t){this.moduleFormData.templateId=t.id,console.log(t),console.log(this.moduleFormData)},moduleSubmitSelectTemplate:function(){var t=this;this.moduleFormLoading=!0;var e=Object.assign({},this.moduleFormData);this.moduleFormName="update",ke(e,this.moduleFormName).then((function(a){if(t.moduleFormLoading=!1,2e4!==a.code)return t.$message.error(a.message),!1;t.$message.success("操作成功"),t.moduleFormVisible=!1,"add"===t.moduleFormName?a.data&&a.data.id&&(e.id=a.data.id,t.moduleList.unshift(e)):t.moduleList.splice(t.index,1,e),t.getModuleList()})).catch((function(){t.moduleFormLoading=!1}))},getPDFModuleNameList:function(){var t=this;xe().then((function(e){t.moduleNameList=e.data.list,console.log(t.moduleNameMap)})).catch((function(){}))}},filters:{paramStatusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},paramStatusFilterName:function(t){var e={1:"订单详情",2:"配货管理-打印订单"};return e[t]}},mounted:function(){},created:function(){this.getList(),this.getPDFModuleNameList(),this.getModuleList(),this.uploadUrl=r["a"]+"/udiwms/upload/pdf/template/jasper",this.uploadJrxmlUrl=r["a"]+"/udiwms/upload/pdf/template/jrxml"}},Ha=Wa,Ka=Object(g["a"])(Ha,Ba,Ua,!1,null,null,null),Ja=Ka.exports,Ga=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.moduleQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"功能名称"},model:{value:t.moduleQuery.name,callback:function(e){t.$set(t.moduleQuery,"name",e)},expression:"moduleQuery.name"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.moduleLoading,expression:"moduleLoading"}],staticStyle:{width:"100%"},attrs:{data:t.moduleList,"highlight-current-row":""},on:{"row-click":t.moduleClick}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"模板类型",width:"150",prop:"templateType"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.moduleTypeMap[e.row.templateType])+"\n ")]}}])}),a("el-table-column",{attrs:{label:"功能名称",prop:"name",width:"250"}}),a("el-table-column",{attrs:{label:"模板名称",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[null===e.row.templateName?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.moduleSelectTemplate(e.row)}}},[t._v("选择模板\n ")])],1):t._e(),null!==e.row.templateName?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.moduleSelectTemplate(e.row)}}},[t._v(t._s(e.row.templateName)+"\n ")])],1):t._e()]}}])}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.showFieldExpain(e.row)}}},[t._v("字段说明\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.jumpDl(e.row)}}},[t._v("初始模板下载\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.moduleQuery.limit,layout:"prev, pager, next",total:t.moduleTotal},on:{"current-change":t.moduleHandleCurrentChange}})],1),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.hideForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-form-item",{attrs:{label:"模板名称",prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea",rows:"6"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("选择jasper模板:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:""}},[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jasper","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"on-error":t.uploadHandleError,"file-list":t.fileList,"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.uploadDisabled},slot:"trigger"},[t._v("选取文件\n ")]),a("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传 jasper 文件,且不超过 2 MB")])],1)],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("所属模块:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"module"}},[a("el-select",{attrs:{placeholder:"所属模块"},model:{value:t.formData.module,callback:function(e){t.$set(t.formData,"module",e)},expression:"formData.module"}},t._l(t.moduleNameList,(function(t){return a("el-option",{key:t.idStr,attrs:{label:t.name,value:t.idStr}})})),1)],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.submitUpload()}}},[t._v("提交\n ")])],1)],1),a("el-dialog",{attrs:{title:"选择模板","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.moduleFormVisible,"before-close":t.moduleHideForm,width:"70%",top:"5vh"},on:{"update:visible":function(e){t.moduleFormVisible=e}}},[a("el-form",{ref:"singleTable"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.selectTemplateLoading,expression:"selectTemplateLoading"}],staticStyle:{width:"100%"},attrs:{data:t.selectTemplateList,"highlight-current-row":""},on:{"current-change":t.moduleSelectHandleCurrentChange}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"模板名称",prop:"name",width:"200"}}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}})],1),a("el-pagination",{attrs:{"page-size":t.selectTemplateQuery.limit,layout:"prev, pager, next",total:t.selectTemplateTotal},on:{"current-change":t.moduleHandleCurrentChange}})],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.moduleHideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.moduleFormLoading},nativeOn:{click:function(e){return t.moduleSubmitSelectTemplate()}}},[t._v("确定\n ")])],1)],1),a("el-dialog",{attrs:{title:"字段说明",visible:t.centerDialogVisible,width:"40%",center:""},on:{"update:visible":function(e){t.centerDialogVisible=e}}},[a("span",{staticStyle:{"white-space":"pre-wrap"}},[t._v(t._s(t.currentRow))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.centerDialogVisible=!1}}},[t._v("确 定")])],1)])],1)},Xa=[],Ya={id:"",name:"",type:"2",module:"1",param:"",path:"",rowCount:10,qrcodeCount:1,remark:""},Za={id:"",templateId:0},ti={data:function(){return{query:{name:"",page:1,limit:20},list:[],total:0,moduleQuery:{name:"",page:1,limit:20},currentRow:null,moduleList:[],moduleNameList:[],moduleTotal:0,selectTemplateQuery:{name:"",module:null,page:1,limit:20},centerDialogVisible:!1,selectTemplateList:[],selectTemplateTotal:0,selectTemplateLoading:!1,moduleSelectQuery:{name:"",page:1,limit:20},moduleSelectList:[],moduleSelectTotal:0,loading:!0,index:null,formName:null,moduleFormName:null,formMap:{add:"新增",update:"设置"},formLoading:!1,formVisible:!1,moduleFormLoading:!1,moduleFormVisible:!1,formData:Ya,moduleFormData:Za,formRules:{name:[{required:!0,message:"请输入模板名称",trigger:"blur"}],module:[{required:!0,message:"请选择所属模块",trigger:"blur"}]},deleteLoading:!1,uploadUrl:"",fileList:[],uploadDisabled:!1,moduleLoading:!1,moduleTypeMap:{0:"标签",1:"报表",2:"单据"}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={name:"",page:1,limit:20},this.getModuleList()},onSubmit:function(){this.getModuleList()},handleCurrentChange:function(t){this.query.page=t,this.getList()},moduleHandleCurrentChange:function(t){this.moduleQuery.page=t,this.getModuleList()},getList:function(){var t=this;this.loading=!0,ve(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},moduleClick:function(t){this.query={module:t.id,page:1,limit:20},this.getList()},handleDownload:function(t,e){return this.getBlob(t).then((function(t){Object(He["saveAs"])(t,e)})),!1},getBlob:function(t){return new Promise((function(e){var a=new XMLHttpRequest;a.open("GET",t,!0),a.responseType="blob",a.onload=function(){200===a.status&&e(a.response)},a.send()}))},jumpDl:function(t){console.log(r["a"]),console.log(t.templateDlUrl+"----"+r["c"]),this.handleDownload(r["a"]+"/udiwms/donwload/file?fileName="+t.templateDlUrl,t.name+".jrxml")},getModuleList:function(){var t=this;this.moduleLoading=!0,we(this.moduleQuery).then((function(e){t.moduleLoading=!1,t.moduleList=e.data.list||[],t.moduleTotal=e.data.total||0})).catch((function(){t.moduleLoading=!1,t.moduleList=[],t.moduleTotal=0}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},moduleHideForm:function(){return this.moduleFormVisible=!this.moduleFormVisible,this.selectTemplateQuery.module=null,!0},moduleSelectTemplate:function(t){this.moduleFormData={id:t.id,templateId:t.templateId},this.moduleFormVisible=!0,this.selectTemplateQuery={module:t.templateType,name:"",page:1,limit:20},this.selectTemplateGetList()},selectTemplateGetList:function(){var t=this;console.log(this.selectTemplateQuery),this.selectTemplateLoading=!0,ve(this.selectTemplateQuery).then((function(e){t.selectTemplateLoading=!1,t.selectTemplateList=e.data.list||[],t.selectTemplateTotal=e.data.total||0})).catch((function(){t.selectTemplateLoading=!1,t.selectTemplateList=[],t.selectTemplateTotal=0}))},previewTemplate:function(t){console.log(t)},showFieldExpain:function(t){this.currentRow=t.fieldExplain.replace("\\\n","<br>"),this.centerDialogVisible=!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(Ya)),this.fileList=[],null!==e&&(this.formData=Object.assign({},e),this.formData.module=e.module+""),this.index=t,this.formName="update",this.uploadDisabled=!0},handleAddForm:function(t){this.formVisible=!0,this.formData={module:t.id+""},this.fileList=[],this.formName="add",this.uploadDisabled=!1},templateConfig:function(t){},submitUpload:function(){var t=this;this.$refs.upload.uploadFiles.length<1&&!this.uploadDisabled&&this.$message.warning("请选择jasper文件"),console.log(this.formName),this.$refs["dataForm"].validate((function(e){e&&(t.uploadDisabled?t.submitTemplate():t.$refs.upload.submit())}))},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jasper"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 jasper 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?(this.formData.path=t.data.path,this.submitTemplate()):this.$message.error("上传失败:"+t.message)},uploadHandleError:function(){},submitTemplate:function(){var t=this;console.log(this.formData),this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);a.name=a.name.trim(),Ce(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList(),t.getModuleList()})).catch((function(){t.formLoading=!1}))}}))},deleteTemplate:function(t){var e=this;this.$confirm("此操作将永久删除该模板, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Qe({id:t.id,path:t.path}).then((function(t){console.log(t),2e4===t.code?(e.$message.success(t.data),e.resetForm(),e.getList()):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},moduleSelectSetCurrent:function(t){this.$refs.singleTable.setCurrentRow(t)},moduleSelectHandleCurrentChange:function(t){this.moduleFormData.templateId=t.id,console.log(t),console.log(this.moduleFormData)},moduleSubmitSelectTemplate:function(){var t=this;this.moduleFormLoading=!0;var e=Object.assign({},this.moduleFormData);this.moduleFormName="update",ke(e,this.moduleFormName).then((function(a){if(t.moduleFormLoading=!1,2e4!==a.code)return t.$message.error(a.message),!1;t.$message.success("操作成功"),t.moduleFormVisible=!1,"add"===t.moduleFormName?a.data&&a.data.id&&(e.id=a.data.id,t.moduleList.unshift(e)):t.moduleList.splice(t.index,1,e),t.getModuleList()})).catch((function(){t.moduleFormLoading=!1}))},getPDFModuleNameList:function(){var t=this;xe().then((function(e){t.moduleNameList=e.data.list,t.moduleNameMap={},t.moduleNameList.forEach((function(e,a){console.log(e),t.moduleNameMap[e.id]=e.name})),console.log(t.moduleNameMap)})).catch((function(){}))}},filters:{paramStatusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},paramStatusFilterName:function(t){var e={1:"订单详情",2:"配货管理-打印订单"};return e[t]}},mounted:function(){},created:function(){this.getPDFModuleNameList(),this.getModuleList(),this.uploadUrl=r["a"]+"/udiwms/upload/pdf/template"}},ei=ti,ai=Object(g["a"])(ei,Ga,Xa,!1,null,null,null),ii=ai.exports,li=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"企业名称"},model:{value:t.filterQuery.companyName,callback:function(e){t.$set(t.filterQuery,"companyName",e)},expression:"filterQuery.companyName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"社会信用号"},model:{value:t.filterQuery.creditCode,callback:function(e){t.$set(t.filterQuery,"creditCode",e)},expression:"filterQuery.creditCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"省市区"},model:{value:t.filterQuery.placeArea,callback:function(e){t.$set(t.filterQuery,"placeArea",e)},expression:"filterQuery.placeArea"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.addInfoDialog()}}},[t._v("添加")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"row-click":t.getRegistrationList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"企业名称",prop:"companyName",width:"250"}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditCode"}}),a("el-table-column",{attrs:{label:"企业类型",prop:"bussinessStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.companyTypeMap[e.row.companyType]))])]}}])}),a("el-table-column",{attrs:{label:"企业法人",prop:"legalPersonName"}}),a("el-table-column",{attrs:{label:"所在地区",prop:"placeArea"}}),a("el-table-column",{attrs:{label:"所在地址",prop:"placeAddress","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.addInfoDialog(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.registrationQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.registrationQuery.recordProductName,callback:function(e){t.$set(t.registrationQuery,"recordProductName",e)},expression:"registrationQuery.recordProductName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"注册备案号"},model:{value:t.registrationQuery.recordCode,callback:function(e){t.$set(t.registrationQuery,"recordCode",e)},expression:"registrationQuery.recordCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"注册备案人"},model:{value:t.registrationQuery.recordPeopleName,callback:function(e){t.$set(t.registrationQuery,"recordPeopleName",e)},expression:"registrationQuery.recordPeopleName"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset2}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit2}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.registrationDialog()}}},[t._v("添加")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.registrationLoading,expression:"registrationLoading"}],staticStyle:{width:"100%"},attrs:{data:t.registrationList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"注册/备案产品名称",prop:"recordProductName"}}),a("el-table-column",{attrs:{label:"注册/备案号",prop:"recordCode"}}),a("el-table-column",{attrs:{label:"注册/备案人名称",prop:"recordPeopleName"}}),a("el-table-column",{attrs:{label:"管理类别",prop:"productManageType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.productManageTypeMap[e.row.productManageType]))])]}}])}),a("el-table-column",{attrs:{label:"批准日期",prop:"create_date","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_date))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.registrationDialog(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{disabled:null===e.row.filePath||""===e.row.filePath,type:"text",size:"small"},nativeOn:{click:function(a){return t.toViewRegistrationCert(e.row,1)}}},[t._v("查看文件\n ")]),a("el-button",{attrs:{disabled:null===e.row.instructions||""===e.row.instructions,type:"text",size:"small"},nativeOn:{click:function(a){return t.toViewRegistrationCert(e.row,2)}}},[t._v("查看说明书附件\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteRegistration(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.registrationQuery.limit,layout:"prev, pager, next",total:t.certTotal},on:{"current-change":t.certHandleCurrentChange}})],1),t.addInfoVisible?a("el-dialog",{attrs:{title:"生产企业信息编辑",visible:t.addInfoVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addInfoVisible=e},close:t.closeDialog}},[a("suppliersEnterpriseBasicAdd",{attrs:{addCloseDialog:t.closeDialog,enterpriseId:t.enterpriseId}})],1):t._e(),t.registrationVisible?a("el-dialog",{attrs:{title:"注册/备案凭证编辑",visible:t.registrationVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.registrationVisible=e},close:t.closeDialog}},[a("suppliersRegistrationBasic",{attrs:{closeRegistrationDialog:t.closeDialog,enterpriseId:t.registrationQuery.enterpriseId,registrationId:t.registrationId}})],1):t._e()],1)},si=[];function oi(t){return Object(et["a"])({url:"/udiwms/info/suppliers/enterprise/basic/getCompanyList",method:"get",params:t})}function ri(t){return Object(et["a"])({url:"/udiwms/info/suppliers/enterprise/basic/getCompanyInfo",method:"get",params:t})}function ni(t,e){var a="add"===e?"/udiwms/info/suppliers/enterprise/basic/addCompany":"/udiwms/info/suppliers/enterprise/basic/modifyCompany";return Object(et["a"])({url:a,method:"post",data:t})}function ci(t){return Object(et["a"])({url:"/udiwms/info/suppliers/registration/basic/getRegistrationList",method:"get",params:t})}function ui(t){return Object(et["a"])({url:"/udiwms/info/suppliers/registration/basic/getRegistrationInfo",method:"get",params:t})}function di(t,e){var a="add"===e?"/udiwms/info/suppliers/registration/basic/addRegistration":"/udiwms/info/suppliers/registration/basic/modifyRegistration";return Object(et["a"])({url:a,method:"post",data:t})}function pi(t){return Object(et["a"])({url:"/udiwms/info/suppliers/registration/basic/delete",method:"get",params:t})}var mi=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",staticStyle:{"margin-top":"-50px"},attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("div",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 100px 20px auto",width:"100px"},attrs:{type:"primary",size:"small",icon:"search",loading:t.loading},on:{click:function(e){return t.onModifySubmit("inputQuery")}}},[t._v("保存\n ")])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业名称:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.companyName,callback:function(e){t.$set(t.inputQuery,"companyName",e)},expression:"inputQuery.companyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"统一社会信用代码:","label-width":"150px",prop:"creditCode"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.creditCode,callback:function(e){t.$set(t.inputQuery,"creditCode",e)},expression:"inputQuery.creditCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业类型:","label-width":"150px",prop:"companyType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"企业类型"},model:{value:t.inputQuery.companyType,callback:function(e){t.$set(t.inputQuery,"companyType",e)},expression:"inputQuery.companyType"}},[a("el-option",{attrs:{label:"注册人/备案人",value:"1"}}),a("el-option",{attrs:{label:"代理人",value:"2"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"登记状态:","label-width":"150px",prop:"registerStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"登记状态"},model:{value:t.inputQuery.registerStatus,callback:function(e){t.$set(t.inputQuery,"registerStatus",e)},expression:"inputQuery.registerStatus"}},[a("el-option",{attrs:{label:"续存(在营,开业,在册)",value:"1"}}),a("el-option",{attrs:{label:"吊销",value:"2"}}),a("el-option",{attrs:{label:"注销",value:"3"}}),a("el-option",{attrs:{label:"迁出",value:"4"}})],1)],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所在地区:","label-width":"150px",prop:"placeArea"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"small",options:t.options,placeholder:"请选择所在地区"},on:{change:t.handleChange},model:{value:t.selectedOptions,callback:function(e){t.selectedOptions=e},expression:"selectedOptions"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产地区:","label-width":"150px",prop:"productionArea"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"small",options:t.options,placeholder:"请选择生产地区"},on:{change:t.handleChange2},model:{value:t.selectedOptions2,callback:function(e){t.selectedOptions2=e},expression:"selectedOptions2"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所在地址:","label-width":"150px",prop:"placeAddress"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.placeAddress,callback:function(e){t.$set(t.inputQuery,"placeAddress",e)},expression:"inputQuery.placeAddress"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产地址:","label-width":"150px",prop:"productionAddress"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionAddress,callback:function(e){t.$set(t.inputQuery,"productionAddress",e)},expression:"inputQuery.productionAddress"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"法人姓名:","label-width":"150px",prop:"legalPersonName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.legalPersonName,callback:function(e){t.$set(t.inputQuery,"legalPersonName",e)},expression:"inputQuery.legalPersonName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"法人证件类型:","label-width":"150px",prop:"legalPersonPapersType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"法人证件类型"},model:{value:t.inputQuery.legalPersonPapersType,callback:function(e){t.$set(t.inputQuery,"legalPersonPapersType",e)},expression:"inputQuery.legalPersonPapersType"}},[a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"法人证件号码:","label-width":"150px",prop:"legalPersonPapersCode"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.legalPersonPapersCode,callback:function(e){t.$set(t.inputQuery,"legalPersonPapersCode",e)},expression:"inputQuery.legalPersonPapersCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产许可证号:","label-width":"150px",prop:"productionLicenceNum"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionLicenceNum,callback:function(e){t.$set(t.inputQuery,"productionLicenceNum",e)},expression:"inputQuery.productionLicenceNum"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产许可证有效期至:","label-width":"150px",prop:"productionLicenceDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期"},model:{value:t.inputQuery.productionLicenceDate,callback:function(e){t.$set(t.inputQuery,"productionLicenceDate",e)},expression:"inputQuery.productionLicenceDate"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产备案凭证号:","label-width":"150px",prop:"productionRecordNum"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionRecordNum,callback:function(e){t.$set(t.inputQuery,"productionRecordNum",e)},expression:"inputQuery.productionRecordNum"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案发证日期:","label-width":"150px",prop:"productionRecordDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期"},model:{value:t.inputQuery.productionRecordDate,callback:function(e){t.$set(t.inputQuery,"productionRecordDate",e)},expression:"inputQuery.productionRecordDate"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"凭证号备案部门:","label-width":"150px",prop:"productionRecordSection"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionRecordSection,callback:function(e){t.$set(t.inputQuery,"productionRecordSection",e)},expression:"inputQuery.productionRecordSection"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"备注:","label-width":"150px",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.remark,callback:function(e){t.$set(t.inputQuery,"remark",e)},expression:"inputQuery.remark"}})],1)],1)],1)],1),a("el-card",{staticClass:"el-card"},[a("div",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 100px 20px auto",width:"100px"},attrs:{type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.addCert()}}},[t._v("添加电子档\n ")])],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.certLoading,expression:"certLoading"}],staticStyle:{width:"100%"},attrs:{data:t.certList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"电子档名称",prop:"name"}}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}}),a("el-table-column",{attrs:{label:"时间",prop:"create_time","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_time))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.toViewCompanyCert(e.row)}}},[t._v("查看文件\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteCompanyCert(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.certQuery.limit,layout:"prev, pager, next",total:t.certTotal},on:{"current-change":t.certHandleCurrentChange}})],1),t.addCertVisible?a("el-dialog",{attrs:{title:"添加电子档",visible:t.addCertVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%","append-to-body":!0},on:{"update:visible":function(e){t.addCertVisible=e},close:t.closeDialog}},[a("suppliersEnterpriseBasicAddCert",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery,enterpriseId:t.enterpriseId}})],1):t._e()],1)],1)},hi=[],fi=(a("28a5"),a("ef6c"));function gi(t){return Object(et["a"])({url:"/udiwms/info/suppliers/enterprise/basic/cert/filter",method:"get",params:t})}function yi(t){return Object(et["a"])({url:"/udiwms/info/suppliers/enterprise/basic/cert/insertCompanyCert",method:"post",data:t})}function bi(t){return Object(et["a"])({url:"/udiwms/info/suppliers/enterprise/basic/cert/deleteCompanyCert",method:"post",data:t})}var vi=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-card",{staticStyle:{"margin-top":"-30px"}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submitUpload()}}},[t._v("提交\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("电子档名称:")])])]),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("备注:")])])]),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"remark"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}}),a("el-col",{attrs:{span:16}},[a("div",{staticStyle:{color:"red"}},[t._v("\n 需要上传档案为:营业执照电子档案,经营许可证电子档案,经营备案证电子档案,开户行电子档案。\n ")])])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("文件:")])])]),a("el-col",{attrs:{span:6}},[a("el-form-item",[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"on-error":t.uploadHandleError,"file-list":t.fileList,data:{type:"image3"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1)],1)],1)],1)],1)],1)],1)},wi=[],xi={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0},enterpriseId:""},data:function(){return{code:"",formData:{},formRules:{name:[{required:!0,message:"电子档名称",trigger:"blur"}]},loading:!1,uploadUrl:"",fileList:[]}},components:{draggable:We.a},methods:{submitUpload:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.$message.warning("请选择文件"))}))},onSubmit:function(){var t=this;this.loading=!0,this.formData.enterpriseId=this.enterpriseId,yi(this.formData).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("添加成功"),t.closeDialog(!0)):t.$message.error(e.message)}))},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){2e4===t.code?(this.formData.filePath=t.data.name,this.onSubmit()):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.uploadUrl=r["a"]+"/udiwms/upload/register/file"}},Di=xi,Ci=(a("9af1"),Object(g["a"])(Di,vi,wi,!1,null,null,null)),ki=Ci.exports;function Qi(t){return Object(et["a"])({url:"/warehouse/inout/deleteCodesTempById",method:"get",params:t})}function Si(t){return Object(et["a"])({url:"/warehouse/inout/submitOrderWeb",method:"get",params:t})}function _i(t){return Object(et["a"])({url:"/warehouse/inout/saveOrderWeb",method:"post",data:t})}function $i(t){return Object(et["a"])({url:"/udiwms/inout/order/error",method:"get",params:t})}function Ti(t){return Object(et["a"])({url:"/admin/warehouse/inout/findByOrderId",method:"get",params:t})}function Li(t){return Object(et["a"])({url:"/warehouse/inout/addOrderWeb",method:"post",data:t})}function Oi(t){return Object(et["a"])({url:"/warehouse/inout/order/mergeOrder",method:"post",data:t})}function zi(t){return Object(et["a"])({url:"/udiwms/inout/order/updateUnit",method:"post",data:t})}function Ii(t){return Object(et["a"])({url:"/udiwms/inout/order/filter",method:"get",params:t})}function Ni(t){return Object(et["a"])({url:"/admin/warehouse/inout/findErrorByOrderId",method:"get",params:t})}function Fi(t){return Object(et["a"])({url:"/udiwms/inout/order/delete",method:"post",data:t})}function qi(t){return Object(et["a"])({url:"/warehouse/inout/code/deleteCodes",method:"post",data:t})}function Vi(t){return Object(et["a"])({url:"/warehouse/inout/commit",method:"post",data:t})}function Ri(t){return Object(et["a"])({url:"/warehouse/inout/addCommit",method:"post",data:t})}function Ei(t){return Object(et["a"])({url:"/warehouse/inout/order/updateExportStatus",method:"post",data:t})}function ji(t){return Object(et["a"])({url:"/warehouse/inout/order/detail",method:"get",params:t})}function Pi(t){return Object(et["a"])({url:"/udiwms/erpOrder/updateBind",method:"post",data:t})}function Bi(t){return Object(et["a"])({url:"/udiwms/erpOrder/updateBindSup",method:"post",data:t})}function Ui(t){return Object(et["a"])({url:"/warehouse/inout/order/uploadOrder",method:"post",data:t})}function Ai(t){return Object(et["a"])({url:"/admin/warehouse/inout/findAllByOrderId",method:"get",params:t})}function Mi(t){return Object(et["a"])({url:"/spms/inout/order/revoke",method:"get",params:t})}function Wi(t){return Object(et["a"])({url:"/warehouse/inout/order/exportXml",method:"post",data:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},responseType:"arraybuffer"})}var Hi={name:"suppliersEnterpriseBasicAdd",props:{addCloseDialog:{type:Function,required:!0},enterpriseId:""},data:function(){return{inputQuery:{companyName:"",creditCode:"",companyType:"",registerStatus:"",placeArea:"",placeAddress:"",legalPersonName:"",legalPersonPapersType:"",legalPersonPapersCode:""},loading:!1,classesDisplay:!1,selectedOptions:[],selectedOptions2:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}],creditCode:[{required:!0,message:"请输入统一社会信用代码",trigger:"blur"}],companyType:[{required:!0,message:"请选择企业类型",trigger:"change"}],registerStatus:[{required:!0,message:"请选择登记状态",trigger:"change"}],placeArea:[{required:!0,message:"请选择所在地区",trigger:"change"}],placeAddress:[{required:!0,message:"请输入所在地址",trigger:"change"}],legalPersonName:[{required:!0,message:"请输入法人姓名",trigger:"change"}],legalPersonPapersType:[{required:!0,message:"请选择法人证件类型",trigger:"change"}],legalPersonPapersCode:[{required:!0,message:"请输入法人证件号码",trigger:"change"}]},uploadUrl:"",fileList:[],fileUrl:"",certFileUrl:"",url:"http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg",certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,addCertVisible:!1,idQuery:{id:""}}},created:function(){this.$isNotBlank(this.enterpriseId)&&(this.getData(),this.getCompanyCertList()),this.uploadUrl=r["a"]+"/udiwms/upload/register/file",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.certFileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image3&name="},components:{draggable:We.a,suppliersEnterpriseBasicAddCert:ki},methods:{onModifySubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.loading=!0;var a=e.$isBlank(e.enterpriseId)?"add":"update";e.$isBlank(e.inputQuery.productionLicenceNum)&&(e.inputQuery.productionLicenceDate=null),e.$isBlank(e.inputQuery.productionRecordNum)&&(e.inputQuery.productionRecordDate=null),ni(e.inputQuery,a).then((function(t){e.loading=!1,2e4===t.code?(e.addCloseDialog(!0),e.$message.success("保存成功")):e.$message.error(t.message)}))}))},getData:function(){var t=this;this.loading=!0;var e={id:this.enterpriseId};ri(e).then((function(e){console.log(e),t.loading=!1,t.inputQuery=e.data,t.selectedOptions=t.inputQuery.placeAreaCode.split(","),t.selectedOptions2=t.inputQuery.productionAreaCode.split(",")}))},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},getCompanyCertList:function(){var t=this;this.certLoading=!0,this.certQuery.enterpriseId=this.enterpriseId,gi(this.certQuery).then((function(e){t.certLoading=!1,t.certList=e.data.list||[]})).catch((function(){t.certLoading=!1,t.certList=[]}))},addCert:function(t,e){this.idQuery.id="",this.$isNotBlank(e)&&this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e),this.addCertVisible=!0},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},deleteCompanyCert:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.certLoading=!0;var a={id:t.id,filePath:t.filePath};bi(a).then((function(t){e.certLoading=!1,2e4===t.code?(e.getCompanyCertList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.certLoading=!1}))})).catch((function(){}))},closeDialog:function(t){this.addCertVisible=!1,this.getCompanyCertList()},handleChange:function(t){this.inputQuery.placeArea=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],console.log(this.inputQuery.placeArea),this.inputQuery.placeAreaCode=t.toString()},handleChange2:function(t){this.inputQuery.productionArea=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.productionAreaCode=t.toString()},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?(this.inputQuery.newFilePath=t.data.name,this.onModifySubmit("inputQuery")):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){}}},Ki=Hi,Ji=(a("f9f3"),Object(g["a"])(Ki,mi,hi,!1,null,null,null)),Gi=Ji.exports,Xi=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",staticStyle:{"margin-top":"-50px"},attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("div",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 100px 20px auto",width:"100px"},attrs:{type:"primary",size:"small",icon:"search",loading:t.loading},on:{click:function(e){return t.submitUpload()}}},[t._v("保存\n ")])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"注册/备案号:","label-width":"150px",prop:"recordCode"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.recordCode,callback:function(e){t.$set(t.inputQuery,"recordCode",e)},expression:"inputQuery.recordCode"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"注册/备案产品名称:","label-width":"150px",prop:"recordProductName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.recordProductName,callback:function(e){t.$set(t.inputQuery,"recordProductName",e)},expression:"inputQuery.recordProductName"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"注册/备案人名称:","label-width":"150px",prop:"recordPeopleName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.recordPeopleName,callback:function(e){t.$set(t.inputQuery,"recordPeopleName",e)},expression:"inputQuery.recordPeopleName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"代理人名称:","label-width":"150px",prop:"agentName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.agentName,callback:function(e){t.$set(t.inputQuery,"agentName",e)},expression:"inputQuery.agentName"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:8}},[a("el-form-item",{attrs:{label:"注册人住所地区:","label-width":"150px",prop:"recordPeopleArea"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"small",options:t.options,placeholder:"请选择所在地区"},on:{change:t.handleChange},model:{value:t.selectedOptions,callback:function(e){t.selectedOptions=e},expression:"selectedOptions"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:2}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search",loading:t.loading},on:{click:function(e){return t.clearRecordPeopleArea()}}},[t._v("清空\n ")])],1),a("el-col",{staticClass:"el-col",attrs:{span:8}},[a("el-form-item",{attrs:{label:"代理人住所地区:","label-width":"150px",prop:"agentArea"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"small",options:t.options,placeholder:"请选择生产地区"},on:{change:t.handleChange2},model:{value:t.selectedOptions2,callback:function(e){t.selectedOptions2=e},expression:"selectedOptions2"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:2}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search",loading:t.loading},on:{click:function(e){return t.clearAgentArea()}}},[t._v("清空\n ")])],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"注册人住所地址:","label-width":"150px",prop:"recordPeopleAddress"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.recordPeopleAddress,callback:function(e){t.$set(t.inputQuery,"recordPeopleAddress",e)},expression:"inputQuery.recordPeopleAddress"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"代理人住所地址:","label-width":"150px",prop:"agentAddress"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.agentAddress,callback:function(e){t.$set(t.inputQuery,"agentAddress",e)},expression:"inputQuery.agentAddress"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"医疗器械管理类别:","label-width":"150px",prop:"productManageType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"医疗器械管理类别"},model:{value:t.inputQuery.productManageType,callback:function(e){t.$set(t.inputQuery,"productManageType",e)},expression:"inputQuery.productManageType"}},[a("el-option",{attrs:{label:"Ⅰ类",value:"1"}}),a("el-option",{attrs:{label:"Ⅱ类",value:"2"}}),a("el-option",{attrs:{label:"Ⅲ类",value:"3"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"器械类别:","label-width":"150px",prop:"productType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"医疗器械管理类别"},model:{value:t.inputQuery.productType,callback:function(e){t.$set(t.inputQuery,"productType",e)},expression:"inputQuery.productType"}},[a("el-option",{attrs:{label:"器械",value:"1"}}),a("el-option",{attrs:{label:"诊断试剂",value:"2"}})],1)],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"器械目录分类编码:","label-width":"150px",prop:"productDirectoryCode"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productDirectoryCode,callback:function(e){t.$set(t.inputQuery,"productDirectoryCode",e)},expression:"inputQuery.productDirectoryCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"产地:","label-width":"150px",prop:"placeOrigin"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"产地"},model:{value:t.inputQuery.placeOrigin,callback:function(e){t.$set(t.inputQuery,"placeOrigin",e)},expression:"inputQuery.placeOrigin"}},[a("el-option",{attrs:{label:"国产",value:"1"}}),a("el-option",{attrs:{label:"进口",value:"2"}}),a("el-option",{attrs:{label:"港澳台",value:"3"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"生产国或地区:","label-width":"150px",prop:"productionRegion"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionRegion,callback:function(e){t.$set(t.inputQuery,"productionRegion",e)},expression:"inputQuery.productionRegion"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"生产地址:","label-width":"150px",prop:"productAddress"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productAddress,callback:function(e){t.$set(t.inputQuery,"productAddress",e)},expression:"inputQuery.productAddress"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"生产厂商名称:","label-width":"150px",prop:"productionCompanyName"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.productionCompanyName,callback:function(e){t.$set(t.inputQuery,"productionCompanyName",e)},expression:"inputQuery.productionCompanyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"售后服务机构:","label-width":"150px",prop:"afterSale"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.afterSale,callback:function(e){t.$set(t.inputQuery,"afterSale",e)},expression:"inputQuery.afterSale"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"规格型号:","label-width":"150px",prop:"specification"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.specification,callback:function(e){t.$set(t.inputQuery,"specification",e)},expression:"inputQuery.specification"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"结构及组成:","label-width":"150px",prop:"structure"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.structure,callback:function(e){t.$set(t.inputQuery,"structure",e)},expression:"inputQuery.structure"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"适用范围:","label-width":"150px",prop:"scope"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.scope,callback:function(e){t.$set(t.inputQuery,"scope",e)},expression:"inputQuery.scope"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"其它内容:","label-width":"150px",prop:"other"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.other,callback:function(e){t.$set(t.inputQuery,"other",e)},expression:"inputQuery.other"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"备注:","label-width":"150px",prop:"remark"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.remark,callback:function(e){t.$set(t.inputQuery,"remark",e)},expression:"inputQuery.remark"}})],1)],1)],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"电子档:","label-width":"150px"}},[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"on-error":t.uploadHandleError,"file-list":t.fileList,data:{type:"image4"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"说明书附件:","label-width":"150px"}},[a("el-upload",{ref:"upload2",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess2,"on-error":t.uploadHandleError,"file-list":t.fileList2,data:{type:"image4"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1)],1)],1)],1)],1)],1)],1)},Yi=[],Zi={name:"suppliersEnterpriseBasicAdd",props:{closeRegistrationDialog:{type:Function,required:!0},enterpriseId:"",registrationId:""},data:function(){return{inputQuery:{recordCode:"",recordProductName:"",productManageType:"",productType:"",recordPeopleArea:"",recordPeopleAddress:"",recordPeopleName:"",productDirectoryCode:"",specification:""},loading:!1,classesDisplay:!1,selectedOptions:[],selectedOptions2:[],options:fi["regionDataPlus"],rules:{recordCode:[{required:!0,message:"请输入注册/备案号",trigger:"blur"}],recordProductName:[{required:!0,message:"请输入注册/备案产品名称",trigger:"blur"}],productManageType:[{required:!0,message:"请选择医疗器械管理类别",trigger:"change"}],productType:[{required:!0,message:"请选择器械类别",trigger:"change"}],recordPeopleArea:[{required:!0,message:"请选择注册人住所地区",trigger:"change"}],recordPeopleAddress:[{required:!0,message:"请输入注册人住所地址",trigger:"change"}],recordPeopleName:[{required:!0,message:"请输入注册/备案人名称",trigger:"change"}],productDirectoryCode:[{required:!0,message:"请输入器械目录分类编码",trigger:"change"}],specification:[{required:!0,message:"请输入规格型号",trigger:"change"}]},uploadUrl:"",fileList:[],fileList2:[],fileUrl:"",idQuery:{id:""}}},created:function(){this.$isNotBlank(this.registrationId)&&this.getData(),this.inputQuery.enterpriseId=this.enterpriseId,this.uploadUrl=r["a"]+"/udiwms/upload/register/file",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image4&name="},components:{draggable:We.a,suppliersEnterpriseBasicAddCert:ki},methods:{submitUpload:function(){var t=this;this.$refs["inputQuery"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.$refs.upload2.uploadFiles.length>0?t.$refs.upload2.submit():t.onModifySubmit("inputQuery"))}))},onModifySubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.loading=!0;var a=e.$isBlank(e.registrationId)?"add":"update";di(e.inputQuery,a).then((function(t){e.loading=!1,2e4===t.code?(e.closeRegistrationDialog(!0),e.$message.success("保存成功")):e.$message.error(t.message)}))}))},clearRecordPeopleArea:function(){this.inputQuery.recordPeopleArea=" ",this.inputQuery.recordPeopleAreaCode=" ",this.selectedOptions=[]},clearAgentArea:function(){this.inputQuery.agentArea=" ",this.inputQuery.agentAreaCode=" ",this.selectedOptions2=[]},getData:function(){var t=this;this.loading=!0;var e={id:this.registrationId};ui(e).then((function(e){console.log(e),t.loading=!1,t.inputQuery=e.data,t.selectedOptions=t.inputQuery.recordPeopleAreaCode.split(","),t.selectedOptions2=t.inputQuery.agentAreaCode.split(",")}))},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},handleChange:function(t){this.inputQuery.recordPeopleArea=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.recordPeopleAreaCode=t.toString()},handleChange2:function(t){this.inputQuery.agentArea=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.agentAreaCode=t.toString()},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?(this.$isBlank(this.inputQuery.instructions)?this.inputQuery.filePath=t.data.name:this.inputQuery.newFilePath=t.data.name,this.$refs.upload2.uploadFiles.length>0?this.$refs.upload2.submit():this.onModifySubmit("inputQuery")):this.$message.error("文件上传失败:"+t.message)},uploadHandleSuccess2:function(t,e,a){console.log(t),2e4===t.code?(this.$isBlank(this.inputQuery.instructions)?this.inputQuery.instructions=t.data.name:this.inputQuery.newInstructions=t.data.name,this.onModifySubmit("inputQuery")):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){}}},tl=Zi,el=(a("bf83"),Object(g["a"])(tl,Xi,Yi,!1,null,null,null)),al=el.exports;function il(t){return Object(et["a"])({url:"/udiwms/thrOrder/importLog/export",method:"post",data:t})}var ll={data:function(){return{filterQuery:{companyName:"",creditCode:"",placeArea:"",page:1,limit:20},value:"",total:0,companyTypeMap:{1:"注册人/备案人",2:"代理人"},productManageTypeMap:{1:"Ⅰ类",2:"Ⅱ类",3:"Ⅲ类"},list:[],addInfoVisible:!1,registrationVisible:!1,enterpriseId:"",registrationQuery:{recordProductName:"",recordCode:"",recordPeopleName:"",page:1,limit:20},registrationList:[],certTotal:0,registrationLoading:!1,registrationId:"",fileUrl:""}},filters:{statusFilterType:function(t){var e={0:"gray",1:"success",2:"danger"};return e[t]},statusFilterName:function(t){var e={0:"禁用",1:"正常",2:"未验证"};return e[t]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={companyName:"",creditCode:"",placeArea:"",page:1,limit:20},this.getList(),this.registrationList=[]},onSubmit:function(){this.getList(),this.registrationList=[]},onReset2:function(){this.registrationQuery={recordProductName:"",recordCode:"",recordPeopleName:"",page:1,limit:20},this.getRegistrationList()},onSubmit2:function(){this.getRegistrationList()},toViewRegistrationCert:function(t,e){var a=1===e?t.filePath:t.instructions;window.open(this.fileUrl+a)},getList:function(){var t=this;this.loading=!0,oi(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},addInfoDialog:function(t){this.$isNotBlank(t)&&(this.enterpriseId=t.id),this.addInfoVisible=!0},registrationDialog:function(t){if(this.$isBlank(this.registrationQuery.enterpriseId))return this.$message.error("未选择企业");this.$isNotBlank(t)&&(this.registrationId=t.id),this.registrationVisible=!0},deleteRegistration:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.certLoading=!0;var a={id:t.id,filePath:t.filePath,filePath2:t.instructions};pi(a).then((function(t){e.certLoading=!1,2e4===t.code?(e.getRegistrationList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.certLoading=!1}))})).catch((function(){}))},closeDialog:function(t){this.addInfoVisible=!1,this.registrationVisible=!1,this.enterpriseId=null,this.registrationId=null,this.getList(),this.registrationList=[]},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleCheckedChange:function(t){console.log(t),console.log(this.check)},getRegistrationList:function(t){var e=this;this.registrationLoading=!0,this.$isNotBlank(t)&&(this.registrationQuery.enterpriseId=t.id),ci(this.registrationQuery).then((function(t){e.registrationLoading=!1,e.registrationList=t.data.list||[]})).catch((function(){e.registrationLoading=!1,e.registrationList=[]}))}},components:{suppliersEnterpriseBasicAdd:Gi,suppliersRegistrationBasic:al},mounted:function(){},created:function(){this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image4&name=",this.getList()}},sl=ll,ol=Object(g["a"])(sl,li,si,!1,null,null,null),rl=ol.exports,nl=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("div",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 10px 20px 0",width:"100px"},attrs:{disabled:"4"===t.inputQuery.auditStatus||"5"===t.inputQuery.auditStatus||"1"===t.inputQuery.auditStatus||"6"===t.inputQuery.auditStatus||t.companyEditDisabled,type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.companySaveSubmit("inputQuery")}}},[t._v("保存\n ")]),a("el-button",{staticStyle:{margin:"0 10px 20px 0",width:"100px"},attrs:{disabled:"4"===t.inputQuery.auditStatus||"5"===t.inputQuery.auditStatus||"1"===t.inputQuery.auditStatus||"6"===t.inputQuery.auditStatus,type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.editSwitch()}}},[t._v(t._s(t.companyEditButtonStr)+"\n ")]),a("el-button",{staticStyle:{margin:"0 10px 20px 0",width:"100px"},attrs:{disabled:"4"===t.inputQuery.auditStatus||"5"===t.inputQuery.auditStatus||"1"===t.inputQuery.auditStatus||"6"===t.inputQuery.auditStatus,type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.onModifySubmit("inputQuery")}}},[t._v("提交\n ")]),a("el-button",{staticStyle:{margin:"0 10px 20px 0",width:"100px"},attrs:{disabled:"5"!==t.inputQuery.auditStatus&&"1"!==t.inputQuery.auditStatus,type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.applyUpdate()}}},[t._v("申请变更\n ")])],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业名称:","label-width":"150px",prop:"companyName"}},[a("el-input",{attrs:{size:"small",splaceholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.companyName,callback:function(e){t.$set(t.inputQuery,"companyName",e)},expression:"inputQuery.companyName"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"统一社会信用代码:","label-width":"150px",prop:"creditNum"}},[a("el-input",{attrs:{size:"small",splaceholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.creditNum,callback:function(e){t.$set(t.inputQuery,"creditNum",e)},expression:"inputQuery.creditNum"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"企业类别:","label-width":"150px",prop:"classes"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{disabled:!0,size:"small",placeholder:"企业类别"},model:{value:t.inputQuery.classes,callback:function(e){t.$set(t.inputQuery,"classes",e)},expression:"inputQuery.classes"}},[t.classesDisplay?a("el-option",{attrs:{label:"医院",value:"1"}}):t._e(),a("el-option",{attrs:{label:"经营企业",value:"2"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"所属地区:","label-width":"150px",prop:"area"}},[a("el-cascader",{staticStyle:{width:"100%"},attrs:{size:"small",options:t.options,placeholder:"请选择所属地区",disabled:t.companyEditDisabled},on:{change:t.handleChange},model:{value:t.selectedOptions,callback:function(e){t.selectedOptions=e},expression:"selectedOptions"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系人:","label-width":"150px",prop:"contacts"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.contacts,callback:function(e){t.$set(t.inputQuery,"contacts",e)},expression:"inputQuery.contacts"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"详细地址:","label-width":"150px",prop:"detailAddr"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.detailAddr,callback:function(e){t.$set(t.inputQuery,"detailAddr",e)},expression:"inputQuery.detailAddr"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"联系电话:","label-width":"150px",prop:"mobile"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.mobile,callback:function(e){t.$set(t.inputQuery,"mobile",e)},expression:"inputQuery.mobile"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"邮箱:","label-width":"150px",prop:"email"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.email,callback:function(e){t.$set(t.inputQuery,"email",e)},expression:"inputQuery.email"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件类型:","label-width":"150px",prop:"contactsPapersType"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"证件类型",disabled:t.companyEditDisabled},model:{value:t.inputQuery.contactsPapersType,callback:function(e){t.$set(t.inputQuery,"contactsPapersType",e)},expression:"inputQuery.contactsPapersType"}},[a("el-option",{attrs:{label:"身份证",value:"1"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"证件号码:","label-width":"150px",prop:"contactsPapersCode"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.contactsPapersCode,callback:function(e){t.$set(t.inputQuery,"contactsPapersCode",e)},expression:"inputQuery.contactsPapersCode"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"登记状态:","label-width":"150px",prop:"registerStatus"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small",placeholder:"登记状态",disabled:t.companyEditDisabled},model:{value:t.inputQuery.registerStatus,callback:function(e){t.$set(t.inputQuery,"registerStatus",e)},expression:"inputQuery.registerStatus"}},[a("el-option",{attrs:{label:"续存(在营,开业,在册)",value:"1"}}),a("el-option",{attrs:{label:"吊销",value:"2"}}),a("el-option",{attrs:{label:"注销",value:"3"}}),a("el-option",{attrs:{label:"迁出",value:"4"}})],1)],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证号:","label-width":"150px",prop:"jyxkzh"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.jyxkzh,callback:function(e){t.$set(t.inputQuery,"jyxkzh",e)},expression:"inputQuery.jyxkzh"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证发证机关:","label-width":"150px",prop:"jyxkzfzjg"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.jyxkzfzjg,callback:function(e){t.$set(t.inputQuery,"jyxkzfzjg",e)},expression:"inputQuery.jyxkzfzjg"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证有效期至:","label-width":"150px",prop:"jyxkzyxq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期",disabled:t.companyEditDisabled},model:{value:t.inputQuery.jyxkzyxq,callback:function(e){t.$set(t.inputQuery,"jyxkzyxq",e)},expression:"inputQuery.jyxkzyxq"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案凭证号:","label-width":"150px",prop:"jybapzh"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.jybapzh,callback:function(e){t.$set(t.inputQuery,"jybapzh",e)},expression:"inputQuery.jybapzh"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案部门:","label-width":"150px",prop:"jybabm"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.jybabm,callback:function(e){t.$set(t.inputQuery,"jybabm",e)},expression:"inputQuery.jybabm"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"发证日期:","label-width":"150px",prop:"fzrq"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期",disabled:t.companyEditDisabled},model:{value:t.inputQuery.fzrq,callback:function(e){t.$set(t.inputQuery,"fzrq",e)},expression:"inputQuery.fzrq"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"税号:","label-width":"150px",prop:"suihao"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.suihao,callback:function(e){t.$set(t.inputQuery,"suihao",e)},expression:"inputQuery.suihao"}})],1)],1)],1),a("el-row",{staticClass:"el-row",staticStyle:{"margin-top":"-10px"},attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行:","label-width":"150px",prop:"kaihuhang"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.kaihuhang,callback:function(e){t.$set(t.inputQuery,"kaihuhang",e)},expression:"inputQuery.kaihuhang"}})],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户账号:","label-width":"150px",prop:"kaihuzhanghao"}},[a("el-input",{attrs:{size:"small",placeholder:"请输入内容",disabled:t.companyEditDisabled},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.kaihuzhanghao,callback:function(e){t.$set(t.inputQuery,"kaihuzhanghao",e)},expression:"inputQuery.kaihuzhanghao"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"营业执照电子档案:","label-width":"150px"}},[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"on-error":t.uploadHandleError,"file-list":t.fileList,data:{type:"image1"},"auto-upload":!0,"show-file-list":!1}},[a("div",[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.companyEditDisabled},slot:"trigger"},[t._v("选取文件")]),a("el-button",{attrs:{disabled:null===t.inputQuery.filePath||""===t.inputQuery.filePath,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.inputQuery.filePath)}}},[t._v("查看文件\n ")])],1)])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营许可证电子档案:","label-width":"150px"}},[a("el-upload",{ref:"upload2",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess2,"on-error":t.uploadHandleError,"file-list":t.fileList2,data:{type:"image1"},"auto-upload":!0,"show-file-list":!1}},[a("div",[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.companyEditDisabled},slot:"trigger"},[t._v("选取文件")]),a("el-button",{attrs:{disabled:null===t.inputQuery.filePath2||""===t.inputQuery.filePath2,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.inputQuery.filePath2)}}},[t._v("查看文件\n ")])],1)])],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"经营备案证电子档案:","label-width":"150px"}},[a("el-upload",{ref:"upload3",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess3,"on-error":t.uploadHandleError,"file-list":t.fileList3,data:{type:"image1"},"auto-upload":!0,"show-file-list":!1}},[a("div",[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.companyEditDisabled},slot:"trigger"},[t._v("选取文件")]),a("el-button",{attrs:{disabled:null===t.inputQuery.filePath3||""===t.inputQuery.filePath3,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.inputQuery.filePath3)}}},[t._v("查看文件\n ")])],1)])],1)],1),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"开户行电子档案:","label-width":"150px"}},[a("el-upload",{ref:"upload4",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess4,"on-error":t.uploadHandleError,"file-list":t.fileList4,data:{type:"image1"},"auto-upload":!0,"show-file-list":!1}},[a("div",[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary",disabled:t.companyEditDisabled},slot:"trigger"},[t._v("选取文件")]),a("el-button",{attrs:{disabled:null===t.inputQuery.filePath4||""===t.inputQuery.filePath4,size:"small",type:"primary"},nativeOn:{click:function(e){return t.openFile(t.inputQuery.filePath4)}}},[t._v("查看文件\n ")])],1)])],1)],1),a("el-col",{staticStyle:{"margin-top":"-10px"},attrs:{span:10}},[a("el-form-item",{attrs:{label:"","label-width":"150px"}},[a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])])],1)],1)],1),a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.salesmanQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"业务员姓名"},model:{value:t.salesmanQuery.name,callback:function(e){t.$set(t.salesmanQuery,"name",e)},expression:"salesmanQuery.name"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.salesmanOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.salesmanOnSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.addSalesman()}}},[t._v("新增\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.salesmanLoading,expression:"salesmanLoading"}],staticStyle:{width:"100%"},attrs:{data:t.salesmanList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"姓名",prop:"name"}}),a("el-table-column",{attrs:{label:"电话",prop:"tel"}}),a("el-table-column",{attrs:{label:"手机",prop:"phone"}}),a("el-table-column",{attrs:{label:"邮箱",prop:"email"}}),a("el-table-column",{attrs:{label:"证件类型",prop:"certType",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.certTypeMap[e.row.certType]))])]}}])}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"证件号",prop:"certCode"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{disabled:"1"===e.row.auditStatus&&"4"===e.row.auditStatus&&"5"===e.row.auditStatus,type:"text",size:"small"},nativeOn:{click:function(a){return t.addSalesman(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{disabled:"0"!==e.row.auditStatus||"2"!==e.row.auditStatus||"3"!==e.row.auditStatus,type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteCompanySalesman(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.salesmanQuery.limit,layout:"prev, pager, next",total:t.salesmanTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),t.addCertVisible?a("el-dialog",{attrs:{title:"添加电子档",visible:t.addCertVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.addCertVisible=e},close:t.closeDialog}},[a("companyAddCert",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.addSalesmanVisible?a("el-dialog",{attrs:{title:"添加业务员",visible:t.addSalesmanVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addSalesmanVisible=e},close:t.closeDialog}},[a("companyAddSalesman",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.companyApplyUpdateVisible?a("el-dialog",{attrs:{title:"申请变更",visible:t.companyApplyUpdateVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.companyApplyUpdateVisible=e},close:t.closeDialog}},[a("companyApplyUpdate",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.selectLocalVisible?a("el-dialog",{attrs:{title:"医疗器械信息",visible:t.selectLocalVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectProduct",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid}})],1):t._e()],1)],1)},cl=[],ul=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-card",{staticStyle:{"margin-top":"-30px"}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submitUpload()}}},[t._v("提交\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("电子档名称:")])])]),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{attrs:{"auto-complete":"off"},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("备注:")])])]),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"remark"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.formData.remark,callback:function(e){t.$set(t.formData,"remark",e)},expression:"formData.remark"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}}),a("el-col",{attrs:{span:16}},[a("div",{staticStyle:{color:"red"}},[t._v("\n 需要上传档案为:营业执照电子档案,经营许可证电子档案,经营备案证电子档案,开户行电子档案。\n ")])])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("文件:")])])]),a("el-col",{attrs:{span:6}},[a("el-form-item",[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:this.uploadUrl,"on-preview":t.uploadHandlePreview,"on-remove":t.uploadHandleRemove,limit:1,"on-exceed":t.uploadHandleExceed,accept:".jpg,.png","on-change":t.uploadOnchange,"on-success":t.uploadHandleSuccess,"on-error":t.uploadHandleError,"file-list":t.fileList,data:{type:"image2"},"auto-upload":!1}},[a("el-button",{attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")]),a("div",[t._v("只能上传 .jpg,.png 文件,且不超过 2 MB")])],1)],1)],1)],1)],1)],1)],1)},dl=[],pl={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",formData:{},formRules:{name:[{required:!0,message:"电子档名称",trigger:"blur"}]},loading:!1,uploadUrl:"",fileList:[]}},components:{draggable:We.a},methods:{submitUpload:function(){var t=this;this.$refs["dataForm"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.$message.warning("请选择文件"))}))},onSubmit:function(){var t=this;this.loading=!0,this.formData.customerId=L["a"].getters.customerId,ga(this.formData).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("添加成功"),t.closeDialog(!0)):t.$message.error(e.message)}))},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){2e4===t.code?(this.formData.filePath=t.data.name,this.onSubmit()):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.uploadUrl=r["a"]+"/udiwms/upload/register/file"}},ml=pl,hl=(a("cd79"),Object(g["a"])(ml,ul,dl,!1,null,null,null)),fl=hl.exports,gl=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-card",{staticStyle:{"margin-top":"-30px"}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submit()}}},[t._v("申请变更\n ")])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("el-form-item",{attrs:{label:"变更原因:","label-width":"100px",prop:"updateCause"}},[a("el-input",{attrs:{type:"textarea",size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.formData.updateCause,callback:function(e){t.$set(t.formData,"updateCause",e)},expression:"formData.updateCause"}})],1)],1)],1)],1)],1)],1)},yl=[],bl={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",formData:{certType:"1"},formRules:{updateCause:[{required:!0,message:"请输入变更原因",trigger:"blur"}]},loading:!1}},components:{draggable:We.a},methods:{submit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(!e)return console.log("error submit!!"),!1;t.$confirm("是否提交申请?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.loading=!0,t.formData.customerId=L["a"].getters.customerId,t.formData.submit=L["a"].getters.employeeName,La(t.formData).then((function(e){t.loading=!1,2e4===e.code?(t.closeDialog(),t.$message.success("提交成功")):t.$message.error(e.message)}))})).catch((function(){}))}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){}},vl=bl,wl=(a("ccaf"),Object(g["a"])(vl,gl,yl,!1,null,null,null)),xl=wl.exports,Dl={data:function(){return{inputQuery:{cpmpanyName:null,category:"",creditNum:"",area:"",classes:"",appId:"",appSecret:"",contact:"",mobile:"",email:"",customerId:L["a"].getters.customerId,filePath:"",filePath2:"",filePath3:"",filePath4:""},classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}],creditNum:[{required:!0,message:"请输入统一社会信用代码",trigger:"blur"}],classes:[{required:!0,message:"请选择企业类别",trigger:"change"}],area:[{required:!0,message:"请选择所属地区",trigger:"change"}],detailAddr:[{required:!0,message:"请输入详细地址",trigger:"change"}],contacts:[{required:!0,message:"请输入联系人",trigger:"change"}],mobile:[{required:!0,message:"请输入联系电话",trigger:"change"}],email:[{required:!0,message:"请输入邮箱",trigger:"change"}],updateCause:[{required:!0,message:"请输入变更原因",trigger:"change"}]},uploadUrl:"",fileList:[],fileList2:[],fileList3:[],fileList4:[],fileUrl:"",certFileUrl:"",url:"http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg",certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,addCertVisible:!1,idQuery:{id:""},salesmanQuery:{name:"",page:1,limit:20},salesmanList:[],salesmanTotal:0,salesmanLoading:!1,addSalesmanVisible:!1,certTypeMap:{1:"身份证"},auditStatusMap:{1:"通过",2:"不通过",3:"反审",4:"申请反审",5:"拒绝反审"},selectLocalVisible:!1,productQuery:{ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",page:1,limit:20},productList:[],productTotal:0,productLoading:!1,uuid:null,companyApplyUpdateVisible:!1,companyEditDisabled:!0,companyEditButtonStr:"编辑"}},created:function(){this.getData(),this.getCompanySalesmanList(),110===L["a"].getters.customerId&&(this.classesDisplay=!0),this.uploadUrl=r["a"]+"/udiwms/upload/register/file",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.certFileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image2&name="},components:{draggable:We.a,companyAddCert:fl,companyAddSalesman:aa,selectProduct:ha,companyApplyUpdate:xl},methods:{submitUpload:function(){var t=this;this.$refs["inputQuery"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.$refs.upload2.uploadFiles.length>0?t.$refs.upload2.submit():t.$refs.upload3.uploadFiles.length>0?t.$refs.upload3.submit():t.$refs.upload4.uploadFiles.length>0?t.$refs.upload4.submit():t.onModifySubmit("inputQuery"))}))},companySaveSubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.$confirm("是否保存变更?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,e.inputQuery.customerId=L["a"].getters.customerId,e.inputQuery.newAuditStatus="0",Object(x["g"])(e.inputQuery).then((function(t){e.loading=!1,2e4===t.code&&e.$message.success("保存成功"),e.getData(),e.companyEditDisabled=!0,e.companyEditButtonStr="编辑"}))})).catch((function(){}))}))},onModifySubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.$confirm("是否提交变更?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,e.inputQuery.customerId=L["a"].getters.customerId,e.inputQuery.newAuditStatus="6",Object(x["g"])(e.inputQuery).then((function(t){e.loading=!1,2e4===t.code&&e.$message.success("提交成功"),e.getData(),e.companyEditDisabled=!0,e.companyEditButtonStr="编辑"}))})).catch((function(){}))}))},editSwitch:function(){this.companyEditDisabled?(this.companyEditDisabled=!1,this.companyEditButtonStr="取消编辑"):(this.companyEditDisabled=!0,this.companyEditButtonStr="编辑")},addUpdateLog:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.$confirm("是否提交变更?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,e.inputQuery.customerId=L["a"].getters.customerId,Ta(e.inputQuery).then((function(t){e.loading=!1,2e4===t.code?(e.getData(),e.$message.success("提交成功")):e.$message.error(t.message)}))})).catch((function(){}))}))},getData:function(){var t=this;this.loading=!0;var e={customerId:L["a"].getters.customerId};Object(x["b"])(e).then((function(e){console.log(e),t.loading=!1,t.inputQuery=e.data,t.inputQuery.bussinessStatus=t.inputQuery.bussinessStatus+"",t.selectedOptions=t.inputQuery.areaCode.split(",")}))},applyUpdate:function(){this.companyApplyUpdateVisible=!0},salesmanOnReset:function(){this.salesmanQuery={name:"",auditStatus:"",page:1,limit:20},this.getCompanySalesmanList()},salesmanOnSubmit:function(){this.getCompanySalesmanList()},productOnReset:function(){this.productQuery={ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"",page:1,limit:20},this.getProductRelevanceList()},productOnSubmit:function(){this.getProductRelevanceList()},openFile:function(t){window.open(this.fileUrl+t)},selectProduct:function(t){this.uuid=null,this.$isNotBlank(t)&&(this.uuid=t.uuid),this.selectLocalVisible=!0},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},salesmanHandleCurrentChange:function(t){this.salesmanQuery.page=t,this.getCompanySalesmanList()},productHandleCurrentChange:function(t){this.productQuery.page=t,this.getProductRelevanceList()},getCompanyCertList:function(){var t=this;this.certLoading=!0,this.certQuery.customerId=L["a"].getters.customerId,fa(this.certQuery).then((function(e){t.certLoading=!1,t.certList=e.data.list||[]})).catch((function(){t.certLoading=!1,t.certList=[]}))},getCompanySalesmanList:function(){var t=this;this.salesmanLoading=!0,this.salesmanQuery.customerId=L["a"].getters.customerId,Je(this.salesmanQuery).then((function(e){t.salesmanLoading=!1,t.salesmanList=e.data.list||[]})).catch((function(){t.salesmanLoading=!1,t.salesmanList=[]}))},getProductRelevanceList:function(){var t=this;this.erpDisplay=!1,this.productLoading=!0,this.productQuery.customerId=L["a"].getters.customerId,oa(this.productQuery).then((function(e){t.productLoading=!1,t.productList=e.data.list||[],t.productTotal=e.data.total||0})).catch((function(){t.productLoading=!1,t.productList=[],t.productTotal=0}))},addCert:function(t,e){this.idQuery.id="",this.$isNotBlank(e)&&this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e),this.addCertVisible=!0},addSalesman:function(t){this.idQuery.id="",this.$isNotBlank(t)&&this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t),this.addSalesmanVisible=!0},applyAudit:function(t){var e=this;this.$confirm("是否提交申请?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.certLoading=!0;var a={salesmanId:t.id,customerId:L["a"].getters.customerId,name:t.name};va(a).then((function(t){e.certLoading=!1,2e4===t.code?(e.getCompanySalesmanList(),e.$message({type:"success",message:"提交成功!"})):e.$message.error(t.message)})).catch((function(){e.certLoading=!1}))})).catch((function(){}))},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},deleteCompanyCert:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.certLoading=!0;var a={id:t.id,filePath:t.filePath};ya(a).then((function(t){e.certLoading=!1,2e4===t.code?(e.getCompanyCertList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.certLoading=!1}))})).catch((function(){}))},deleteCompanySalesman:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.salesmanLoading=!0;var a={id:t.id,filePath:t.filePath,filePath2:t.filePath2};Ye(a).then((function(t){e.salesmanLoading=!1,2e4===t.code?(e.getCompanySalesmanList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.salesmanLoading=!1}))})).catch((function(){}))},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.productLoading=!0;var a={id:t.id};ua(a).then((function(t){e.productLoading=!1,2e4===t.code?(e.getProductRelevanceList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.productLoading=!1}))})).catch((function(){}))},closeDialog:function(t){this.addCertVisible=!1,this.addSalesmanVisible=!1,this.selectLocalVisible=!1,this.companyApplyUpdateVisible=!1,this.getData(),this.getCompanyCertList(),this.getCompanySalesmanList()},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?this.uploadFilePath("",t.data.name):this.$message.error("文件上传失败:"+t.message)},uploadHandleSuccess2:function(t,e,a){console.log(t),2e4===t.code?this.uploadFilePath("2",t.data.name):this.$message.error("文件上传失败:"+t.message)},uploadHandleSuccess3:function(t,e,a){console.log(t),2e4===t.code?this.uploadFilePath("3",t.data.name):this.$message.error("文件上传失败:"+t.message)},uploadHandleSuccess4:function(t,e,a){console.log(t),2e4===t.code?this.uploadFilePath("4",t.data.name):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){},deleteFile:function(t){this.$confirm("是否删除该文件?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){})).catch((function(){}))},uploadFilePath:function(t,e){var a=this,i="filePath"+t,l="newFilePath"+t;this.loading=!0;var s={customerId:L["a"].getters.customerId};s[i]=this.inputQuery[i],s[l]=e,Object(x["g"])(s).then((function(t){a.loading=!1,2e4===t.code&&(a.inputQuery[i]=e,a.fileList=[],a.fileList2=[],a.fileList3=[],a.fileList4=[],a.$message.success("上传成功"))}))}}},Cl=Dl,kl=(a("5830"),Object(g["a"])(Cl,nl,cl,!1,null,null,null)),Ql=kl.exports,Sl=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.productQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.productQuery.cpmctymc,callback:function(e){t.$set(t.productQuery,"cpmctymc",e)},expression:"productQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号"},model:{value:t.productQuery.ggxh,callback:function(e){t.$set(t.productQuery,"ggxh",e)},expression:"productQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产厂家"},model:{value:t.productQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.productQuery,"ylqxzcrbarmc",e)},expression:"productQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.productQuery.auditStatus,callback:function(e){t.$set(t.productQuery,"auditStatus",e)},expression:"productQuery.auditStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"通过",value:"1"}}),a("el-option",{attrs:{label:"不通过",value:"2"}}),a("el-option",{attrs:{label:"反审",value:"3"}}),a("el-option",{attrs:{label:"申请反审",value:"4"}}),a("el-option",{attrs:{label:"拒绝反审",value:"5"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.productOnReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.productOnSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.selectProduct()}}},[t._v("选择产品\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.productLoading,expression:"productLoading"}],staticStyle:{width:"100%",height:"500px"},attrs:{data:t.productList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"auditStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.auditStatusMap[e.row.auditStatus]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.selectProduct(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteCompanyProductRelevance(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.productQuery.limit,layout:"prev, pager, next",total:t.productTotal},on:{"current-change":t.salesmanHandleCurrentChange}})],1),t.selectLocalVisible?a("el-dialog",{attrs:{title:"医疗器械信息","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.selectLocalVisible,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectProduct",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid}})],1):t._e()],1)},_l=[],$l={data:function(){return{classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}],creditNum:[{required:!0,message:"请输入统一社会信用代码",trigger:"blur"}],classes:[{required:!0,message:"请选择企业类别",trigger:"change"}],area:[{required:!0,message:"请选择所属地区",trigger:"change"}],detailAddr:[{required:!0,message:"请输入详细地址",trigger:"change"}],contacts:[{required:!0,message:"请输入联系人",trigger:"change"}],mobile:[{required:!0,message:"请输入联系电话",trigger:"change"}],email:[{required:!0,message:"请输入邮箱",trigger:"change"}]},uploadUrl:"",fileList:[],fileUrl:"",certFileUrl:"",url:"http://127.0.0.1:9996/udiwms/image/register/file/getImage?type=image1&name=t11111.jpg",certQuery:{page:1,limit:20},certList:[],certTotal:0,certLoading:!1,addCertVisible:!1,idQuery:{id:""},salesmanQuery:{name:"",page:1,limit:20},salesmanList:[],salesmanTotal:0,salesmanLoading:!1,addSalesmanVisible:!1,certTypeMap:{1:"身份证"},auditStatusMap:{1:"通过",2:"不通过",3:"反审",4:"申请反审",5:"拒绝反审"},selectLocalVisible:!1,productQuery:{ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:null,page:1,limit:20},productList:[],productTotal:0,productLoading:!1,uuid:null}},created:function(){this.getProductRelevanceList(),110===L["a"].getters.customerId&&(this.classesDisplay=!0),this.uploadUrl=r["a"]+"/udiwms/upload/register/file",this.fileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image1&name=",this.certFileUrl=r["a"]+"/udiwms/image/register/file/getImage?type=image2&name="},components:{draggable:We.a,companyAddCert:fl,companyAddSalesman:aa,selectProduct:ha},methods:{onModifySubmit:function(t){var e=this;this.$refs[t].validate((function(t){if(!t)return console.log("error submit!!"),!1;e.loading=!0,e.inputQuery.customerId=L["a"].getters.customerId,Object(x["g"])(e.inputQuery).then((function(t){e.getData(),e.loading=!1,e.$message.success("修改成功")}))}))},getData:function(){var t=this;this.loading=!0;var e={customerId:L["a"].getters.customerId};Object(x["b"])(e).then((function(e){console.log(e),t.loading=!1,t.inputQuery=e.data,t.inputQuery.bussinessStatus=t.inputQuery.bussinessStatus+"",t.selectedOptions=t.inputQuery.areaCode.split(",")}))},salesmanOnReset:function(){this.salesmanQuery={name:"",page:1,limit:20},this.getCompanySalesmanList()},salesmanOnSubmit:function(){this.getCompanySalesmanList()},productOnReset:function(){this.productQuery={ylqxzcrbarmc:"",cpmctymc:"",ggxh:"",auditStatus:"",page:1,limit:20},this.getProductRelevanceList()},productOnSubmit:function(){this.getProductRelevanceList()},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},selectProduct:function(t){this.uuid=null,this.$isNotBlank(t)&&(this.uuid=t.uuid),this.selectLocalVisible=!0},certHandleCurrentChange:function(t){this.certQuery.page=t,this.getCompanyCertList()},salesmanHandleCurrentChange:function(t){this.salesmanQuery.page=t,this.getCompanySalesmanList()},productHandleCurrentChange:function(t){this.productQuery.page=t,this.getProductRelevanceList()},getProductRelevanceList:function(){var t=this;this.erpDisplay=!1,this.productLoading=!0,this.productQuery.customerId=L["a"].getters.customerId,oa(this.productQuery).then((function(e){t.productLoading=!1,t.productList=e.data.list||[],t.productTotal=e.data.total||0})).catch((function(){t.productLoading=!1,t.productList=[],t.productTotal=0}))},toViewCompanyCert:function(t){window.open(this.certFileUrl+t.filePath)},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.productLoading=!0;var a={id:t.id};ua(a).then((function(t){e.productLoading=!1,2e4===t.code?(e.getProductRelevanceList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.productLoading=!1}))})).catch((function(){}))},closeDialog:function(t){this.addCertVisible=!1,this.addSalesmanVisible=!1,this.selectLocalVisible=!1,this.getProductRelevanceList()},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()},submitUpload:function(){var t=this;this.$refs["inputQuery"].validate((function(e){e&&(t.$refs.upload.uploadFiles.length>0?t.$refs.upload.submit():t.onModifySubmit("inputQuery"))}))},uploadHandleRemove:function(t,e){console.log(t,e)},uploadHandlePreview:function(t){console.log(t),console.log(this.fileList)},uploadHandleExceed:function(t,e){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(t.length," 个文件,共选择了 ").concat(t.length+e.length," 个文件"))},uploadOnchange:function(t,e){var a=t.name,i=t.uid,l=a.lastIndexOf("."),s=a.substring(l,a.length);if(".jpg"===s.toLowerCase()||".png"===s.toLowerCase()){var o=t.size/1024/1024/2<=1;if(!o){this.$message.error("上传文件大小不能超过 2MB");for(var r=0;r<e.length;r++)e[r].uid===i&&e.splice(r,1)}return o}this.$message.error("上传文件只能是 .jpg,.png 格式");for(var n=0;n<e.length;n++)e[n].uid===i&&e.splice(n,1)},uploadHandleSuccess:function(t,e,a){console.log(t),2e4===t.code?(this.inputQuery.newFilePath=t.data.name,this.onModifySubmit("inputQuery")):this.$message.error("文件上传失败:"+t.message)},uploadHandleError:function(){}}},Tl=$l,Ll=(a("ed34"),Object(g["a"])(Tl,Sl,_l,!1,null,null,null)),Ol=(Ll.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.filterQuery.unionCode,callback:function(e){t.$set(t.filterQuery,"unionCode",e)},expression:"filterQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.filterQuery.ggxh,callback:function(e){t.$set(t.filterQuery,"ggxh",e)},expression:"filterQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择过滤对照条件"},model:{value:t.filterQuery.filterType,callback:function(e){t.$set(t.filterQuery,"filterType",e)},expression:"filterQuery.filterType"}},t._l(t.filterList,(function(e){return a("el-option",{key:e.filterType,attrs:{label:e.sysName,value:e.filterType}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.sysName))])])})),1)],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.filterQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.filterQuery,"ylqxzcrbarmc",e)},expression:"filterQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.filterQuery.thrPiId,callback:function(e){t.$set(t.filterQuery,"thrPiId",e)},expression:"filterQuery.thrPiId"}})],1),t.isSpCombine?a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.filterQuery.lockStatus,callback:function(e){t.$set(t.filterQuery,"lockStatus",e)},expression:"filterQuery.lockStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未提交",value:"1"}}),a("el-option",{attrs:{label:"已提交",value:"2"}}),a("el-option",{attrs:{label:"已锁定",value:"3"}})],1)],1):t._e(),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.selectProduct()}}},[t._v("选择产品\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}}),t.isSpCombine?a("el-table-column",{attrs:{label:"审核状态",prop:"lockStatus","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.lockStatusMap[e.row.lockStatus])+"\n ")]}}],null,!1,2171353223)}):t._e(),a("el-table-column",{attrs:{width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.isSpCombine?a("el-button",{attrs:{type:"text",size:"small",disabled:null==e.row.thirdId||""==e.row.thirdId||null!=e.row.flbm||3===e.row.lockStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.intentSelectUdi(e.row)}}},[t._v("关联DI\n ")]):t._e(),t.isSpCombine?a("el-button",{attrs:{type:"text",size:"small",disabled:3===e.row.lockStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")]):t._e(),t.isSpCombine?a("el-button",{attrs:{type:"text",size:"small",disabled:3===e.row.lockStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.sumitLockStatus(e.row)}}},[t._v("提交审核\n ")]):t._e(),t.isSpCombine?t._e():a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteCompanyProductRelevance(e.row)}}},[t._v("删除\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息编辑",visible:t.editDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-card",[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:e.row.thirdId==t.editQuery.nameCode},on:{click:function(a){return t.addSelectErp(e.row)}}},[t._v("关联\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:""},nativeOn:{click:function(a){return a.stopPropagation(),t.removeErp(e.row)}}},[t._v("解绑\n ")])]}}],null,!1,1323032305)})],1)],1),a("el-card",[a("div",{staticStyle:{float:"left","text-align":"left","font-weight":"bold","margin-bottom":"8px"}},[a("span",[t._v("产品标识:")])]),a("div",{staticStyle:{float:"right","text-align":"right","margin-bottom":"8px"}},[1!=t.productType?a("el-button",{staticStyle:{"text-align":"right"},attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.removeDi}},[t._v("解绑DI器械信息\n ")]):t._e()],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1)],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}}),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.editQuery.isDisable,callback:function(e){t.$set(t.editQuery,"isDisable",e)},expression:"editQuery.isDisable"}},[t._v("是否禁用\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.editQuery.isAdavence,callback:function(e){t.$set(t.editQuery,"isAdavence",e)},expression:"editQuery.isAdavence"}},[t._v("是否寄售\n ")])],1)],1)],1)],1),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onAddSubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),t.detailDialogVisible?a("el-dialog",{attrs:{title:"产品信息详情",visible:t.detailDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.detailDialogVisible=e}}},[a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}}),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:""},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:""},model:{value:t.editQuery.isDisable,callback:function(e){t.$set(t.editQuery,"isDisable",e)},expression:"editQuery.isDisable"}},[t._v("是否禁用\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:""},model:{value:t.editQuery.isAdavence,callback:function(e){t.$set(t.editQuery,"isAdavence",e)},expression:"editQuery.isAdavence"}},[t._v("是否寄售\n ")])],1)],1)],1)],1)],1):t._e(),t.selectUdiDialogVisible?a("el-dialog",{attrs:{title:"关联选入器械信息",visible:t.selectUdiDialogVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectUdiDialogVisible=e}}},[a("selectUdi",{attrs:{isImportUdi:t.isImportUdi},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectErpDialogVisible?a("el-dialog",{attrs:{title:"从指定系统选入器械信息",visible:t.selectErpDialogVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectErpDialogVisible=e}}},[a("selectErp",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,relId:t.relId,isImport:t.isImport,data:t.thisData,defaultSys:t.defaultSys},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectLocalVisible?a("el-dialog",{attrs:{title:"选入DI器械信息",visible:t.selectLocalVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectLocalUdi",{attrs:{closeDialog:t.closeDialog,relId:t.relId,isImportUdi:t.isImportUdi,data:t.thisData},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectProductVisible?a("el-dialog",{attrs:{title:"选入产品信息",visible:t.selectProductVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectProductVisible=e}}},[a("selectProduct",{attrs:{closeSelDialog:t.closeSelDialog,uuid:t.uuid}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)}),zl=[];function Il(t){return Object(et["a"])({url:"/udi/udirel/filterUdi",method:"get",params:t})}function Nl(t){return Object(et["a"])({url:"/udi/udirel/download",method:"get",params:t})}function Fl(t){return Object(et["a"])({url:"/udi/udirel/filterSmUdi",method:"get",params:t})}function ql(t){return Object(et["a"])({url:"/udi/udirel/deleteById",method:"post",data:t})}function Vl(t){return Object(et["a"])({url:"/udi/udirel/update",method:"post",data:t})}function Rl(t){return Object(et["a"])({url:"/udi/udirel/revleance",method:"post",data:t})}function El(t){return Object(et["a"])({url:"/udi/udirel/combineAll",method:"get",params:t})}function jl(t){return Object(et["a"])({url:"/udi/udirel/modifyRel",method:"post",data:t})}function Pl(t){return Object(et["a"])({url:"/udi/udirel/addErp",method:"post",data:t})}function Bl(t){return Object(et["a"])({url:"/udi/udirel/addAllErp",method:"post",data:t})}function Ul(t){return Object(et["a"])({url:"/udi/udirel/updateErp",method:"get",params:t})}function Al(t){return Object(et["a"])({url:"/udiwms/smp/udirl/upload",method:"post",data:t})}function Ml(t){return Object(et["a"])({url:"/udiwms/udirel/thirdSys/detail",method:"get",params:t})}function Wl(t){return Object(et["a"])({url:"/udiwms/udirl/thirdSys/remove",method:"get",params:t})}function Hl(t){return Object(et["a"])({url:"/udiwms/udirl/di/remove",method:"get",params:t})}function Kl(t){return Object(et["a"])({url:"/udiwms/udirel/thirdSys/filter",method:"get",params:t})}function Jl(t){return Object(et["a"])({url:"/udiwms/udiinfo/spcombie",method:"get",params:t})}function Gl(t){return Object(et["a"])({url:"/udiwms/udirl/lock/status",method:"post",data:t})}function Xl(t){return Object(et["a"])({url:"/udiwms/udiinfo/filterUdi",method:"get",params:t})}function Yl(t){return Object(et["a"])({url:"/udiwms/udiinfo/filterCompany",method:"get",params:t})}function Zl(t){return Object(et["a"])({url:"/udiwms/udiinfo/local/filterByUuid",method:"get",params:t})}var ts=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticStyle:{display:"flex",width:"100%"}},[a("span",{staticClass:"checkitemTag"}),a("el-button",{staticStyle:{"margin-right":"20px",float:"right"},attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.combine}},[t._v("选入\n ")])],1),t.checked?a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.erpQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品编码/商品条码/医保编码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyupErp_submit(e)}},model:{value:t.erpQuery.code,callback:function(e){t.$set(t.erpQuery,"code",e)},expression:"erpQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"产品名称"},model:{value:t.erpQuery.name,callback:function(e){t.$set(t.erpQuery,"name",e)},expression:"erpQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"注册/备案凭证号"},model:{value:t.erpQuery.registerNo,callback:function(e){t.$set(t.erpQuery,"registerNo",e)},expression:"erpQuery.registerNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"生产厂家"},model:{value:t.erpQuery.manufactory,callback:function(e){t.$set(t.erpQuery,"manufactory",e)},expression:"erpQuery.manufactory"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"规格型号"},model:{value:t.erpQuery.spec,callback:function(e){t.$set(t.erpQuery,"spec",e)},expression:"erpQuery.spec"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统",disabled:"true"},model:{value:t.thirdSysFk,callback:function(e){t.thirdSysFk=e},expression:"thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.searchErpList}},[t._v("查询")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.erpLloading,expression:"erpLloading"}],staticStyle:{width:"100%"},attrs:{data:t.erpList,"highlight-current-row":"true","row-class-name":t.tableRowClassName},on:{"current-change":t.handleErpChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"code"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"name"}}),a("el-table-column",{attrs:{label:"计量单位",prop:"measname"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory"}})],1),a("el-pagination",{attrs:{"page-size":t.erpQuery.limit,layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.handleErpPageChange}})],1)]):t._e(),a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{attrs:{inline:!0,model:t.unionQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{size:"mini",placeholder:"请输入完整DI",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.unionQuery.nameCode,callback:function(e){t.$set(t.unionQuery,"nameCode",e)},expression:"unionQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"医疗器械注册人","remote-method":t.findMethod,loading:t.loading},model:{value:t.unionQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.unionQuery,"ylqxzcrbarmc",e)},expression:"unionQuery.ylqxzcrbarmc"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.ylqxzcrbarmc,attrs:{label:e.ylqxzcrbarmc,value:e.ylqxzcrbarmc}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.ylqxzcrbarmc))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{size:"mini",clearable:"true",placeholder:"器械通用名称"},model:{value:t.unionQuery.cpmctymc,callback:function(e){t.$set(t.unionQuery,"cpmctymc",e)},expression:"unionQuery.cpmctymc"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true",size:"mini",disabled:""==t.unionQuery.cpmctymc&&""==t.unionQuery.nameCode&&null==t.unionQuery.ylqxzcrbarmc},model:{value:t.unionQuery.ggxh,callback:function(e){t.$set(t.unionQuery,"ggxh",e)},expression:"unionQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",disabled:""==t.unionQuery.cpmctymc&&""==t.unionQuery.nameCode&&null==t.unionQuery.ylqxzcrbarmc,placeholder:"注册/备案凭证号",size:"mini"},model:{value:t.unionQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.unionQuery,"zczbhhzbapzbh",e)},expression:"unionQuery.zczbhhzbapzbh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search",size:"mini"},on:{click:t.serchList}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.udidlList,"row-class-name":t.tableRowClassName},on:{"row-click":t.intentDetail,"selection-change":t.handleSelectionUdiChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",selectable:t.checkSelectable}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"医疗器械注册人",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册证编号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.unionQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)])],1)},es=[];function as(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/filter",method:"get",params:t})}function is(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/update",method:"post",data:t})}function ls(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/filterDetail",method:"get",params:t})}function ss(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/filterDetailByKey",method:"get",params:t})}function os(t){return Object(et["a"])({url:"/udiwms/basic/thirdsys/saveDetail",method:"post",data:t})}function rs(t){return Object(et["a"])({url:"/udiwms/udiinfo/erp/products",method:"get",params:t})}var ns={name:"closeDialog",props:{closeDialog:{type:Function,required:!0}},data:function(){return{erpQuery:{code:null,name:"",thirdSys:null,spec:null,manufactory:null,registerNo:null,page:1,limit:10},unionQuery:{page:1,limit:20,nameCode:"",cpmctymc:"",ylqxzcrbarmc:null,ggxh:"",zczbhhzbapzbh:"",isCheck:1},combineQuery:{thirdId:"",keys:[],thirdSys:null},fromOptions:[],checked:!0,udidlList:[],erpList:[],pageTotal:1,total:1,currentRow:null,loading:!1,erpLloading:!1,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null}},methods:{serchList:function(){this.unionQuery.page=1,this.getList()},getList:function(){var t=this;""!=this.unionQuery.nameCode||""!=this.unionQuery.cpmctymc||""!=this.unionQuery.ylqxzcrbarmc||""!=this.unionQuery.ggxh?(this.loading=!0,Xl(this.unionQuery).then((function(e){t.loading=!1,2e4==e.code?(t.udidlList=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.udidlList=[],t.total=0}))):this.$message.warning("请输入查询条件")},checkSelectable:function(t){return!t.check},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},tableRowClassName:function(t){var e=t.row;return e.checked?"warning-row":""},handleErpChange:function(t){console.log(t),this.currentRow=t},searchErpList:function(){this.erpQuery.page=1,this.getErpList()},handleErpPageChange:function(t){this.erpQuery.page=t,this.getErpList()},getErpList:function(){var t=this;this.erplLoading=!0,this.erpQuery.thirdSys=this.thirdSysFk,rs(this.erpQuery).then((function(e){t.erplLoading=!1,2e4==e.code?(t.erpList=e.data.list||[],t.pageTotal=e.data.total||0):(t.$message.error(e.message),t.erpList=[],t.pageTotal=0)})).catch((function(){t.erplLoading=!1,t.erpList=[],t.pageTotal=0}))},keyupErp_submit:function(t){this.erpQuery.page=1,this.getErpList(),t.target.select()},intentBack:function(){this.$router.go(-1)},combine:function(){var t=this,e=this.multipleUdiSelection,a=[];e.forEach((function(t){a.push(t.uuid)})),null!=this.currentRow&&this.currentRow.checked?this.$message.warning("产品编码:"+this.currentRow.code+"已被选入"):null!=this.currentRow?0!=a.length?(this.combineQuery.keys=a,this.combineQuery.thirdSys=this.thirdSysFk,this.checked?(this.combineQuery.thirdId=this.currentRow.code,this.combineQuery.erpName=this.currentRow.name):this.combineQuery.thirdId="",Rl(this.combineQuery).then((function(e){2e4==e.code?t.$emit("closeUdi",!0):t.$emit("closeUdi",!1)})).catch((function(){t.$emit("closeUdi",!1)}))):this.$message.warning("未选择医疗器械产品信息"):this.$message.warning("未选择第三方产品信息")},intentDetail:function(t){this.$emit("productInfo",t),this.closeDialog()},handleSelectionUdiChange:function(t){this.multipleUdiSelection=t},keyup_submit:function(t){this.unionQuery.page=1,this.getList(),t.target.select()},getBasicThirdSys:function(){var t=this,e={enabled:!0,mainSys:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId})).catch((function(){t.loading=!1,t.list=[]}))},findMethod:function(t){var e=this;console.log(t);var a={ylqxzcrbarmc:t,page:1,limit:10};Yl(a).then((function(t){e.loading=!1,e.fromOptions=t.data||[]})).catch((function(){e.loading=!1,e.options=[]}))}},created:function(){this.getBasicThirdSys()}},cs=ns,us=(a("4e21"),Object(g["a"])(cs,ts,es,!1,null,"6825ead5",null)),ds=us.exports,ps=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.erpQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品编码/商品条码/医保编码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyupErp_submit(e)}},model:{value:t.erpQuery.code,callback:function(e){t.$set(t.erpQuery,"code",e)},expression:"erpQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.erpQuery.name,callback:function(e){t.$set(t.erpQuery,"name",e)},expression:"erpQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyupErp_submit(e)}},model:{value:t.erpQuery.spec,callback:function(e){t.$set(t.erpQuery,"spec",e)},expression:"erpQuery.spec"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"注册/备案凭证号"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.erpQuery.registerNo,callback:function(e){t.$set(t.erpQuery,"registerNo",e)},expression:"erpQuery.registerNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"生产厂家"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.erpQuery.manufactory,callback:function(e){t.$set(t.erpQuery,"manufactory",e)},expression:"erpQuery.manufactory"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请设置主系统",disabled:"isImport"},model:{value:t.thirdSysFk,callback:function(e){t.thirdSysFk=e},expression:"thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.searchErpList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search",loading:t.combineLoading},on:{click:t.combine}},[t._v("选入\n ")]),t.isImport?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.combineAll}},[t._v("结果全部选入\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.erpLloading,expression:"erpLloading"}],staticStyle:{width:"100%"},attrs:{data:t.erpList,"highlight-current-row":"true","row-class-name":t.tableRowClassName},on:{"current-change":t.handleErpChange,"selection-change":t.handleSelectionChange}},[t.isImport?a("el-table-column",{attrs:{type:"selection",selectable:t.checkSelectable,width:"55"}}):t._e(),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"code"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"name"}}),a("el-table-column",{attrs:{label:"计量单位",prop:"measname"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo"}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory"}})],1),a("el-pagination",{attrs:{"page-size":t.erpQuery.limit,layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.handleErpPageChange}})],1)]),t.isImport?t._e():a("el-card",{staticClass:"el-card"},[t.isImport?t._e():a("div",{staticStyle:{"margin-bottom":"20px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.data.cpmctymc,callback:function(e){t.$set(t.data,"cpmctymc",e)},expression:"data.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.nameCode,callback:function(e){t.$set(t.data,"nameCode",e)},expression:"data.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ggxh,callback:function(e){t.$set(t.data,"ggxh",e)},expression:"data.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.data.ylqxzcrbarmc,callback:function(e){t.$set(t.data,"ylqxzcrbarmc",e)},expression:"data.ylqxzcrbarmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ylqxzcrbarywmc,callback:function(e){t.$set(t.data,"ylqxzcrbarywmc",e)},expression:"data.ylqxzcrbarywmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.qxlb,callback:function(e){t.$set(t.data,"qxlb",e)},expression:"data.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.cplb,callback:function(e){t.$set(t.data,"cplb",e)},expression:"data.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.flbm,callback:function(e){t.$set(t.data,"flbm",e)},expression:"data.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.sptm,callback:function(e){t.$set(t.data,"sptm",e)},expression:"data.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ybbm,callback:function(e){t.$set(t.data,"ybbm",e)},expression:"data.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.tyshxydm,callback:function(e){t.$set(t.data,"tyshxydm",e)},expression:"data.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.zczbhhzbapzbh,callback:function(e){t.$set(t.data,"zczbhhzbapzbh",e)},expression:"data.zczbhhzbapzbh"}})],1)])],1)],1)])],1)},ms=[],hs=(a("c5f6"),{name:"closeDialog",props:{uuid:{type:Object,required:!0},data:{type:Object,required:!0},relId:{type:Number,required:!0},isImport:{type:Boolean,required:!0},closeDialog:{type:Function,required:!0},defaultSys:{type:Object,required:!0}},data:function(){return{erpQuery:{code:null,name:null,spec:null,registerNo:null,manufactory:null,thirdSys:null,page:1,limit:10},combineLoading:!1,combineQuery:{thirdId:"",relId:"",erpName:"",keys:[],thirdIds:[],thirdSys:null,query:null,isRlInv:null},udidlList:[],erpList:[],pageTotal:1,total:1,currentRow:null,loading:!1,erpLloading:!1,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null}},methods:{tableRowClassName:function(t){var e=t.row;return e.checked?"warning-row":""},checkSelectable:function(t){return!t.checked},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},handleErpChange:function(t){console.log(t),this.currentRow=t},handleErpPageChange:function(t){this.erpQuery.page=t,this.getErpList()},searchErpList:function(){this.erpQuery.page=1,this.getErpList()},keyup_submit:function(t){this.erpQuery.page=1,this.getErpList(),t.target.select()},getErpList:function(){var t=this;this.erplLoading=!0,this.erpQuery.thirdSys=this.thirdSysFk,rs(this.erpQuery).then((function(e){t.erplLoading=!1,2e4==e.code?(t.erpList=e.data.list||[],t.pageTotal=e.data.total||0):(t.$message.error(e.message),t.erpList=[],t.pageTotal=0)})).catch((function(){t.erplLoading=!1,t.erpList=[],t.pageTotal=0}))},intentBack:function(){this.closeDialog()},combineAll:function(){var t=this;this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.combineQuery.thirdSys=t.thirdSysFk,t.combineQuery.query=t.erpQuery,Bl(t.combineQuery).then((function(e){2e4==e.code?(t.$message.success(e.data),t.$emit("closeUdi",!0)):(t.$message.error(e.message),t.$emit("closeUdi",!1))})).catch((function(){t.$emit("closeUdi",!1)}))})).catch((function(){}))},combine:function(){var t=this;if(this.combineQuery.query=null,this.combineQuery.relId=this.relId,this.combineQuery.thirdSys=this.thirdSysFk,this.isImport){this.combineQuery.thirdId=null;var e=this.multipleUdiSelection,a=null;if(e.forEach((function(e){e.checked&&(a=e),t.combineQuery.thirdIds.push(e.code)})),null!=a)return void this.$message.warning("产品编码:"+a.code+"已被选入");this.combineLoading=!0,Pl(this.combineQuery).then((function(e){t.combineLoading=!1,2e4==e.code?t.$emit("closeUdi",!0):(t.$message.error(e.message),t.$emit("closeUdi",!1))})).catch((function(){t.combineLoading=!1,t.$emit("closeUdi",!1)}))}else{if(this.combineQuery.thirdId=this.currentRow.code,this.combineQuery.erpName=this.currentRow.name,this.currentRow.checked)return void this.$message.warning("产品编码:"+this.currentRow.code+"已被选入");this.combineLoading=!0,jl(this.combineQuery).then((function(e){t.combineLoading=!1,2e4==e.code?t.$emit("closeUdi",!0):t.$emit("closeUdi",!1)})).catch((function(){t.combineLoading=!1,t.$emit("closeUdi",!1)}))}},handleSelectionChange:function(t){console.log("----"+t),this.multipleUdiSelection=t},getBasicThirdSys:function(){var t=this,e={enabled:!0,mainSys:!1,filter:!0};this.isImport&&(e.mainSys=!0),as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId,null!=t.defaultSys&&(t.thirdSysFk=t.defaultSys)})).catch((function(){t.loading=!1,t.list=[]}))}},created:function(){console.log("-------------"+this.uuid),this.getBasicThirdSys()}}),fs=hs,gs=(a("bf99"),Object(g["a"])(fs,ps,ms,!1,null,"4af8730c",null)),ys=gs.exports,bs=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{attrs:{inline:!0,model:t.unionQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"1000px"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"600px"},attrs:{placeholder:"请扫描或输入UDI码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.unionQuery.udiCode,callback:function(e){t.$set(t.unionQuery,"udiCode",e)},expression:"unionQuery.udiCode"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",size:"mini",placeholder:"请输入完整DI"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.unionQuery.nameCode,callback:function(e){t.$set(t.unionQuery,"nameCode",e)},expression:"unionQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"医疗器械注册人","remote-method":t.findMethod,loading:t.loading},model:{value:t.unionQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.unionQuery,"ylqxzcrbarmc",e)},expression:"unionQuery.ylqxzcrbarmc"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.ylqxzcrbarmc,attrs:{label:e.ylqxzcrbarmc,value:e.ylqxzcrbarmc}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.ylqxzcrbarmc))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",size:"mini",placeholder:"器械通用名称"},model:{value:t.unionQuery.cpmctymc,callback:function(e){t.$set(t.unionQuery,"cpmctymc",e)},expression:"unionQuery.cpmctymc"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",disabled:""==t.unionQuery.cpmctymc&&""==t.unionQuery.nameCode&&null==t.unionQuery.ylqxzcrbarmc,placeholder:"规格型号",size:"mini"},model:{value:t.unionQuery.ggxh,callback:function(e){t.$set(t.unionQuery,"ggxh",e)},expression:"unionQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",disabled:""==t.unionQuery.cpmctymc&&""==t.unionQuery.nameCode&&null==t.unionQuery.ylqxzcrbarmc,placeholder:"注册证/备案号",size:"mini"},model:{value:t.unionQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.unionQuery,"zczbhhzbapzbh",e)},expression:"unionQuery.zczbhhzbapzbh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search",size:"mini"},on:{click:t.searchList}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",size:"mini",icon:"search",loading:t.combineLoading},on:{click:t.combine}},[t._v("选入\n ")]),null==t.relId?a("el-button",{attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.combineUdiAll}},[t._v("结果全部选入\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.udidlList,"highlight-current-row":"true","row-class-name":t.tableRowClassName},on:{"row-click":t.intentDetail,"current-change":t.handleErpChange,"selection-change":t.handleSelectionUdiChange}},[null==t.relId?a("el-table-column",{attrs:{type:"selection",selectable:t.checkSelectable,width:"55"}}):t._e(),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"医疗器械注册人",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册证编号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.unionQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)]),t.isImportUdi?t._e():a("el-card",{staticClass:"el-card"},[t.isImport?t._e():a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.data.cpmctymc,callback:function(e){t.$set(t.data,"cpmctymc",e)},expression:"data.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.nameCode,callback:function(e){t.$set(t.data,"nameCode",e)},expression:"data.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ggxh,callback:function(e){t.$set(t.data,"ggxh",e)},expression:"data.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.data.ylqxzcrbarmc,callback:function(e){t.$set(t.data,"ylqxzcrbarmc",e)},expression:"data.ylqxzcrbarmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ylqxzcrbarywmc,callback:function(e){t.$set(t.data,"ylqxzcrbarywmc",e)},expression:"data.ylqxzcrbarywmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.qxlb,callback:function(e){t.$set(t.data,"qxlb",e)},expression:"data.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.cplb,callback:function(e){t.$set(t.data,"cplb",e)},expression:"data.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.flbm,callback:function(e){t.$set(t.data,"flbm",e)},expression:"data.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.sptm,callback:function(e){t.$set(t.data,"sptm",e)},expression:"data.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ybbm,callback:function(e){t.$set(t.data,"ybbm",e)},expression:"data.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.tyshxydm,callback:function(e){t.$set(t.data,"tyshxydm",e)},expression:"data.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.zczbhhzbapzbh,callback:function(e){t.$set(t.data,"zczbhhzbapzbh",e)},expression:"data.zczbhhzbapzbh"}})],1)])],1)],1)])],1)},vs=[],ws={name:"closeDialog",props:{closeDialog:{type:Function,required:!0},relId:{type:Number,required:!0},isImport:{type:Object,required:!0},data:{type:Object,required:!0}},data:function(){return{unionQuery:{page:1,limit:10,udiCode:null,nameCode:"",cpmctymc:"",ylqxzcrbarmc:null,ggxh:"",zczbhhzbapzbh:"",isCheck:1},combineLoading:!1,combineQuery:{thirdId:"",relId:"",erpName:"",keys:[]},checked:!0,udidlList:[],erpList:[],pageTotal:1,total:1,currentRow:null,fromOptions:[],loading:!1,erpLloading:!1,multipleUdiSelection:[]}},methods:{searchList:function(){this.unionQuery.page=1,this.getList()},getList:function(){var t=this;""!=this.unionQuery.udiCode||""!=this.unionQuery.nameCode||""!=this.unionQuery.cpmctymc||""!=this.unionQuery.ylqxzcrbarmc||""!=this.unionQuery.ggxh||""!=this.unionQuery.zczbhhzbapzbh?(this.loading=!0,Xl(this.unionQuery).then((function(e){t.loading=!1,2e4==e.code?(t.udidlList=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.udidlList=[],t.total=0}))):this.$message.warning("请输入查询条件")},combineUdiAll:function(){var t=this;this.$confirm("此操作将在后台自动下载所有查询结果, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){El(t.unionQuery).then((function(e){t.loading=!1,2e4==e.code?(t.$message.success(e.data),t.$emit("closeUdi",!0)):t.$message.error(e.message)})).catch((function(){}))})).catch((function(){}))},keyup_submit:function(t){this.unionQuery.page=1,this.getList(),t.target.select()},checkSelectable:function(t){return!t.check},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.check?"warning-row":""},handleErpChange:function(t){console.log(t),this.currentRow=t},intentBack:function(){this.closeDialog()},combine:function(){var t=this,e=this.multipleUdiSelection,a=null;if(0==this.multipleUdiSelection.length){if(null==this.relId)return;this.combineQuery.relId=this.relId,this.combineQuery.keys.push(this.currentRow.uuid),this.currentRow.check&&(a=this.currentRow)}else e.forEach((function(e){e.check&&(a=e),t.combineQuery.keys.push(e.uuid)}));null==a?(this.combineLoading=!0,Rl(this.combineQuery).then((function(e){t.combineLoading=!1,2e4==e.code?t.$emit("closeUdi",!0):t.$emit("closeUdi",!1)})).catch((function(){t.combineLoading=!1,t.$emit("closeUdi",!1)}))):this.$message.warning("UDI编码:"+a.nameCode+"已被选入")},handleSelectionUdiChange:function(t){console.log("----"+t),this.multipleUdiSelection=t},findMethod:function(t){var e=this;console.log(t);var a={ylqxzcrbarmc:t,page:1,limit:10};Yl(a).then((function(t){e.loading=!1,e.fromOptions=t.data||[]})).catch((function(){e.loading=!1,e.fromOptions=[]}))}}},xs=ws,Ds=(a("3991"),Object(g["a"])(xs,bs,vs,!1,null,"68e883e8",null)),Cs=Ds.exports,ks=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.filterQuery.unionCode,callback:function(e){t.$set(t.filterQuery,"unionCode",e)},expression:"filterQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.filterQuery.ggxh,callback:function(e){t.$set(t.filterQuery,"ggxh",e)},expression:"filterQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择过滤对照条件"},model:{value:t.filterQuery.filterType,callback:function(e){t.$set(t.filterQuery,"filterType",e)},expression:"filterQuery.filterType"}},t._l(t.filterList,(function(e){return a("el-option",{key:e.filterType,attrs:{label:e.sysName,value:e.filterType}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.sysName))])])})),1)],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.filterQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.filterQuery,"ylqxzcrbarmc",e)},expression:"filterQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.filterQuery.thrPiId,callback:function(e){t.$set(t.filterQuery,"thrPiId",e)},expression:"filterQuery.thrPiId"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导入\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",selectable:t.checkSelectable}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("详情\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息详情",visible:t.editDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方产品ID",prop:"thirdId","show-overflow-tooltip":""}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1)],1)],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Qs=[];function Ss(t){return Object(et["a"])({url:"/udiwms/corps/importLog/uploadSmp",method:"post",data:t})}function _s(t){return Object(et["a"])({url:"/udiwms/products/importLog/uploadSmp",method:"post",data:t})}function $s(t){return Object(et["a"])({url:"/udiwms/thrOrder/importLog/uploadSmp",method:"post",data:t})}function Ts(t){return Object(et["a"])({url:"/udiwms/thrProducts/importLog/uploadSmp",method:"post",data:t})}function Ls(t){return Object(et["a"])({url:"/udiwms/products/exportLog/filter",method:"get",params:t})}function Os(t){return Object(et["a"])({url:"/udiwms/products/exportLog/deleteLog",method:"post",data:t})}function zs(t){return Object(et["a"])({url:"/udiwms/products/importLog/export",method:"post",data:t})}var Is={name:"UdIInfoSelect",props:{selectType:{type:Object,required:!0},closeSelDialog:{type:Function,required:!0}},data:function(){return{filterQuery:{customerId:null,uuids:[],rlIds:[],ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",page:1,limit:20,addType:1},editQuery:null,relevanceEdit:{id:null,thirdId:"",isUseDy:!1},isImport:!1,isImportUdi:!1,isUploadSmp:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={customerId:null,uuids:[],rlIds:[],ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",page:1,limit:20,addType:1},this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Fl(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.loading=!1,e.detailList=t.data||[]})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},combine:function(){var t=this;this.combineQuery.productUuid=this.currentRow.uuid,this.combineQuery.customerId=L["a"].getters.customerId,ra(this.combineQuery).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success("添加成功"),t.closeDialog(!0)):t.$message.error(e.message)}))},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.rlIds.push(e.id)})),this.allExport()},allExport:function(){var t=this;this.filterQuery.customerId=L["a"].getters.customerId,na(this.filterQuery).then((function(e){t.loading=!1,2e4==e.code?(t.$message.success(e.data),console.log("关闭弹窗"),t.$emit("closeSelDialog",!0),t.closeSelDialog()):t.$message.error(e.message)}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},intentImportErp:function(t){this.uuid=t.uuid,this.relId=t.id,this.isImport=!0,this.thisData=t,this.selectErpDialogVisible=!0},uploadSMP:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.uuids.push(e.uuid)})),this.allUploadSMP()},allUploadSMP:function(){var t=this;_s(this.filterQuery).then((function(e){2e4==e.code?t.$message({type:"success",message:"上传成功!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"}),t.$emit("cancelDialog",!0)}))},handleSelectionChange:function(t){console.log("----"+t),this.multipleSelection=t},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleModifyClick:function(t){this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.id,thirdId:t.thirdId,isUseDy:t.isUseDy},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},checkSelectable:function(t){return!t.isSelect},uploadErpProduct:function(){var t=this;Ul().then((function(e){2e4==e.code?(t.$message({type:"success",message:e.data}),t.$emit("closeDialog",!0)):t.$message.error(e.message)})).catch((function(){}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1},selectSysParam:function(){var t=this,e={paramKey:"smp_isUploadProuct"};Bt(e).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isUploadSmp=!0)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))}},mounted:function(){},components:{},created:function(){this.getList(),this.selectSysParam()}},Ns=Is,Fs=(a("22c3"),Object(g["a"])(Ns,ks,Qs,!1,null,"10e32301",null)),qs=Fs.exports,Vs={data:function(){return{filterQuery:{unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",ggxh:null,page:1,limit:20,addType:1,thrPiId:null,filterType:null,auditStatus:null},selectProductVisible:!1,editQuery:null,relevanceEdit:{id:null,thirdId:"",isDisable:null,isUseDy:!1,isAdavence:null},productType:null,defaultSys:null,isImport:!1,isSpCombine:!1,isImportUdi:!1,isUploadSmp:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],filterList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,detailDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1,auditStatusMap:{1:"通过",2:"不通过",3:"反审",4:"申请反审",5:"拒绝反审"},lockStatusMap:{1:"未提交",2:"已提交",3:"已锁定"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",thrPiId:null,nameCode:"",ggxh:null,page:1,limit:20,addType:1},this.getList()},getList:function(){this.loading=!0,this.getProductRelevanceList()},getProductRelevanceList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,oa(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},keyup_submit:function(t){this.filterQuery.page=1,this.getList(),t.target.select()},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.loading=!1,e.detailList=t.data||[],e.productType=e.detailList[0].productType})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};ql(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},addSelectErp:function(t){this.defaultSys=t.sysId,this.isImport=!1,this.selectErpDialogVisible=!0},removeErp:function(t){var e=this;this.$confirm("此操作将解除该绑定产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={relId:e.editQuery.rlId,thirdSys:t.sysId};Wl(a).then((function(t){2e4==t.code?(e.getThirdSysDetail()(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},removeDi:function(){var t=this;this.$confirm("此操作将解除该绑定DI器械信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={relId:t.editQuery.rlId};Hl(e).then((function(e){2e4==e.code?(t.$message({type:"success",message:"删除成功!"}),t.getList(),t.cancelDialog()):t.$message.error(e.message)})).catch((function(){}))})).catch((function(){}))},intentSelectErp:function(t){this.uuid=t.uuid,this.relId=t.rlId,this.isImport=!1,this.thisData=t,this.selectErpDialogVisible=!0},intentImportErp:function(t){this.defaultSys=null,this.uuid=t.uuid,this.relId=t.rlId,this.isImport=!0,this.thisData=t,this.selectErpDialogVisible=!0},uploadSMP:function(){var t=this,e=this.multipleSelection,a=[];e.forEach((function(t){a.push(t.id)}));var i={keys:a};Al(i).then((function(e){2e4==e.code?t.$message({type:"success",message:"上传成功!"}):t.$message({type:"error",message:e.message})})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},intentSelectUdi:function(t){this.relId=t.rlId,this.isImportUdi=!0,this.thisData=t,console.log("-----"+this.relId),this.selectLocalVisible=!0},intentImportUdi:function(){this.relId=null,this.selectLocalVisible=!0},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.productLoading=!0;var a={id:t.id};ua(a).then((function(t){e.productLoading=!1,2e4===t.code?(e.getProductRelevanceList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.productLoading=!1}))})).catch((function(){}))},handleSelectionChange:function(t){console.log("----"+t),this.multipleSelection=t},closeSelDialog:function(t){this.selectProductVisible=!1},cancelDialog:function(){this.editDialogVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleDetailClick:function(t){this.thisData=t,this.detailDialogVisible=!0,this.editQuery=t},sumitLockStatus:function(t){var e=this,a={ids:[],lockStatus:2};a.ids.push(t.rlId),Gl(a).then((function(t){2e4==t.code?(e.loading=!1,e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},handleModifyClick:function(t){this.uuid=t.uuid,this.relId=t.rlId,this.isImport=!1,this.thisData=t,this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.rlId,isUseDy:t.isUseDy,isDisable:t.isDisable,isAdavence:t.isAdavence},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,this.getThirdSysDetail(),t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},getSysFilter:function(){var t=this;Kl().then((function(e){t.loading=!1,t.filterList=e.data.list||[]})).catch((function(){t.loading=!1,t.filterList=[]}))},uploadErpProduct:function(){var t=this;Ul().then((function(e){2e4==e.code?t.$message({type:"success",message:e.data}):t.$message.error(e.message)})).catch((function(){}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,this.selectProductVisible=!1,console.log("关闭弹窗2")},onAddSubmit:function(){var t=this;1==this.checked?this.relevanceEdit.isUseDy=1:this.relevanceEdit.isUseDy=0,this.relevanceEdit.isDisable=this.editQuery.isDisable,this.relevanceEdit.isAdavence=this.editQuery.isAdavence,console.log(this.relevanceEdit.isUseDy),Vl(this.relevanceEdit).then((function(e){t.loading=!1,t.getList(),t.cancelDialog()})).catch((function(){t.loading=!1,t.cancelDialog()}))},selectSysParam:function(){var t=this;Jl().then((function(e){2e4==e.code&&("1"==e.data.paramValue?t.isSpCombine=!0:t.isSpCombine=!1)}));var e={paramKey:"smp_isUploadProuct"};Bt(e).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isUploadSmp=!0)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))},selectProduct:function(){this.selectProductVisible=!0}},mounted:function(){},components:{selectUdi:ds,selectErp:ys,selectLocalUdi:Cs,selectProduct:qs},created:function(){this.getList(),this.selectSysParam(),this.getSysFilter()}},Rs=Vs,Es=(a("ad9e"),Object(g["a"])(Rs,Ol,zl,!1,null,"2e5c79e8",null)),js=Es.exports,Ps=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.logQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.logQuery.status,callback:function(e){t.$set(t.logQuery,"status",e)},expression:"logQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未审核",value:"1"}}),a("el-option",{attrs:{label:"通过",value:"2"}}),a("el-option",{attrs:{label:"未通过",value:"3"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%",height:"500px"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"原因",prop:"updateCause"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.status]))])]}}])}),a("el-table-column",{attrs:{label:"拒绝原因",prop:"noPassCause"}}),a("el-table-column",{attrs:{label:"提交时间",prop:"create_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_time))])]}}])}),a("el-table-column",{attrs:{label:"审核时间",prop:"update_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.update_time))])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.logQuery.limit,layout:"prev, pager, next",total:t.logTotal},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},Bs=[],Us={data:function(){return{classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}]},uploadUrl:"",fileList:[],fileUrl:"",idQuery:{id:""},statusMap:{1:"已提交",2:"通过",3:"不通过"},selectLocalVisible:!1,logQuery:{name:"",status:"",page:1,limit:20},dataList:[],logTotal:0,loading:!1,uuid:null}},created:function(){this.getLogList()},components:{draggable:We.a},methods:{onReset:function(){this.logQuery={name:"",status:"",page:1,limit:20},this.getLogList()},onSubmit:function(){this.getLogList()},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},handleCurrentChange:function(t){this.logQuery.page=t,this.getLogList()},getLogList:function(){var t=this;this.loading=!0,this.logQuery.customerId=L["a"].getters.customerId,ba(this.logQuery).then((function(e){t.loading=!1,t.dataList=e.data.list||[],t.logTotal=e.data.total||0})).catch((function(){t.loading=!1,t.dataList=[],t.logTotal=0}))},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0;var a={id:t.id};ua(a).then((function(t){e.loading=!1,2e4===t.code?(e.getLogList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},closeDialog:function(t){this.selectLocalVisible=!1},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()}}},As=Us,Ms=(a("319d"),Object(g["a"])(As,Ps,Bs,!1,null,null,null)),Ws=Ms.exports,Hs=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.logQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.logQuery.status,callback:function(e){t.$set(t.logQuery,"status",e)},expression:"logQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未审核",value:"1"}}),a("el-option",{attrs:{label:"通过",value:"2"}}),a("el-option",{attrs:{label:"未通过",value:"3"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%",height:"500px"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"原因",prop:"updateCause"}}),a("el-table-column",{attrs:{label:"审核状态",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.status]))])]}}])}),a("el-table-column",{attrs:{label:"拒绝原因",prop:"noPassCause"}}),a("el-table-column",{attrs:{label:"提交时间",prop:"create_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_time))])]}}])}),a("el-table-column",{attrs:{label:"审核时间",prop:"update_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.update_time))])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.logQuery.limit,layout:"prev, pager, next",total:t.logTotal},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},Ks=[],Js={data:function(){return{classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}]},uploadUrl:"",fileList:[],fileUrl:"",idQuery:{id:""},statusMap:{1:"已提交",2:"通过",3:"不通过"},selectLocalVisible:!1,logQuery:{name:"",status:"",page:1,limit:20},dataList:[],logTotal:0,loading:!1,uuid:null}},created:function(){this.getLogList()},components:{draggable:We.a},methods:{onReset:function(){this.logQuery={name:"",status:"",page:1,limit:20},this.getLogList()},onSubmit:function(){this.getLogList()},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},handleCurrentChange:function(t){this.logQuery.page=t,this.getLogList()},getLogList:function(){var t=this;this.loading=!0,ba(this.logQuery).then((function(e){t.loading=!1,t.dataList=e.data.list||[],t.logTotal=e.data.total||0})).catch((function(){t.loading=!1,t.dataList=[],t.logTotal=0}))},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0;var a={id:t.id};ua(a).then((function(t){e.loading=!1,2e4===t.code?(e.getLogList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},closeDialog:function(t){this.selectLocalVisible=!1},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()}}},Gs=Js,Xs=(a("80f5"),Object(g["a"])(Gs,Hs,Ks,!1,null,null,null)),Ys=Xs.exports,Zs=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.logQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.logQuery.status,callback:function(e){t.$set(t.logQuery,"status",e)},expression:"logQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未审核",value:"1"}}),a("el-option",{attrs:{label:"通过",value:"2"}}),a("el-option",{attrs:{label:"未通过",value:"3"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核类型"},model:{value:t.logQuery.logType,callback:function(e){t.$set(t.logQuery,"logType",e)},expression:"logQuery.logType"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"新增审核",value:"1"}}),a("el-option",{attrs:{label:"变更审核",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%",height:"500px"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"原因",prop:"updateCause"}}),a("el-table-column",{attrs:{label:"审核类型",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.logTypeMap[e.row.logType]))])]}}])}),a("el-table-column",{attrs:{label:"审核状态",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.status]))])]}}])}),a("el-table-column",{attrs:{label:"提交人员",prop:"submit"}}),a("el-table-column",{attrs:{label:"审核人员",prop:"auditor"}}),a("el-table-column",{attrs:{label:"拒绝原因",prop:"noPassCause"}}),a("el-table-column",{attrs:{label:"提交时间",prop:"create_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_time))])]}}])}),a("el-table-column",{attrs:{label:"审核时间",prop:"update_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.update_time))])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.logQuery.limit,layout:"prev, pager, next",total:t.logTotal},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},to=[],eo={data:function(){return{classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}]},uploadUrl:"",fileList:[],fileUrl:"",idQuery:{id:""},statusMap:{1:"未审核",2:"通过",3:"未通过"},logTypeMap:{1:"新增审核",2:"变更审核"},selectLocalVisible:!1,logQuery:{name:"",status:"",logType:"",page:1,limit:20},dataList:[],logTotal:0,loading:!1,uuid:null}},created:function(){this.getLogList()},components:{draggable:We.a},methods:{onReset:function(){this.logQuery={name:"",status:"",logType:"",page:1,limit:20},this.getLogList()},onSubmit:function(){this.getLogList()},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},handleCurrentChange:function(t){this.logQuery.page=t,this.getLogList()},getLogList:function(){var t=this;this.loading=!0,this.logQuery.customerId=L["a"].getters.customerId,_a(this.logQuery).then((function(e){t.loading=!1,t.dataList=e.data.list||[],t.logTotal=e.data.total||0})).catch((function(){t.loading=!1,t.dataList=[],t.logTotal=0}))},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0;var a={id:t.id};ua(a).then((function(t){e.loading=!1,2e4===t.code?(e.getLogList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},closeDialog:function(t){this.selectLocalVisible=!1},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()}}},ao=eo,io=(a("956b"),Object(g["a"])(ao,Zs,to,!1,null,null,null)),lo=io.exports,so=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.logQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核状态"},model:{value:t.logQuery.status,callback:function(e){t.$set(t.logQuery,"status",e)},expression:"logQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未审核",value:"1"}}),a("el-option",{attrs:{label:"通过",value:"2"}}),a("el-option",{attrs:{label:"未通过",value:"3"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"审核类型"},model:{value:t.logQuery.logType,callback:function(e){t.$set(t.logQuery,"logType",e)},expression:"logQuery.logType"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"新增审核",value:"1"}}),a("el-option",{attrs:{label:"变更审核",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{margin:"0 100px 0 auto"}},[a("el-button-group")],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%",height:"500px"},attrs:{data:t.dataList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"原因",prop:"updateCause"}}),a("el-table-column",{attrs:{label:"审核类型",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.logTypeMap[e.row.logType]))])]}}])}),a("el-table-column",{attrs:{label:"审核状态",prop:"status",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.status]))])]}}])}),a("el-table-column",{attrs:{label:"提交人员",prop:"submit"}}),a("el-table-column",{attrs:{label:"审核人员",prop:"auditor"}}),a("el-table-column",{attrs:{label:"拒绝原因",prop:"noPassCause"}}),a("el-table-column",{attrs:{label:"提交时间",prop:"create_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.create_time))])]}}])}),a("el-table-column",{attrs:{label:"审核时间",prop:"update_time","show-overflow-tooltip":"",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.update_time))])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.logQuery.limit,layout:"prev, pager, next",total:t.logTotal},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},oo=[],ro={data:function(){return{classesDisplay:!1,selectedOptions:[],options:fi["regionDataPlus"],rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}]},uploadUrl:"",fileList:[],fileUrl:"",idQuery:{id:""},statusMap:{1:"未审核",2:"通过",3:"未通过"},logTypeMap:{1:"新增审核",2:"变更审核"},selectLocalVisible:!1,logQuery:{name:"",status:"",logType:"",page:1,limit:20},dataList:[],logTotal:0,loading:!1,uuid:null}},created:function(){this.getLogList()},components:{draggable:We.a},methods:{onReset:function(){this.logQuery={name:"",status:"",logType:"",page:1,limit:20},this.getLogList()},onSubmit:function(){this.getLogList()},openFile:function(){window.open(this.fileUrl+this.inputQuery.filePath)},handleCurrentChange:function(t){this.logQuery.page=t,this.getLogList()},getLogList:function(){var t=this;this.loading=!0,_a(this.logQuery).then((function(e){t.loading=!1,t.dataList=e.data.list||[],t.logTotal=e.data.total||0})).catch((function(){t.loading=!1,t.dataList=[],t.logTotal=0}))},deleteCompanyProductRelevance:function(t){var e=this;this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0;var a={id:t.id};ua(a).then((function(t){e.loading=!1,2e4===t.code?(e.getLogList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},closeDialog:function(t){this.selectLocalVisible=!1},handleChange:function(t){this.inputQuery.area=fi["CodeToText"][t[0]]+fi["CodeToText"][t[1]]+fi["CodeToText"][t[2]],this.inputQuery.areaCode=t.toString()}}},no=ro,co=(a("c849"),Object(g["a"])(no,so,oo,!1,null,null,null)),uo=co.exports,po=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"搜索",clearable:"true"},model:{value:t.query.key,callback:function(e){t.$set(t.query,"key",e)},expression:"query.key"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search",width:"1200px"},on:{click:t.getList}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.handleForm(null,null)}}},[t._v("新增\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.intentDetail}},[t._v("选入往来单位信息\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"往来单位编码",prop:"erpId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方主系统ID",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),t.selectDrugDialogVisible?a("el-dialog",{attrs:{title:t.combinTypeMap[t.combinType],visible:t.selectDrugDialogVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectDrugDialogVisible=e}}},[a("selectUnit",{on:{closeMain:t.closeMain}})],1):t._e(),t.selectSingleUnitVisible?a("el-dialog",{attrs:{title:t.combinTypeMap[t.combinType],visible:t.selectSingleUnitVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.selectSingleUnitVisible=e}}},[a("selectSingleUnit",{attrs:{corpData:t.corpData,defaultSys:t.defaultSys},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-dialog",{attrs:{title:t.formMap[t.formName],visible:t.formVisible,"before-close":t.hideForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.formVisible=e}}},["update"==t.formName?a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方往来单位ID",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方往来单位名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.intentSelect(e.row)}}},[t._v("关联\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:""==e.row.thirdId||null==e.row.thirdId},nativeOn:{click:function(a){return a.stopPropagation(),t.removeErp(e.row)}}},[t._v("解绑\n ")])]}}],null,!1,1743063386)})],1):t._e(),a("el-form",{ref:"dataForm",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.formRules}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("往来单位名称: ")])]),a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small","auto-complete":"off",splaceholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.editQuery.name,callback:function(e){t.$set(t.editQuery,"name",e)},expression:"editQuery.name"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("往来单位编码: ")])]),a("el-form-item",{attrs:{prop:"erpId"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off",disabled:"true"},model:{value:t.editQuery.erpId,callback:function(e){t.$set(t.editQuery,"erpId",e)},expression:"editQuery.erpId"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("社会信用号: ")])]),a("el-form-item",{attrs:{prop:"creditNo"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.editQuery.creditNo,callback:function(e){t.$set(t.editQuery,"creditNo",e)},expression:"editQuery.creditNo"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系人: ")])]),a("el-form-item",{attrs:{prop:"contact"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.editQuery.contact,callback:function(e){t.$set(t.editQuery,"contact",e)},expression:"editQuery.contact"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("地址: ")])]),a("el-form-item",{attrs:{prop:"addr"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{type:"","auto-complete":"off"},model:{value:t.editQuery.addr,callback:function(e){t.$set(t.editQuery,"addr",e)},expression:"editQuery.addr"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系电话: ")])]),a("el-form-item",{attrs:{prop:"mobile"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.editQuery.mobile,callback:function(e){t.$set(t.editQuery,"mobile",e)},expression:"editQuery.mobile"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("拼音码: ")])]),a("el-form-item",{attrs:{prop:"spell"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.editQuery.spell,callback:function(e){t.$set(t.editQuery,"spell",e)},expression:"editQuery.spell"}})],1)],1)])],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交")])],1)],1)],1)},mo=[],ho=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.checked?a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.erpQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位ID",clearable:""},model:{value:t.erpQuery.unitId,callback:function(e){t.$set(t.erpQuery,"unitId",e)},expression:"erpQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.erpQuery.name,callback:function(e){t.$set(t.erpQuery,"name",e)},expression:"erpQuery.name"}})],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getErpList}},[t._v("查询")])],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.erpList,"highlight-current-row":"true"},on:{"current-change":t.handleCurrentChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方往来单位ID",prop:"customid",width:"200"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"customname",width:"400"}})],1),a("el-pagination",{attrs:{"page-size":t.erpQuery.limit,layout:"prev, pager, next",total:t.erpTotal},on:{"current-change":t.handleErppageChange}})],1)]):t._e(),a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.unitQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码",clearable:""},model:{value:t.unitQuery.unitId,callback:function(e){t.$set(t.unitQuery,"unitId",e)},expression:"unitQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.unitQuery.name,callback:function(e){t.$set(t.unitQuery,"name",e)},expression:"unitQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请设置主系统"},model:{value:t.thirdSysFk,callback:function(e){t.thirdSysFk=e},expression:"thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.combine}},[t._v("选入\n ")]),a("el-button",{attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.combineAll}},[t._v("结果全部选入\n ")])],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.unitlList},on:{"selection-change":t.handleSelectionUdiChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",selectable:t.checkSelectable}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"往来单位编码",prop:"id"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写","show-overflow-tooltip":"",prop:"spell"}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}})],1)],1)]),a("el-pagination",{attrs:{"page-size":t.unitQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handlepageChange}})],1)},fo=[],go={data:function(){return{unitQuery:{page:1,limit:10,key:"",thirdSys:null},combineQuery:{thirdSys:"",keys:[],custmandocResponses:[]},total:0,erpTotal:0,checked:!1,unitlList:[],erpList:[],currentRow:null,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null}},methods:{handlepageChange:function(t){this.unitQuery.page=t,this.getList()},handleErppageChange:function(t){this.erpQuery.page=t,this.getErpList()},checkSelectable:function(t){return!t.checked},getList:function(){var t=this;this.loading=!0,this.unitQuery.thirdSys=this.thirdSysFk,Object(Yt["j"])(this.unitQuery).then((function(e){console.log(e),t.loading=!1,2e4==e.code?(t.unitlList=e.data.list||[],t.total=e.data.total||0):(t.$message.error(e.message),t.unitlList=[],t.total=0)})).catch((function(){t.loading=!1,t.unitlList=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},getBasicThirdSys:function(){var t=this,e={enabled:!0,mainSys:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId})).catch((function(){t.loading=!1,t.list=[]}))},combine:function(){var t=this,e=this.multipleUdiSelection,a=[];e.forEach((function(t){a.push(t)})),this.combineQuery.thirdSys=this.thirdSysFk,this.combineQuery.custmandocResponses=a,console.log(a),Object(Yt["b"])(this.combineQuery).then((function(e){2e4==e.code?t.$emit("closeMain",!0):t.$emit("closeMain",!1)})).catch((function(){t.$emit("closeMain",!1)}))},combineAll:function(){var t=this;this.unitQuery.thirdSys=this.thirdSysFk,Object(Yt["c"])(this.unitQuery).then((function(e){2e4==e.code?t.$emit("closeMain",!0):t.$emit("closeMain",!1)})).catch((function(){t.$emit("closeMain",!1)}))},handleCurrentChange:function(t){console.log(t),this.currentRow=t,this.unitQuery.key=this.currentRow.name},handleSelectionUdiChange:function(t){console.log("----"+t[0].id),this.multipleUdiSelection=t}},created:function(){this.getBasicThirdSys()}},yo=go,bo=Object(g["a"])(yo,ho,fo,!1,null,null,null),vo=bo.exports,wo=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.checked?a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.erpQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"350px"},attrs:{placeholder:"搜索"},model:{value:t.erpQuery.customname,callback:function(e){t.$set(t.erpQuery,"customname",e)},expression:"erpQuery.customname"}})],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getErpList}},[t._v("查询")])],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.erpList,"highlight-current-row":"true"},on:{"current-change":t.handleCurrentChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方往来单位ID",prop:"customid",width:"200"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"customname",width:"400"}})],1),a("el-pagination",{attrs:{"page-size":t.erpQuery.limit,layout:"prev, pager, next",total:t.erpTotal},on:{"current-change":t.handleErppageChange}})],1)]):t._e(),a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.unitQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码",clearable:""},model:{value:t.unitQuery.unitId,callback:function(e){t.$set(t.unitQuery,"unitId",e)},expression:"unitQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.unitQuery.name,callback:function(e){t.$set(t.unitQuery,"name",e)},expression:"unitQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统",disabled:"true"},model:{value:t.thirdSysFk,callback:function(e){t.thirdSysFk=e},expression:"thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",size:"mini",icon:"search",loading:t.combineLoading},on:{click:t.combine}},[t._v("选入\n ")])],1)],1)],1),a("el-table",{staticStyle:{width:"100%"},attrs:{"highlight-current-row":"",data:t.unitlList,"row-class-name":t.tableRowClassName},on:{"current-change":t.handleCurrentChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"往来单位编码",prop:"id"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写","show-overflow-tooltip":"",prop:"spell"}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}})],1)],1)]),a("el-pagination",{attrs:{"page-size":t.unitQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handlepageChange}})],1)},xo=[],Do={name:"combinType",props:{corpData:{type:Object,required:!0},defaultSys:{type:Object,required:!0}},data:function(){return{unitQuery:{page:1,limit:10,key:"",thirdSys:null},combineQuery:{thirdSys:"",key:null,erpUnitsResponse:[]},total:0,erpTotal:0,checked:!1,unitlList:[],erpList:[],currentRow:null,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null,combineLoading:!1}},methods:{handlepageChange:function(t){this.unitQuery.page=t,this.getList()},handleErppageChange:function(t){this.erpQuery.page=t,this.getErpList()},getList:function(){var t=this;this.loading=!0,this.unitQuery.thirdSys=this.thirdSysFk,Object(Yt["j"])(this.unitQuery).then((function(e){console.log(e),t.loading=!1,2e4==e.code?(t.unitlList=e.data.list||[],t.total=e.data.total||0):(t.$message.error(e.message),t.unitlList=[],t.total=0)})).catch((function(){t.loading=!1,t.unitlList=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId,null!=t.defaultSys&&(t.thirdSysFk=t.defaultSys)})).catch((function(){t.loading=!1,t.list=[]}))},handleCurrentChange:function(t){console.log(t),this.combineQuery.thirdSys=this.thirdSysFk,this.combineQuery.key=this.corpData.id,this.combineQuery.erpUnitsResponse=t},combine:function(){var t=this;null!=this.combineQuery.key?1!=this.combineQuery.erpUnitsResponse.checked?(this.combineLoading=!0,Object(Yt["d"])(this.combineQuery).then((function(e){t.combineLoading=!1,t.$emit("cancelDialog",!0),2e4==e.code?t.$message.success("关联成功!"):t.$message.error(e.message)})).catch((function(){t.combineLoading=!1,t.$emit("cancelDialog",!1)}))):this.$message.warning("该往来单位已被关联,不能重复选入!"):this.$message.warning("未选择往来单位!")},tableRowClassName:function(t){var e=t.row;return e.checked?"warning-row":""},handleSelectionUdiChange:function(t){console.log("----"+t[0].id),this.multipleUdiSelection=t}},created:function(){this.getBasicThirdSys()}},Co=Do,ko=(a("074f"),Object(g["a"])(Co,wo,xo,!1,null,"4eaa9238",null)),Qo=ko.exports,So=(a("d958"),{data:function(){return{query:{key:"",page:1,limit:20},erpIdColumn:!1,thirdIdColumn:!1,editQuery:{id:"",thirdId:"",erpId:"",name:"",spell:"",addr:"",status:"",type:"",creditNo:"",contact:"",mobile:""},corpData:null,checked:!1,formName:null,formMap:{add:"新增",update:"编辑"},formLoading:!1,formVisible:!1,combinType:0,combinTypeMap:{0:"选入往来单位信息",1:"关联往来单位信息"},formRules:{},spellUpdate:!1,editDialogVisible:!1,selectDrugDialogVisible:!1,selectSingleUnitVisible:!1,list:[],sysList:[],total:0,multipleSelection:[],thirdSys:[],thirdSysFk:null,defaultSys:null}},methods:{onReset:function(){this.$router.push({path:""}),this.query={key:"",page:1,limit:20},this.getList()},getList:function(){var t=this;this.loading=!0,this.erpIdColumn=!1,this.thirdIdColumn=!1,Object(Yt["f"])(this.query).then((function(e){console.log(e),t.loading=!1,t.erpIdColumn="1"==e.data.BUMErpIdValue,t.thirdIdColumn="1"==e.data.BUMThirdIdValue,t.list=e.data.page.list||[],t.total=e.data.page.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},handleForm:function(t,e){this.formVisible=!0,this.formName="add",this.spellUpdate=!1,null!==t?(this.index=t,this.formName="update",this.spellUpdate=!0,this.editQuery=e):this.editQuery={id:"",thirdId:"",erpId:"",name:"",spell:"",addr:"",status:"",type:"",creditNo:"",contact:"",mobile:""},this.getThirdSysDetail()},formSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0,t.editQuery.thirdId=null,t.editQuery.thirdId1=null,t.editQuery.thirdId2=null,t.editQuery.thirdId3=null,t.editQuery.thirdId4=null,t.editQuery.thirdName=null,t.editQuery.thirdName1=null,t.editQuery.thirdName2=null,t.editQuery.thirdName3=null,t.editQuery.thirdName4=null;var a=Object.assign({},t.editQuery);console.log("------2------"),Object(Yt["a"])(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList()})).catch((function(){t.formLoading=!1}))}}))},deleteUnit:function(t){var e=this;this.loading=!0;var a={id:t.id+""};Object(Yt["e"])(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},cancelDialog:function(){this.editDialogVisible=!1,this.selectSingleUnitVisible=!1,this.getList(),this.getThirdSysDetail()},closeMain:function(t){this.selectDrugDialogVisible=!1,t?(this.$message.success("添加成功!"),this.getList()):this.$message.error("添加失败!")},handleModifyClick:function(t){this.editDialogVisible=!0,this.editQuery=t,this.getThirdSysDetail()},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteUnit(t)})).catch((function(){}))},exportTxt:function(){},intentDetail:function(){this.combinType=0,this.selectDrugDialogVisible=!0},intentSelect:function(t){this.combinType=1,this.corpData=this.editQuery,this.defaultSys=t.sysId,this.selectSingleUnitVisible=!0},handleSelectionChange:function(t){this.multipleSelection=t},handleCurrentChange:function(t){this.query.page=t,this.getList()},getBasicThirdSys:function(){var t=this,e={enabled:null};as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId})).catch((function(){t.loading=!1,t.list=[]}))},getThirdSysDetail:function(){var t=this,e={};"update"==this.formName&&(e={id:this.editQuery.id}),Object(Yt["h"])(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},change:function(){var t=a("d958"),e=t(this.editQuery.name,{style:t.STYLE_FIRST_LETTER,heteronym:!0}),i="";e.forEach((function(t){i+=t[0]})),this.editQuery.spell=i},removeErp:function(t){var e=this;this.$confirm("此操作将解除该绑定往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={relId:e.editQuery.id,thirdSys:t.sysId};Object(Yt["i"])(a).then((function(t){2e4==t.code?(e.getThirdSysDetail()(),e.$message({type:"success",message:"解绑成功!"})):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))}},mounted:function(){},components:{selectUnit:vo,selectSingleUnit:Qo},created:function(){this.getList(),this.getBasicThirdSys()}}),_o=So,$o=(a("0f56"),Object(g["a"])(_o,po,mo,!1,null,"14a26584",null)),To=$o.exports,Lo=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"inputQuery",attrs:{model:t.inputQuery,rules:t.rules,"label-width":"100px"}},[a("el-card",{staticClass:"el-card"},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("企业名称: ")])]),a("el-form-item",{attrs:{prop:"companyName"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.companyName,callback:function(e){t.$set(t.inputQuery,"companyName",e)},expression:"inputQuery.companyName"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用代码: ")])]),a("el-form-item",{attrs:{prop:"creditNum"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.creditNum,callback:function(e){t.$set(t.inputQuery,"creditNum",e)},expression:"inputQuery.creditNum"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("所属地区: ")])]),a("el-form-item",{attrs:{prop:"area"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.area,callback:function(e){t.$set(t.inputQuery,"area",e)},expression:"inputQuery.area"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("详细地址: ")])]),a("el-form-item",{attrs:{prop:"detailAddr"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.detailAddr,callback:function(e){t.$set(t.inputQuery,"detailAddr",e)},expression:"inputQuery.detailAddr"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("企业类型: ")])]),a("el-form-item",{attrs:{prop:"bussinessStatus"}},[a("el-select",{staticStyle:{width:"80%"},attrs:{size:"small",disabled:!0,placeholder:"企业类型"},model:{value:t.inputQuery.bussinessStatus,callback:function(e){t.$set(t.inputQuery,"bussinessStatus",e)},expression:"inputQuery.bussinessStatus"}},[a("el-option",{attrs:{label:"医院",value:"1"}}),a("el-option",{attrs:{label:"经营企业",value:"2"}})],1)],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:14}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("所属连锁总部: ")])]),a("el-form-item",{attrs:{prop:"parentCompany"}},[a("el-input",{staticStyle:{width:"50%"},attrs:{size:"small",placeholder:"请填写连锁总部入驻码上放心平台的中文名称",disabled:"5"!==t.inputQuery.bussinessStatus},model:{value:t.inputQuery.parentCompany,callback:function(e){t.$set(t.inputQuery,"parentCompany",e)},expression:"inputQuery.parentCompany"}}),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"small",icon:"search",disabled:"5"!==t.inputQuery.bussinessStatus},on:{click:function(e){return t.checkPanrentName()}}},[t._v("校验名称\n ")])],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系人: ")])]),a("el-form-item",{attrs:{prop:"contacts"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.contacts,callback:function(e){t.$set(t.inputQuery,"contacts",e)},expression:"inputQuery.contacts"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("邮箱: ")])]),a("el-form-item",{attrs:{prop:"email"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.email,callback:function(e){t.$set(t.inputQuery,"email",e)},expression:"inputQuery.email"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系电话: ")])]),a("el-form-item",{attrs:{prop:"tel"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.tel,callback:function(e){t.$set(t.inputQuery,"tel",e)},expression:"inputQuery.tel"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("手机: ")])]),a("el-form-item",{attrs:{prop:"mobile"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.mobile,callback:function(e){t.$set(t.inputQuery,"mobile",e)},expression:"inputQuery.mobile"}})],1)],1)])],1)],1),a("el-card",{staticClass:"el-card"},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("企业唯一标识(ref_ent_id): ")])]),a("el-form-item",{attrs:{prop:"refEntId"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{size:"small",placeholder:"请输入内容"},model:{value:t.inputQuery.refEntId,callback:function(e){t.$set(t.inputQuery,"refEntId",e)},expression:"inputQuery.refEntId"}}),a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.checkName()}}},[t._v("校验名称\n ")])],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("企业ID(ent_id): ")])]),a("el-form-item",{attrs:{prop:"entId"}},[a("el-input",{staticStyle:{width:"400px"},attrs:{size:"small",placeholder:"请输入内容"},model:{value:t.inputQuery.entId,callback:function(e){t.$set(t.inputQuery,"entId",e)},expression:"inputQuery.entId"}})],1)],1)])],1)],1),a("div",{staticStyle:{"text-align":"center"}},[a("el-form-item",[a("el-button",{staticStyle:{"margin-top":"20px",width:"200px"},attrs:{type:"primary",size:"small",icon:"search"},on:{click:function(e){return t.onModifySubmit("inputQuery")}}},[t._v("保 存\n ")])],1)],1)],1)],1)},Oo=[],zo={data:function(){return{inputQuery:{companyName:"",bussinessStatus:"",creditNum:"",classes:"",area:"",detailAddr:"",contacts:"",mobile:"",tel:"",email:"",refEntId:"",entId:"",customerId:L["a"].getters.customerId},rules:{companyName:[{required:!0,message:"请输入企业名称",trigger:"blur"}],creditCode:[{required:!0,message:"请输入统一社会信用代码",trigger:"blur"}],category:[{required:!0,message:"请选择企业类型",trigger:"change"}],appId:[{required:!0,message:"请输入应用码",trigger:"blur"}],appSecret:[{required:!0,message:"请输入授权码",trigger:"blur"}]}}},created:function(){this.getData()},methods:{onModifySubmit:function(t){var e=this;this.loading=!0,Object(x["g"])(this.inputQuery).then((function(t){2e4==t.code?(e.getData(),e.loading=!1,e.$message.success("修改成功")):e.$message.error(t.message)}))},checkName:function(){var t=this,e={companyName:this.inputQuery.companyName};Object(x["c"])(e).then((function(e){2e4==e.code?(t.$message.success("校验成功!"),t.inputQuery.refEntId=e.data.ref_ent_id,t.inputQuery.entId=e.data.ent_id):t.$message.error(e.message)}))},checkPanrentName:function(){var t=this,e={companyName:this.inputQuery.parentCompany};Object(x["c"])(e).then((function(e){2e4==e.code?t.$message.success("校验成功!"):t.$message.error(e.message)}))},getData:function(){var t=this;this.loading=!0;var e={customerId:L["a"].getters.customerId};Object(x["b"])(e).then((function(e){t.loading=!1,t.inputQuery=e.data,t.inputQuery.bussinessStatus=t.inputQuery.bussinessStatus+""}))}}},Io=zo,No=(a("bab2"),Object(g["a"])(Io,Lo,Oo,!1,null,"7303126e",null)),Fo=(No.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型",clearable:""},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择扫码单据类型",clearable:""},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px","font-size":"small"}},[t._v("创建日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.exportOrders}},[t._v("导出单据")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getOrderDetail,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.fromCorp)+"\n ")]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate",width:"150","show-overflow-tooltip":"true"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"contrastStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(1===e.row.contrastStatus)}},[t._v("\n "+t._s(t.erpCheckStatus[e.row.contrastStatus])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.successOrderExportPDFSettingVisible?a("el-dialog",{attrs:{title:"导出PDF",visible:t.successOrderExportPDFSettingVisible,width:"80%"},on:{"update:visible":function(e){t.successOrderExportPDFSettingVisible=e},close:t.closeDialog}},[a("successOrderExportPDFSetting",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card",attrs:{id:"printJS-form"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"row-class-name":t.tableRowClassName,data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"coName","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"包装规格",prop:"packSpec","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据数量",prop:"erpCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count"}}),a("el-table-column",{attrs:{label:"生产企业",prop:"productCompany","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"authCode","show-overflow-tooltip":!0}})],1)],1),a("el-dialog",{attrs:{title:"选择往来单位",visible:t.dialogTableVisible,width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"选择erp业务单据",visible:t.addDialogVisible,width:"80%"},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("selectErpOrder",{attrs:{orderId:t.orderId},on:{closeManuDialog:t.closeManuDialog}})],1):t._e(),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-dialog",{attrs:{title:"校验信息",visible:t.errDialogVisible,width:"30%"},on:{"update:visible":function(e){t.errDialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.errDialogVisible=!1}}},[t._v("关 闭")])],1)])],1)}),qo=[];function Vo(t){return Object(et["a"])({url:"/udiwms/pdf/download/inout/order/success",method:"post",data:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},responseType:"arraybuffer"})}function Ro(t){return Object(et["a"])({url:"/udiwms/pdf/template/order/detail/file",method:"post",data:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},responseType:"arraybuffer"})}function Eo(t){return Object(et["a"])({url:"/udiwms/pdf/template/inspection/order/detail/file",method:"post",data:t})}function jo(t){return Object(et["a"])({url:"/udiwms/pdf/template/inspection/stock/qrcode/text/file",method:"post",data:t})}function Po(t){return Object(et["a"])({url:"/udiwms/pdf/template/stock/qrcode/text/file",method:"post",data:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},responseType:"arraybuffer"})}function Bo(t){return Object(et["a"])({url:"/udiwms/pdf/template/stock/qrcode/text/maxfile",method:"post",data:t})}function Uo(t){return Object(et["a"])({url:"/spms/stock/qrcode/filterTemp",method:"get",params:t})}function Ao(t){return Object(et["a"])({url:"/udiwms/pdf/template/inspection/stock/order/file",method:"post",data:t})}function Mo(t){return Object(et["a"])({url:"/udiwms/pdf/template/stock/order/file",method:"post",data:t,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},responseType:"arraybuffer"})}function Wo(t){return Object(et["a"])({url:"/warehouse/repeatCheck",method:"post",data:t})}function Ho(t){return Object(et["a"])({url:"/warehouse/repeatPrintCheck",method:"post",data:t})}function Ko(t){return Object(et["a"])({url:"/warehouse/unit/list/key",method:"get",params:t})}var Jo=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"条码查询"},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getCodeList}},[t._v("查询\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.codeArry}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"条码",prop:"code","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count",width:"180","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate",width:"220","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"操作员",prop:"actor",width:"180"}})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next,total",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Go=[],Xo={name:"idQuery",props:{idQuery:{type:Object,required:!0}},data:function(){return{query:{code:"",corpOrderId:"",page:1,limit:20},codeArry:[],total:0,loading:!0,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,busTypes:[]}},components:{draggable:We.a},methods:{onReset:function(){this.$router.push({path:""}),this.query={code:"",corpOrderId:"",page:1,limit:20},this.getCodeList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getCodeList()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},getCodeList:function(){var t=this;this.loading=!0,this.query.corpOrderId=this.idQuery.id,Ti(this.query).then((function(e){t.loading=!1,t.codeArry=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){var t=this.$route.query;this.orderNo=t.id,this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.query.corpOrderId=t.id,this.getCodeList()}},Yo=Xo,Zo=Object(g["a"])(Yo,Jo,Go,!1,null,null,null),tr=Zo.exports,er=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 0 10px auto",height:"35px"},attrs:{type:"primary"},nativeOn:{click:function(e){return t.resetSetting()}}},[t._v("重置选项\n ")]),a("el-button",{staticStyle:{margin:"-50px 60px 10px 0",height:"35px"},attrs:{type:"primary"},nativeOn:{click:function(e){return t.submit()}}},[t._v("导出PDF\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("订单号:")]),a("el-switch",{model:{value:t.formData.orderIdEnable,callback:function(e){t.$set(t.formData,"orderIdEnable",e)},expression:"formData.orderIdEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"orderIdWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.orderIdEnable,min:4,max:16,"show-tooltip":!0},model:{value:t.formData.orderIdWidth,callback:function(e){t.$set(t.formData,"orderIdWidth",e)},expression:"formData.orderIdWidth"}})],1)],1),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")]),a("el-switch",{model:{value:t.formData.actionEnable,callback:function(e){t.$set(t.formData,"actionEnable",e)},expression:"formData.actionEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"actionWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.actionEnable,min:4,max:16,"show-tooltip":!0},model:{value:t.formData.actionWidth,callback:function(e){t.$set(t.formData,"actionWidth",e)},expression:"formData.actionWidth"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("往来单位:")]),a("el-switch",{model:{value:t.formData.fromCorpEnable,callback:function(e){t.$set(t.formData,"fromCorpEnable",e)},expression:"formData.fromCorpEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromCorpWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.fromCorpEnable,min:4,max:16,"show-tooltip":!0},model:{value:t.formData.fromCorpWidth,callback:function(e){t.$set(t.formData,"fromCorpWidth",e)},expression:"formData.fromCorpWidth"}})],1)],1),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("订单来源:")]),a("el-switch",{model:{value:t.formData.fromTypeEnable,callback:function(e){t.$set(t.formData,"fromTypeEnable",e)},expression:"formData.fromTypeEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromTypeWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.fromTypeEnable,min:4,max:16,"show-tooltip":!0},model:{value:t.formData.fromTypeWidth,callback:function(e){t.$set(t.formData,"fromTypeWidth",e)},expression:"formData.fromTypeWidth"}})],1)],1)],1),a("el-divider"),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("序号:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"numberWidth","numberEnable")}},model:{value:t.formData.numberEnable,callback:function(e){t.$set(t.formData,"numberEnable",e)},expression:"formData.numberEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromCorpWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.numberEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"numberWidth")}},model:{value:t.formData.numberWidth,callback:function(e){t.$set(t.formData,"numberWidth",e)},expression:"formData.numberWidth"}})],1)],1),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"coNameWidth","coNameEnable")}},model:{value:t.formData.coNameEnable,callback:function(e){t.$set(t.formData,"coNameEnable",e)},expression:"formData.coNameEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromTypeWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.coNameEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"coNameWidth")}},model:{value:t.formData.coNameWidth,callback:function(e){t.$set(t.formData,"coNameWidth",e)},expression:"formData.coNameWidth"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"packSpecWidth","packSpecEnable")}},model:{value:t.formData.packSpecEnable,callback:function(e){t.$set(t.formData,"packSpecEnable",e)},expression:"formData.packSpecEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromCorpWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.packSpecEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"packSpecWidth")}},model:{value:t.formData.packSpecWidth,callback:function(e){t.$set(t.formData,"packSpecWidth",e)},expression:"formData.packSpecWidth"}})],1)],1),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"batchNoWidth","batchNoEnable")}},model:{value:t.formData.batchNoEnable,callback:function(e){t.$set(t.formData,"batchNoEnable",e)},expression:"formData.batchNoEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromTypeWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.batchNoEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"batchNoWidth")}},model:{value:t.formData.batchNoWidth,callback:function(e){t.$set(t.formData,"batchNoWidth",e)},expression:"formData.batchNoWidth"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"countWidth","countEnable")}},model:{value:t.formData.countEnable,callback:function(e){t.$set(t.formData,"countEnable",e)},expression:"formData.countEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromCorpWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.countEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"countWidth")}},model:{value:t.formData.countWidth,callback:function(e){t.$set(t.formData,"countWidth",e)},expression:"formData.countWidth"}})],1)],1),a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产企业:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"productCompanyWidth","productCompanyEnable")}},model:{value:t.formData.productCompanyEnable,callback:function(e){t.$set(t.formData,"productCompanyEnable",e)},expression:"formData.productCompanyEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromTypeWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.productCompanyEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"productCompanyWidth")}},model:{value:t.formData.productCompanyWidth,callback:function(e){t.$set(t.formData,"productCompanyWidth",e)},expression:"formData.productCompanyWidth"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("注册/备案凭证号:")]),a("el-switch",{on:{change:function(e){return t.switchChange(e,"authCodeWidth","authCodeEnable")}},model:{value:t.formData.authCodeEnable,callback:function(e){t.$set(t.formData,"authCodeEnable",e)},expression:"formData.authCodeEnable"}}),a("span",{staticStyle:{"margin-left":"30px"}},[t._v("宽度:")])],1)]),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"fromCorpWidth"}},[a("el-slider",{attrs:{disabled:!t.formData.authCodeEnable,min:t.tableCellMinWidth,max:t.tableCellMaxWidth,"show-tooltip":!0},on:{change:function(e){return t.sliderChange(e,"authCodeWidth")}},model:{value:t.formData.authCodeWidth,callback:function(e){t.$set(t.formData,"authCodeWidth",e)},expression:"formData.authCodeWidth"}})],1)],1)],1)],1)],1)},ar=[],ir={orderIdEnable:!0,orderIdWidth:8,actionEnable:!0,actionWidth:4,fromCorpEnable:!0,fromCorpWidth:8,fromTypeEnable:!0,fromTypeWidth:4,numberEnable:!0,numberWidth:1,coNameEnable:!0,coNameWidth:4,packSpecEnable:!0,packSpecWidth:3,batchNoEnable:!0,batchNoWidth:2,countEnable:!0,countWidth:2,productCompanyEnable:!0,productCompanyWidth:4,authCodeEnable:!0,authCodeWidth:4},lr={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{formData:ir,formRules:{temp:[{required:!0,message:"请输入条码",trigger:"blur"}]},cellDefaultWidth:{numberWidth:1,coNameWidth:4,packSpecWidth:3,batchNoWidth:2,countWidth:2,productCompanyWidth:4,authCodeWidth:4},cellOldWidth:{numberWidth:1,coNameWidth:4,packSpecWidth:3,batchNoWidth:2,countWidth:2,productCompanyWidth:4,authCodeWidth:4},orderIdDisabled:!1,total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,pdfUrl:"",tableCellMinWidth:1,tableCellMaxWidth:14,nowWidth:0}},components:{draggable:We.a},methods:{resetSetting:function(t){this.resetFormData()},submit:function(t){var e=this,a={orderId:this.idQuery.id,settingData:this.formData};console.log(a),this.loading=!0,Vo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},resetFormData:function(){this.formData={orderIdEnable:!0,orderIdWidth:8,actionEnable:!0,actionWidth:4,fromCorpEnable:!0,fromCorpWidth:8,fromTypeEnable:!0,fromTypeWidth:4,numberEnable:!0,numberWidth:this.cellDefaultWidth.numberWidth,coNameEnable:!0,coNameWidth:this.cellDefaultWidth.coNameWidth,packSpecEnable:!0,packSpecWidth:this.cellDefaultWidth.packSpecWidth,batchNoEnable:!0,batchNoWidth:this.cellDefaultWidth.batchNoWidth,countEnable:!0,countWidth:this.cellDefaultWidth.countWidth,productCompanyEnable:!0,productCompanyWidth:this.cellDefaultWidth.productCompanyWidth,authCodeEnable:!0,authCodeWidth:this.cellDefaultWidth.authCodeWidth},this.cellOldWidth={numberWidth:this.cellDefaultWidth.numberWidth,coNameWidth:this.cellDefaultWidth.coNameWidth,packSpecWidth:this.cellDefaultWidth.packSpecWidth,batchNoWidth:this.cellDefaultWidth.batchNoWidth,countWidth:this.cellDefaultWidth.countWidth,productCompanyWidth:this.cellDefaultWidth.productCompanyWidth,authCodeWidth:this.cellDefaultWidth.authCodeWidth},this.tableCellMaxWidth=14},getInputFocus:function(t){t.currentTarget.select()},intentBack:function(){this.$router.go(-1)},switchChange:function(t,e,a){if(!1===this.formData.numberEnable&&!1===this.formData.coNameEnable&&!1===this.formData.packSpecEnable&&!1===this.formData.batchNoEnable&&!1===this.formData.countEnable&&!1===this.formData.productCompanyEnable&&!1===this.formData.authCodeEnable)return this.formData[a]=!0,void(this.formData[e]=20);this.tableCellMaxWidth=!0===t?--this.tableCellMaxWidth:++this.tableCellMaxWidth,this.formData[e]=!0===t?this.cellDefaultWidth[e]:0;var i=this.formData[e]-this.cellOldWidth[e];this.cellOldWidth[e]=this.formData[e],this.sliderChangeAlgorithm(i,e)},sliderChange:function(t,e){var a=7;if(!1===this.formData.numberEnable&&--a,!1===this.formData.coNameEnable&&--a,!1===this.formData.packSpecEnable&&--a,!1===this.formData.batchNoEnable&&--a,!1===this.formData.countEnable&&--a,!1===this.formData.productCompanyEnable&&--a,!1===this.formData.authCodeEnable&&--a,a<=1)this.formData[e]=20;else{console.log("更新后的值:"+t),console.log("传递的参数:"+e);var i=t-this.cellOldWidth[e];this.cellOldWidth[e]=t,this.sliderChangeAlgorithm(i,e)}},sliderChangeAlgorithm:function(t,e){for(console.log("----------------------------"),console.log("更新后的值:"+t),console.log("传递的参数:"+e),this.nowWidth=0,this.nowNumber=t;0!==this.nowNumber;){if(console.log("num ber:"+this.nowNumber),this.nowNumber<0){if(console.log("this.nowWidth:"+this.nowWidth),0===this.nowNumber)break;if(this.sliderChangeAdd("numberEnable","numberWidth",e),0===this.nowNumber)break;if(this.sliderChangeAdd("coNameEnable","coNameWidth",e),0===this.nowNumber)break;if(this.sliderChangeAdd("packSpecEnable","packSpecWidth",e),0===this.nowNumber)break;if(this.sliderChangeAdd("batchNoEnable","batchNoWidth",e),0===this.nowNumber)break;if(this.sliderChangeAdd("countEnable","countWidth",e),0===this.nowNumber)break;if(this.sliderChangeAdd("productCompanyEnable","productCompanyWidth",e),0===this.nowNumber)break;this.sliderChangeAdd("authCodeEnable","authCodeWidth",e)}else{if(!(this.nowNumber>0))break;if(0===this.nowNumber)break;if(this.sliderChangeDelete("numberEnable","numberWidth",e),0===this.nowNumber)break;if(this.sliderChangeDelete("coNameEnable","coNameWidth",e),0===this.nowNumber)break;if(this.sliderChangeDelete("packSpecEnable","packSpecWidth",e),0===this.nowNumber)break;if(this.sliderChangeDelete("batchNoEnable","batchNoWidth",e),0===this.nowNumber)break;if(this.sliderChangeDelete("countEnable","countWidth",e),0===this.nowNumber)break;if(this.sliderChangeDelete("productCompanyEnable","productCompanyWidth",e),0===this.nowNumber)break;this.sliderChangeDelete("authCodeEnable","authCodeWidth",e)}console.log("number:"+t)}},sliderChangeAdd:function(t,e,a){if(console.log("++++++++++++++ 更新后的值: "+this.nowNumber),this.formData[t]&&e!==a&&this.formData[e]<this.tableCellMaxWidth){if(0===this.nowNumber)return;0===this.nowWidth||this.nowWidth>this.formData[e]?this.nowWidth=this.formData[e]:this.nowWidth===this.formData[e]&&(this.nowWidth=0,++this.formData[e],++this.cellOldWidth[e],++this.nowNumber)}},sliderChangeDelete:function(t,e,a){if(console.log("-------------- 更新后的值: "+this.nowNumber),this.formData[t]&&e!==a&&this.formData[e]>this.tableCellMinWidth){if(0===this.nowNumber)return;0===this.nowWidth||this.nowWidth<this.formData[e]?this.nowWidth=this.formData[e]:this.nowWidth===this.formData[e]&&(this.nowWidth=0,--this.formData[e],--this.cellOldWidth[e],--this.nowNumber)}}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.resetFormData(),this.$isNotBlank(this.idQuery.id)}},sr=lr,or=(a("eb9f"),Object(g["a"])(sr,er,ar,!1,null,null,null)),rr=or.exports,nr=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.filterQuery.billNo,callback:function(e){t.$set(t.filterQuery,"billNo",e)},expression:"filterQuery.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.filterQuery.billAction,callback:function(e){t.$set(t.filterQuery,"billAction",e)},expression:"filterQuery.billAction"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.importErps}},[t._v("导入比对\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":"true"},on:{"selection-change":t.handleSelectionChange,"row-click":t.getOrderDetail}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"订单ID",prop:"billNo","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"客户名称",prop:"corpName","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据日期","show-overflow-tooltip":"",prop:"billdate"}}),a("el-table-column",{attrs:{label:"业务单据类型",prop:"billType"}})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品ID",prop:"productId","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"产品名称",prop:"productName","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"批号",prop:"batchNo","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单位",prop:"spec","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据数量",prop:"reCount"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"count"}})],1)],1)],1)},cr=[];function ur(t){return Object(et["a"])({url:"/spms/erpOrder/filter",method:"get",params:t})}function dr(t){return Object(et["a"])({url:"/udiwms/erpOrder/addStockOrder",method:"get",params:t})}function pr(t){return Object(et["a"])({url:"/warehouse/combineErpOrder",method:"post",data:t})}function mr(t){return Object(et["a"])({url:"/warehouse/selectErpOrder",method:"post",data:t})}function hr(t){return Object(et["a"])({url:"/udiwms/stock/order/filter",method:"get",params:t})}function fr(t){return Object(et["a"])({url:"/udiwms/stock/order/filterDetail",method:"get",params:t})}function gr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/filter",method:"get",params:t})}function yr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/temp/filter",method:"get",params:t})}function br(t){return Object(et["a"])({url:"/udiwms/stock/order/insertWeb",method:"post",data:t})}function vr(t){return Object(et["a"])({url:"/udiwms/stock/order/delete",method:"post",data:t})}function wr(t){return Object(et["a"])({url:"/udiwms/stock/order/error/delete",method:"post",data:t})}function xr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/delete",method:"post",data:t})}function Dr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/temp/delete",method:"post",data:t})}function Cr(t){return Object(et["a"])({url:"/udiwms/stock/order/submit",method:"get",params:t})}function kr(t){return Object(et["a"])({url:"/udiwms/stock/order/update",method:"post",data:t})}function Qr(t){return Object(et["a"])({url:"/udiwms/stock/order/new/repealSubmit",method:"get",params:t})}function Sr(t){return Object(et["a"])({url:"/udiwms/stock/order/error/submit",method:"get",params:t})}function _r(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/uploadCount",method:"get",params:t})}function $r(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/getInstrument",method:"get",params:t})}function Tr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/getInstrumentById",method:"post",data:t})}function Lr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/addFromCode",method:"get",params:t})}function Or(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/queryProduct",method:"get",params:t})}function zr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/filterProduct",method:"get",params:t})}function Ir(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/upload",method:"get",params:t})}function Nr(t){return Object(et["a"])({url:"/udiwms/stock/order/detail/copy",method:"get",params:t})}function Fr(t){return Object(et["a"])({url:"/udiwms/stock/order/qrcode/generate/text",method:"post",data:t})}function qr(t){return Object(et["a"])({url:"/udiwms/stock/order/generateBillNo",method:"get",params:t})}function Vr(t){return Object(et["a"])({url:"/udiwms/bussinessType/filter",method:"get",params:t})}function Rr(t){return Object(et["a"])({url:"/udiwms/bussinessType/joinFilter",method:"get",params:t})}function Er(t){return Object(et["a"])({url:"/udiwms/bussinessType/delete",method:"post",data:t})}function jr(t){return Object(et["a"])({url:"/udiwms/bussinessType/update",method:"post",data:t})}function Pr(t){return Object(et["a"])({url:"/udiwms/bussinessType/insert",method:"post",data:t})}function Br(t){return Object(et["a"])({url:"/udiwms/localBusType/filter",method:"get",params:t})}function Ur(t){return Object(et["a"])({url:"/udiwms/localBusType/filterJoin",method:"get",params:t})}function Ar(t){return Object(et["a"])({url:"/udiwms/localBusType/filterByBus",method:"get",params:t})}function Mr(t){return Object(et["a"])({url:"/udiwms/localBusType/add",method:"post",data:t})}function Wr(t){return Object(et["a"])({url:"/udiwms/localBusType/update",method:"post",data:t})}var Hr={name:"orderId",props:{orderId:{type:Object,required:!0},orderAction:{type:Object,required:!0}},data:function(){return{filterQuery:{billcode:"",billFlag:null,billAction:null,startDate:null,endDate:null,status:3,page:1,limit:5},value:"",total:0,list:[],loading:!1,detailLoading:!1,detailList:[],actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},multipleSelection:[],postQuery:{orderId:"",purchaseinResponses:[]},idQuery:{id:""}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={billNo:"",billFlag:null,billAction:null,startDate:null,endDate:null,page:1,limit:5,status:3},this.actDateRange=[],this.getList()},onSubmit:function(){null!=this.actDateRange?(this.filterQuery.startDate=this.actDateRange[0],this.filterQuery.endDate=this.actDateRange[1]):(this.filterQuery.startDate=null,this.filterQuery.endDate=null),this.getList()},getList:function(){var t=this;this.loading=!0,fr(this.filterQuery).then((function(e){t.loading=!1,2e4==e.code?(t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getOrderDetail:function(t){this.detailList=t.subErpOrders},importErps:function(){var t=this,e=this.multipleSelection;e.forEach((function(e,a){t.postQuery.purchaseinResponses.push(e)})),this.postQuery.purchaseinResponses.length<1?this.$message.warning("选择的订单需大于1"):(this.postQuery.orderId=this.orderId,mr(this.postQuery).then((function(e){2e4==e.code?(t.loading=!1,t.$emit("closeManuDialog",!0)):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.$emit("closeManuDialog",!1)})))},combineErps:function(){var t=this,e=this.multipleSelection;e.forEach((function(e,a){t.postQuery.docids.push(e.docid)})),this.postQuery.docids.length<1?this.$message.warning("选择的订单需大于1"):pr(this.postQuery).then((function(e){2e4==e.code?(t.loading=!1,t.$emit("closeManuDialog",!0)):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.$emit("closeManuDialog",!1)}))},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},getBusType:function(){var t=this,e={enabled:!0};Br(e).then((function(e){t.busTypes=e.data.list||[],t.getCurBillAction()})).catch((function(){}))},getCurBillAction:function(){var t=this,e={action:this.orderAction};Ar(e).then((function(e){t.filterQuery.billAction=e.data,t.getList()})).catch((function(){}))}},components:{},mounted:function(){},created:function(){var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getBusType()}},Kr=Hr,Jr=(a("95bd"),Object(g["a"])(Kr,nr,cr,!1,null,"73132635",null)),Gr=Jr.exports,Xr=a("bc3a"),Yr=a.n(Xr);a("3b2b");function Zr(t,e){/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var i in a)if(new RegExp("(".concat(i,")")).test(e)){var l=a[i]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?l:tn(l))}return e}function tn(t){return("00"+t).substr(t.length)}var en={site_id:"",site_name:"",describe:"",ads:[]},an={props:{isSelect:{type:Boolean,default:!1}},data:function(){return{query:{page:1,limit:20},checkStatus:{1:"校验异常",0:"未校验",2:"正常"},erpCheckStatus:{1:"校验异常",0:"未校验",2:"校验成功"},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},unitquery:{key:"",page:1,limit:20},unitlist:[],list:[],detailList:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},actDateRange:[],filterQuery:{id:"",mainAction:null,action:null,page:1,limit:10,code:"",exportStatus:null,unionCtrStatus:1,status:null,startTime:"",endTime:""},detailQuery:{orderId:""},deleteData:{id:""},idQuery:{id:""},curIndex:"",adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,successOrderExportPDFSettingVisible:!1,total:0,loading:!0,index:null,formName:null,orderId:"",formMap:{add:"新增",edit:"编辑"},exportQuery:{orderId:"",exportStatus:""},uploadQuery:{orderId:""},busTypes:[],multipleSelection:[],dialogTableVisible:!1,formLoading:!1,formVisible:!1,formData:en,deleteLoading:!1,addDialogVisible:!1,errDialogVisible:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},components:{draggable:We.a,codeDetail:tr,successOrderExportPDFSetting:rr,selectErpOrder:Gr},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={id:"",mainAction:null,action:null,page:1,limit:10,code:"",unionCtrStatus:1,exportStatus:null,status:null,startTime:"",endTime:""},this.actDateRange=[],this.getList()},onSubmit:function(){null!==this.actDateRange?(this.filterQuery.startTime=this.actDateRange[0],this.filterQuery.endTime=this.actDateRange[1]):(this.filterQuery.startTime=null,this.filterQuery.endTime=null),this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},handleErrorDetail:function(t){var e=this.list[t];this.errorDetail=e.remark,this.errDialogVisible=!0},mergesOrders:function(){var t=this,e=this.multipleSelection;if(e.length<=1)this.$message.warning("选择的订单需大于1");else{var a=e[0].id,i=e[0].fromCorp,l=e[0].action,s=[];e.forEach((function(e,a){i===e.fromCorp?l===e.action?s.push(e.id):t.$message.warning("业务类型不一致!"):t.$message.warning("往来单位不一致!")}));var o={orderList:s};this.$confirm("所选择的订单将会合并到订单号为"+a+"的订单下","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Oi(o).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"合并成功"})):t.$message.error(e.message)}))})).catch((function(){}))}},exportOrders:function(){var t=this,e=this.multipleSelection;if(e.length<1)this.$message.warning("选择的订单需大于1");else{var a=[];e.forEach((function(t,e){a.push(t.id)}));var i={ids:a};Wi(i).then((function(e){var a=[];a.push(e);var i=window.URL.createObjectURL(new Blob(a,{type:"application/json"}));t.loading=!1;var l=document.createElement("a"),s=Zr(new Date,"yyyy-MM-dd_hh:mm");l.download="已完成单据导出"+s+".json",l.style.display="none",l.href=i,document.body.appendChild(l),l.click(),document.body.removeChild(l)})).catch((function(){t.loading=!1}))}},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Ii(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getOrderDetail:function(t){this.loading=!0,this.detailQuery={orderId:t.id},this.refresgOrderDetail()},repeatCheckClick:function(t){var e=this,a={orderId:t.id};this.loading=!0,Wo(a).then((function(a){e.loading=!1,2e4===a.code?(e.$message.success(a.data),e.getList(),e.detailQuery={orderId:t.id},e.refresgOrderDetail()):e.$message.error(a.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},refresgOrderDetail:function(){var t=this;ji(this.detailQuery).then((function(e){console.log(e),t.loading=!1,t.detailList=e.data||[]})).catch((function(){t.loading=!1,t.detailList=[]}))},handleUnitClick:function(t){this.curIndex=t.id},getUnitList:function(){var t=this;this.loading=!0,Ko(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.list||[]})).catch((function(){t.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},successOrderExportPDFSetting:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id),this.successOrderExportPDFSettingVisible=!0},successOrderExportPDF:function(t){var e=this;console.log(t);var a={orderId:t.id,customerId:L["a"].getters.customerId};this.loading=!0,Eo(a).then((function(t){2e4===t.code?Ro(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1})):(e.loading=!1,e.$message.error(t.message))})).catch((function(){e.loading=!1}))},closeDialog:function(){this.successOrderExportPDFSettingVisible=!1,this.getList()},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.unitid,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.refresgOrderDetail(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.reCount===e.count?"success-row":"warning-row"},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeManuDialog:function(t){this.addDialogVisible=!1,t?(this.$message.success("选入成功"),this.refresgOrderDetail(),this.getList()):this.$message.error("选入失败")},cancelDialog:function(){this.addDialogVisible=!1},importOrder:function(t){this.orderId=t.id,this.addDialogVisible=!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.getList();var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),this.actDateRange=[a,e]}},ln=an,sn=(a("d5d3"),Object(g["a"])(ln,Fo,qo,!1,null,null,null)),on=sn.exports,rn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型"},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1),a("el-form-item",{staticStyle:{"margin-right":"50px","margin-left":"auto"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.mergesOrders}},[t._v("合并单据")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.addOrders}},[t._v("新增订单")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.errOrders}},[t._v("异常单据")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源订单号",prop:"corpOrderId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.fromCorp)+"\n ")]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"status",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(-1===e.row.status)}},[t._v(t._s(t.checkStatus[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",width:"150",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.addOrders(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")]),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.onUpload(e.row.id)}}},[t._v("立即提交\n ")]):t._e()]}}])})],1),a("el-dialog",{attrs:{title:"错误信息",visible:t.dialogVisible,width:"30%"},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("关 闭")])],1)]),a("el-dialog",{attrs:{title:"选择往来单位",visible:t.dialogTableVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.unitquery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),a("el-dialog",{attrs:{title:"异常订单",visible:t.errOrderVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.errOrderVisible=e}}},[a("ioErrorOrder")],1),t.addOrderVisible?a("el-dialog",{attrs:{title:"新增订单",visible:t.addOrderVisible,width:"75%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addOrderVisible=e},close:t.closeDialog}},[a("addOrder",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},nn=[],cn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.deleteDialog}},[t._v("删除\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArry,"tooltip-effect":"dark"},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index",fixed:""}}),a("el-table-column",{attrs:{label:"条码",prop:"code",fixed:""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count",width:"220","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},un=[],dn={name:"idQuery",props:{idQuery:{type:Object,required:!0}},data:function(){return{query:{code:"",corpOrderId:"",page:1,limit:20},codeArry:[],total:0,loading:!0,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,multipleSelection:[]}},components:{draggable:We.a},methods:{handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},onReset:function(){this.$router.push({path:""}),this.query={code:"",corpOrderId:"",page:1,limit:20},this.getCodeList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getCodeList()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},deleteDialog:function(){var t=this;this.$confirm("是否删除所选条码?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.onDelete()})).catch((function(){}))},onDelete:function(){var t=this,e=this.multipleSelection,a=[];e.forEach((function(t,e){a.push(t.id)}));var i={codes:a};qi(i).then((function(e){t.getCodeList(),t.$message({type:"success",message:"删除成功!"})}))},getCodeList:function(){var t=this;this.loading=!0,this.query.orderId=this.idQuery.id,console.log(this.idQuery.id),Ni(this.query).then((function(e){t.loading=!1,t.codeArry=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){var t=this.$route.query;this.orderNo=t.id,this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.query.corpOrderId=t.id,this.getCodeList()}},pn=dn,mn=Object(g["a"])(pn,cn,un,!1,null,null,null),hn=mn.exports,fn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型"},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源订单号",prop:"corpOrderId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.fromCorp?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleUnitClick(e.row)}}},[t._v("选择往来单位\n ")])],1):t._e(),null!==e.row.fromCorp?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleUnitClick(e.row)}}},[t._v(t._s(e.row.fromCorp)+"\n ")])],1):t._e()]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"status",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(3==e.row.status)}},[t._v(t._s(t.checkStatus[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",width:"250",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[-1===e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.addOrders(e.row)}}},[t._v("编辑\n ")]):t._e(),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]):t._e(),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleErrorDetail(e.$index)}}},[t._v("错误详情\n ")]):t._e(),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")]),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.onUpload(e.row.id)}}},[t._v("重新提交\n ")]):t._e()]}}])})],1),a("el-dialog",{attrs:{title:"错误信息",visible:t.dialogVisible,width:"30%","append-to-body":!0},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("关 闭")])],1)]),a("el-dialog",{attrs:{title:"选择往来单位","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.dialogTableVisible,"append-to-body":"",width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.unitquery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"erpId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"80%","append-to-body":""},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},gn=[],yn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex",margin:"-50px 0 10px 80%",height:"35px"}},[a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.saveOrder()}}},[t._v("完成\n ")]),0===t.visiblV?a("el-button",{attrs:{type:"primary"},nativeOn:{click:function(e){return t.submit("0")}}},[t._v("提交\n ")]):t._e()],1),a("el-card",[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("入库单号:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"corpOrderId"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:t.corpOrderIdDisabled},model:{value:t.formData.corpOrderId,callback:function(e){t.$set(t.formData,"corpOrderId",e)},expression:"formData.corpOrderId"}})],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("日期:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"actDate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",placeholder:"日期",disabled:!0},model:{value:t.formData.actDate,callback:function(e){t.$set(t.formData,"actDate",e)},expression:"formData.actDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("往来单位:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"fromCorp"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.fromCorp,callback:function(e){t.$set(t.formData,"fromCorp",e)},expression:"formData.fromCorp"}})],1)],1),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据类型:")])])]),a("el-col",{attrs:{span:8}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1)],1)],1),a("el-card",[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:2}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("条码:")])])]),a("el-col",{attrs:{span:19}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addCode(e)}},model:{value:t.formData.code,callback:function(e){t.$set(t.formData,"code",e)},expression:"formData.code"}})],1)],1),a("el-col",{attrs:{span:2}},[a("el-button",{staticStyle:{height:"31px","margin-left":"2px"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.addCode()}}},[t._v("确定\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"45"}}),a("el-table-column",{attrs:{label:"条码",prop:"code","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count",width:"80","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"90"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteCode(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next,total","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)],1)},bn=[],vn={corpOrderId:"",code:"",actor:"",fromCorpId:"",fromCorp:"医院",fromType:null,actDate:new Date,billType:null},wn={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0},addType:{type:Object,required:!0}},data:function(){return{codeQuery:{code:""},query:{code:"",corpOrderId:"",page:1,limit:10},formData:vn,formRules:{temp:[{required:!0,message:"请输入条码",trigger:"blur"}]},visiblV:0,corpOrderIdDisabled:!1,codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,busTypes:[]}},components:{draggable:We.a},methods:{submit:function(t){var e=this;if(this.total<1)this.$message.error("未添加条码");else if(null!=this.formData.billType){var a={orderId:this.idQuery.id,action:this.formData.billType};Si(a).then((function(t){console.log(t),2e4===t.code?(e.$message.success("提交成功"),e.closeDialog()):e.$message.error(t.message),e.loading=!1}))}else this.$message.error("未选择扫码单据类型")},saveOrder:function(){var t=this,e=Object.assign(JSON.parse(JSON.stringify(this.formData)));e.orderId=this.idQuery.id,e.actDate=Object(Ke["parseTime"])(this.formData.actDate,"{y}-{m}-{d} {h}:{i}:{s}"),e.action=e.billType,_i(e).then((function(e){2e4===e.code?t.closeDialog():t.$message.error(e.message),t.loading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(t){var e=this;if(null==t?this.$refs.inputRef.focus():t.target.select(),this.formData.corpOrderId=this.formData.corpOrderId.trim(),this.$isBlank(this.formData.corpOrderId)){var a=new Date;this.formData.corpOrderId=Object(Ke["parseTime"])(a,"{y}{m}{d}{h}{i}{s}")+Math.ceil(89*Math.random()+10)}if(this.formData.code=this.formData.code.trim(),!this.$isBlank(this.formData.code)){this.loading=!0;var i=Object.assign(JSON.parse(JSON.stringify(this.formData)));i.orderId=this.idQuery.id,i.actDate=Object(Ke["parseTime"])(this.formData.actDate,"{y}-{m}-{d} {h}:{i}:{s}"),i.action=i.billType,Li(i).then((function(t){2e4===t.code?(e.idQuery.id=t.data,e.corpOrderIdDisabled=!0,e.getCodeList()):e.$alert(t.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(t){e.$refs.inputRef.focus()}}),e.loading=!1}))}},deleteCode:function(t,e){var a=this;console.log(e.id),this.$confirm("是否删除?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.loading=!0;var t={id:e.id};Qi(t).then((function(t){2e4===t.code?a.getCodeList():a.$message.error(t.message),a.loading=!1}))})).catch((function(){}))},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},getCodeList:function(){var t=this;this.loading=!0,this.query.orderId=this.idQuery.id,Ni(this.query).then((function(e){t.codeArray=e.data.list||[],t.total=e.data.total||0;for(var a=0;a<t.codeArray.length;a++)t.codeArray[a].fromType=t.formData.fromType,t.codeArray[a].billType=t.formData.billType;t.tableSelection(),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))},intentBack:function(){this.$router.go(-1)}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){if(this.formData.code="",this.formData.actDate=new Date,this.codeArray=[],this.formData.fromCorp=L["a"].getters.companyName,this.formData.customerId=L["a"].getters.customerId,this.getBusType(),this.$isNotBlank(this.idQuery.id))this.formData.actDate=new Date(this.idQuery.actDate),this.formData.corpOrderId=this.idQuery.corpOrderId,this.formData.billType=this.idQuery.billType,this.corpOrderIdDisabled=!0,"edit"==this.addType&&(this.visiblV=1),this.getCodeList();else if(this.corpOrderIdDisabled=!1,"{}"===JSON.stringify(this.$route.query)){var t=new Date;this.formData.corpOrderId=Object(Ke["parseTime"])(t,"{y}{m}{d}{h}{i}{s}")+Math.ceil(89*Math.random()+10)}else{var e=this.$route.query;this.orderNo=e.id,this.query=Object.assign(this.query,e),this.query.limit=parseInt(this.query.limit),this.query.corpOrderId=e.id}}},xn=wn,Dn=(a("4926"),Object(g["a"])(xn,yn,bn,!1,null,null,null)),Cn=Dn.exports,kn={site_id:"",site_name:"",describe:"",ads:[]},Qn={data:function(){return{filterQuery:{id:"",mainAction:null,action:null,page:1,limit:20},checkStatus:{"-1":"等待提交",1:"等待校验",2:"等待校验",3:"校验异常",4:"校验成功"},curIndex:"",unitquery:{key:"",page:1,limit:20},unitlist:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},idQuery:{id:""},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},list:[],adId:[],adSelectList:[],adList:{},adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,total:0,loading:!0,index:null,formName:null,errorDetail:"1111111111111",formMap:{add:"新增",edit:"编辑"},deleteData:{id:""},dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,formData:kn,deleteLoading:!1,busTypes:[]}},components:{draggable:We.a,codeDetail:hn,addOrder:Cn},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={page:1,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.getList()},getUnitList:function(){var t=this;this.loading=!0,Object(Yt["f"])(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.page.list||[]})).catch((function(){t.loading=!1}))},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.erpId,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},getList:function(){var t=this;this.loading=!0,this.filterQuery.status=3,this.filterQuery.customerId=L["a"].getters.customerId,$i(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},onUpload:function(t){var e=this;this.loading=!0;var a={orderId:""};a.orderId=t,Vi(a).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},handleErrorDetail:function(t){var e=this.list[t],a=e.remark;this.errorDetail=e.remark,console.log(a+" "+e+" "+e.remark),this.dialogVisible=!0},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},Sn=Qn,_n=Object(g["a"])(Sn,fn,gn,!1,null,null,null),$n=_n.exports,Tn={site_id:"",site_name:"",describe:"",ads:[]},Ln={data:function(){return{filterQuery:{id:"",mainAction:null,action:null,page:1,status:10,limit:10},checkStatus:{"-1":"草稿",1:"等待处理",2:"等待校验",3:"校验异常",4:"校验成功"},curIndex:"",unitquery:{key:"",page:1,limit:20},unitlist:[],multipleSelection:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},idQuery:{id:""},errOrderVisible:!1,list:[],adId:[],adSelectList:[],adList:{},adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,addOrderVisible:!1,total:0,loading:!0,index:null,formName:null,errorDetail:"1111111111111",formMap:{add:"新增",edit:"编辑"},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda已校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},deleteData:{id:""},dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,formData:Tn,deleteLoading:!1,busTypes:[]}},components:{draggable:We.a,codeDetail:hn,addOrder:Cn,ioErrorOrder:$n},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={status:10,page:1,limit:10},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},addOrders:function(t){console.log(t),this.idQuery.id="",this.idQuery.actDate="",this.idQuery.corpOrderId="",null!==t.id&&void 0!==t.id&&""!==t.id&&(this.idQuery.id=t.id,this.idQuery.actDate=t.actDate,this.idQuery.corpOrderId=t.corpOrderId,this.idQuery.billType=t.action),this.addOrderVisible=!0},errOrders:function(){this.errOrderVisible=!0},closeDialog:function(){this.addOrderVisible=!1,this.getList()},getUnitList:function(){var t=this;this.loading=!0,Ko(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.list||[]})).catch((function(){t.loading=!1}))},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.unitid,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,$i(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},mergesOrders:function(){var t=this,e=this.multipleSelection;if(e.length<=1)this.$message.warning("未选择单据!");else{var a=e[0].id,i=e[0].fromCorp,l=e[0].action,s=[];e.forEach((function(e,a){i===e.fromCorp?l===e.action?s.push(e.id):t.$message.warning("业务类型不一致!"):t.$message.warning("往来单位不一致!")}));var o={orderList:s};this.$confirm("所选择的订单将会合并到订单号为"+a+"的订单下","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Oi(o).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"合并成功"})):t.$message.error(e.message)}))})).catch((function(){}))}},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},onUpload:function(t){var e=this;this.loading=!0;var a={orderId:""};a.orderId=t,Vi(a).then((function(t){2e4==t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},handleErrorDetail:function(t){var e=this.list[t],a=e.remark;this.errorDetail=e.remark,console.log(a+" "+e+" "+e.remark),this.dialogVisible=!0},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id}},filters:{statusFilterType:function(t){var e={false:"success",true:"warning"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},On=Ln,zn=Object(g["a"])(On,rn,nn,!1,null,null,null),In=zn.exports,Nn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.query,"label-width":"480px",size:"mini"}},[a("el-form-item",{staticClass:"query-form-item",attrs:{"label-width":"100px"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{placeholder:"UDI码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.erpLloading,expression:"erpLloading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":"true"}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"actDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"订单号",prop:"orderId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"业务类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.geActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业","show-overflow-tooltip":"",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产日期",prop:"produceDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"数量",prop:"count","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.handleCurrentChange}})],1)])],1)},Fn=[];function qn(t){return Object(et["a"])({url:"/udiwarehouse/trace/filter",method:"get",params:t})}var Vn={data:function(){return{query:{code:null,page:1,limit:10},list:[],busTypes:[],pageTotal:1,total:1,currentRow:null,loading:!1,erpLloading:!1,multipleUdiSelection:[]}},methods:{getList:function(){var t=this;null!=this.query.code&&""!=this.query.code?(this.loading=!0,qn(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))):this.$message.warning("请输入条码查询!")},geActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))},checkSelectable:function(t,e){return!t.check},handleCurrentChange:function(t){this.query.page=t,this.getList()},intentDetail:function(t){this.$emit("productInfo",t),this.closeDialog()},keyup_submit:function(t){console.log("全选----"),this.getList(),t.target.select()}},created:function(){this.getBusType()}},Rn=Vn,En=(a("93e5"),Object(g["a"])(Rn,Nn,Fn,!1,null,"23e643c1",null)),jn=(En.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"校验状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"校验成功",value:4}}),a("el-option",{attrs:{label:"校验异常",value:3}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型"},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择扫码单据类型",clearable:""},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("创建日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getOrderDetail,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.fromCorp)+"\n ")]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate",width:"150","show-overflow-tooltip":"true"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"contrastStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(1===e.row.contrastStatus)}},[t._v("\n "+t._s(t.erpCheckStatus[e.row.contrastStatus])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[4!=e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.repeatCheckClick(e.row)}}},[t._v("重新校验\n ")]):t._e(),4===e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.repeatPrintCheckClick(e.row)}}},[t._v("重新提交\n ")]):t._e(),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleErrorDetail(e.$index)}}},[t._v("校验信息\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:4==e.row.status&&2==e.row.contrastStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.importOrder(e.row)}}},[t._v("选择业务单据\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.revokeErrOrder(e.row)}}},[t._v("撤回\n ")])]}}])})],1),t.successOrderExportPDFSettingVisible?a("el-dialog",{attrs:{title:"导出PDF",visible:t.successOrderExportPDFSettingVisible,width:"80%"},on:{"update:visible":function(e){t.successOrderExportPDFSettingVisible=e},close:t.closeDialog}},[a("successOrderExportPDFSetting",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card",attrs:{id:"printJS-form"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"row-class-name":t.tableRowClassName,data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"coName",width:"150","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"包装规格",prop:"packSpec",width:"200","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo",width:"100","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate",width:"100","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate",width:"100","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据数量",prop:"reCount",width:"100","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"实际数量",prop:"erpCount",width:"100","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count",width:"100"}}),a("el-table-column",{attrs:{label:"生产企业",prop:"productCompany",width:"150","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"authCode",width:"150","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"180"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:0===e.row.bindStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.bindRl(e.row)}}},[t._v("绑定产品\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:0===e.row.bindSupStatus||null===e.row.bindSupStatus},nativeOn:{click:function(a){return a.stopPropagation(),t.handleUnitClick(e.row)}}},[t._v("绑定供应商\n ")])]}}],null,!1,1166133845)})],1)],1),a("el-dialog",{attrs:{title:"选择往来单位",visible:t.dialogTableVisible,width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"选择erp业务单据",visible:t.addDialogVisible,width:"80%"},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("selectErpOrder",{attrs:{orderId:t.orderId,orderAction:t.billAction},on:{closeManuDialog:t.closeManuDialog}})],1):t._e(),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),t.selectRlVisible?a("el-dialog",{attrs:{title:"绑定产品ID",visible:t.selectRlVisible,width:"80%"},on:{"update:visible":function(e){t.selectRlVisible=e}}},[a("selectRlDialog",{attrs:{curRow:t.curRow,closeBindDialog:t.closeBindDialog}})],1):t._e(),a("el-dialog",{attrs:{title:"校验信息",visible:t.errDialogVisible,width:"30%"},on:{"update:visible":function(e){t.errDialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.errDialogVisible=!1}}},[t._v("关 闭")])],1)])],1)}),Pn=[],Bn=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.bindId(e.row)}}},[t._v("选入绑定\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息编辑",visible:t.editDialogVisible,"close-on-click-modal":!1,"append-to-body":"","close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}}),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:!t.isUseDyCheck},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:!0},model:{value:t.editQuery.isLock,callback:function(e){t.$set(t.editQuery,"isLock",e)},expression:"editQuery.isLock"}},[t._v("是否锁定\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:!0},model:{value:t.editQuery.isDisable,callback:function(e){t.$set(t.editQuery,"isDisable",e)},expression:"editQuery.isDisable"}},[t._v("是否禁用\n ")])],1)],1)],1)],1),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onAddSubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Un=[],An={name:"DialogSelectRl",props:{curRow:{type:Object,required:!0},closeBindDialog:{type:Function,required:!0}},data:function(){return{filterQuery:{nameCode:null,page:1,limit:20},editQuery:null,relevanceEdit:{id:null,thirdId:"",isDisable:null,isUseDy:!1,isLock:null},defaultSys:null,isImport:!1,isImportUdi:!1,isUploadSmp:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],filterList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1,isUseDyCheck:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={nameCode:null,page:1,limit:20},this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.nameCode=this.curRow.nameCode,Nl(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},keyup_submit:function(t){this.filterQuery.page=1,this.getList(),t.target.select()},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.isUseDyCheck=!1,e.loading=!1,e.detailList=t.data||[],e.detailList.forEach((function(t,a,i){t.zxxsbzbhsydysl>1&&(e.isUseDyCheck=!0)}))})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};ql(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},addSelectErp:function(t){this.defaultSys=t.sysId,this.isImport=!1,this.selectErpDialogVisible=!0},removeErp:function(t){var e=this;this.$confirm("此操作将解除该绑定产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={relId:e.editQuery.relId,thirdSys:t.sysId};Wl(a).then((function(t){2e4==t.code?(e.getThirdSysDetail()(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},bindId:function(t){var e=this,a={id:this.curRow.id,bindStatus:0,bindRlFk:t.id};Pi(a).then((function(t){2e4==t.code?(e.$message.success("绑定成功"),e.closeBindDialog(e.curRow.id)):e.$message.error("绑定失败")})).catch((function(){}))},handleSelectionChange:function(t){console.log("----"+t)},cancelDialog:function(){this.editDialogVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleModifyClick:function(t){this.uuid=t.uuid,this.relId=t.relId,this.isImport=!1,this.thisData=t,this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.id,isUseDy:t.isUseDy,isDisable:t.isDisable,isLock:t.isLock},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,this.getThirdSysDetail(),t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},getSysFilter:function(){var t=this;Kl().then((function(e){t.loading=!1,t.filterList=e.data.list||[]})).catch((function(){t.loading=!1,t.filterList=[]}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1},selectSysParam:function(){var t=this,e={paramKey:"smp_isUploadProuct"};Bt(e).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isUploadSmp=!0)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))}},mounted:function(){},components:{selectUdi:ds,selectErp:ys,selectLocalUdi:Cs},created:function(){this.getList()}},Mn=An,Wn=(a("a417"),Object(g["a"])(Mn,Bn,Un,!1,null,"5a8401a0",null)),Hn=Wn.exports;function Kn(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=Jn(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var i=0,l=function(){};return{s:l,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,r=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){r=!0,s=t},f:function(){try{o||null==a.return||a.return()}finally{if(r)throw s}}}}function Jn(t,e){if(t){if("string"===typeof t)return Gn(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Gn(t,e):void 0}}function Gn(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=new Array(e);a<e;a++)i[a]=t[a];return i}var Xn={site_id:"",site_name:"",describe:"",ads:[]},Yn={props:{isSelect:{type:Boolean,default:!1}},data:function(){return{query:{page:1,limit:20},checkStatus:{1:"校验异常",0:"未校验",2:"正常"},erpCheckStatus:{1:"校验异常",0:"未校验",2:"校验成功"},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},busTypes:[],unitquery:{key:"",page:1,limit:20},unitlist:[],list:[],detailList:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},billAction:null,actDateRange:[],filterQuery:{id:"",mainAction:null,action:null,page:1,limit:10,code:"",exportStatus:null,contrastStatus:1,status:null,startTime:"",endTime:""},detailQuery:{orderId:""},deleteData:{id:""},idQuery:{id:""},curIndex:"",adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,selectRlVisible:!1,curRow:null,successOrderExportPDFSettingVisible:!1,total:0,loading:!0,index:null,formName:null,orderId:"",formMap:{add:"新增",edit:"编辑"},exportQuery:{orderId:"",exportStatus:""},uploadQuery:{orderId:""},errorDetail:null,multipleSelection:[],dialogTableVisible:!1,formLoading:!1,formVisible:!1,formData:Xn,deleteLoading:!1,addDialogVisible:!1,errDialogVisible:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},components:{draggable:We.a,codeDetail:tr,successOrderExportPDFSetting:rr,selectErpOrder:Gr,selectRlDialog:Hn},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={id:"",mainAction:null,action:null,page:1,limit:10,code:"",exportStatus:null,contrastStatus:1,status:null,startTime:"",endTime:""},this.actDateRange=[],this.getList()},onSubmit:function(){null!==this.actDateRange?(this.filterQuery.startTime=this.actDateRange[0],this.filterQuery.endTime=this.actDateRange[1]):(this.filterQuery.startTime=null,this.filterQuery.endTime=null),this.getList()},bindRl:function(t){this.curRow=t,this.selectRlVisible=!0},closeBindDialog:function(t){this.selectRlVisible=!1,this.detailQuery={orderId:t},this.refresgOrderDetail()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},handleErrorDetail:function(t){var e=this.list[t];this.errorDetail=e.remark,this.errDialogVisible=!0},mergesOrders:function(){var t=this,e=this.multipleSelection;if(e.length<=1)this.$message.warning("选择的订单需大于1");else{var a=e[0].id,i=e[0].fromCorp,l=e[0].action,s=[];e.forEach((function(e,a){i===e.fromCorp?l===e.action?s.push(e.id):t.$message.warning("业务类型不一致!"):t.$message.warning("往来单位不一致!")}));var o={orderList:s};this.$confirm("所选择的订单将会合并到订单号为"+a+"的订单下","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Oi(o).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"合并成功"})):t.$message.error(e.message)}))})).catch((function(){}))}},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Ii(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,t.detailList=[]})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getOrderDetail:function(t){this.loading=!0,this.detailQuery={orderId:t.id},this.refresgOrderDetail()},repeatCheckClick:function(t){var e=this,a={orderId:t.id};this.loading=!0,Wo(a).then((function(a){e.loading=!1,2e4===a.code?(e.$message.success(a.data),e.getList(),e.detailQuery={orderId:t.id},e.refresgOrderDetail()):e.$message.error(a.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},repeatPrintCheckClick:function(t){var e=this,a={orderId:t.id};this.loading=!0,Ho(a).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},revokeErrOrder:function(t){var e=this,a={id:t.id};Mi(a).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},refresgOrderDetail:function(){var t=this;ji(this.detailQuery).then((function(e){console.log(e),t.loading=!1,t.detailList=e.data||[]})).catch((function(){t.loading=!1,t.detailList=[]}))},handleUnitClick:function(t){this.curIndex=t.id,this.curRow=t,this.dialogTableVisible=!0},getUnitList:function(){var t=this;this.loading=!0,Object(Yt["f"])(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.page.list||[]})).catch((function(){t.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},successOrderExportPDFSetting:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id),this.successOrderExportPDFSettingVisible=!0},successOrderExportPDF:function(t){var e=this;console.log(t);var a={orderId:t.id,customerId:L["a"].getters.customerId};this.loading=!0,Eo(a).then((function(t){2e4===t.code?Ro(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1})):(e.loading=!1,e.$message.error(t.message))})).catch((function(){e.loading=!1}))},closeDialog:function(){this.successOrderExportPDFSettingVisible=!1,this.getList()},selectUnit:function(t){var e=this;console.log(t.id);var a={id:this.curRow.id,supId:t.erpId};Bi(a).then((function(t){2e4==t.code?(e.$message.success("绑定成功"),e.getList(),e.detailList=[]):e.$message.error("绑定失败")})).catch((function(){})),zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.refresgOrderDetail(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.erpCount===e.count?"success-row":"warning-row"},exportDialog:function(t){var e=this,a=t;"已上传"===a.exportStatus?this.$confirm("该订单已修改, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):0===a.contrastStatus?this.$confirm("该订单校验异常, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):null===a.contrastStatus?this.$confirm("该订单未校验, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):this.$confirm("是否确定修改ERP订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},exportXml:function(t){var e=this;this.loading=!0;var a,i=this.list[t],l=i.id;this.query={corpOrderId:l,page:1,limit:20},Ai(this.query).then((function(t){e.loading=!1,a=t.data.list||[];var s,o='<?xml version="1.0" encoding="utf-8"?>\n<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="终端接口XML Schema-2.0.xsd" SN="" Version="3.0" License="123456">\n<Events>\n<Event Name="'+i.action+'" MainAction="'+i.mainAction+'"><ActionMaping>\n<Action Name="'+i.mainAction+'">\n<ActionData>Code</ActionData>\n<ActionData>CorpOrderID</ActionData>\n<ActionData>Actor</ActionData>\n<ActionData>ActDate</ActionData>\n<ActionData>ToCorpID</ActionData>\n</Action>\n </ActionMaping>\n<DataMaping>\n<MetaData Name="Code" Type="string" />\n<MetaData Name="CorpOrderID" Type="string" />\n<MetaData Name="Actor" Type="string" />\n<MetaData Name="ActDate" Type="Date" />\n<MetaData Name="ToCorpID" Type="string" />\n</DataMaping>\n<DataField>\n',r=Kn(a);try{for(r.s();!(s=r.n()).done;){var n=s.value;null===n.fromCorpId&&(n.fromCorpId="");var c=' <Data Code="'+n.code+'" CorpOrderID="'+n.corpOrderId+'" Actor="'+n.actor+'" ActDate="'+n.actDate+'" ToCorpID="'+n.fromCorpId+'" />\n';o+=c}}catch(d){r.e(d)}finally{r.f()}o+="</DataField>\n</Event>\n</Events>\n</Document>\n";var u=new Blob([o],{type:"text/plain;charset=utf-8"});Object(He["saveAs"])(u,i.action+i.corpOrderId+".xml"),e.exportQuery.orderId=l,e.exportQuery.exportStatus="已上传",Ei(e.exportQuery).then((function(t){e.getList()}))})).catch((function(){e.loading=!1,e.list=[],e.total=0}))},uploadOrderDialog:function(t){var e=this;console.log(t.id+"---"+t.orderid),this.uploadQuery={orderId:t.id},Ui(this.uploadQuery).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeManuDialog:function(t){this.addDialogVisible=!1,t?(this.$message.success("选入成功"),this.refresgOrderDetail(),this.getList()):this.$message.error("选入失败")},cancelDialog:function(){this.addDialogVisible=!1},importOrder:function(t){this.orderId=t.id,this.billAction=t.action,this.addDialogVisible=!0}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.getList();var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),this.actDateRange=[a,e]}},Zn=Yn,tc=(a("9ba4"),Object(g["a"])(Zn,jn,Pn,!1,null,null,null)),ec=tc.exports,ac=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型"},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择扫码单据类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("创建日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.mergesOrders}},[t._v("合并单号")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getOrderDetail,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.fromCorp)+"\n ")]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate",width:"150","show-overflow-tooltip":"true"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"contrastStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(1===e.row.contrastStatus)}},[t._v("\n "+t._s(t.erpCheckStatus[e.row.contrastStatus])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.importOrder(e.row)}}},[t._v("选择业务单据\n ")])]}}])})],1),t.successOrderExportPDFSettingVisible?a("el-dialog",{attrs:{title:"导出PDF",visible:t.successOrderExportPDFSettingVisible,width:"80%"},on:{"update:visible":function(e){t.successOrderExportPDFSettingVisible=e},close:t.closeDialog}},[a("successOrderExportPDFSetting",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card",attrs:{id:"printJS-form"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"row-class-name":t.tableRowClassName,data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"coName","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"包装规格",prop:"packSpec","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据数量",prop:"erpCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count"}}),a("el-table-column",{attrs:{label:"生产企业",prop:"productCompany","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"authCode","show-overflow-tooltip":!0}})],1)],1),a("el-dialog",{attrs:{title:"选择往来单位",visible:t.dialogTableVisible,width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"选择业务单据",visible:t.addDialogVisible,width:"80%"},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("selectErpOrder",{attrs:{orderId:t.orderId,orderAction:t.billAction},on:{closeManuDialog:t.closeManuDialog}})],1):t._e(),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-dialog",{attrs:{title:"校验信息",visible:t.errDialogVisible,width:"30%"},on:{"update:visible":function(e){t.errDialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.errDialogVisible=!1}}},[t._v("关 闭")])],1)])],1)},ic=[],lc={site_id:"",site_name:"",describe:"",ads:[]},sc={props:{isSelect:{type:Boolean,default:!1}},data:function(){return{query:{page:1,limit:10},checkStatus:{1:"校验异常",0:"未校验",2:"正常"},erpCheckStatus:{1:"校验异常",0:"未校验",2:"校验成功"},unitquery:{key:"",page:1,limit:20},unitlist:[],list:[],billAction:null,detailList:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},actDateRange:[],filterQuery:{id:"",mainAction:null,action:null,page:1,limit:10,code:"",exportStatus:null,contrastStatus:0,status:2,startTime:"",endTime:""},detailQuery:{orderId:""},deleteData:{id:""},idQuery:{id:""},curIndex:"",adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,successOrderExportPDFSettingVisible:!1,total:0,loading:!0,index:null,formName:null,orderId:"",formMap:{add:"新增",edit:"编辑"},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},exportQuery:{orderId:"",exportStatus:""},uploadQuery:{orderId:""},busTypes:[],multipleSelection:[],dialogTableVisible:!1,formLoading:!1,formVisible:!1,formData:lc,deleteLoading:!1,addDialogVisible:!1,errDialogVisible:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},components:{draggable:We.a,codeDetail:tr,successOrderExportPDFSetting:rr,selectErpOrder:Gr},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={id:"",mainAction:null,action:null,page:1,limit:10,code:"",exportStatus:null,contrastStatus:0,status:2,startTime:"",endTime:""},this.actDateRange=[],this.getList()},onSubmit:function(){null!==this.actDateRange?(this.filterQuery.startTime=this.actDateRange[0],this.filterQuery.endTime=this.actDateRange[1]):(this.filterQuery.startTime=null,this.filterQuery.endTime=null),this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},handleErrorDetail:function(t){var e=this.list[t];this.errorDetail=e.remark,this.errDialogVisible=!0},mergesOrders:function(){var t=this,e=this.multipleSelection;if(e.length<=1)this.$message.warning("选择的订单需大于1");else{var a=e[0].id,i=e[0].fromCorp,l=e[0].action,s=[];e.forEach((function(e,a){i===e.fromCorp?l===e.action?s.push(e.id):t.$message.warning("业务类型不一致!"):t.$message.warning("往来单位不一致!")}));var o={orderList:s};this.$confirm("所选择的订单将会合并到订单号为"+a+"的订单下","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Oi(o).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"合并成功"})):t.$message.error(e.message)}))})).catch((function(){}))}},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Ii(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,t.detailList=[]})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getOrderDetail:function(t){this.loading=!0,this.detailQuery={orderId:t.id},this.refresgOrderDetail()},repeatCheckClick:function(t){var e=this,a={orderId:t.id};this.loading=!0,Wo(a).then((function(a){e.loading=!1,2e4===a.code?(e.$message.success(a.data),e.getList(),e.detailQuery={orderId:t.id},e.refresgOrderDetail()):e.$message.error(a.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},refresgOrderDetail:function(){var t=this;ji(this.detailQuery).then((function(e){console.log(e),t.loading=!1,t.detailList=e.data||[]})).catch((function(){t.loading=!1,t.detailList=[]}))},handleUnitClick:function(t){this.curIndex=t.id},getUnitList:function(){var t=this;this.loading=!0,Ko(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.list||[]})).catch((function(){t.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},successOrderExportPDFSetting:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id),this.successOrderExportPDFSettingVisible=!0},successOrderExportPDF:function(t){var e=this;console.log(t);var a={orderId:t.id,customerId:L["a"].getters.customerId};this.loading=!0,Eo(a).then((function(t){2e4===t.code?Ro(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1})):(e.loading=!1,e.$message.error(t.message))})).catch((function(){e.loading=!1}))},closeDialog:function(){this.successOrderExportPDFSettingVisible=!1,this.getList()},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.unitid,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.refresgOrderDetail(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.reCount===e.count?"success-row":"warning-row"},exportDialog:function(t){var e=this,a=t;"已上传"===a.exportStatus?this.$confirm("该订单已修改, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):0===a.contrastStatus?this.$confirm("该订单校验异常, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):null===a.contrastStatus?this.$confirm("该订单未校验, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):this.$confirm("是否确定修改ERP订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){}))},uploadOrderDialog:function(t){var e=this;console.log(t.id+"---"+t.orderid),this.uploadQuery={orderId:t.id},Ui(this.uploadQuery).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeManuDialog:function(t){this.addDialogVisible=!1,t?(this.$message.success("选入成功"),this.refresgOrderDetail(),this.getList()):this.$message.error("选入失败")},cancelDialog:function(){this.addDialogVisible=!1},importOrder:function(t){this.orderId=t.id,this.billAction=t.action,this.addDialogVisible=!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.getList();var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),this.actDateRange=[a,e]}},oc=sc,rc=(a("1164"),Object(g["a"])(oc,ac,ic,!1,null,null,null)),nc=rc.exports,cc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),t.haveDistributionVisible?a("el-button",{attrs:{type:"primary",icon:"search",loading:t.loading},on:{click:function(e){return t.generateQRCodeText(null,1)}}},[t._v("生成码\n ")]):t._e()],1)],1),a("el-form-item",{staticStyle:{margin:"0 1px 0 auto"}},[a("el-button-group",[t.haveDistributionVisible?a("el-switch",{attrs:{"active-text":"过滤已有UDI码的产品"},model:{value:t.filterUDIType,callback:function(e){t.filterUDIType=e},expression:"filterUDIType"}}):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.qrcodeDetail(e.row)}}},[t._v("内部码详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printQRCodeText(e.row)}}},[t._v("标签打印\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",width:"150",prop:"productName"}}),a("el-table-column",{attrs:{label:"规格型号",width:"150",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",width:"150",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",width:"150",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",width:"150",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"实际数量",width:"150",prop:"reCount"}}),a("el-table-column",{attrs:{label:"单据数量",width:"150",prop:"count"}}),a("el-table-column",{attrs:{label:"价格",width:"150",prop:"price"}}),a("el-table-column",{attrs:{label:"生产厂家",width:"150",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",width:"150",prop:"zczbhhzbapzbh"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.qrcodeDetailVisible?a("el-dialog",{attrs:{title:"码详情",visible:t.qrcodeDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.qrcodeDetailVisible=e},close:t.closeQRCodeDetailDialog}},[a("stockOrderQRCodeDetail",{attrs:{closeDialog:t.closeQRCodeDetailDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"标签打印",visible:t.qrcodeExportVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e()],1)},uc=[],dc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submit("0")}}},[t._v("提交\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据状态:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.statusMap[t.formData.status],callback:function(e){t.$set(t.statusMap,t.formData.status,e)},expression:"statusMap[formData.status]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.typeMap[t.formData.type],callback:function(e){t.$set(t.typeMap,t.formData.type,e)},expression:"typeMap[formData.type]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("条码:")])])]),a("el-col",{attrs:{span:15}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",attrs:{"auto-complete":"off"},on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addCode()}},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1)],1),a("el-col",{attrs:{span:2}},[a("el-button",{staticStyle:{height:"31px","margin-left":"10px"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.addCode()}}},[t._v("添加\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"sweepCount","show-overflow-tooltip":""}})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},pc=[],mc={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{corpName:[{required:!0,message:"请输入供应商",trigger:"blur"}],billdate:[{required:!0,message:"请输入单据日期",trigger:"blur"}],billType:[{required:!0,message:"请选择业务类型",trigger:"blur"}],type:[{required:!0,message:"请选择采购类型",trigger:"blur"}]},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},typeMap:{1:"预入库",2:"普通采购"},busTypes:[]}},components:{draggable:We.a},methods:{submit:function(t){var e=this;this.total<1?this.$message.error("未配货"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),!this.$isBlank(this.code)){this.loading=!0;var e={orderId:this.idQuery.id,code:this.code};_r(e).then((function(e){t.loading=!1,2e4===e.code?(t.idQuery.id=e.data,t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,gr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.$isNotBlank(this.idQuery.id)&&(this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.getStockOrderDetailList())}},hc=mc,fc=(a("3c47"),Object(g["a"])(hc,dc,pc,!1,null,null,null)),gc=fc.exports,yc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-button-group",{staticStyle:{display:"flex","margin-bottom":"15px","margin-right":"50px"}},[a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.generateQRCodeText.apply(null,arguments)}}},[t._v("生成内部码\n ")]),a("el-switch",{staticStyle:{"margin-top":"7px","margin-left":"20px"},attrs:{"active-text":"过滤已有UDI码的产品"},model:{value:t.filterUDIType,callback:function(e){t.filterUDIType=e},expression:"filterUDIType"}})],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商名称:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"码",prop:"udiCode"}}),a("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.printStatus]))])]}}])}),a("el-table-column",{attrs:{label:"时间",prop:"create_time","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.updateTime))])]}}])})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},bc=[];function vc(t){return Object(et["a"])({url:"/spms/stockPrint/filter",method:"get",params:t})}var wc={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{sOrderId:null,orderIdFk:"",page:1,limit:10,filterUDIType:null},busTypes:[],formData:{},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,filterUDIType:!0,statusMap:{0:"未打印",1:"已打印"}}},components:{draggable:We.a},methods:{submit:function(t){var e=this;this.total<1?this.$message.error("未选择条码"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockQRCodeTextList()},handleCurrentChange:function(t){this.query.page=t,this.getStockQRCodeTextList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,vc(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getStockQRCodeTextList:function(){var t=this;this.loading=!0,vc(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},printStockOrderDetailPDF:function(t){var e=this;if(t.count<=0)return this.$message.error("数量错误");var a={queryId:t.id};this.loading=!0,jo(a).then((function(i){2e4===i.code?(a={id:t.id,rowCount:t.count,text:t.text},Po(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},intentBack:function(){this.$router.go(-1)},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},generateQRCodeText:function(){var t=this,e="确定生成内部码?";this.codeArray.length>1&&(e="是否确定重新生成内部码?"),this.$confirm(e,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={id:t.query.sOrderId,filterUDIType:t.filterUDIType};t.loading=!0,Fr(e).then((function(e){t.loading=!1,2e4===e.code?(t.$message.success(e.data),t.getStockOrderDetailList(),t.detailList=[]):t.$message.error(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.$isNotBlank(this.idQuery.id)&&(this.formData=this.idQuery.formData,this.query.sOrderId=this.idQuery.id,this.query.filterUDIType=this.idQuery.filterUDIType,this.getStockQRCodeTextList())}},xc=wc,Dc=(a("a753"),Object(g["a"])(xc,yc,bc,!1,null,null,null)),Cc=Dc.exports,kc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.printStockOrderDetailPDF()}}},[t._v("打印全部\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商名称:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"码",prop:"udiCode"}}),a("el-table-column",{attrs:{label:"状态",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.statusMap[e.row.printStatus]))])]}}])}),a("el-table-column",{attrs:{label:"时间",width:"200",prop:"create_time","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.updateTime))])]}}])}),a("el-table-column",{attrs:{label:"标签数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"50%"},attrs:{size:"small",placeholder:"请输入打印标签数量",oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.row.count,callback:function(a){t.$set(e.row,"count",a)},expression:"scope.row.count"}})]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printStockOrderDetailPDF(e.row)}}},[t._v("标签打印\n ")])]}}])})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1),t.labelPrintVisible?a("el-dialog",{attrs:{title:"标签打印文件列表",visible:t.labelPrintVisible,width:"60%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.labelPrintVisible=e}}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 60px 10px auto",height:"35px"},attrs:{type:"primary"},nativeOn:{click:function(e){return t.refeshLabel()}}},[t._v("刷新\n ")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.lableFileLsit}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"文件名称",prop:"fileName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生成状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.printMap[e.row.status]))])]}}],null,!1,2528095193)}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.printLabel(e.row)}}},[t._v("标签打印\n ")])]}}],null,!1,2365873954)})],1),a("el-pagination",{attrs:{"page-size":t.refreshQuery.limit,layout:"prev, pager, next",total:t.labltotal},on:{"current-change":t.handleLableChange}})],1):t._e()],1)},Qc=[],Sc={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{sOrderId:null,orderIdFk:"",page:1,limit:10},labelPrintVisible:!1,busTypes:[],formData:{},codeArray:[],total:0,lableFileLsit:[],loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{0:"未打印",1:"已打印"},refreshQuery:{page:1,limit:10,printCodeIdFk:null,stockOrderFk:null},labltotal:null,printMap:{0:"正在生成",1:"已生成"},pdffileUrl:null}},components:{draggable:We.a},methods:{submit:function(t){var e=this;this.total<1?this.$message.error("未选择条码"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},refeshLabel:function(){var t=this;Uo(this.refreshQuery).then((function(e){2e4==e.code&&(t.lableFileLsit=e.data.list,t.labelPrintVisible=!0,t.labltotal=e.data.total||0)})).catch((function(){t.loading=!1}))},printLabel:function(t){window.open(this.pdffileUrl+t.fileName,"_blank")},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockQRCodeTextList()},handleCurrentChange:function(t){this.query.page=t,this.getStockQRCodeTextList()},handleLableChange:function(t){this.refreshQuery.page=t,this.refeshLabel()},getStockOrderDetailList:function(){var t=this;this.loading=!0,vc(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))},getStockQRCodeTextList:function(){var t=this;this.loading=!0,vc(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},printStockOrderDetailPDF:function(t){var e=this,a={queryId:null,orderId:null,countList:[]};if(null==t)a.orderId=this.query.sOrderId;else{if(t.reCount<=0)return this.$message.error("数量错误");a.queryId=t.id}this.loading=!0,jo(a).then((function(i){if(2e4===i.code){if(null!=t){a.id=t.id,a.rowCount=t.reCount;var l={queryId:t.id,rowCount:t.count};a.countList.push(l)}else for(var s=0;s<e.codeArray.length;s++){var o={queryId:e.codeArray[s].id,rowCount:e.codeArray[s].count};a.countList.push(o)}for(var r=0,n=0;n<a.countList.length;n++)r+=a.countList[n].rowCount,console.log(r);console.log(r),r>100?Bo(a).then((function(t){2e4==t.code&&(e.lableFileLsit=t.data.list,e.labltotal=t.data.total||0,e.labelPrintVisible=!0,e.refreshQuery={page:1,limit:10,printCodeIdFk:a.queryId,stockOrderFk:a.orderId},e.loading=!1,e.$message.warning("打印文件正在生成中,请点击刷新按钮查看进度,请勿关闭按钮重复打印!"))})).catch((function(){e.loading=!1})):Po(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))}else e.loading=!1,e.$message.error(i.message)})).catch((function(){e.loading=!1}))},intentBack:function(){this.$router.go(-1)},getPrintList:function(t){}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.pdffileUrl=r["a"]+"/spms/donwload/pdf?fileName=",this.$isNotBlank(this.idQuery.id)&&(this.formData=this.idQuery.formData,this.query.orderId=this.idQuery.id,this.query.sOrderId=this.idQuery.id,console.log(this.query.sOrderId),this.getStockQRCodeTextList())}},_c=Sc,$c=(a("2ea8"),Object(g["a"])(_c,kc,Qc,!1,null,null,null)),Tc=$c.exports,Lc={name:"stockOrder",data:function(){return{query:{billNo:"",status:"3",page:1,limit:10,startTime:"",endTime:""},detailQuery:{orderIdFk:"",page:1,limit:20},busTypes:[],list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},idQuery:{id:"",filterUDIType:null},distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeDetailVisible:!1,qrcodeExportVisible:!1,filterUDIType:!0,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"3",page:1,limit:10,startTime:"",endTime:""},this.getList(),this.haveDistributionVisible=!0,this.actDateRange=[]},onSubmit:function(){this.getList(),"202"===this.query.status||"502"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,t.detailList=[]})).catch((function(){t.loading=!1,t.list=[],t.detailList=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},qrcodeDetail:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.idQuery.filterUDIType=this.filterUDIType,this.qrcodeDetailVisible=!0)},closeQRCodeDetailDialog:function(){this.qrcodeDetailVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},generateQRCodeText:function(t,e){var a=this,i=[];if(1===e){var l=this.$refs.multipleTable.selection;if(l.length<1)return void this.$message.error("请选择需要生成内部码单据!");l.forEach((function(t,e){i.push(t.id)}))}else i=[t.id];this.$confirm("确定生成内部码?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={};t.ids=i,t.filterUDIType=a.filterUDIType,a.loading=!0,Fr(t).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success(t.data),a.getList(),a.detailList=[]):a.$message.error(t.message)})).catch((function(){a.loading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockOrderQRCodeDetail:Cc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},Oc=Lc,zc=Object(g["a"])(Oc,cc,uc,!1,null,"cc66b080",null),Ic=zc.exports,Nc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%",height:"250px"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName"}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printOrder(e.row)}}},[t._v("单据打印\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",width:"150",prop:"productName"}}),a("el-table-column",{attrs:{label:"规格型号",width:"150",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",width:"150",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",width:"150",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",width:"150",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"实际数量",width:"150",prop:"reCount"}}),a("el-table-column",{attrs:{label:"单据数量",width:"150",prop:"count"}}),a("el-table-column",{attrs:{label:"生产厂家",width:"150",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",width:"150",prop:"zczbhhzbapzbh"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.qrcodeDetailVisible?a("el-dialog",{attrs:{title:"码详情",visible:t.qrcodeDetailVisible,width:"70%"},on:{"update:visible":function(e){t.qrcodeDetailVisible=e},close:t.closeQRCodeDetailDialog}},[a("stockOrderQRCodeDetail",{attrs:{closeDialog:t.closeQRCodeDetailDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,width:"60%"},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e()],1)},Fc=[],qc={name:"stockIOrderInCode",data:function(){return{query:{billNo:"",status:"4",page:1,limit:20,startTime:"",endTime:""},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},idQuery:{id:""},busTypes:[],distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeDetailVisible:!1,qrcodeExportVisible:!1,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"4",page:1,limit:20,startTime:"",endTime:""},this.getList(),this.detailList=[],this.haveDistributionVisible=!0,this.actDateRange=[]},onSubmit:function(){null!==this.actDateRange?(this.query.startTime=this.actDateRange[0],this.query.endTime=this.actDateRange[1]):(this.query.startTime=null,this.query.endTime=null),this.getList(),this.detailList=[],"202"===this.query.status||"502"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},qrcodeDetail:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeDetailVisible=!0)},closeQRCodeDetailDialog:function(){this.qrcodeDetailVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockOrderQRCodeDetail:Cc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验",4:"已校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},Vc=qc,Rc=Object(g["a"])(Vc,Nc,Fc,!1,null,"3fc3f41f",null),Ec=(Rc.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(t){}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"count"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount"}}),a("el-table-column",{attrs:{label:"价格",prop:"price"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.qrcodeDetailVisible?a("el-dialog",{attrs:{title:"码详情",visible:t.qrcodeDetailVisible,width:"70%"},on:{"update:visible":function(e){t.qrcodeDetailVisible=e},close:t.closeQRCodeDetailDialog}},[a("stockOrderQRCodeDetail",{attrs:{closeDialog:t.closeQRCodeDetailDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,width:"60%"},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e()],1)}),jc=[],Pc={name:"stockOrderDelSearch",data:function(){return{query:{startTime:"",endTime:"",billNo:"",status:5,page:1,limit:10},detailQuery:{orderIdFk:"",page:1,limit:20},busTypes:[],list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,idQuery:{id:""},distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeDetailVisible:!1,qrcodeExportVisible:!1,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:5,startTime:"",endTime:"",page:1,limit:10},this.getList(),this.haveDistributionVisible=!0,this.actDateRange=[]},onSubmit:function(){null!==this.actDateRange?(this.query.startTime=this.actDateRange[0],this.query.endTime=this.actDateRange[1]):(this.query.startTime=null,this.query.endTime=null),this.getList(),"202"===this.query.status||"502"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0,t.detailList=[]}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},qrcodeDetail:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeDetailVisible=!0)},closeQRCodeDetailDialog:function(){this.qrcodeDetailVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockOrderQRCodeDetail:Cc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验",4:"已校验",5:"已核对"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},Bc=Pc,Uc=Object(g["a"])(Bc,Ec,jc,!1,null,"7a9f23ac",null),Ac=Uc.exports,Mc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search",loading:t.loading},on:{click:function(e){return t.selectThrOrderFunction()}}},[t._v("选入订单\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.haveDistributionVisible?t._e():a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.distributionForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",width:"150",prop:"productName"}}),a("el-table-column",{attrs:{label:"规格型号",width:"150",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",width:"150",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",width:"150",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",width:"150",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"实际数量",width:"150",prop:"reCount"}}),a("el-table-column",{attrs:{label:"单据数量",width:"150",prop:"count"}}),a("el-table-column",{attrs:{label:"价格",width:"150",prop:"price"}}),a("el-table-column",{attrs:{label:"生产厂家",width:"150",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",width:"150",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return t.haveDistributionVisible?void 0:[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleDetailForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.copyDetail(e.row)}}},[t._v("复制\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrderDetail(e.row)}}},[t._v("删除\n ")])]}}],null,!0)})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"单据配货管理",visible:t.distributionVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.handleClose},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderEditDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"60%"},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据状态:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.statusMap[t.formData.status],callback:function(e){t.$set(t.statusMap,t.formData.status,e)},expression:"statusMap[formData.status]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.typeMap[t.formData.type],callback:function(e){t.$set(t.typeMap,t.formData.type,e)},expression:"typeMap[formData.type]"}})],1)],1)],1),a("el-divider"),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",placeholder:"请选择生产日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",placeholder:"请选择失效日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("价格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"price"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.price,callback:function(e){t.$set(t.detailFormData,"price",e)},expression:"detailFormData.price"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.selectThrOrderVisible?a("el-dialog",{attrs:{title:"选入订单",visible:t.selectThrOrderVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectThrOrderVisible=e}}},[a("selectThrOrder",{attrs:{closeDialog:t.closeDialog,data:t.thisData}})],1):t._e()],1)},Wc=[],Hc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-button-group",{staticStyle:{display:"flex","margin-bottom":"15px","margin-right":"50px"}},[a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("2")}}},[t._v("保存\n ")]),a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("3")}}},[t._v("提交\n ")])],1)],1),a("el-card",{staticStyle:{"margin-top":"-5px"}},[a("el-row",{staticStyle:{"margin-top":"10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期",clearable:!1},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"采购类型"},model:{value:t.formData.type,callback:function(e){t.$set(t.formData,"type",e)},expression:"formData.type"}},[a("el-option",{attrs:{label:"预入库",value:"1"}}),a("el-option",{attrs:{label:"普通采购",value:"2"}})],1)],1)],1)],1)],1),a("el-card",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0px 60px 10px auto",height:"35px"},attrs:{type:"primary",size:"small",loading:t.loading},nativeOn:{click:function(e){return e.stopPropagation(),t.selectProductFunction()}}},[t._v("产品录入\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码录入:")])])]),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",attrs:{"auto-complete":"off"},on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectProductFunction(e)}},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"row-class-name":t.tableRowClassName,"max-height":"300",height:"300"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{width:"150",label:"产品通用名",prop:"productName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"批次号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{ref:"inputBatchNoRef",staticStyle:{width:"80%"},attrs:{size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入批次号"},model:{value:e.row.batchNo,callback:function(a){t.$set(e.row,"batchNo",a)},expression:"scope.row.batchNo"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"生产日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请选择生产日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:e.row.productDate,callback:function(a){t.$set(e.row,"productDate",a)},expression:"scope.row.productDate"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"失效日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请选择失效日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:e.row.expireDate,callback:function(a){t.$set(e.row,"expireDate",a)},expression:"scope.row.expireDate"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"实际数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入数量",type:"number",disabled:e.row.index!==t.selectedIndex,oninput:"value=value.replace(/[^\\d]/g,'')"},on:{change:function(a){return t.tableCountChange(e.row)}},model:{value:e.row.reCount,callback:function(a){t.$set(e.row,"reCount",a)},expression:"scope.row.reCount"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",type:"number",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入价格"},model:{value:e.row.price,callback:function(a){t.$set(e.row,"price",a)},expression:"scope.row.price"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"单据数量",prop:"count","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"注册/备案凭证号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"生产厂家",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:e.row.index===t.selectedIndex},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.rowChange(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.copyDetail(e.row)}}},[t._v("复制\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.deleteCodeArray(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1)],1)],1)],1)},Kc=[],Jc=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{attrs:{inline:!0,model:t.listQuery,size:"mini"}},[a("el-row",{staticStyle:{"margin-top":"15px",width:"1000px"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"600px"},attrs:{placeholder:"请扫描或输入UDI码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.listQuery.udiCode,callback:function(e){t.$set(t.listQuery,"udiCode",e)},expression:"listQuery.udiCode"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.listQuery.unionCode,callback:function(e){t.$set(t.listQuery,"unionCode",e)},expression:"listQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.listQuery.cpmctymc,callback:function(e){t.$set(t.listQuery,"cpmctymc",e)},expression:"listQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.listQuery.ggxh,callback:function(e){t.$set(t.listQuery,"ggxh",e)},expression:"listQuery.ggxh"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.listQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.listQuery,"ylqxzcrbarmc",e)},expression:"listQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.listQuery.thrPiId,callback:function(e){t.$set(t.listQuery,"thrPiId",e)},expression:"listQuery.thrPiId"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.combine}},[t._v("确定")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.dataList,"highlight-current-row":"false","row-class-name":t.tableRowClassName},on:{"current-change":t.handleChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.listQuery.limit,layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.handleErpPageChange}})],1)])],1)},Gc=[],Xc={name:"closeDialog",props:{data:{type:Object,required:!0},closeDialog:{type:Function,required:!0}},data:function(){return{listQuery:{billNo:"",page:1,limit:10},combineQuery:{thirdId:"",relId:"",erpName:"",keys:[]},dataList:[],pageTotal:1,total:1,currentRow:null,loading:!1,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null,busTypes:[],actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]},orderEditor:!1,orderId:""}},methods:{onReset:function(){this.$router.push({path:""}),this.listQuery={unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",thrPiId:null,nameCode:"",ggxh:null,page:1,limit:20,addType:1},this.getList()},tableRowClassName:function(t){var e=t.row;return e.checked?"warning-row":""},checkSelectable:function(t){return!t.check},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},handleChange:function(t){console.log(t),this.currentRow=t},handleErpPageChange:function(t){this.listQuery.page=t,this.getList()},keyup_submit:function(t){this.listQuery.page=1,this.getList(),t.target.select()},getList:function(){var t=this;this.loading=!0,this.listQuery.customerId=L["a"].getters.customerId,zr(this.listQuery).then((function(e){console.log(e),t.loading=!1,2e4===e.code?(t.dataList=e.data.list||[],t.pageTotal=e.data.total||0):(t.$message.error(e.message),t.dataList=[],t.pageTotal=0)})).catch((function(){t.loading=!1,t.dataList=[],t.pageTotal=0}))},intentBack:function(){this.closeDialog()},combine:function(){var t=this,e=this.$refs.multipleTable.selection;if(e.length<1)this.$message.error("未选择产品");else{var a=[];e.forEach((function(t,e){a.push(t.rlId)})),this.loading=!0;var i={ids:a};Tr(i).then((function(e){t.loading=!1,2e4===e.code?t.closeDialog(e.data):t.$message.error(e.message)})).catch((function(){t.loading=!1}))}},handleSelectionUdiChange:function(t){console.log("----"+t),this.multipleUdiSelection=t}},created:function(){this.$isNotBlank(this.data)&&(this.listQuery.nameCode=this.data.udi,this.orderEditor=this.data.orderEditor,this.orderId=this.data.orderId,this.getList())}},Yc=Xc,Zc=(a("bfc6"),Object(g["a"])(Yc,Jc,Gc,!1,null,"0440462e",null)),tu=Zc.exports,eu={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{corpName:[{required:!0,message:"请输入供应商",trigger:"blur"}],billdate:[{required:!0,message:"请输入单据日期",trigger:"blur"}],billType:[{required:!0,message:"请选择业务类型",trigger:"blur"}],type:[{required:!0,message:"请选择采购类型",trigger:"blur"}]},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},typeMap:{1:"预入库",2:"普通采购"},orderEditor:!0,iCount:0,sOptions:[],sValue:[],sList:[],sLoading:!1,busTypes:[],currentRow:{},selectedIndex:"",selectProductVisible:!1,thisData:{}}},components:{draggable:We.a,stockOrderNewSelectProduct:tu},methods:{saveOrder:function(t){var e=this;this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.$refs["dataForm"].validate((function(a){if(a){if(e.codeArray.length<1)return void e.$message.warning("未添加产品");for(var i=0;i<e.codeArray.length;i++){if(e.$isBlank(e.codeArray[i].batchNo))return e.$message.error("批次号不能为空");if(e.$isBlank(e.codeArray[i].productDate))return e.$message.error("生产日期不能为空");if(e.$isBlank(e.codeArray[i].expireDate))return e.$message.error("失效日期不能为空")}"2"===t?e.submitFunction(t):e.$confirm("是否确定提交订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.submitFunction(t)})).catch((function(){e.loading=!1}))}}))},submitFunction:function(t){var e=this,a="501"===t?"保存":"提交";this.loading=!0;var i=this.formData;i.status=t,i.subErpOrders=this.codeArray,console.log(i),br(i).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(a+"成功"),e.closeDialog(!0)):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},submit:function(t){var e=this;this.total<1?this.$message.warning("未添加产品"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},selectProductFunction:function(t){var e=this;if(null==t?this.$refs.inputRef.focus():t.target.select(),this.$isBlank(t))return this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.thisData.code="",this.thisData.orderEditor=this.orderEditor,this.thisData.orderId="",this.orderEditor&&(this.thisData.orderId=this.formData.id),void(this.selectProductVisible=!0);if(this.code=this.code.trim(),this.code.length>13){var a=this.code.substring(0,2);a=a.replace("m","M"),a=a.replace("a","A"),-1!==a.indexOf("MA")&&(this.code=a+this.code.substring(2,this.code.length))}this.loading=!0;var i={code:this.code,customerId:L["a"].getters.customerId};Or(i).then((function(a){if(e.loading=!1,console.log(a),2e4===a.code)if("1"===a.data.getType){e.loading=!0;var i=[a.data.getId],l={ids:i,udiEntity:a.data};Tr(l).then((function(t){e.loading=!1,2e4===t.code?e.closeDialogC2(t.data):e.$message.error(t.message)})).catch((function(){e.loading=!1}))}else e.thisData=a.data,e.thisData.code=e.code,e.thisData.orderEditor=e.orderEditor,e.thisData.orderId="",e.orderEditor&&(e.thisData.orderId=e.formData.id),e.selectProductVisible=!0;else e.$message.warning(a.message),e.focusNext("inputRef"),e.$isNotBlank(t)&&t.target.select()}))},closeDialogC2:function(t){var e=this;this.selectProductVisible=!1,this.thisData={},this.$isNotBlank(t)&&(console.log(t),t.forEach((function(t,a){0===e.codeArray.length?e.codeArray.push(t):e.codeArray.unshift(t)})),this.$refs.multipleTable.setCurrentRow(this.codeArray[0]),this.currentRow=this.codeArray[0],this.selectedIndex=0,this.focusNext("iCount"))},rowChange:function(t){this.currentRow=t,this.selectedIndex=t.index,this.iCount=t.reCount,this.focusNext("iCount")},iCountChange:function(){},iCountEnterFunction:function(){this.$isNotBlank(this.currentRow)&&(this.currentRow.count=this.iCount,this.currentRow.reCount=this.iCount),this.focusNext("inputRef")},tableCountChange:function(t){this.$isNotBlank(t)},tableRowClassName:function(t){var e=t.row,a=t.rowIndex;e.index=a},focusNext:function(t){this.$refs[t].focus()},focusNextToTable:function(t){this.$refs[t][0].focus()},remoteMethod:function(t){var e=this;if(""!==t){this.sLoading=!0;var a={key:t,page:1,limit:20};Object(Yt["g"])(a).then((function(t){console.log(t),e.sLoading=!1,e.sOptions=t.data.list})).catch((function(){e.sLoading=!1,e.sOptions=[]}))}else this.sOptions=[]},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),this.$isBlank(this.code))this.$message.warning("请输入条码");else if(this.iCount<=0)this.$message.warning("请输入数量");else{this.loading=!0;var e={orderId:this.formData.id,count:this.iCount,code:this.code};this.orderEditor?Lr(e).then((function(e){t.loading=!1,2e4===e.code?t.getStockOrderDetailList():t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})})):$r(e).then((function(e){if(t.loading=!1,2e4===e.code){for(var a=0;a<t.codeArray.length;a++){if(t.codeArray[a].productId===e.data.productId){t.$alert("已添加","提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}});break}a+1===t.codeArray.length&&t.codeArray.push(e.data)}0===t.codeArray.length&&t.codeArray.push(e.data)}else t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},saveCodeArray:function(t,e){var a=this;if(this.$isBlank(e.batchNo))return this.$message.error("批次号不能为空");if(this.$isBlank(e.productDate))return this.$message.error("生产日期不能为空");if(this.$isBlank(e.expireDate))return this.$message.error("失效日期不能为空");this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.detailLoading=!0;var i=e;Ir(i).then((function(t){a.detailLoading=!1,2e4===t.code?(a.$message.success("修改完成"),a.getStockOrderDetailList(),a.$refs.inputRef.focus()):a.$message.error(t.message)}))},deleteCodeArray:function(t,e){var a=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$refs.multipleTable.setCurrentRow(),a.currentRow={},a.selectedIndex="",a.iCount=0,a.orderEditor?(a.detailLoading=!0,a.$isNotBlank(e.id)?xr({id:e.id}).then((function(e){a.detailLoading=!1,2e4===e.code?(a.$message.success(e.data),a.codeArray.splice(t,1)):a.$message.error(e.message)})).catch((function(){a.detailLoading=!1})):(a.$message.success("删除成功"),a.codeArray.splice(t,1))):(a.$message.success("删除成功"),a.codeArray.splice(t,1))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=JSON.parse(JSON.stringify(t));a.id=null,0===e.codeArray.length?(e.codeArray.push(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0):(e.codeArray.unshift(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0),e.$message.success("复制成功"),e.iCount=e.currentRow.reCount,e.focusNext("iCount")})).catch((function(){}))},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,gr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},generateBillNo:function(){var t=this,e={action:this.formData.billType};this.loading=!0,qr(e).then((function(e){t.loading=!1,2e4===e.code?(t.formData.billNo=e.data,t.formData.billdate=new Date):t.closeDialog(!0)}))},getBusType:function(){var t=this,e={enabled:!0};Br(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.$isNotBlank(this.idQuery.id)?(this.query.limit=100,this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.orderEditor=!0,this.sValue=this.formData.corpName,this.getStockOrderDetailList()):(this.formData={billdate:"",corpName:L["a"].getters.companyName,customerId:L["a"].getters.customerId,billType:"",type:"1"},this.iCount=0,this.orderEditor=!1,this.generateBillNo())}},au=eu,iu=(a("a9ed"),Object(g["a"])(au,Hc,Kc,!1,null,null,null)),lu=iu.exports,su=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("div",[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.listQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号",clearable:""},model:{value:t.listQuery.billNo,callback:function(e){t.$set(t.listQuery,"billNo",e)},expression:"listQuery.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.listQuery.corpName,callback:function(e){t.$set(t.listQuery,"corpName",e)},expression:"listQuery.corpName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true"},model:{value:t.listQuery.billAction,callback:function(e){t.$set(t.listQuery,"billAction",e)},expression:"listQuery.billAction"}},t._l(t.originTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.combine}},[t._v("确定\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.dataList,"highlight-current-row":"true","row-class-name":t.tableRowClassName},on:{"current-change":t.handleChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"往来单位",prop:"corpName",width:"300","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据类型",prop:"billType"}}),a("el-table-column",{attrs:{label:"单据状态",prop:"billFlag",width:"80"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}})],1),a("el-pagination",{attrs:{"page-size":t.listQuery.limit,layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.handleErpPageChange}})],1)])],1)},ou=[];function ru(t){return Object(et["a"])({url:"/udiwms/originBusType/filter",method:"get",params:t})}var nu={name:"closeDialog",props:{data:{type:Object,required:!0},closeDialog:{type:Function,required:!0}},data:function(){return{listQuery:{billNo:"",thirdSysFk:"",billAction:null,originType:null,page:1,limit:10,customerId:null},combineQuery:{thirdId:"",relId:"",erpName:"",keys:[]},dataList:[],pageTotal:1,total:1,currentRow:null,loading:!1,multipleUdiSelection:[],thirdSys:[],thirdSysFk:null,busTypes:[],originTypes:[],actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{tableRowClassName:function(t){var e=t.row;return e.checked?"warning-row":""},checkSelectable:function(t){return!t.check},handleCurrentChange:function(t){this.unionQuery.page=t,this.getList()},handleChange:function(t){console.log(t),this.currentRow=t},handleErpPageChange:function(t){this.listQuery.page=t,this.getList()},keyup_submit:function(t){this.getList(),t.target.select()},getList:function(){var t=this;this.loading=!0,null!==this.actDateRange?(this.listQuery.startDate=this.actDateRange[0],this.listQuery.endDate=this.actDateRange[1]):(this.listQuery.startDate=null,this.listQuery.endDate=null),this.listQuery.customerId=L["a"].getters.customerId,ur(this.listQuery).then((function(e){console.log(e),t.loading=!1,2e4===e.code?(t.dataList=e.data.list||[],t.pageTotal=e.data.total||0):(t.$message.error(e.message),t.dataList=[],t.pageTotal=0)})).catch((function(){t.loading=!1,t.dataList=[],t.pageTotal=0}))},intentBack:function(){this.closeDialog()},combine:function(){var t=this;if(!this.$isBlank(this.currentRow.id)){var e={id:this.currentRow.id};dr(e).then((function(e){2e4===e.code?t.closeDialog():t.$message.error(e.message)})).catch((function(){}))}},handleSelectionUdiChange:function(t){console.log("----"+t),this.multipleUdiSelection=t},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){})),ru(e).then((function(e){t.originTypes=e.data.list||[]})).catch((function(){}))}},created:function(){this.getBusType()}},cu=nu,uu=(a("50a2"),Object(g["a"])(cu,su,ou,!1,null,"2007226b",null)),du=uu.exports,pu={name:"stockOrderEditor",data:function(){return{query:{billNo:"",status:"2",startTime:"",endTime:"",page:1,limit:10},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],busTypes:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,formData:{},sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},statusMap:{1:"草稿",2:"未配货",3:"待校验"},typeMap:{1:"预入库",2:"普通采购"},idQuery:{id:""},distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!1,qrcodeExportVisible:!1,filterUDIType:!1,selectThrOrderVisible:!1,thisData:{},actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={startTime:"",endTime:"",billNo:"",status:"2",page:1,limit:10},this.getList(),this.detailList=[],this.haveDistributionVisible=!1,this.actDateRange=[]},onSubmit:function(){null!==this.actDateRange?(this.query.startTime=this.actDateRange[0],this.query.endTime=this.actDateRange[1]):(this.query.startTime=null,this.query.endTime=null),this.getList(),"202"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.detailList=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",console.log("row = "+e.id),this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},selectThrOrderFunction:function(){this.selectThrOrderVisible=!0},closeDialog:function(t){this.distributionVisible=!1,this.selectThrOrderVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},exportQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id,this.formData=t),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockQRCodeExport:Tc,stockOrderEditDistribution:lu,selectThrOrder:du},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType(),this.getList();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t]}},mu=pu,hu=Object(g["a"])(mu,Mc,Wc,!1,null,"0ac3b570",null),fu=hu.exports,gu=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据状态","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.haveDistributionVisible?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printOrder(e.row)}}},[t._v("单据打印\n ")]):t._e()]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"count"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount"}}),a("el-table-column",{attrs:{label:"价格",width:"150",prop:"price"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionSetVisible?a("el-dialog",{attrs:{title:"单据设置",visible:t.distributionSetVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.handleClose},on:{"update:visible":function(e){t.distributionSetVisible=e},close:t.closeDialog}},[a("stockOrderEditDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.qrcodeDetailVisible?a("el-dialog",{attrs:{title:"码详情",visible:t.qrcodeDetailVisible,width:"70%"},on:{"update:visible":function(e){t.qrcodeDetailVisible=e},close:t.closeQRCodeDetailDialog}},[a("stockOrderQRCodeDetail",{attrs:{closeDialog:t.closeQRCodeDetailDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,width:"60%"},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e()],1)},yu=[],bu={name:"stockOrderSearch",data:function(){return{query:{startTime:"",endTime:"",billNo:"",status:4,page:1,limit:10},detailQuery:{orderIdFk:"",page:1,limit:20},busTypes:[],list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,idQuery:{id:""},distributionSetVisible:!1,distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeDetailVisible:!1,qrcodeExportVisible:!1,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:4,startTime:"",endTime:"",page:1,limit:10},this.getList(),this.haveDistributionVisible=!0,this.actDateRange=[]},onSubmit:function(){null!==this.actDateRange?(this.query.startTime=this.actDateRange[0],this.query.endTime=this.actDateRange[1]):(this.query.startTime=null,this.query.endTime=null),this.getList(),"202"===this.query.status||"502"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,t.detailList=[]})).catch((function(){t.loading=!1,t.list=[],t.total=0,t.detailList=[]}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},qrcodeDetail:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeDetailVisible=!0)},closeQRCodeDetailDialog:function(){this.qrcodeDetailVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockOrderEditDistribution:lu,stockOrderQRCodeDetail:Cc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验",4:"已校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},vu=bu,wu=Object(g["a"])(vu,gu,yu,!1,null,"976b7dda",null),xu=wu.exports,Du=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search",loading:t.loading},on:{click:function(e){return t.newDistributionForm()}}},[t._v("\n 新增订单\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate",width:"150","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.billdate.slice(0,10))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"单据状态",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类别",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.haveNewDistributionVisible?t._e():a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.newDistributionForm(e.$index,e.row)}}},[t._v("编辑\n ")]),t.haveNewDistributionVisible?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.repealSubmit(e.row)}}},[t._v("撤销提交\n ")]):t._e(),t.haveNewDistributionVisible?t._e():a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",width:"150",prop:"productName"}}),a("el-table-column",{attrs:{label:"规格型号",width:"150",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",width:"150",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",width:"150",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",width:"150",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"单据数量",width:"150",prop:"count"}}),a("el-table-column",{attrs:{label:"实际数量",width:"150",prop:"reCount"}}),a("el-table-column",{attrs:{label:"价格",width:"150",prop:"price"}}),a("el-table-column",{attrs:{label:"生产厂家",width:"150",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",width:"150",prop:"zczbhhzbapzbh"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return t.haveNewDistributionVisible?void 0:[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleDetailForm(e.$index,e.row)}}},[t._v("编辑\n ")])]}}],null,!0)})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.newDistributionVisible?a("el-dialog",{attrs:{title:"编辑",visible:t.newDistributionVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.handleClose},on:{"update:visible":function(e){t.newDistributionVisible=e},close:t.closeDialog}},[a("stockOrderNewDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery,closeConfirmFunction:t.closeConfirmFunction}})],1):t._e(),t.newSpDistributionVisible?a("el-dialog",{attrs:{title:"编辑",visible:t.newSpDistributionVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":t.handleClose},on:{"update:visible":function(e){t.newSpDistributionVisible=e},close:t.closeDialog}},[a("stockHospOrderNew",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery,closeConfirmFunction:t.closeConfirmFunction}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,width:"85%",top:"5vh","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据状态:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.statusMap[t.formData.status],callback:function(e){t.$set(t.statusMap,t.formData.status,e)},expression:"statusMap[formData.status]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类别:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.typeMap[t.formData.type],callback:function(e){t.$set(t.typeMap,t.formData.type,e)},expression:"typeMap[formData.type]"}})],1)],1)],1),a("el-divider"),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("规格型号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",placeholder:"请选择失效日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("价格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.price,callback:function(e){t.$set(t.detailFormData,"price",e)},expression:"detailFormData.price"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1)],1)},Cu=[],ku=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-button-group",{staticStyle:{display:"flex","margin-bottom":"15px","margin-right":"50px"}},[a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("1")}}},[t._v("草稿保存\n ")]),a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("2")}}},[t._v("未配货提交\n ")]),a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("3")}}},[t._v("已配货提交\n ")])],1)],1),a("el-card",{staticStyle:{"margin-top":"-5px"}},[a("el-row",{staticStyle:{"margin-top":"10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期",clearable:!1},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1)],1)],1),a("el-card",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0px 60px 10px auto",height:"35px"},attrs:{type:"primary",size:"small",loading:t.loading},nativeOn:{click:function(e){return e.stopPropagation(),t.selectProductFunction()}}},[t._v("产品录入\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码录入:")])])]),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",attrs:{"auto-complete":"off"},on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectProductFunction(e)}},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"row-class-name":t.tableRowClassName,"max-height":"300",height:"300"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{width:"150",label:"产品通用名",prop:"productName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"批次号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{ref:"inputBatchNoRef",staticStyle:{width:"80%"},attrs:{size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入批次号"},model:{value:e.row.batchNo,callback:function(a){t.$set(e.row,"batchNo",a)},expression:"scope.row.batchNo"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"生产日期1"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请选择生产日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:e.row.productDate,callback:function(a){t.$set(e.row,"productDate",a)},expression:"scope.row.productDate"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"失效日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入失效日期"},model:{value:e.row.expireDate,callback:function(a){t.$set(e.row,"expireDate",a)},expression:"scope.row.expireDate"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"单据数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入数量",type:"number",disabled:e.row.index!==t.selectedIndex,oninput:"value=value.replace(/[^\\d]/g,'')"},on:{change:function(a){return t.tableCountChange(e.row)}},model:{value:e.row.count,callback:function(a){t.$set(e.row,"count",a)},expression:"scope.row.count"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"实际数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入数量",type:"number",disabled:e.row.index!==t.selectedIndex,oninput:"value=value.replace(/[^\\d]/g,'')"},on:{change:function(a){return t.tableCountChange(e.row)}},model:{value:e.row.reCount,callback:function(a){t.$set(e.row,"reCount",a)},expression:"scope.row.reCount"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",type:"number",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入价格"},model:{value:e.row.price,callback:function(a){t.$set(e.row,"price",a)},expression:"scope.row.price"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"注册/备案凭证号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"生产厂家",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:e.row.index===t.selectedIndex},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.rowChange(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.copyDetail(e.row)}}},[t._v("复制\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.deleteCodeArray(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1)],1)],1),t.selectProductVisible?a("el-dialog",{attrs:{title:"产品录入",visible:t.selectProductVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%","append-to-body":!0},on:{"update:visible":function(e){t.selectProductVisible=e}}},[a("stockOrderNewSelectProduct",{attrs:{closeDialog:t.closeDialogC2,data:t.thisData}})],1):t._e()],1)},Qu=[],Su={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0},closeConfirmFunction:{type:Function,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{corpName:[{required:!0,message:"请输入供应商",trigger:"blur"}],billdate:[{required:!0,message:"请输入单据日期",trigger:"blur"}],billType:[{required:!0,message:"请选择业务类型",trigger:"blur"}]},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},typeMap:{1:"预入库",2:"普通采购"},orderEditor:!0,iCount:0,sOptions:[],sValue:[],sList:[],sLoading:!1,busTypes:[],currentRow:{},selectedIndex:"",selectProductVisible:!1,thisData:{}}},components:{draggable:We.a,stockOrderNewSelectProduct:tu},methods:{saveOrder:function(t){var e=this;this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.$refs["dataForm"].validate((function(a){if(a){if(e.codeArray.length<1)return void e.$message.warning("未添加产品");for(var i=0;i<e.codeArray.length;i++){if(e.$isBlank(e.codeArray[i].batchNo))return e.$message.error("批次号不能为空");if(e.$isBlank(e.codeArray[i].productDate))return e.$message.error("生产日期不能为空");if(e.$isBlank(e.codeArray[i].expireDate))return e.$message.error("失效日期不能为空")}if("501"===t)e.submitFunction(t);else if("1"==t)e.submitFunction(t);else{var l="是否确定提交订单?";"2"==t?l="是否确定提交单据为未配货?":"3"==t&&(l="是否确定提交单据为已配货?"),e.$confirm(l,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.submitFunction(t)})).catch((function(){e.loading=!1}))}}}))},submitFunction:function(t){var e=this,a="501"===t?"保存":"提交";this.loading=!0;var i=this.formData;i.status=t,i.subErpOrders=this.codeArray,"3"==t&&i.subErpOrders.forEach((function(t){t.reCount=t.count,console.log(t.reCount)})),console.log(i),br(i).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(a+"成功"),e.closeDialog(!0)):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},submit:function(t){var e=this;this.total<1?this.$message.warning("未添加产品"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},selectProductFunction:function(t){var e=this;if(null==t?this.$refs.inputRef.focus():t.target.select(),this.$isBlank(t))return this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.thisData.code="",this.thisData.orderEditor=this.orderEditor,this.thisData.orderId="",this.orderEditor&&(this.thisData.orderId=this.formData.id),void(this.selectProductVisible=!0);if(this.code=this.code.trim(),this.code.length>13){var a=this.code.substring(0,2);a=a.replace("m","M"),a=a.replace("a","A"),-1!==a.indexOf("MA")&&(this.code=a+this.code.substring(2,this.code.length))}this.loading=!0;var i={code:this.code,customerId:L["a"].getters.customerId};Or(i).then((function(a){if(e.loading=!1,console.log(a),2e4===a.code)if("1"===a.data.getType){e.loading=!0;var i=[a.data.getId],l={ids:i,udiEntity:a.data};Tr(l).then((function(t){e.loading=!1,2e4===t.code?e.closeDialogC2(t.data):e.$message.error(t.message)})).catch((function(){e.loading=!1}))}else e.thisData=a.data,e.thisData.code=e.code,e.thisData.orderEditor=e.orderEditor,e.thisData.orderId="",e.orderEditor&&(e.thisData.orderId=e.formData.id),e.selectProductVisible=!0;else e.$message.warning(a.message),e.focusNext("inputRef"),e.$isNotBlank(t)&&t.target.select()}))},closeDialogC2:function(t){var e=this;if(this.selectProductVisible=!1,this.thisData={},this.$isNotBlank(t)){console.log(t);for(var a=0;a<this.codeArray.length;a++){var i=this.codeArray[a];if(i.batchNo==t[0].batchNo)return void(i.count=parseInt(i.count)+parseInt(this.iCount))}t.forEach((function(t,a){0===e.codeArray.length?e.codeArray.push(t):e.codeArray.unshift(t)})),this.$refs.multipleTable.setCurrentRow(this.codeArray[0]),this.currentRow=this.codeArray[0],this.selectedIndex=0,this.focusNext("iCount"),this.closeConfirmFunction(!0)}},rowChange:function(t){this.currentRow=t,this.selectedIndex=t.index,this.iCount=t.count,this.focusNext("iCount")},iCountChange:function(){},iCountEnterFunction:function(){this.$isNotBlank(this.currentRow)&&(this.currentRow.count=this.iCount),this.focusNext("inputRef")},tableCountChange:function(t){this.$isNotBlank(t)},tableRowClassName:function(t){var e=t.row,a=t.rowIndex;e.index=a},focusNext:function(t){this.$refs[t].focus()},focusNextToTable:function(t){this.$refs[t][0].focus()},remoteMethod:function(t){var e=this;if(""!==t){this.sLoading=!0;var a={key:t,page:1,limit:20};Object(Yt["g"])(a).then((function(t){console.log(t),e.sLoading=!1,e.sOptions=t.data.list})).catch((function(){e.sLoading=!1,e.sOptions=[]}))}else this.sOptions=[]},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),this.$isBlank(this.code))this.$message.warning("请输入条码");else if(this.iCount<=0)this.$message.warning("请输入数量");else{this.loading=!0;var e={orderId:this.formData.id,count:this.iCount,code:this.code};this.orderEditor?Lr(e).then((function(e){t.loading=!1,2e4===e.code?t.getStockOrderDetailList():t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})})):$r(e).then((function(e){if(t.loading=!1,2e4===e.code){for(var a=0;a<t.codeArray.length;a++){if(t.codeArray[a].productId===e.data.productId){t.$alert("已添加","提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}});break}a+1===t.codeArray.length&&t.codeArray.push(e.data)}0===t.codeArray.length&&t.codeArray.push(e.data)}else t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},saveCodeArray:function(t,e){var a=this;if(this.$isBlank(e.batchNo))return this.$message.error("批次号不能为空");if(this.$isBlank(e.productDate))return this.$message.error("生产日期不能为空");if(this.$isBlank(e.expireDate))return this.$message.error("失效日期不能为空");this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.detailLoading=!0;var i=e;Ir(i).then((function(t){a.detailLoading=!1,2e4===t.code?(a.$message.success("修改完成"),a.getStockOrderDetailList(),a.$refs.inputRef.focus()):a.$message.error(t.message)}))},deleteCodeArray:function(t,e){var a=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$refs.multipleTable.setCurrentRow(),a.currentRow={},a.selectedIndex="",a.iCount=0,a.orderEditor?(a.detailLoading=!0,a.$isNotBlank(e.id)?xr({id:e.id}).then((function(e){a.detailLoading=!1,2e4===e.code?(a.$message.success(e.data),a.codeArray.splice(t,1)):a.$message.error(e.message)})).catch((function(){a.detailLoading=!1})):(a.$message.success("删除成功"),a.codeArray.splice(t,1))):(a.$message.success("删除成功"),a.codeArray.splice(t,1))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=JSON.parse(JSON.stringify(t));a.id=null,0===e.codeArray.length?(e.codeArray.push(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0):(e.codeArray.unshift(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0),e.$message.success("复制成功"),e.iCount=e.currentRow.count,e.focusNext("iCount")})).catch((function(){}))},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,gr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},generateBillNo:function(){var t=this,e={action:this.formData.billType};this.loading=!0,qr(e).then((function(e){t.loading=!1,2e4===e.code?(t.formData.billNo=e.data,t.formData.billdate=new Date):t.closeDialog(!0)}))},getBusType:function(){var t=this,e={enabled:!0};Br(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.closeConfirmFunction(!1),this.$isNotBlank(this.idQuery.id)?(this.query.limit=100,this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.orderEditor=!0,this.sValue=this.formData.corpName,this.getStockOrderDetailList()):(this.formData={billdate:"",corpName:L["a"].getters.companyName,customerId:L["a"].getters.customerId,billType:"",type:"2"},this.iCount=0,this.orderEditor=!1,this.generateBillNo())}},_u=Su,$u=(a("c7c8"),Object(g["a"])(_u,ku,Qu,!1,null,null,null)),Tu=$u.exports,Lu=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-button-group",{staticStyle:{display:"flex","margin-bottom":"15px","margin-right":"50px"}},[a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("1")}}},[t._v("草稿保存\n ")]),a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("2")}}},[t._v("未配货提交\n ")]),a("el-button",{attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.saveOrder("3")}}},[t._v("已配货提交\n ")])],1)],1),a("el-card",{staticStyle:{"margin-top":"-5px"}},[a("el-row",{staticStyle:{"margin-top":"10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"date",placeholder:"选择日期",clearable:!1},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1)],1),a("el-row",{staticStyle:{"margin-top":"-10px"},attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"请输入企业名称","remote-method":t.findMethod,size:"small",loading:t.loading},on:{change:t.selectOne},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)],1)],1)],1),a("el-card",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"0px 60px 10px auto",height:"35px"},attrs:{type:"primary",size:"small",loading:t.loading},nativeOn:{click:function(e){return e.stopPropagation(),t.selectProductFunction()}}},[t._v("产品录入\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码录入:")])])]),a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",attrs:{"auto-complete":"off"},on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.selectProductFunction(e)}},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"row-class-name":t.tableRowClassName,"max-height":"300",height:"300"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{width:"150",label:"产品通用名",prop:"productName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"批次号"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{ref:"inputBatchNoRef",staticStyle:{width:"80%"},attrs:{size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入批次号"},model:{value:e.row.batchNo,callback:function(a){t.$set(e.row,"batchNo",a)},expression:"scope.row.batchNo"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"生产日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请选择生产日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:e.row.productDate,callback:function(a){t.$set(e.row,"productDate",a)},expression:"scope.row.productDate"}})]}}])}),a("el-table-column",{attrs:{width:"180",label:"失效日期"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-date-picker",{staticStyle:{width:"80%"},attrs:{type:"date",size:"small",disabled:e.row.index!==t.selectedIndex,placeholder:"请选择失效日期","value-format":"yyMMdd",format:"yyyy-MM-dd"},model:{value:e.row.expireDate,callback:function(a){t.$set(e.row,"expireDate",a)},expression:"scope.row.expireDate"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"单据数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入数量",type:"number",disabled:e.row.index!==t.selectedIndex,oninput:"value=value.replace(/[^\\d]/g,'')"},on:{change:function(a){return t.tableCountChange(e.row)}},model:{value:e.row.count,callback:function(a){t.$set(e.row,"count",a)},expression:"scope.row.count"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"实际数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:"请输入数量",type:"number",disabled:e.row.index!==t.selectedIndex,oninput:"value=value.replace(/[^\\d]/g,'')"},on:{change:function(a){return t.tableCountChange(e.row)}},model:{value:e.row.reCount,callback:function(a){t.$set(e.row,"reCount",a)},expression:"scope.row.reCount"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",type:"number",disabled:e.row.index!==t.selectedIndex,placeholder:"请输入价格"},model:{value:e.row.price,callback:function(a){t.$set(e.row,"price",a)},expression:"scope.row.price"}})]}}])}),a("el-table-column",{attrs:{width:"150",label:"注册/备案凭证号",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"150",label:"生产厂家",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:e.row.index===t.selectedIndex},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.rowChange(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.copyDetail(e.row)}}},[t._v("复制\n ")]),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(t){return t.stopPropagation(),(!0).apply(null,arguments)}},nativeOn:{click:function(a){return t.deleteCodeArray(e.$index,e.row)}}},[t._v("删除\n ")])]}}])})],1)],1)],1),t.selectProductVisible?a("el-dialog",{attrs:{title:"产品录入",visible:t.selectProductVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%","append-to-body":!0},on:{"update:visible":function(e){t.selectProductVisible=e}}},[a("stockOrderNewSelectProduct",{attrs:{closeDialog:t.closeDialogC2,data:t.thisData}})],1):t._e()],1)},Ou=[],zu={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0},closeConfirmFunction:{type:Function,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{corpName:[{required:!0,message:"请输入供应商",trigger:"blur"}],billdate:[{required:!0,message:"请输入单据日期",trigger:"blur"}],billType:[{required:!0,message:"请选择业务类型",trigger:"blur"}]},codeArray:[],fromOptions:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},typeMap:{1:"预入库",2:"普通采购"},orderEditor:!0,iCount:0,sOptions:[],sValue:[],sList:[],sLoading:!1,busTypes:[],currentRow:{},selectedIndex:"",selectProductVisible:!1,thisData:{}}},components:{draggable:We.a,stockOrderNewSelectProduct:tu},methods:{saveOrder:function(t){var e=this;this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.$refs["dataForm"].validate((function(a){if(a){if(e.codeArray.length<1)return void e.$message.warning("未添加产品");for(var i=0;i<e.codeArray.length;i++){if(e.$isBlank(e.codeArray[i].batchNo))return e.$message.error("批次号不能为空");if(e.$isBlank(e.codeArray[i].productDate))return e.$message.error("生产日期不能为空");if(e.$isBlank(e.codeArray[i].expireDate))return e.$message.error("失效日期不能为空")}if("501"===t)e.submitFunction(t);else if("1"==t)e.submitFunction(t);else{var l="是否确定提交订单?";"2"==t?l="是否确定提交单据为未配货?":"3"==t&&(l="是否确定提交单据为已配货?"),e.$confirm(l,"提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.submitFunction(t)})).catch((function(){e.loading=!1}))}}}))},submitFunction:function(t){var e=this,a="501"===t?"保存":"提交";this.loading=!0;var i=this.formData;i.status=t,i.subErpOrders=this.codeArray,"3"==t&&i.subErpOrders.forEach((function(t){t.reCount=t.count,console.log(t.reCount)})),console.log(i),br(i).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(a+"成功"),e.closeDialog(!0)):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},submit:function(t){var e=this;this.total<1?this.$message.warning("未添加产品"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},selectProductFunction:function(t){var e=this;if(null==t?this.$refs.inputRef.focus():t.target.select(),this.$isBlank(t))return this.code="",this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.thisData.code="",this.thisData.orderEditor=this.orderEditor,this.thisData.orderId="",this.orderEditor&&(this.thisData.orderId=this.formData.id),void(this.selectProductVisible=!0);if(this.code=this.code.trim(),this.code.length>13){var a=this.code.substring(0,2);a=a.replace("m","M"),a=a.replace("a","A"),-1!==a.indexOf("MA")&&(this.code=a+this.code.substring(2,this.code.length))}this.loading=!0;var i={code:this.code,customerId:L["a"].getters.customerId};Or(i).then((function(a){if(e.loading=!1,console.log(a),2e4===a.code)if("1"===a.data.getType){e.loading=!0;var i=[a.data.getId],l={ids:i,udiEntity:a.data};Tr(l).then((function(t){e.loading=!1,2e4===t.code?e.closeDialogC2(t.data):e.$message.error(t.message)})).catch((function(){e.loading=!1}))}else e.thisData=a.data,e.thisData.code=e.code,e.thisData.orderEditor=e.orderEditor,e.thisData.orderId="",e.orderEditor&&(e.thisData.orderId=e.formData.id),e.selectProductVisible=!0;else e.$message.warning(a.message),e.focusNext("inputRef"),e.$isNotBlank(t)&&t.target.select()}))},closeDialogC2:function(t){var e=this;if(this.selectProductVisible=!1,this.thisData={},this.$isNotBlank(t)){console.log(t);for(var a=0;a<this.codeArray.length;a++){var i=this.codeArray[a];if(i.batchNo==t[0].batchNo)return void(i.count=parseInt(i.count)+parseInt(this.iCount))}t.forEach((function(t,a){0===e.codeArray.length?e.codeArray.push(t):e.codeArray.unshift(t)})),this.$refs.multipleTable.setCurrentRow(this.codeArray[0]),this.currentRow=this.codeArray[0],this.selectedIndex=0,this.focusNext("iCount"),this.closeConfirmFunction(!0)}},rowChange:function(t){this.currentRow=t,this.selectedIndex=t.index,this.iCount=t.count,this.focusNext("iCount")},iCountChange:function(){},iCountEnterFunction:function(){this.$isNotBlank(this.currentRow)&&(this.currentRow.count=this.iCount),this.focusNext("inputRef")},tableCountChange:function(t){this.$isNotBlank(t)},tableRowClassName:function(t){var e=t.row,a=t.rowIndex;e.index=a},focusNext:function(t){this.$refs[t].focus()},focusNextToTable:function(t){this.$refs[t][0].focus()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),this.$isBlank(this.code))this.$message.warning("请输入条码");else if(this.iCount<=0)this.$message.warning("请输入数量");else{this.loading=!0;var e={orderId:this.formData.id,count:this.iCount,code:this.code};this.orderEditor?Lr(e).then((function(e){t.loading=!1,2e4===e.code?t.getStockOrderDetailList():t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})})):$r(e).then((function(e){if(t.loading=!1,2e4===e.code){for(var a=0;a<t.codeArray.length;a++){if(t.codeArray[a].productId===e.data.productId){t.$alert("已添加","提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}});break}a+1===t.codeArray.length&&t.codeArray.push(e.data)}0===t.codeArray.length&&t.codeArray.push(e.data)}else t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},saveCodeArray:function(t,e){var a=this;if(this.$isBlank(e.batchNo))return this.$message.error("批次号不能为空");if(this.$isBlank(e.productDate))return this.$message.error("生产日期不能为空");if(this.$isBlank(e.expireDate))return this.$message.error("失效日期不能为空");this.$refs.multipleTable.setCurrentRow(),this.currentRow={},this.selectedIndex="",this.iCount=0,this.detailLoading=!0;var i=e;Ir(i).then((function(t){a.detailLoading=!1,2e4===t.code?(a.$message.success("修改完成"),a.getStockOrderDetailList(),a.$refs.inputRef.focus()):a.$message.error(t.message)}))},deleteCodeArray:function(t,e){var a=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$refs.multipleTable.setCurrentRow(),a.currentRow={},a.selectedIndex="",a.iCount=0,a.orderEditor?(a.detailLoading=!0,a.$isNotBlank(e.id)?xr({id:e.id}).then((function(e){a.detailLoading=!1,2e4===e.code?(a.$message.success(e.data),a.codeArray.splice(t,1)):a.$message.error(e.message)})).catch((function(){a.detailLoading=!1})):(a.$message.success("删除成功"),a.codeArray.splice(t,1))):(a.$message.success("删除成功"),a.codeArray.splice(t,1))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a=JSON.parse(JSON.stringify(t));a.id=null,0===e.codeArray.length?(e.codeArray.push(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0):(e.codeArray.unshift(a),e.$refs.multipleTable.setCurrentRow(e.codeArray[0]),e.currentRow=e.codeArray[0],e.selectedIndex=0),e.$message.success("复制成功"),e.iCount=e.currentRow.count,e.focusNext("iCount")})).catch((function(){}))},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,gr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},generateBillNo:function(){var t=this,e={action:this.formData.billType};this.loading=!0,qr(e).then((function(e){t.loading=!1,2e4===e.code?(t.formData.billNo=e.data,t.formData.billdate=new Date):t.closeDialog(!0)}))},getBusType:function(){var t=this,e={enabled:!0};Br(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))},selectOne:function(t){this.formData.corpName=t.name,this.formData.corpId=t.erpId,this.formData.unitIdFk=t.erpId,console.log("this.inputQuery.companyId"+t.erpId)},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.closeConfirmFunction(!1),this.$isNotBlank(this.idQuery.id)?(this.query.limit=100,this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.orderEditor=!0,this.sValue=this.formData.corpName,this.getStockOrderDetailList()):(this.formData={billdate:"",customerId:L["a"].getters.customerId,billType:"",type:"2"},this.iCount=0,this.orderEditor=!1,this.generateBillNo())}},Iu=zu,Nu=(a("3ea7"),Object(g["a"])(Iu,Lu,Ou,!1,null,null,null)),Fu=Nu.exports,qu={name:"stockOrder",data:function(){return{query:{billNo:"",status:"1",page:1,limit:20,startTime:"",endTime:""},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,formData:{},statusMap:{1:"草稿",2:"未配货",3:"待校验"},sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},typeMap:{1:"预入库",2:"普通采购"},idQuery:{id:""},newDistributionVisible:!1,newSpDistributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},busTypes:[],detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveNewDistributionVisible:!1,qrcodeExportVisible:!1,filterUDIType:!1,closeConfirm:!1,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"1",startTime:"",endTime:"",page:1,limit:20},this.getList(),this.haveNewDistributionVisible=!1,this.actDateRange=[]},onSubmit:function(){null!==this.actDateRange?(this.query.startTime=this.actDateRange[0],this.query.endTime=this.actDateRange[1]):(this.query.startTime=null,this.query.endTime=null),this.getList(),"502"===this.query.status?this.haveNewDistributionVisible=!0:this.haveNewDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0,t.detailList=[]})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},newDistributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e)&&this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e),110==L["a"].getters.customerId?this.newSpDistributionVisible=!0:this.newDistributionVisible=!0},closeDialog:function(t){this.newDistributionVisible=!1,this.newSpDistributionVisible=!1,this.getList(),this.detailList=[]},closeConfirmFunction:function(t){this.$isNotBlank(t)&&t&&(this.closeConfirm=t)},handleClose:function(t){var e=this;this.closeConfirm?this.$confirm("数据未保存,确认关闭?").then((function(a){e.closeConfirm=!1,t()})).catch((function(t){})):(this.newDistributionVisible=!1,this.newSpDistributionVisible=!1)},exportQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id,this.formData=t),this.detailLoading=!0,gr(this.detailQuery).then((function(t){e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},repealSubmit:function(t){var e=this;this.$confirm("是否撤销提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.loading=!0,Qr(a).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("撤销成功"),e.getList(),e.detailList=[]):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetailTemp:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,Dr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderNewDistribution:Tu,stockHospOrderNew:Fu},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},Vu=qu,Ru=Object(g["a"])(Vu,Du,Cu,!1,null,"b7883228",null),Eu=Ru.exports,ju=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",{staticStyle:{width:"100%"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据来源",prop:"sourceType",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.sourceMap[e.row.sourceType]))])]}}])}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.backOrder(e.row)}}},[t._v("撤回配货\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList,"highlight-current-row":""}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",width:"150",prop:"productName"}}),a("el-table-column",{attrs:{label:"规格型号",width:"150",prop:"spec"}}),a("el-table-column",{attrs:{label:"批次号",width:"150",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",width:"150",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",width:"150",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"实际数量",width:"150",prop:"reCount"}}),a("el-table-column",{attrs:{label:"单据数量",width:"150",prop:"count"}}),a("el-table-column",{attrs:{label:"价格",width:"150",prop:"price"}}),a("el-table-column",{attrs:{label:"生产厂家",width:"150",prop:"ylqxzcrbarmc"}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",width:"150",prop:"zczbhhzbapzbh"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1),t.qrcodeDetailVisible?a("el-dialog",{attrs:{title:"码详情",visible:t.qrcodeDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.qrcodeDetailVisible=e},close:t.closeQRCodeDetailDialog}},[a("stockOrderQRCodeDetail",{attrs:{closeDialog:t.closeQRCodeDetailDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,width:"80%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e()],1)},Pu=[],Bu={name:"stockOrderWaitCheck",data:function(){return{query:{billNo:"",status:"3",page:1,limit:10,startTime:"",endTime:""},detailQuery:{orderIdFk:"",page:1,limit:20},busTypes:[],list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,sourceMap:{1:"网页新增",2:"第三方系统",3:"扫码单据"},idQuery:{id:""},distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeDetailVisible:!1,qrcodeExportVisible:!1,filterUDIType:!0,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"3",page:1,limit:10,startTime:"",endTime:""},this.getList(),this.detailList=[],this.haveDistributionVisible=!0,this.actDateRange=[]},onSubmit:function(){this.getList(),"202"===this.query.status||"502"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},backOrder:function(t){var e=this,a={id:t.id,status:"2"};kr(a).then((function(t){e.getList(),e.loading=!1,e.detailList=[]})).catch((function(){e.loading=!1}))},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},qrcodeDetail:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeDetailVisible=!0)},closeQRCodeDetailDialog:function(){this.qrcodeDetailVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},generateQRCodeText:function(t,e){var a=this,i=[];if(1===e){var l=this.$refs.multipleTable.selection;if(l.length<1)return void this.$message.error("未选择订单");l.forEach((function(t,e){i.push(t.id)}))}else i=[t.id];this.$confirm("确定生成条码?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={};t.ids=i,t.filterUDIType=a.filterUDIType,a.loading=!0,Fr(t).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success(t.data),a.getList(),a.detailList=[]):a.$message.error(t.message)})).catch((function(){a.loading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockOrderQRCodeDetail:Cc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getList()}},Uu=Bu,Au=Object(g["a"])(Uu,ju,Pu,!1,null,"4d57e9c6",null),Mu=Au.exports,Wu=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%",height:"350px"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo",width:"250"}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName",width:"250"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate",width:"100"}}),a("el-table-column",{attrs:{label:"单据状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),"401"===t.query.status?a("el-table-column",{attrs:{label:"异常信息",prop:"statusInfo"}}):t._e(),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.againSubmit(e.row)}}},[t._v("重新提交\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.errorDistributionForm(e.$index,e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t.errorDistributionVisible?a("el-dialog",{attrs:{title:"编辑",visible:t.errorDistributionVisible,width:"60%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.errorDistributionVisible=e},close:t.closeDialog}},[a("stockOrderErrorDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e()],1)},Hu=[],Ku=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submit("0")}}},[t._v("提交\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据状态:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.statusMap[t.formData.status],callback:function(e){t.$set(t.statusMap,t.formData.status,e)},expression:"statusMap[formData.status]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.typeMap[t.formData.type],callback:function(e){t.$set(t.typeMap,t.formData.type,e)},expression:"typeMap[formData.type]"}})],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"sweepCount","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"50"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrderDetailTemp(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},Ju=[],Gu={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{temp:[{required:!0,message:"请输入条码",trigger:"blur"}]},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},typeMap:{1:"预入库",2:"普通采购"},busTypes:[]}},components:{draggable:We.a},methods:{submit:function(t){var e=this;this.total<1?this.$message.error("空单据"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Sr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),!this.$isBlank(this.code)){this.loading=!0;var e={orderId:this.idQuery.id,code:this.code};_r(e).then((function(e){t.loading=!1,2e4===e.code?(t.idQuery.id=e.data,t.getStockOrderDetailTempList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailTempList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailTempList()},getStockOrderDetailTempList:function(){var t=this;this.loading=!0,yr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteStockOrderDetailTemp:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Dr({id:t.id}).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailTempList()):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},intentBack:function(){this.$router.go(-1)},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.$isNotBlank(this.idQuery.id)&&(this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.getStockOrderDetailTempList())}},Xu=Gu,Yu=(a("74e7"),Object(g["a"])(Xu,Ku,Ju,!1,null,null,null)),Zu=Yu.exports,td={name:"stockOrderError",data:function(){return{query:{billNo:"",status:"401",page:1,limit:20},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,idQuery:{id:""},errorDistributionVisible:!1,rowStatus:"",detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,busTypes:[]}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"201",page:1,limit:20},this.getList(),this.detailList=[]},onSubmit:function(){this.getList(),this.detailList=[]},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},errorDistributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.errorDistributionVisible=!0)},againSubmit:function(t){var e=this;this.$confirm("是否重新提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.loading=!0,Sr(a).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.getList()):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},closeDialog:function(t){this.errorDistributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},getStockOrderDetailList:function(t){},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){wr({id:t.id}).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){e.detailLoading=!1}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){xr({id:t.id}).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderErrorDistribution:Zu},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType(),this.getList()}},ed=td,ad=Object(g["a"])(ed,Wu,Hu,!1,null,"527601c4",null),id=(ad.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"配货状态"},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},[a("el-option",{attrs:{label:"已配货",value:"202"}}),a("el-option",{attrs:{label:"新增提交",value:"502"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%",height:"250px"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"打印状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s("102"===e.row.printStatus?"已打印":"未打印")+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t.haveDistributionVisible?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printQRCodeText(e.row)}}},[t._v("打印码\n ")]):t._e(),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.printOrder(e.row)}}},[t._v("单据打印\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrderDetail(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec",width:"250"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo",width:"150"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate",width:"150"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate",width:"150"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"count",width:"150"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount",width:"150"}})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.distributionVisible?a("el-dialog",{attrs:{title:"配货",visible:t.distributionVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"60%"},on:{"update:visible":function(e){t.distributionVisible=e},close:t.closeDialog}},[a("stockOrderDistribution",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),t.qrcodeExportVisible?a("el-dialog",{attrs:{title:"码管理",visible:t.qrcodeExportVisible,width:"60%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.qrcodeExportVisible=e},close:t.closeQRCodeExportDialog}},[a("stockQRCodeExport",{attrs:{closeDialog:t.closeQRCodeExportDialog,idQuery:t.idQuery}})],1):t._e(),a("el-dialog",{attrs:{title:"编辑",visible:t.detailFormVisible,"before-close":t.hideDetailForm,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%",top:"5vh"},on:{"update:visible":function(e){t.detailFormVisible=e}}},[a("el-form",{ref:"dataForm",attrs:{model:t.detailFormData,rules:t.detailFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("产品通用名:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.productName,callback:function(e){t.$set(t.detailFormData,"productName",e)},expression:"detailFormData.productName"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("包装规格:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"spec"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.spec,callback:function(e){t.$set(t.detailFormData,"spec",e)},expression:"detailFormData.spec"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"count"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.count,callback:function(e){t.$set(t.detailFormData,"count",e)},expression:"detailFormData.count"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("实际数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"reCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.detailFormData.reCount,callback:function(e){t.$set(t.detailFormData,"reCount",e)},expression:"detailFormData.reCount"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("生产日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"productDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.productDate,callback:function(e){t.$set(t.detailFormData,"productDate",e)},expression:"detailFormData.productDate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("失效日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"expireDate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.expireDate,callback:function(e){t.$set(t.detailFormData,"expireDate",e)},expression:"detailFormData.expireDate"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("批次号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"batchNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1},model:{value:t.detailFormData.batchNo,callback:function(e){t.$set(t.detailFormData,"batchNo",e)},expression:"detailFormData.batchNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("扫码数量:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"sweepCount"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!1,oninput:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.detailFormData.sweepCount,callback:function(e){t.$set(t.detailFormData,"sweepCount",e)},expression:"detailFormData.sweepCount"}})],1)],1)],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{nativeOn:{click:function(e){return t.hideDetailForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",loading:t.detailFormLoading},nativeOn:{click:function(e){return t.submitUploadDetail()}}},[t._v("提交\n ")])],1)],1)],1)}),ld=[],sd={name:"stockOrder",data:function(){return{query:{billNo:"",status:"202",page:1,limit:20},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],detailList:[],total:0,busTypes:[],detailTotal:0,loading:!1,detailLoading:!1,idQuery:{id:""},distributionVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!0,qrcodeExportVisible:!1,filterUDIType:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"202",page:1,limit:20},this.getList(),this.detailList=[],this.haveDistributionVisible=!0},onSubmit:function(){this.getList(),this.detailList=[],"202"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,this.query.corpId=L["a"].getters.customerId,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.distributionVisible=!0)},closeDialog:function(t){this.distributionVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},printQRCodeText:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.qrcodeExportVisible=!0)},printOrder:function(t){var e=this,a={queryId:t.id};this.loading=!0,Ao(a).then((function(i){2e4===i.code?(a={id:t.id},Mo(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1}))):(e.loading=!1,e.$message.error(i.message))})).catch((function(){e.loading=!1}))},closeQRCodeExportDialog:function(){this.qrcodeExportVisible=!1,this.getList()},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},copyDetail:function(t){var e=this;this.$confirm("是否复制该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};e.detailLoading=!0,Nr(a).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success("复制成功"),e.getStockOrderDetailList()):e.$message.error(t.message)}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},generateQRCodeText:function(t,e){var a=this,i=[];if(1===e){var l=this.$refs.multipleTable.selection;if(l.length<1)return void this.$message.error("未选择订单");l.forEach((function(t,e){i.push(t.id)}))}else i=[t.id];this.$confirm("确定生成条码?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={};t.ids=i,t.filterUDIType=a.filterUDIType,a.loading=!0,Fr(t).then((function(t){a.loading=!1,2e4===t.code?(a.$message.success(t.data),a.getList(),a.detailList=[]):a.$message.error(t.message)})).catch((function(){a.loading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].localAction===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))}},components:{draggable:We.a,stockOrderDistribution:gc,stockQRCodeExport:Tc},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={1:"草稿",2:"未配货",3:"待校验"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType(),this.getList()}},od=sd,rd=Object(g["a"])(od,id,ld,!1,null,"b3fcff50",null),nd=(rd.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号"},model:{value:t.query.billNo,callback:function(e){t.$set(t.query,"billNo",e)},expression:"query.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"送货状态"},model:{value:t.query.status,callback:function(e){t.$set(t.query,"status",e)},expression:"query.status"}},[a("el-option",{attrs:{label:"未提交",value:"501"}}),a("el-option",{attrs:{label:"已提交",value:"502"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.addStockDeliveryOrder}},[t._v("新增")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%",height:"250px"},attrs:{data:t.list},on:{"row-click":t.getStockOrderDetailList}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo",width:"250"}}),a("el-table-column",{attrs:{label:"供应商名称",prop:"corpName",width:"250"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate",width:"100"}}),a("el-table-column",{attrs:{label:"单据状态",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("statusFilterName")(e.row.status))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"业务类型",prop:"billType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.billType)))])]}}])}),a("el-table-column",{attrs:{label:"采购类型",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilterName")(e.row.type))+"\n ")]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.submitStockDeliveryOrder(e.row)}}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.updateStockDeliveryOrder(e.row)}}},[t._v("编辑\n ")]),t.haveDistributionVisible?t._e():a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.deleteStockOrder(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.detailLoading,expression:"detailLoading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{type:"index",label:"序号",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"productName",width:"200"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec",width:"200"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo",width:"100"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate",width:"100"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate",width:"100"}}),a("el-table-column",{attrs:{label:"配货数量",prop:"count",width:"100"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount",width:"100"}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"sweepCount",width:"100"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){t.haveDistributionVisible}}],null,!0)})],1),a("el-pagination",{attrs:{"page-size":t.detailQuery.limit,layout:"prev, pager, next",total:t.detailTotal},on:{"current-change":t.detailHandleCurrentChange}})],1),t.deliveryAddVisible?a("el-dialog",{attrs:{title:"新增",visible:t.deliveryAddVisible,width:"60%"},on:{"update:visible":function(e){t.deliveryAddVisible=e},close:t.closeDialog}},[a("stockDeliveryAdd",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e()],1)}),cd=[],ud=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{ref:"dataForm",attrs:{model:t.formData,rules:t.formRules}},[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{staticStyle:{margin:"-50px 60px 10px auto",height:"35px"},attrs:{type:"primary",loading:t.loading},nativeOn:{click:function(e){return t.submit("0")}}},[t._v("提交\n ")])],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据号:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billNo"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billNo,callback:function(e){t.$set(t.formData,"billNo",e)},expression:"formData.billNo"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("供应商:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"corpName"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.corpName,callback:function(e){t.$set(t.formData,"corpName",e)},expression:"formData.corpName"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据日期:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billdate"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.formData.billdate,callback:function(e){t.$set(t.formData,"billdate",e)},expression:"formData.billdate"}})],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("单据状态:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"status"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.statusMap[t.formData.status],callback:function(e){t.$set(t.statusMap,t.formData.status,e)},expression:"statusMap[formData.status]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("业务类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"billType"}},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true",disabled:"true"},model:{value:t.formData.billType,callback:function(e){t.$set(t.formData,"billType",e)},expression:"formData.billType"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.localName,attrs:{label:e.localName,value:e.localAction}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.localName))])])})),1)],1)],1),a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("采购类型:")])])]),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{prop:"type"}},[a("el-input",{attrs:{"auto-complete":"off",disabled:!0},model:{value:t.typeMap[t.formData.type],callback:function(e){t.$set(t.typeMap,t.formData.type,e)},expression:"typeMap[formData.type]"}})],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:3}},[a("div",{staticClass:"ao-text"},[a("span",[t._v("条码:")])])]),a("el-col",{attrs:{span:15}},[a("el-form-item",{attrs:{prop:"code"}},[a("el-input",{ref:"inputRef",attrs:{"auto-complete":"off"},on:{focus:function(e){return t.getInputFocus(e)}},nativeOn:{keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.addCode()}},model:{value:t.code,callback:function(e){t.code=e},expression:"code"}})],1)],1),a("el-col",{attrs:{span:2}},[a("el-button",{staticStyle:{height:"31px","margin-left":"10px"},attrs:{type:"primary",size:"small"},nativeOn:{click:function(e){return e.stopPropagation(),t.addCode()}}},[t._v("添加\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.codeArray,"max-height":"350",height:"350"}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"50"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"productName","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"包装规格",prop:"spec","show-overflow-tooltip":"",width:"200"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"sweepCount","show-overflow-tooltip":""}})],1),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{layout:"prev, pager, next","page-size":t.query.limit,total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)],1)},dd=[],pd={name:"idQuery",props:{closeDialog:{type:Function,required:!0},idQuery:{type:Object,required:!0}},data:function(){return{code:"",query:{orderIdFk:"",page:1,limit:10},formData:{},formRules:{temp:[{required:!0,message:"请输入条码",trigger:"blur"}]},codeArray:[],total:0,loading:!1,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,statusMap:{101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"},busTypes:[],typeMap:{1:"预入库",2:"普通采购"}}},components:{draggable:We.a},methods:{submit:function(t){var e=this;this.total<1?this.$message.error("未配货"):this.$confirm("是否提交?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={id:e.idQuery.id};e.loading=!0,Cr(t).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success("提交成功"),e.closeDialog(!0)):e.$message.error(t.message)}))})).catch((function(){e.loading=!1}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},addCode:function(){var t=this;if(this.code=this.code.trim(),!this.$isBlank(this.code)){this.loading=!0;var e={orderId:this.idQuery.id,code:this.code};_r(e).then((function(e){t.loading=!1,2e4===e.code?(t.idQuery.id=e.data,t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}},getInputFocus:function(t){t.currentTarget.select()},tableSelection:function(){this.$refs.multipleTable.clearSelection(),this.$refs.multipleTable.toggleAllSelection()},handleSizeChange:function(t){this.query.limit=t,this.getStockOrderDetailList()},handleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},getStockOrderDetailList:function(){var t=this;this.loading=!0,gr(this.query).then((function(e){console.log(e),t.codeArray=e.data.list||[],t.total=e.data.total||0,t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},intentBack:function(){this.$router.go(-1)},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.formData={},this.codeArray=[],this.$isNotBlank(this.idQuery.id)&&(this.query.orderIdFk=this.idQuery.id,this.formData=this.idQuery.formData,this.getStockOrderDetailList())}},md=pd,hd=(a("88de"),Object(g["a"])(md,ud,dd,!1,null,null,null)),fd=hd.exports,gd={name:"stockOrder",data:function(){return{query:{billNo:"",status:"501",page:1,limit:20},detailQuery:{orderIdFk:"",page:1,limit:20},list:[],detailList:[],total:0,detailTotal:0,loading:!1,detailLoading:!1,idQuery:{id:""},deliveryAddVisible:!1,detailFormRules:{batchNo:[{required:!0,message:"请输入批次号",trigger:"blur"}],productDate:[{required:!0,message:"请输入生产日期",trigger:"blur"}],expireDate:[{required:!0,message:"请输入失效日期",trigger:"blur"}],sweepCount:[{required:!0,message:"请输入扫码数量",trigger:"blur"}]},detailFormVisible:!1,detailFormData:{},detailFormLoading:!1,haveDistributionVisible:!1,busTypes:[]}},methods:{onReset:function(){this.$router.push({path:""}),this.query={billNo:"",status:"501",page:1,limit:20},this.getList(),this.detailList=[],this.haveDistributionVisible=!1},onSubmit:function(){this.getList(),this.detailList=[],"501"===this.query.status?this.haveDistributionVisible=!0:this.haveDistributionVisible=!1},handleCurrentChange:function(t){this.query.page=t,this.getList()},detailHandleCurrentChange:function(t){this.query.page=t,this.getStockOrderDetailList()},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},getList:function(){var t=this;this.loading=!0,hr(this.query).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},distributionForm:function(t,e){this.idQuery.id="",this.$isNotBlank(e.id)&&(this.idQuery.id=e.id,this.idQuery.formData=e,this.deliveryAddVisible=!0)},closeDialog:function(t){this.deliveryAddVisible=!1,this.getList(),this.$isNotBlank(t)&&(this.detailList=[])},getStockOrderDetailList:function(t){var e=this;this.$isNotBlank(t)&&(this.detailQuery.orderIdFk=t.id),this.detailLoading=!0,gr(this.detailQuery).then((function(t){console.log(t),e.detailLoading=!1,e.detailList=t.data.list||[]})).catch((function(){e.detailLoading=!1,e.detailList=[]}))},addStockDeliveryOrder:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id,this.idQuery.formData=t,this.deliveryAddVisible=!0)},submitStockDeliveryOrder:function(t){},updateStockDeliveryOrder:function(t){},deleteStockOrder:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.loading=!0,vr({id:t.id}).then((function(t){e.loading=!1,2e4===t.code?(e.$message.success(t.data),e.getList(),e.detailList=[]):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},deleteStockOrderDetail:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.detailLoading=!0,xr({id:t.id}).then((function(t){e.detailLoading=!1,2e4===t.code?(e.$message.success(t.data),e.getStockOrderDetailList()):e.$message.error(t.message)})).catch((function(){e.detailLoading=!1}))})).catch((function(){}))},handleDetailForm:function(t,e){this.detailFormVisible=!0,this.detailFormData={},null!==e&&(this.detailFormData=Object.assign({},e))},hideDetailForm:function(){return this.detailFormVisible=!this.detailFormVisible,!0},submitUploadDetail:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.detailLoading=!0;var a=t.detailFormData;Ir(a).then((function(e){t.detailLoading=!1,2e4===e.code?(t.$message.success("修改完成"),t.hideDetailForm(),t.getStockOrderDetailList()):t.$alert(e.message,"提示",{confirmButtonText:"确定",type:"warning",closeOnClickModal:!0,callback:function(e){t.$refs.inputRef.focus()}})}))}}))},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},components:{draggable:We.a,stockDeliveryAdd:fd},filters:{statusFilterType:function(t){var e={0:"gray",1:"success"};return e[t]},statusFilterName:function(t){var e={101:"未处理",102:"已处理",201:"未配货",202:"已配货",301:"已打印",401:"异常",501:"未提交",502:"已提交"};return e[t]},typeFilterName:function(t){var e={1:"预入库",2:"普通采购"};return e[t]}},created:function(){this.getBusType(),this.getList()}},yd=gd,bd=Object(g["a"])(yd,nd,cd,!1,null,"0d21b54a",null),vd=(bd.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"业务类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.filterQuery.enabled,callback:function(e){t.$set(t.filterQuery,"enabled",e)},expression:"filterQuery.enabled"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"已启用",value:"1"}}),a("el-option",{attrs:{label:"未启用",value:"0"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{"margin-left":"10px",display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入单据类型")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"120",fixed:""}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"name",fixed:""}}),a("el-table-column",{attrs:{label:"扫码单据类型代码",prop:"action",fixed:""}}),a("el-table-column",{attrs:{label:"是否启用",prop:"enable",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.enable]))])]}}])}),a("el-table-column",{attrs:{label:"必须选择业务单据校验",prop:"checkEnable",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.checkEnable]))])]}}])}),a("el-table-column",{attrs:{label:"二次核对",prop:"secCheckEnable",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.secCheckEnable]))])]}}])}),a("el-table-column",{attrs:{label:"校验业务单据",prop:"localName",fixed:""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")])]}}])})],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"新增业务类型关联",visible:t.addDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("modifyDialog",{attrs:{inputQuery:t.inputQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onAddSubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),t.modifyDialogVisible?a("el-dialog",{attrs:{title:"编辑扫码单据类型",visible:t.modifyDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.modifyDialogVisible=e}}},[a("modifyDialog",{attrs:{inputQuery:t.inputQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onModifySubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)}),wd=[],xd=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("扫码单据类型: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.inputQuery.name,callback:function(e){t.$set(t.inputQuery,"name",e)},expression:"inputQuery.name"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("单据类型代码: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.action,callback:function(e){t.$set(t.inputQuery,"action",e)},expression:"inputQuery.action"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("出入库类型代码: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.mainAction,callback:function(e){t.$set(t.inputQuery,"mainAction",e)},expression:"inputQuery.mainAction"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("本地业务单据: ")])]),a("el-select",{attrs:{placeholder:"请选择"},model:{value:t.inputQuery.localAction,callback:function(e){t.$set(t.inputQuery,"localAction",e)},expression:"inputQuery.localAction"}},t._l(t.localTypes,(function(e){return a("el-option",{key:e.action,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.action))])])})),1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:24}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("备注: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.remark,callback:function(e){t.$set(t.inputQuery,"remark",e)},expression:"inputQuery.remark"}})],1)])],1),a("el-divider"),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.enable,callback:function(e){t.$set(t.inputQuery,"enable",e)},expression:"inputQuery.enable"}},[t._v("启用单据类型")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.checkEnable,callback:function(e){t.$set(t.inputQuery,"checkEnable",e)},expression:"inputQuery.checkEnable"}},[t._v("选择业务单据校验")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.secCheckEnable,callback:function(e){t.$set(t.inputQuery,"secCheckEnable",e)},expression:"inputQuery.secCheckEnable"}},[t._v("单据需要复核")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.innerOrder,callback:function(e){t.$set(t.inputQuery,"innerOrder",e)},expression:"inputQuery.innerOrder"}},[t._v("标记为内部单据")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.genUnit,callback:function(e){t.$set(t.inputQuery,"genUnit",e)},expression:"inputQuery.genUnit"}},[t._v("允许手动输入信息")])],1)])],1),a("el-divider"),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:5}},[a("span",[t._v("选择业务单据校验的来源类型")])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkWebNew,callback:function(e){t.$set(t.inputQuery,"checkWebNew",e)},expression:"inputQuery.checkWebNew"}},[t._v("web端新增单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkPdaEd,callback:function(e){t.$set(t.inputQuery,"checkPdaEd",e)},expression:"inputQuery.checkPdaEd"}},[t._v("手持终端未校验单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkPdaUn,callback:function(e){t.$set(t.inputQuery,"checkPdaUn",e)},expression:"inputQuery.checkPdaUn"}},[t._v("手持终端已校验单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkUdims,callback:function(e){t.$set(t.inputQuery,"checkUdims",e)},expression:"inputQuery.checkUdims"}},[t._v("UDIMS平台\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkPc,callback:function(e){t.$set(t.inputQuery,"checkPc",e)},expression:"inputQuery.checkPc"}},[t._v("UDI扫码通")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.checkEnable},model:{value:t.inputQuery.checkChange,callback:function(e){t.$set(t.inputQuery,"checkChange",e)},expression:"inputQuery.checkChange"}},[t._v("自动生成流转单据")])],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:5}},[a("span",[t._v("单据需要复核的来源类型")])])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckUdims,callback:function(e){t.$set(t.inputQuery,"secCheckUdims",e)},expression:"inputQuery.secCheckUdims"}},[t._v("web端新增单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckPdaEd,callback:function(e){t.$set(t.inputQuery,"secCheckPdaEd",e)},expression:"inputQuery.secCheckPdaEd"}},[t._v("手持终端未校验单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckPdaUn,callback:function(e){t.$set(t.inputQuery,"secCheckPdaUn",e)},expression:"inputQuery.secCheckPdaUn"}},[t._v("手持终端已校验单据\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckPc,callback:function(e){t.$set(t.inputQuery,"secCheckPc",e)},expression:"inputQuery.secCheckPc"}},[t._v("UDIMS平台\n ")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckWebNew,callback:function(e){t.$set(t.inputQuery,"secCheckWebNew",e)},expression:"inputQuery.secCheckWebNew"}},[t._v("UDI扫码通")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{attrs:{disabled:!t.inputQuery.secCheckEnable},model:{value:t.inputQuery.secCheckChange,callback:function(e){t.$set(t.inputQuery,"secCheckChange",e)},expression:"inputQuery.secCheckChange"}},[t._v("自动生成流转单据")])],1)])],1),a("el-divider")],1)},Dd=[],Cd={name:"inputQuery",props:{inputQuery:{type:Object,required:!0}},data:function(){return{filterQuery:{enabled:!0,isBuType:!0},thirdSys:[],localTypes:[],value:""}},methods:{getList:function(){var t=this;as(this.filterQuery).then((function(e){t.thirdSys=e.data.list||[]})).catch((function(){t.loading=!1,t.list=[]})),Br(this.filterQuery).then((function(e){t.localTypes=e.data.list||[]})).catch((function(){t.loading=!1,t.localTypes=[]}))}},created:function(){this.getList()}},kd=Cd,Qd=(a("6194"),Object(g["a"])(kd,xd,Dd,!1,null,"314a6316",null)),Sd=Qd.exports,_d={data:function(){return{filterQuery:{enabled:"1",udiwmsType:"",thirdType:"",page:1,limit:20},addDialogVisible:!1,modifyDialogVisible:!1,list:[],inputQuery:{action:"",name:"",enable:"",remark:"",mainAction:"",thirdSysFk:"",id:"",localAction:null,checkEnable:!1,genUnit:!1,innerOrder:!1,spUse:null,secCheckEnable:null,checkUdims:null,checkPdaEd:null,checkPdaUn:null,checkPc:null,checkWebNew:null,checkChange:null,secCheckUdims:null,secCheckPdaEd:null,secCheckPdaUn:null,secCheckPc:null,secCheckWebNew:null,secCheckChange:null},enableMap:{true:"是",false:"否"},total:0,multipleSelection:[],uploadFileUrl:null}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={udiwmsType:"",thirdType:"",page:1,limit:20},this.getList()},cancelDialog:function(){this.modifyDialogVisible=!1,this.addDialogVisible=!1},getList:function(){var t=this;this.loading=!0,Rr(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},onAddSubmit:function(){var t=this;this.inputQuery.enable&&""==this.inputQuery.localAction?this.$message.error("本地单据不能为空!"):Pr(this.inputQuery).then((function(e){t.loading=!1,t.cancelDialog(),t.getList()})).catch((function(){t.loading=!1,t.cancelDialog()}))},onModifySubmit:function(){var t=this;this.inputQuery.enable&&""==this.inputQuery.localAction?this.$message.error("本地单据不能为空!"):jr(this.inputQuery).then((function(e){t.loading=!1,t.cancelDialog(),t.getList()})).catch((function(){t.loading=!1,t.cancelDialog()}))},handleModifyClick:function(t){this.modifyDialogVisible=!0,this.inputQuery={id:t.id,remark:t.remark,action:t.action,name:t.name,enable:t.enable,mainAction:t.mainAction,localAction:t.localAction,thirdSysFk:t.thirdSysFk,checkEnable:t.checkEnable,genUnit:t.genUnit,innerOrder:t.innerOrder,spUse:t.spUse,secCheckEnable:t.secCheckEnable,checkUdims:t.checkUdims,checkPdaEd:t.checkPdaEd,checkPdaUn:t.checkPdaUn,checkPc:t.checkPc,checkWebNew:t.checkWebNew,checkChange:t.checkChange,secCheckUdims:t.secCheckUdims,secCheckPdaEd:t.secCheckPdaEd,secCheckPdaUn:t.secCheckPdaUn,secCheckPc:t.secCheckPc,secCheckWebNew:t.secCheckWebNew,secCheckChange:t.secCheckChange}},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该业务类型信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};Er(a).then((function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},init:function(){var t=this;Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL;t.uploadFileUrl=a+"udiwms/busstiness/file/upload"}))}},components:{modifyDialog:Sd},mounted:function(){},created:function(){this.init(),this.getList()}},$d=_d,Td=Object(g["a"])($d,vd,wd,!1,null,null,null),Ld=Td.exports,Od=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"400px"},attrs:{placeholder:"业务类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.filterQuery.enabled,callback:function(e){t.$set(t.filterQuery,"enabled",e)},expression:"filterQuery.enabled"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"已启用",value:"1"}}),a("el-option",{attrs:{label:"未启用",value:"0"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.handleAddClick}},[t._v("新增\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"120",fixed:""}}),a("el-table-column",{attrs:{label:"业务单据类型名称",prop:"name",fixed:""}}),a("el-table-column",{attrs:{label:"业务单据类型代码",prop:"action",fixed:""}}),a("el-table-column",{attrs:{label:"原单据类型",prop:"originAction",fixed:""}}),a("el-table-column",{attrs:{label:"单据是否启用",prop:"enable",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.enable]))])]}}])}),a("el-table-column",{attrs:{label:"是否预入库",prop:"advanceType",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.advanceType]))])]}}])}),a("el-table-column",{attrs:{label:"是否自动补单",prop:"advanceType",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.changeEnable]))])]}}])}),a("el-table-column",{attrs:{label:"是否供应商使用",prop:"spUse",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.spUse]))])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")])]}}])})],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"新增业务类型关联",visible:t.addDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("modifyDialog",{attrs:{inputQuery:t.inputQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onAddSubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),t.modifyDialogVisible?a("el-dialog",{attrs:{title:"编辑业务类型关联",visible:t.modifyDialogVisible,width:"70%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.modifyDialogVisible=e}}},[a("modifyDialog",{attrs:{inputQuery:t.inputQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onModifySubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e()],1)],1)},zd=[],Id=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("业务类型名称: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.name,callback:function(e){t.$set(t.inputQuery,"name",e)},expression:"inputQuery.name"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("业务类型代码: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.action,callback:function(e){t.$set(t.inputQuery,"action",e)},expression:"inputQuery.action"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("第三方单据类型: ")])]),a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true"},model:{value:t.inputQuery.originAction,callback:function(e){t.$set(t.inputQuery,"originAction",e)},expression:"inputQuery.originAction"}},t._l(t.originTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:20}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("备注: ")])]),a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.inputQuery.remark,callback:function(e){t.$set(t.inputQuery,"remark",e)},expression:"inputQuery.remark"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.enable,callback:function(e){t.$set(t.inputQuery,"enable",e)},expression:"inputQuery.enable"}},[t._v("启用当前单据")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.advanceType,callback:function(e){t.$set(t.inputQuery,"advanceType",e)},expression:"inputQuery.advanceType"}},[t._v("预入库类型单据")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{on:{change:t.isChangeOrder},model:{value:t.inputQuery.changeEnable,callback:function(e){t.$set(t.inputQuery,"changeEnable",e)},expression:"inputQuery.changeEnable"}},[t._v("自动补单")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.spUse,callback:function(e){t.$set(t.inputQuery,"spUse",e)},expression:"inputQuery.spUse"}},[t._v("允许供应商使用")])],1)])],1),t.inputQuery.changeEnable?a("div",[a("el-table",{staticStyle:{"margin-bottom":"20px","margin-top":"10px"},attrs:{border:"",data:t.changeList}},[a("el-table-column",{attrs:{label:"序号",prop:"index",width:"55"}}),a("el-table-column",{attrs:{label:"补单说明",prop:"intro"}}),a("el-table-column",{attrs:{label:"补单扫码单据类型",prop:"name"}}),a("el-table-column",{attrs:{label:"推前时长(小时)",prop:"beforeTime"}}),a("el-table-column",{attrs:{label:"备注",prop:"remark"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")])]}}],null,!1,3551299807)})],1)],1):t._e(),t.editChangeTypeVisible?a("el-dialog",{attrs:{title:t.formMap[t.changeEdit],visible:t.editChangeTypeVisible,width:"55%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.editChangeTypeVisible=e}}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生成扫码单据类型: ")])]),a("el-select",{attrs:{placeholder:"请选择扫码单据类型",clearable:"true"},model:{value:t.editQuery.scAction,callback:function(e){t.$set(t.editQuery,"scAction",e)},expression:"editQuery.scAction"}},t._l(t.codeTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("往前推移时间(小时): ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.beforeTime,callback:function(e){t.$set(t.editQuery,"beforeTime",e)},expression:"editQuery.beforeTime"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("转换顺序号: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"small",splaceholder:"请输入内容",disabled:"false"},model:{value:t.editQuery.index,callback:function(e){t.$set(t.editQuery,"index",e)},expression:"editQuery.index"}})],1)])],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},nativeOn:{click:function(e){return t.hideForm.apply(null,arguments)}}},[t._v("取消")]),a("el-button",{attrs:{type:"primary",size:"small",loading:t.formLoading},nativeOn:{click:function(e){return t.formSubmit()}}},[t._v("提交\n ")])],1)],1):t._e()],1)},Nd=[];function Fd(t){return Object(et["a"])({url:"/spms/bussinessChangeType/filter",method:"get",params:t})}function qd(t){return Object(et["a"])({url:"/spms/bussinessChangeType/insert",method:"post",data:t})}function Vd(t){return Object(et["a"])({url:"/spms/bussinessChangeType/delete",method:"post",data:t})}function Rd(t){return Object(et["a"])({url:"/spms/bussinessChangeType/update",method:"post",data:t})}var Ed={name:"inputQuery",props:{inputQuery:{type:Object,required:!0}},data:function(){return{query:{action:null,type:null},filterQuery:{enabled:!0,isBuType:!0},editQuery:{},thirdSys:[],localTypes:[],originTypes:[],codeTypes:[],value:"",changeEdit:0,editChangeTypeVisible:!1,formMap:{0:"新增",1:"编辑"},changeList:[]}},methods:{getList:function(){var t=this;this.query.action=this.inputQuery.action,Fd(this.query).then((function(e){t.changeList=e.data||[]})).catch((function(){}))},getTypes:function(){var t=this;ru().then((function(e){t.originTypes=e.data.list||[]})).catch((function(){}));var e={enabled:!0};Vr(e).then((function(e){t.codeTypes=e.data.list||[]})).catch((function(){}))},addChangeType:function(){this.changeEdit=0,this.editQuery={},this.editChangeTypeVisible=!0},handleModifyClick:function(t){this.changeEdit=1,this.editQuery=t,this.editChangeTypeVisible=!0},hideForm:function(){this.editChangeTypeVisible=!1},formSubmit:function(){var t=this;0==this.changeEdit?(this.editQuery.action=this.inputQuery.action,qd(this.editQuery).then((function(e){t.editChangeTypeVisible=!1,t.getList()})).catch((function(){}))):Rd(this.editQuery).then((function(e){t.editChangeTypeVisible=!1,t.getList()})).catch((function(){}))},deleteClick:function(t){var e=this,a={id:t.id};Vd(a).then((function(t){e.editChangeTypeVisible=!1,e.getList()})).catch((function(){}))},isChangeOrder:function(){console.log("this.inputQuery.changeEnable = "+this.inputQuery.changeEnable),this.inputQuery.changeEnable&&(this.query.type="changeEnable",this.getList())}},created:function(){this.getTypes(),this.getList()}},jd=Ed,Pd=(a("e50b"),Object(g["a"])(jd,Id,Nd,!1,null,"030a8d80",null)),Bd=Pd.exports,Ud={data:function(){return{filterQuery:{enabled:"1",udiwmsType:"",thirdType:"",page:1,limit:20},addDialogVisible:!1,modifyDialogVisible:!1,list:[],inputQuery:{action:"",name:"",enable:"",remark:"",mainAction:"",thirdSysFk:"",id:"",originAction:null,localAction:null,advanceType:null,changeEnable:null,spUse:null},enableMap:{true:"是",false:"否"},total:0,multipleSelection:[]}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={udiwmsType:"",thirdType:"",page:1,limit:20},this.getList()},cancelDialog:function(){this.modifyDialogVisible=!1,this.addDialogVisible=!1},getList:function(){var t=this;this.loading=!0,Br(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},onAddSubmit:function(){var t=this;Mr(this.inputQuery).then((function(e){t.loading=!1,t.cancelDialog(),t.getList()})).catch((function(){t.loading=!1,t.cancelDialog()}))},onModifySubmit:function(){var t=this;Wr(this.inputQuery).then((function(e){t.loading=!1,t.cancelDialog(),t.getList()})).catch((function(){t.loading=!1,t.cancelDialog()}))},handleModifyClick:function(t){this.modifyDialogVisible=!0,this.inputQuery={id:t.id,remark:t.remark,action:t.action,name:t.name,enable:t.enable,mainAction:t.mainAction,localAction:t.localAction,thirdSysFk:t.thirdSysFk,originAction:t.originAction,advanceType:t.advanceType,changeEnable:t.changeEnable,spUse:t.spUse}},handleAddClick:function(){this.addDialogVisible=!0,this.inputQuery={action:"",name:"",enable:"",remark:"",mainAction:"",thirdSysFk:"",id:"",advanceType:null,localAction:null,changeEnable:null}},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该业务类型信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};deleteBussinessType(a).then((function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))}},components:{modifyDialog:Bd},mounted:function(){},created:function(){this.getList()}},Ad=Ud,Md=Object(g["a"])(Ad,Od,zd,!1,null,null,null),Wd=Md.exports,Hd=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.exportExcel}},[t._v("导出Excel文件")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"下载次数",prop:"dlCount","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.downloadExcel(e.row)}}},[t._v("下载\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"导出医疗器械产品信息",visible:t.udiImportDetailVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("udiInfoSelect",{attrs:{selectType:t.selectType},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Kd=[],Jd=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",{staticStyle:{"margin-top":"15px",width:"1000px"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"600px"},attrs:{placeholder:"请扫描或输入UDI码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.filterQuery.udiCode,callback:function(e){t.$set(t.filterQuery,"udiCode",e)},expression:"filterQuery.udiCode"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.filterQuery.unionCode,callback:function(e){t.$set(t.filterQuery,"unionCode",e)},expression:"filterQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.filterQuery.ggxh,callback:function(e){t.$set(t.filterQuery,"ggxh",e)},expression:"filterQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择过滤对照条件"},model:{value:t.filterQuery.filterType,callback:function(e){t.$set(t.filterQuery,"filterType",e)},expression:"filterQuery.filterType"}},t._l(t.filterList,(function(e){return a("el-option",{key:e.filterType,attrs:{label:e.sysName,value:e.filterType}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.sysName))])])})),1)],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.filterQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.filterQuery,"ylqxzcrbarmc",e)},expression:"filterQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.filterQuery.thrPiId,callback:function(e){t.$set(t.filterQuery,"thrPiId",e)},expression:"filterQuery.thrPiId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.filterQuery.lockStatus,callback:function(e){t.$set(t.filterQuery,"lockStatus",e)},expression:"filterQuery.lockStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未提交",value:"1"}}),a("el-option",{attrs:{label:"已提交",value:"2"}}),a("el-option",{attrs:{label:"已锁定",value:"3"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导出\n ")]):t._e(),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allExport}},[t._v("结果全部导出\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("选中上传\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allUploadSMP}},[t._v("一键上传\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("详情\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息编辑","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.editDialogVisible,width:"70%","append-to-body":""},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方产品ID",prop:"thirdId","show-overflow-tooltip":""}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品通用名: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1)],1)],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Gd=[],Xd={name:"UdIInfoSelect",props:{selectType:{type:Object,required:!0}},data:function(){return{filterQuery:{lockStatus:"3",uuids:[],ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",page:1,limit:20,addType:1},editQuery:null,relevanceEdit:{id:null,thirdId:"",isUseDy:!1},isImport:!1,isImportUdi:!1,isUploadSmp:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={uuids:[],ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",page:1,limit:20,addType:1},this.getList()},getList:function(){var t=this;this.loading=!0,Il(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.loading=!1,e.detailList=t.data||[]})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.uuids.push(e.uuid)})),this.allExport()},allExport:function(){var t=this;zs(this.filterQuery).then((function(e){2e4==e.code?t.$message({type:"success",message:"导出成功,后台正在生成Excel文件,请稍后刷新查看!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},intentImportErp:function(t){this.uuid=t.uuid,this.relId=t.id,this.isImport=!0,this.thisData=t,this.selectErpDialogVisible=!0},uploadSMP:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.uuids.push(e.uuid)})),this.allUploadSMP()},allUploadSMP:function(){var t=this;_s(this.filterQuery).then((function(e){2e4==e.code?t.$message({type:"success",message:"上传成功!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"}),t.$emit("cancelDialog",!0)}))},handleSelectionChange:function(t){console.log("----"+t),this.multipleSelection=t},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleModifyClick:function(t){this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.id,thirdId:t.thirdId,isUseDy:t.isUseDy},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},uploadErpProduct:function(){var t=this;Ul().then((function(e){2e4==e.code?t.$message({type:"success",message:e.data}):t.$message.error(e.message)})).catch((function(){}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1},selectSysParam:function(){var t=this,e={paramKey:"smp_isUploadProuct"};Bt(e).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isUploadSmp=!0)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))}},mounted:function(){},components:{},created:function(){this.getList(),this.selectSysParam()}},Yd=Xd,Zd=(a("bdea"),Object(g["a"])(Yd,Jd,Gd,!1,null,"2000af7b",null)),tp=Zd.exports,ep={data:function(){return{filterQuery:{type:1,genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},selectType:0,udiImportDetailVisible:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={type:1,fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,Ls(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},exportExcel:function(){this.selectType=0,this.udiImportDetailVisible=!0},uploadSmp:function(){this.selectType=1,this.udiImportDetailVisible=!0},downloadExcel:function(t){var e=this;Yr.a.get("./config.json").then((function(a){var i=a.data.BASE_URL,l=i+"/udiwms/products/exportLog/download?genKey="+t.genKey,s=document.createElement("a");fetch(l).then((function(t){return t.blob()})).then((function(a){s.href=URL.createObjectURL(a),console.log(s.href),s.download=t.filePath.split("/")[t.filePath.split("/").length-1],document.body.appendChild(s),s.click(),e.getList()}))}))},cancelDialog:function(t){this.udiImportDetailVisible=!1,t&&this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};Os(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(this.getList(),this.$message.success("文件上传成功,请稍后刷新查看!"))},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]}},mounted:function(){},components:{udiInfoSelect:tp},created:function(){this.getList()}},ap=ep,ip=(a("7524"),Object(g["a"])(ap,Hd,Kd,!1,null,null,null)),lp=ip.exports,sp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",{staticStyle:{width:"1000px"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"600px"},attrs:{placeholder:"请扫描或输入UDI码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.filterQuery.udiCode,callback:function(e){t.$set(t.filterQuery,"udiCode",e)},expression:"filterQuery.udiCode"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.filterQuery.unionCode,callback:function(e){t.$set(t.filterQuery,"unionCode",e)},expression:"filterQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.filterQuery.ggxh,callback:function(e){t.$set(t.filterQuery,"ggxh",e)},expression:"filterQuery.ggxh"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择过滤对照条件"},model:{value:t.filterQuery.filterType,callback:function(e){t.$set(t.filterQuery,"filterType",e)},expression:"filterQuery.filterType"}},t._l(t.filterList,(function(e){return a("el-option",{key:e.filterType,attrs:{label:e.sysName,value:e.filterType}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.sysName))])])})),1)],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.filterQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.filterQuery,"ylqxzcrbarmc",e)},expression:"filterQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.filterQuery.thrPiId,callback:function(e){t.$set(t.filterQuery,"thrPiId",e)},expression:"filterQuery.thrPiId"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.intentDetail}},[t._v("关联选入\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.intentImportUdi}},[t._v("选入DI器械\n ")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.intentImportErp}},[t._v("选入产品信息\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:"1",staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"主系统产品编码",prop:"mainId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"200",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:null==e.row.thirdId||""==e.row.thirdId||null!=e.row.flbm},nativeOn:{click:function(a){return a.stopPropagation(),t.intentSelectUdi(e.row)}}},[t._v("关联DI\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息编辑",visible:t.editDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-card",[a("el-table",{key:"2",staticStyle:{width:"100%","margin-bottom":"8px"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small",disabled:e.row.thirdId==t.editQuery.nameCode},on:{click:function(a){return t.addSelectErp(e.row)}}},[t._v("关联\n ")]),a("el-button",{attrs:{type:"text",size:"small",disabled:null==t.editQuery.flbm||null==e.row.thirdId||""==e.row.thirdId},nativeOn:{click:function(a){return a.stopPropagation(),t.removeErp(e.row)}}},[t._v("解绑\n ")])]}}],null,!1,3689743148)})],1)],1),a("el-card",[a("div",{staticStyle:{float:"left","text-align":"left","font-weight":"bold","margin-bottom":"8px"}},[a("span",[t._v("产品标识:")])]),a("div",{staticStyle:{float:"right","text-align":"right","margin-bottom":"8px"}},[1!=t.productType?a("el-button",{staticStyle:{"text-align":"right"},attrs:{type:"primary",size:"mini",icon:"search"},on:{click:t.removeDi}},[t._v("解绑DI器械信息\n ")]):t._e()],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:"3",staticStyle:{width:"100%"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1)],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!1,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}}),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:!t.isUseDyCheck},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.editQuery.isDisable,callback:function(e){t.$set(t.editQuery,"isDisable",e)},expression:"editQuery.isDisable"}},[t._v("是否禁用\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",model:{value:t.editQuery.isAdavence,callback:function(e){t.$set(t.editQuery,"isAdavence",e)},expression:"editQuery.isAdavence"}},[t._v("是否寄售\n ")])],1)],1)],1)],1),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onAddSubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),t.selectUdiDialogVisible?a("el-dialog",{attrs:{title:"关联选入器械信息",visible:t.selectUdiDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectUdiDialogVisible=e}}},[a("selectUdi",{attrs:{isImportUdi:t.isImportUdi},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectErpDialogVisible?a("el-dialog",{attrs:{title:"从指定系统选入器械信息",visible:t.selectErpDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectErpDialogVisible=e}}},[a("selectErp",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,relId:t.relId,isImport:t.isImport,data:t.thisData,defaultSys:t.defaultSys},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectLocalVisible?a("el-dialog",{attrs:{title:"选入DI器械信息",visible:t.selectLocalVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectLocalUdi",{attrs:{closeDialog:t.closeDialog,relId:t.relId,isImportUdi:t.isImportUdi,data:t.thisData},on:{closeUdi:t.closeUdi}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},op=[],rp={data:function(){return{filterQuery:{lockStatus:null,unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",ggxh:null,page:1,limit:20,addType:1,thrPiId:null,filterType:null},productType:null,editQuery:null,relevanceEdit:{id:null,thirdId:"",isDisable:null,isUseDy:!1,isLock:null,isAdavence:null},defaultSys:null,isImport:!1,isImportUdi:!1,isUploadSmp:!1,isSpCombine:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],filterList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1,isUseDyCheck:!1,lockStatusMap:{1:"未提交",2:"已提交",3:"已锁定"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={lockStatus:null,unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",thrPiId:null,nameCode:"",ggxh:null,page:1,limit:20,addType:1},this.getList()},getList:function(){var t=this;this.loading=!0,Il(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},keyup_submit:function(t){this.filterQuery.page=1,this.getList(),t.target.select()},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.isUseDyCheck=!1,e.loading=!1,e.detailList=t.data||[],e.detailList.forEach((function(t,a,i){t.zxxsbzbhsydysl>1&&(e.isUseDyCheck=!0)})),e.productType=e.detailList[0].productType})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};ql(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},addSelectErp:function(t){this.defaultSys=t.sysId,this.isImport=!1,this.selectErpDialogVisible=!0},removeErp:function(t){var e=this;this.$confirm("此操作将解除该绑定产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={relId:e.editQuery.id,thirdSys:t.sysId};Wl(a).then((function(t){2e4==t.code?(e.getThirdSysDetail()(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},removeDi:function(){var t=this;this.$confirm("此操作将解除该绑定DI器械信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={relId:t.editQuery.id};Hl(e).then((function(e){2e4==e.code?(t.$message({type:"success",message:"删除成功!"}),t.getList(),t.cancelDialog()):t.$message.error(e.message)})).catch((function(){}))})).catch((function(){}))},intentSelectErp:function(t){this.uuid=t.uuid,this.relId=t.id,this.isImport=!1,this.thisData=t,this.selectErpDialogVisible=!0},intentImportErp:function(t){this.defaultSys=null,this.uuid=t.uuid,this.relId=t.id,this.isImport=!0,this.thisData=t,this.selectErpDialogVisible=!0},uploadSMP:function(){var t=this,e=this.multipleSelection,a=[];e.forEach((function(t){a.push(t.id)}));var i={keys:a};Al(i).then((function(e){2e4==e.code?t.$message({type:"success",message:"上传成功!"}):t.$message({type:"error",message:e.message})})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},intentSelectUdi:function(t){this.relId=t.id,this.isImportUdi=!0,this.thisData=t,console.log("-----"+this.uuid+"-2222--"+this.relId),this.selectLocalVisible=!0},intentImportUdi:function(){this.relId=null,this.selectLocalVisible=!0},handleSelectionChange:function(t){console.log("----"+t),this.multipleSelection=t},cancelDialog:function(){this.editDialogVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleModifyClick:function(t){this.uuid=t.uuid,this.relId=t.id,this.isImport=!1,this.thisData=t,this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.id,isUseDy:t.isUseDy,isDisable:t.isDisable,isLock:t.isLock,isAdavence:t.isAdavence},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},lockProducts:function(t){var e=this,a=this.multipleSelection,i={ids:[],lockStatus:t};a.forEach((function(t){i.ids.push(t.id)})),Gl(i).then((function(t){2e4==t.code?(e.loading=!1,e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,this.getThirdSysDetail(),t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},getSysFilter:function(){var t=this;Kl().then((function(e){t.loading=!1,t.filterList=e.data.list||[]})).catch((function(){t.loading=!1,t.filterList=[]}))},uploadErpProduct:function(){var t=this;Ul().then((function(e){2e4==e.code?t.$message({type:"success",message:e.data}):t.$message.error(e.message)})).catch((function(){}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1},onAddSubmit:function(){var t=this;1==this.checked?this.relevanceEdit.isUseDy=1:this.relevanceEdit.isUseDy=0,this.relevanceEdit.isDisable=this.editQuery.isDisable,this.relevanceEdit.isLock=this.editQuery.isLock,this.relevanceEdit.isAdavence=this.editQuery.isAdavence,Vl(this.relevanceEdit).then((function(e){t.loading=!1,t.getList(),t.cancelDialog()})).catch((function(){t.loading=!1,t.cancelDialog()}))},selectSysParam:function(){var t=this,e={paramKey:"smp_isUploadProuct"};Jl().then((function(e){2e4==e.code&&("1"==e.data.paramValue?t.isSpCombine=!0:t.isSpCombine=!1)})),Bt(e).then((function(e){2e4==e.code&&("1"==e.data.paramValue?t.isUploadSmp=!0:t.isUploadSmp=!1)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))}},mounted:function(){},components:{selectUdi:ds,selectErp:ys,selectLocalUdi:Cs},created:function(){this.getList(),this.selectSysParam(),this.getSysFilter()}},np=rp,cp=(a("ff0e"),Object(g["a"])(np,sp,op,!1,null,"aac8fb0c",null)),up=cp.exports,dp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"供应商","remote-method":t.findMethod,loading:t.loading},model:{value:t.filterQuery.companyName,callback:function(e){t.$set(t.filterQuery,"companyName",e)},expression:"filterQuery.companyName"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.companyName,attrs:{label:e.companyName,value:e.companyName}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.companyName))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"DI/医保编码/商品条码",clearable:"true"},model:{value:t.filterQuery.unionCode,callback:function(e){t.$set(t.filterQuery,"unionCode",e)},expression:"filterQuery.unionCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名",clearable:"true"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"规格型号",clearable:"true"},model:{value:t.filterQuery.ggxh,callback:function(e){t.$set(t.filterQuery,"ggxh",e)},expression:"filterQuery.ggxh"}})],1)],1),a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择过滤对照条件"},model:{value:t.filterQuery.filterType,callback:function(e){t.$set(t.filterQuery,"filterType",e)},expression:"filterQuery.filterType"}},t._l(t.filterList,(function(e){return a("el-option",{key:e.filterType,attrs:{label:e.sysName,value:e.filterType}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.sysName))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"生产企业/注册备案人",clearable:"true"},model:{value:t.filterQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.filterQuery,"ylqxzcrbarmc",e)},expression:"filterQuery.ylqxzcrbarmc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"第三方产品编码",clearable:"true"},model:{value:t.filterQuery.thrPiId,callback:function(e){t.$set(t.filterQuery,"thrPiId",e)},expression:"filterQuery.thrPiId"}})],1),t.isSpCombine?a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.filterQuery.lockStatus,callback:function(e){t.$set(t.filterQuery,"lockStatus",e)},expression:"filterQuery.lockStatus"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未提交",value:"1"}}),a("el-option",{attrs:{label:"已提交",value:"2"}}),a("el-option",{attrs:{label:"已锁定",value:"3"}})],1)],1):t._e(),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),t.isSpCombine?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.lockProducts("3")}}},[t._v("锁定\n ")]):t._e(),t.isSpCombine?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:function(e){return t.lockProducts("1")}}},[t._v("退回\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:"1",staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"供应商",prop:"companyName",width:"160","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"最小销售产品标识",prop:"nameCode",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"主系统产品编码",prop:"mainId",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产企业",prop:"ylqxzcrbarmc",width:"160","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"zczbhhzbapzbh",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"器械类别",prop:"qxlb",width:"80","show-overflow-tooltip":""}}),t.isSpCombine?a("el-table-column",{attrs:{label:"状态",prop:"lockStatus",width:"80","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t.lockStatusMap[e.row.lockStatus])+"\n ")]}}],null,!1,2171353223)}):t._e(),a("el-table-column",{attrs:{width:"80",label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("详情\n ")])]}}])})],1),t.editDialogVisible?a("el-dialog",{attrs:{title:"产品信息编辑",visible:t.editDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"70%"},on:{"update:visible":function(e){t.editDialogVisible=e}}},[a("el-table",{key:"2",staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品编码",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品名称",prop:"thirdName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}})],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],key:"3",staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:t.detailList,border:""},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"cpmctymc","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装级别",prop:"packLevel","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"包装层级",prop:"bzcj","show-overflow-tooltip":""}})],1),a("el-form",{ref:"editQuery",staticStyle:{"margin-top":"20px"},attrs:{model:t.editQuery,rules:t.rules,"label-width":"100px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.cpmctymc,callback:function(e){t.$set(t.editQuery,"cpmctymc",e)},expression:"editQuery.cpmctymc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.nameCode,callback:function(e){t.$set(t.editQuery,"nameCode",e)},expression:"editQuery.nameCode"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ggxh,callback:function(e){t.$set(t.editQuery,"ggxh",e)},expression:"editQuery.ggxh"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.qxlb,callback:function(e){t.$set(t.editQuery,"qxlb",e)},expression:"editQuery.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.cplb,callback:function(e){t.$set(t.editQuery,"cplb",e)},expression:"editQuery.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.flbm,callback:function(e){t.$set(t.editQuery,"flbm",e)},expression:"editQuery.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sptm,callback:function(e){t.$set(t.editQuery,"sptm",e)},expression:"editQuery.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ybbm,callback:function(e){t.$set(t.editQuery,"ybbm",e)},expression:"editQuery.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.editQuery.ylqxzcrbarmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarmc",e)},expression:"editQuery.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.ylqxzcrbarywmc,callback:function(e){t.$set(t.editQuery,"ylqxzcrbarywmc",e)},expression:"editQuery.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.tyshxydm,callback:function(e){t.$set(t.editQuery,"tyshxydm",e)},expression:"editQuery.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证/备案号: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zczbhhzbapzbh,callback:function(e){t.$set(t.editQuery,"zczbhhzbapzbh",e)},expression:"editQuery.zczbhhzbapzbh"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("上级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.sjcpbm,callback:function(e){t.$set(t.editQuery,"sjcpbm",e)},expression:"editQuery.sjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.packLevel,callback:function(e){t.$set(t.editQuery,"packLevel",e)},expression:"editQuery.packLevel"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位/包装级别: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bzcj,callback:function(e){t.$set(t.editQuery,"bzcj",e)},expression:"editQuery.bzcj"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.editQuery.bhxjsl,callback:function(e){t.$set(t.editQuery,"bhxjsl",e)},expression:"editQuery.bhxjsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含下级产品编码: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhxjcpbm,callback:function(e){t.$set(t.editQuery,"bhxjcpbm",e)},expression:"editQuery.bhxjcpbm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("包含最小销售包装数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{size:"small",disabled:!0,splaceholder:"请输入内容"},model:{value:t.editQuery.bhzxxsbzsl,callback:function(e){t.$set(t.editQuery,"bhzxxsbzsl",e)},expression:"editQuery.bhzxxsbzsl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("最小包装单元内包含使用单元数量: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"},model:{value:t.editQuery.zxxsbzbhsydysl,callback:function(e){t.$set(t.editQuery,"zxxsbzbhsydysl",e)},expression:"editQuery.zxxsbzbhsydysl"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"65%"},attrs:{disabled:!t.checked,size:"small",splaceholder:"请输入内容"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}}),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:!0},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},[t._v("以使用单元数量入库\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:""},model:{value:t.editQuery.isDisable,callback:function(e){t.$set(t.editQuery,"isDisable",e)},expression:"editQuery.isDisable"}},[t._v("是否禁用\n ")])],1)],1),a("el-col",{staticClass:"el-col",attrs:{span:3}},[a("el-form-item",{attrs:{prop:"name"}},[a("el-checkbox",{staticClass:"text item itemTag",attrs:{disabled:""},model:{value:t.editQuery.isAdavence,callback:function(e){t.$set(t.editQuery,"isAdavence",e)},expression:"editQuery.isAdavence"}},[t._v("是否寄售\n ")])],1)],1)],1)],1)],1):t._e(),t.selectUdiDialogVisible?a("el-dialog",{attrs:{title:"关联选入器械信息",visible:t.selectUdiDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectUdiDialogVisible=e}}},[a("selectUdi",{attrs:{isImportUdi:t.isImportUdi},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectErpDialogVisible?a("el-dialog",{attrs:{title:"从指定系统选入器械信息",visible:t.selectErpDialogVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectErpDialogVisible=e}}},[a("selectErp",{attrs:{closeDialog:t.closeDialog,uuid:t.uuid,relId:t.relId,isImport:t.isImport,data:t.thisData,defaultSys:t.defaultSys},on:{closeUdi:t.closeUdi}})],1):t._e(),t.selectLocalVisible?a("el-dialog",{attrs:{title:"选入DI器械信息",visible:t.selectLocalVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.selectLocalVisible=e}}},[a("selectLocalUdi",{attrs:{closeDialog:t.closeDialog,relId:t.relId,isImportUdi:t.isImportUdi,data:t.thisData},on:{closeUdi:t.closeUdi}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},pp=[],mp={data:function(){return{filterQuery:{lockStatus:null,unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",nameCode:"",ggxh:null,page:1,limit:20,addType:1,thrPiId:null,filterType:null,companyName:null},fromOptions:[],editQuery:null,relevanceEdit:{id:null,thirdId:"",isDisable:null,isUseDy:!1,isLock:null,isAdavence:null},defaultSys:null,isImport:!1,isImportUdi:!1,isUploadSmp:!1,isSpCombine:!1,isImportFile:!1,uploadFileUrl:null,checked:!1,list:[],detailList:[],sysList:[],filterList:[],total:0,thirdNo:"",uuid:"111",thirdId:null,relId:"",thisData:{nameCode:null,cpmctymc:null,ggxh:null},multipleSelection:[],editDialogVisible:!1,selectUdiDialogVisible:!1,selectErpDialogVisible:!1,selectLocalVisible:!1,isUseDyCheck:!1,lockStatusMap:{1:"未提交",2:"已提交",3:"已锁定"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={lockStatus:null,unionCode:null,udiCode:null,ylqxzcrbarmc:"",cpmctymc:"",thrPiId:null,nameCode:"",ggxh:null,page:1,limit:20,addType:1},this.getList()},getList:function(){var t=this;this.loading=!0,oa(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},keyup_submit:function(t){this.filterQuery.page=1,this.getList(),t.target.select()},getDetailList:function(t){var e=this;this.loading=!0,Zl(t).then((function(t){e.isUseDyCheck=!1,e.loading=!1,e.detailList=t.data||[],e.detailList.forEach((function(t,a,i){t.zxxsbzbhsydysl>1&&(e.isUseDyCheck=!0)}))})).catch((function(){e.loading=!1,e.detailList=[]}))},handleDetail:function(t){this.editQuery=t,console.log(t)},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t.id+""};ql(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},intentDetail:function(){this.isImportUdi=!1,this.selectUdiDialogVisible=!0},addSelectErp:function(t){this.defaultSys=t.sysId,this.isImport=!1,this.selectErpDialogVisible=!0},removeErp:function(t){var e=this;this.$confirm("此操作将解除该绑定产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={relId:e.editQuery.id,thirdSys:t.sysId};Wl(a).then((function(t){2e4==t.code?(e.getThirdSysDetail()(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))})).catch((function(){}))},intentSelectErp:function(t){this.uuid=t.uuid,this.relId=t.id,this.isImport=!1,this.thisData=t,this.selectErpDialogVisible=!0},intentImportErp:function(t){this.defaultSys=null,this.uuid=t.uuid,this.relId=t.id,this.isImport=!0,this.thisData=t,this.selectErpDialogVisible=!0},uploadSMP:function(){var t=this,e=this.multipleSelection,a=[];e.forEach((function(t){a.push(t.id)}));var i={keys:a};Al(i).then((function(e){2e4==e.code?t.$message({type:"success",message:"上传成功!"}):t.$message({type:"error",message:e.message})})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},intentSelectUdi:function(t){this.relId=t.id,this.isImportUdi=!0,this.thisData=t,console.log("-----"+this.uuid+"-2222--"+this.relId),this.selectLocalVisible=!0},intentImportUdi:function(){this.relId=null,this.selectLocalVisible=!0},handleSelectionChange:function(t){console.log("----"+t),this.multipleSelection=t},cancelDialog:function(){this.editDialogVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleModifyClick:function(t){this.uuid=t.uuid,this.relId=t.rlId,this.isImport=!1,this.thisData=t,this.editDialogVisible=!0,this.editQuery=t,this.relevanceEdit={id:t.rlId,isUseDy:t.isUseDy,isDisable:t.isDisable,isLock:t.isLock,isAdavence:t.isAdavence},this.checked=1==t.isUseDy;var e={uuid:t.uuid,page:1,limit:10};console.log("this.editQuery.isUseDy = "+this.editQuery.isUseDy),this.getDetailList(e),this.getThirdSysDetail()},lockProducts:function(t){var e=this,a=this.multipleSelection,i={ids:[],lockStatus:t};a.forEach((function(t){i.ids.push(t.rlId)})),Gl(i).then((function(t){2e4==t.code?(e.loading=!1,e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))},closeUdi:function(t){this.selectUdiDialogVisible=!1,this.selectErpDialogVisible=!1,this.selectLocalVisible=!1,this.getThirdSysDetail(),t&&this.getList()},getThirdSysDetail:function(){var t=this,e={id:this.relevanceEdit.id};Ml(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))},getSysFilter:function(){var t=this;Kl().then((function(e){t.loading=!1,t.filterList=e.data.list||[]})).catch((function(){t.loading=!1,t.filterList=[]}))},uploadErpProduct:function(){var t=this;Ul().then((function(e){2e4==e.code?t.$message({type:"success",message:e.data}):t.$message.error(e.message)})).catch((function(){}))},closeDialog:function(){this.selectErpDialogVisible=!1,this.selectLocalVisible=!1},onAddSubmit:function(){var t=this;1==this.checked?this.relevanceEdit.isUseDy=1:this.relevanceEdit.isUseDy=0,this.relevanceEdit.isDisable=this.editQuery.isDisable,this.relevanceEdit.isLock=this.editQuery.isLock,this.relevanceEdit.isAdavence=this.editQuery.isAdavence,Vl(this.relevanceEdit).then((function(e){t.loading=!1,t.getList(),t.cancelDialog()})).catch((function(){t.loading=!1,t.cancelDialog()}))},selectSysParam:function(){var t=this,e={paramKey:"smp_isUploadProuct"};Jl().then((function(e){2e4==e.code&&("1"==e.data.paramValue?t.isSpCombine=!0:t.isSpCombine=!1)})),Bt(e).then((function(e){2e4==e.code&&("1"==e.data.paramValue?t.isUploadSmp=!0:t.isUploadSmp=!1)}));var a={paramKey:"upload_pi_file_enabled"};Bt(a).then((function(e){2e4==e.code&&"1"==e.data.paramValue&&(t.isImportFile=!0)}));var i={paramKey:"upload_pi_file_url"};Bt(i).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.paramValue)}))},findMethod:function(t){var e=this;console.log(t);var a={customerName:t,page:1,limit:10};Se(a).then((function(t){e.loading=!1,e.fromOptions=t.data.list||[]})).catch((function(){e.loading=!1,e.options=[]}))}},mounted:function(){},components:{selectUdi:ds,selectErp:ys,selectLocalUdi:Cs},created:function(){this.getList(),this.selectSysParam(),this.getSysFilter()}},hp=mp,fp=(a("07cf"),Object(g["a"])(hp,dp,pp,!1,null,"33a34512",null)),gp=fp.exports,yp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入器械信息")])],1),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.jumpDl}},[t._v("模板下载\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"器械信息导入详情",visible:t.udiImportDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("udiInfoImportDetail",{attrs:{currentRow:t.currentRow,closeDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},bp=[];function vp(t){return Object(et["a"])({url:"/udiwms/products/importLog/filterDetail",method:"get",params:t})}function wp(t){return Object(et["a"])({url:"/udiwms/products/importLog/filter",method:"get",params:t})}function xp(t){return Object(et["a"])({url:"/udiwms/products/importLog/deleteLog",method:"post",data:t})}function Dp(t){return Object(et["a"])({url:"/udiwms/products/smp/download",method:"get",params:t})}var Cp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"UDI编码"},model:{value:t.filterQuery.udiCode,callback:function(e){t.$set(t.filterQuery,"udiCode",e)},expression:"filterQuery.udiCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未处理",value:"0"}}),a("el-option",{attrs:{label:"已完成",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"UDI编码",prop:"udiCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品ID1",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品ID2",prop:"thirdId1","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品ID3",prop:"thirdId2","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品ID4",prop:"thirdId3","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"产品ID5",prop:"thirdId4","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"医保编码",width:"100",prop:"ybbm","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"商品条码",prop:"sptm","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{width:"160",label:"是否以使用单元入库",prop:"isUseDy","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},kp=[],Qp={name:"udiImportDetail",props:{currentRow:{type:Object,required:!0}},data:function(){return{filterQuery:{genKey:null,udiCode:null,status:null,page:1,limit:10},list:[],detailList:[],total:0,status:{0:"未处理",1:"处理失败",2:"处理成功"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={genKey:null,udiCode:null,status:null,page:1,limit:10},this.getList()},getList:function(){var t=this;this.loading=!0,console.log(" this.genKey = "+this.currentRow.genKey),this.filterQuery.genKey=this.currentRow.genKey,vp(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},statusFilterType:function(t){var e={0:"warning",1:"danger",2:"success"};return e[t]},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()}},mounted:function(){},created:function(){this.getList()},filters:{}},Sp=Qp,_p=(a("e365"),Object(g["a"])(Sp,Cp,kp,!1,null,null,null)),$p=_p.exports,Tp={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},udiImportDetailVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"},templateDlUrl:null}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,wp(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},genInCode:function(){this.selectBasicUdiVisible=!0},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.udiImportDetailVisible=!0},cancelDialog:function(){this.udiImportDetailVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};xp(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.getList()})).catch((function(){t.loading=!1,t.list=[]})),Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL;t.uploadFileUrl=a+"/udiwms/products/importLog/upload"})),Yr.a.get("./config.json").then((function(e){var a=e.data.SERVER_IP;t.templateDlUrl=a+"/已对照产品信息模板.xlsx"}))},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(this.getList(),this.$message.success("文件上传成功,请稍后刷新查看!"))},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]},dlSmp:function(){var t=this;this.loading=!0,Dp().then((function(e){t.loading=!1,t.$message.success(e.data),t.getList()})).catch((function(){t.loading=!1}))}},mounted:function(){},components:{udiInfoImportDetail:$p},created:function(){this.getBasicThirdSys(),this.getList()}},Lp=Tp,Op=(a("e92b"),Object(g["a"])(Lp,yp,bp,!1,null,null,null)),zp=Op.exports,Ip=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入往来单位信息")])],1),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.jumpDl}},[t._v("模板下载\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.corpImportDetailVisible?a("el-dialog",{attrs:{title:"往来单位信息导入详情",visible:t.corpImportDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"85%"},on:{"update:visible":function(e){t.corpImportDetailVisible=e}}},[a("corpImportDetail",{attrs:{currentRow:t.currentRow,closeDialog:t.corpImportDetail}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Np=[];function Fp(t){return Object(et["a"])({url:"/udiwms/corps/importLog/filterDetail",method:"get",params:t})}function qp(t){return Object(et["a"])({url:"/udiwms/corps/importLog/filter",method:"get",params:t})}function Vp(t){return Object(et["a"])({url:"/udiwms/corps/importLog/deleteLog",method:"post",data:t})}var Rp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码"},model:{value:t.filterQuery.erpId,callback:function(e){t.$set(t.filterQuery,"erpId",e)},expression:"filterQuery.erpId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"未处理",value:"0"}}),a("el-option",{attrs:{label:"已完成",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"往来单位编码",prop:"erpId","show-overflow-tooltip":"",width:"100"}}),a("el-table-column",{attrs:{label:"名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.importStatus)}},[t._v(t._s(t.status[e.row.importStatus])+"\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},Ep=[],jp={name:"corpImportDetail",props:{currentRow:{type:Object,required:!0}},data:function(){return{filterQuery:{erpId:null,status:null,page:1,limit:10},list:[],detailList:[],total:0,status:{0:"未处理",2:"已完成",1:"异常"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={genKey:null,udiCode:null,status:null,page:1,limit:10},this.getList()},getList:function(){var t=this;this.loading=!0,console.log(" this.genKeyFk = "+this.currentRow.genKey),this.filterQuery.genKey=this.currentRow.genKey,Fp(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},statusFilterType:function(t){var e={0:"warning",1:"danger",2:"success"};return e[t]},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()}},mounted:function(){},created:function(){this.getList()},filters:{}},Pp=jp,Bp=(a("ce15"),Object(g["a"])(Pp,Rp,Ep,!1,null,null,null)),Up=Bp.exports,Ap={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},corpImportDetailVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"},templateDlUrl:null}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,qp(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.corpImportDetailVisible=!0},cancelDialog:function(){this.corpImportDetailVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};Vp(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.getList()})).catch((function(){t.loading=!1,t.list=[]})),Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL;t.uploadFileUrl=a+"/udiwms/corps/importLog/upload"})),Yr.a.get("./config.json").then((function(e){var a=e.data.SERVER_IP;t.templateDlUrl=a+"/已对照往来单位模板.xlsx"}))},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},handleChange:function(t,e,a){console.log(t),2e4!=t.code?(this.$message.error(t.message),this.getList()):(this.$message.success("文件上传成功,请稍后刷新查看!"),this.getList())},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]}},mounted:function(){},components:{corpImportDetail:Up},created:function(){this.getBasicThirdSys(),this.getList()}},Mp=Ap,Wp=(a("3f2c"),Object(g["a"])(Mp,Ip,Np,!1,null,null,null)),Hp=Wp.exports,Kp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.exportExcel}},[t._v("导出Excel文件")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"下载次数",prop:"dlCount","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.downloadExcel(e.row)}}},[t._v("下载\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.corpImportDetailVisible?a("el-dialog",{attrs:{title:"导出往来单位信息","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.corpImportDetailVisible,width:"85%"},on:{"update:visible":function(e){t.corpImportDetailVisible=e}}},[a("corpSelect",{attrs:{selectType:t.selectType},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Jp=[];function Gp(t){return Object(et["a"])({url:"/udiwms/corps/exportLog/filter",method:"get",params:t})}function Xp(t){return Object(et["a"])({url:"/udiwms/corps/exportLog/deleteLog",method:"post",data:t})}function Yp(t){return Object(et["a"])({url:"/udiwms/corps/importLog/export",method:"post",data:t})}var Zp=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{staticStyle:{width:"300px"},attrs:{placeholder:"搜索"},model:{value:t.query.key,callback:function(e){t.$set(t.query,"key",e)},expression:"query.key"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search",width:"1200px"},on:{click:t.getList}},[t._v("查询\n ")]),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导出\n ")]):t._e(),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allExport}},[t._v("结果全部导出\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("选中上传\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("一键上传\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index"}}),t.erpIdColumn?a("el-table-column",{attrs:{label:"往来单位编码",prop:"erpId","show-overflow-tooltip":"",width:"100"}}):t._e(),a("el-table-column",{attrs:{label:"名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return t.handleForm(e.$index,e.row)}}},[t._v("详情\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),a("el-dialog",{attrs:{title:"往来单位详情",visible:t.formVisible,"before-close":t.hideForm,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.formVisible=e}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.sysList,border:""}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"第三方系统名称",prop:"sysName","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方往来单位ID",prop:"thirdId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"第三方往来单位名称",prop:"thirdName","show-overflow-tooltip":""}})],1),a("el-form",{ref:"dataForm",staticStyle:{"margin-top":"20px"},attrs:{model:t.formData,rules:t.formRules}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("往来单位名称: ")])]),a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small","auto-complete":"off",splaceholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.formData.name,callback:function(e){t.$set(t.formData,"name",e)},expression:"formData.name"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("往来单位编码: ")])]),a("el-form-item",{attrs:{prop:"erpId"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off",disabled:"true"},model:{value:t.formData.erpId,callback:function(e){t.$set(t.formData,"erpId",e)},expression:"formData.erpId"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("社会信用号: ")])]),a("el-form-item",{attrs:{prop:"creditNo"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.formData.creditNo,callback:function(e){t.$set(t.formData,"creditNo",e)},expression:"formData.creditNo"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系人: ")])]),a("el-form-item",{attrs:{prop:"contact"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.formData.contact,callback:function(e){t.$set(t.formData,"contact",e)},expression:"formData.contact"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("地址: ")])]),a("el-form-item",{attrs:{prop:"addr"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{type:"","auto-complete":"off"},model:{value:t.formData.addr,callback:function(e){t.$set(t.formData,"addr",e)},expression:"formData.addr"}})],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("联系电话: ")])]),a("el-form-item",{attrs:{prop:"mobile"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.formData.mobile,callback:function(e){t.$set(t.formData,"mobile",e)},expression:"formData.mobile"}})],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20}},[a("el-col",{staticClass:"el-col",attrs:{span:10,type:"flex"}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("拼音码: ")])]),a("el-form-item",{attrs:{prop:"spell"}},[a("el-input",{staticStyle:{width:"80%"},attrs:{"auto-complete":"off"},model:{value:t.formData.spell,callback:function(e){t.$set(t.formData,"spell",e)},expression:"formData.spell"}})],1)],1)])],1)],1)],1)],1)},tm=[],em=(a("d958"),{id:"",thirdId:"",erpId:"",name:"",spell:"",addr:"",status:"",type:"",creditNo:"",contact:"",mobile:""}),am={name:"CorpInfoSelect",props:{selectType:{type:Object,required:!0}},data:function(){return{query:{ids:[],key:"",page:1,limit:20},erpIdColumn:!1,thirdIdColumn:!1,editQuery:null,corpData:null,checked:!1,formName:null,formMap:{add:"新增",update:"编辑"},formLoading:!1,formVisible:!1,formData:em,combinType:0,combinTypeMap:{0:"选入往来单位信息",1:"关联往来单位信息"},formRules:{},spellUpdate:!1,editDialogVisible:!1,selectDrugDialogVisible:!1,selectSingleUnitVisible:!1,list:[],sysList:[],total:0,multipleSelection:[],thirdSys:[],thirdSysFk:null}},methods:{onReset:function(){this.$router.push({path:""}),this.query={key:"",page:1,limit:20},this.getList()},getList:function(){var t=this;this.loading=!0,this.erpIdColumn=!1,this.thirdIdColumn=!1,Object(Yt["f"])(this.query).then((function(e){console.log(e),t.loading=!1,t.erpIdColumn="1"==e.data.BUMErpIdValue,t.thirdIdColumn="1"==e.data.BUMThirdIdValue,t.list=e.data.page.list||[],t.total=e.data.page.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},resetForm:function(){this.$refs["dataForm"]&&(this.$refs["dataForm"].clearValidate(),this.$refs["dataForm"].resetFields(),this.getList())},hideForm:function(){return this.formVisible=!this.formVisible,!0},handleForm:function(t,e){this.formVisible=!0,this.formData=JSON.parse(JSON.stringify(em)),null!==e&&(this.formData=Object.assign({},e)),this.formName="add",this.spellUpdate=!1,null!==t&&(this.index=t,this.formName="update",this.spellUpdate=!0),this.editQuery=e,this.getThirdSysDetail()},formSubmit:function(){var t=this;this.$refs["dataForm"].validate((function(e){if(e){t.formLoading=!0;var a=Object.assign({},t.formData);console.log("------2------"),Object(Yt["a"])(a,t.formName).then((function(e){if(t.formLoading=!1,2e4!==e.code)return t.$message.error(e.message),!1;t.$message.success("操作成功"),t.formVisible=!1,"add"===t.formName?e.data&&e.data.id&&(a.id=e.data.id,t.list.unshift(a)):t.list.splice(t.index,1,a),t.resetForm(),t.getList()})).catch((function(){t.formLoading=!1}))}}))},change:function(){var t=a("d958"),e=t(this.formData.name,{style:t.STYLE_FIRST_LETTER,heteronym:!0}),i="";e.forEach((function(t){i+=t[0]})),this.formData.spell=i},deleteUnit:function(t){var e=this;this.loading=!0;var a={id:t.id+""};Object(Yt["e"])(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},cancelDialog:function(){this.editDialogVisible=!1,this.selectSingleUnitVisible=!1,this.getList()},closeMain:function(t){this.selectDrugDialogVisible=!1,t?(this.$message.success("添加成功!"),this.getList()):this.$message.error("添加失败!")},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.query.ids.push(e.id)})),this.allExport()},allExport:function(){var t=this;Yp(this.query).then((function(e){2e4==e.code?t.$message({type:"success",message:"导出成功,后台正在生成Excel文件,请稍后刷新查看!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},uploadSMP:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.query.ids.push(e.id)})),this.allUploadSMP()},allUploadSMP:function(){var t=this;Ss(this.query).then((function(e){2e4==e.code?t.$message.success("提交成功,后台正在上传!"):t.$message.error(e.message),t.$emit("cancelDialog",!0)})).catch((function(){t.$message.error("上传失败!")}))},handleModifyClick:function(t){this.editDialogVisible=!0,this.editQuery=t,this.getThirdSysDetail()},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteUnit(t)})).catch((function(){}))},intentDetail:function(){this.combinType=0,this.selectDrugDialogVisible=!0},intentSelect:function(t){this.combinType=1,this.corpData=t,this.selectSingleUnitVisible=!0},handleSelectionChange:function(t){this.multipleSelection=t},handleCurrentChange:function(t){this.query.page=t,this.getList()},getBasicThirdSys:function(){var t=this,e={enabled:null};as(e).then((function(e){t.thirdSys=e.data.list||[],t.thirdSysFk=t.thirdSys[0].thirdId})).catch((function(){t.loading=!1,t.list=[]}))},getThirdSysDetail:function(){var t=this,e={id:this.editQuery.id};Object(Yt["h"])(e).then((function(e){t.loading=!1,t.sysList=e.data.list||[]})).catch((function(){t.loading=!1,t.sysList=[]}))}},mounted:function(){},components:{},created:function(){this.getList(),this.getBasicThirdSys()}},im=am,lm=(a("0563"),Object(g["a"])(im,Zp,tm,!1,null,"2713d162",null)),sm=lm.exports,om={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,type:1,thirdSysFk:null},selectType:0,corpImportDetailVisible:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,type:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,Gp(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},exportExcel:function(){this.selectType=0,this.corpImportDetailVisible=!0},uploadSmp:function(){this.selectType=1,this.corpImportDetailVisible=!0},downloadExcel:function(t){var e=this;Yr.a.get("./config.json").then((function(a){var i=a.data.BASE_URL,l=i+"/udiwms/corps/exportLog/download?genKey="+t.genKey;console.log("href = "+l);var s=document.createElement("a");fetch(l).then((function(t){return t.blob()})).then((function(a){s.href=URL.createObjectURL(a),console.log(s.href),s.download=t.filePath.split("/")[t.filePath.split("/").length-1],document.body.appendChild(s),s.click(),e.getList()}))}))},cancelDialog:function(t){this.corpImportDetailVisible=!1,t&&this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};Xp(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]}},mounted:function(){},components:{corpSelect:sm},created:function(){this.getList()}},rm=om,nm=(a("b32d"),Object(g["a"])(rm,Kp,Jp,!1,null,null,null)),cm=nm.exports,um=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品编码/商品条码/医保编码",clearable:"true"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyupErp_submit(e)}},model:{value:t.filterQuery.code,callback:function(e){t.$set(t.filterQuery,"code",e)},expression:"filterQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"产品名称"},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"规格型号"},model:{value:t.filterQuery.spec,callback:function(e){t.$set(t.filterQuery,"spec",e)},expression:"filterQuery.spec"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"注册/备案凭证"},model:{value:t.filterQuery.registerNo,callback:function(e){t.$set(t.filterQuery,"registerNo",e)},expression:"filterQuery.registerNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"生产厂家"},model:{value:t.filterQuery.manufactory,callback:function(e){t.$set(t.filterQuery,"manufactory",e)},expression:"filterQuery.manufactory"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.thirdSysChange},model:{value:t.filterQuery.thirdSys,callback:function(e){t.$set(t.filterQuery,"thirdSys",e)},expression:"filterQuery.thirdSys"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"80"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"code"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"计量单位",prop:"measname","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册/备案凭证",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.detailDialog(e.row)}}},[t._v("详情\n ")]),0!=t.thirdSysDetail.fromType?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")]):t._e()]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t.thrProductsDetailVisible?a("el-dialog",{attrs:{"close-on-click-modal":!1,"close-on-press-escape":!1,title:"产品信息详情",visible:t.thrProductsDetailVisible,width:"85%"},on:{"update:visible":function(e){t.thrProductsDetailVisible=e}}},[a("thrProductsDetail",{attrs:{data:t.thisData}})],1):t._e()],1)},dm=[];function pm(t){return Object(et["a"])({url:"/udiwms/thrsys/delThrProducts",method:"post",data:t})}function mm(t){return Object(et["a"])({url:"/udiwms/thrsys/products/delAll",method:"get",params:t})}function hm(t){return Object(et["a"])({url:"/udiwms/thrsys/products/downloadAll",method:"get",params:t})}function fm(t){return Object(et["a"])({url:"/udiwms/thrsys/products/productsDlAll",method:"post",data:t})}var gm=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[t.isImport?t._e():a("div",{staticStyle:{"margin-bottom":"20px"}},[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{size:"small",splaceholder:"请输入内容",disabled:!0},model:{value:t.data.name,callback:function(e){t.$set(t.data,"name",e)},expression:"data.name"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品标识: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.code,callback:function(e){t.$set(t.data,"code",e)},expression:"data.code"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册证号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.registerNo,callback:function(e){t.$set(t.data,"registerNo",e)},expression:"data.registerNo"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("生产厂家: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.data.manufactory,callback:function(e){t.$set(t.data,"manufactory",e)},expression:"data.manufactory"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("规格型号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.spec,callback:function(e){t.$set(t.data,"spec",e)},expression:"data.spec"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("计量单位: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.measname,callback:function(e){t.$set(t.data,"measname",e)},expression:"data.measname"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医疗器械注册人: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"ylqxzcrbarmc"},model:{value:t.data.ylqxzcrbarmc,callback:function(e){t.$set(t.data,"ylqxzcrbarmc",e)},expression:"data.ylqxzcrbarmc"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("注册人英文名称: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ylqxzcrbarywmc,callback:function(e){t.$set(t.data,"ylqxzcrbarywmc",e)},expression:"data.ylqxzcrbarywmc"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.cplb,callback:function(e){t.$set(t.data,"cplb",e)},expression:"data.cplb"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("分类编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.flbm,callback:function(e){t.$set(t.data,"flbm",e)},expression:"data.flbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("商品条码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.sptm,callback:function(e){t.$set(t.data,"sptm",e)},expression:"data.sptm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("医保编码: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.ybbm,callback:function(e){t.$set(t.data,"ybbm",e)},expression:"data.ybbm"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("统一社会信用号: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.tyshxydm,callback:function(e){t.$set(t.data,"tyshxydm",e)},expression:"data.tyshxydm"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("器械类别: ")])]),a("el-input",{staticStyle:{width:"60%"},attrs:{disabled:!0,size:"small",splaceholder:"请输入内容"},model:{value:t.data.qxlb,callback:function(e){t.$set(t.data,"qxlb",e)},expression:"data.qxlb"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",staticStyle:{"margin-top":"12px"},attrs:{span:20}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("产品描述: ")])]),a("el-input",{staticStyle:{width:"85%"},attrs:{type:"textarea",size:"mini",disabled:!0,rows:"4",splaceholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.data.cpms,callback:function(e){t.$set(t.data,"cpms",e)},expression:"data.cpms"}})],1)])],1)],1)])],1)},ym=[],bm={name:"ThrProductsDetail",props:{data:{type:Object,required:!0}}},vm=bm,wm=Object(g["a"])(vm,gm,ym,!1,null,"df905db2",null),xm=wm.exports,Dm={data:function(){return{filterQuery:{code:null,name:"",spec:null,registerNo:null,manufactory:null,thirdSys:"",page:1,limit:20},total:0,thirdSys:[],thirdSysDetail:null,list:[],uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"},thrProductsDetailVisible:!1,thisData:null,loading:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={code:null,spec:null,registerNo:null,manufactory:null,name:"",thirdSys:null,page:1,limit:20},this.getList()},getList:function(){var t=this;null!=this.filterQuery.thirdSys?(this.loading=!0,rs(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))):this.$message.warning("请先选择第三方系统!")},clearAll:function(){var t=this;this.$confirm("此操作将清空所有产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){mm().then((function(e){t.loading=!1,2e4==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.error(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};pm(a).then((function(t){e.loading=!1,2e4==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.success(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},detailDialog:function(t){this.thisData=t,this.thrProductsDetailVisible=!0},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSys=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSys,t.getThirdSysDetail(),t.selectSysParam(),t.getList()})).catch((function(){t.loading=!1,t.list=[]}))},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys,key:"piQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSys};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/pi/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSys,this.getThirdSysDetail()},downloadDatas:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys};hm(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))}},components:{thrProductsDetail:xm},mounted:function(){},created:function(){this.getBasicThirdSys()}},Cm=Dm,km=Object(g["a"])(Cm,um,dm,!1,null,null,null),Qm=km.exports,Sm=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.sysChange},model:{value:t.filterQuery.thirdSysFk,callback:function(e){t.$set(t.filterQuery,"thirdSysFk",e)},expression:"filterQuery.thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入产品信息")])],1),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.jumpDl}},[t._v("模板下载\n ")]),this.thirdSysDetail.enabled&&3==this.thirdSysDetail.fromType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadProducts}},[t._v("\n 下载产品信息\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源系统",prop:"thirdSysFk","show-overflow-tooltip":"",formatter:t.formatterThirdSys}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"导入产品信息详情详情","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.udiImportDetailVisible,width:"85%"},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("thrProductsImportDetail",{attrs:{currentRow:t.currentRow}})],1):t._e(),t.thrProductsSelectVisible?a("el-dialog",{attrs:{title:"下载产品信息","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.thrProductsSelectVisible,width:"85%"},on:{"update:visible":function(e){t.thrProductsSelectVisible=e}}},[a("thrProductsSelect",{attrs:{selectType:t.selectType,isDownThrSys:!0},on:{cancelDialog:t.cancelDialog}})],1):t._e()],1)},_m=[];function $m(t){return Object(et["a"])({url:"/udiwms/thrProducts/importLog/filter",method:"get",params:t})}function Tm(t){return Object(et["a"])({url:"/udiwms/thrProducts/importLog/filterDetail",method:"get",params:t})}function Lm(t){return Object(et["a"])({url:"/udiwms/thrProducts/importLog/deleteLog",method:"post",data:t})}var Om=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品编码"},model:{value:t.filterQuery.code,callback:function(e){t.$set(t.filterQuery,"code",e)},expression:"filterQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"code"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"计量单位",prop:"measname","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},zm=[],Im={name:"ThrProductsImportDetail",props:{currentRow:{type:Object,required:!0}},data:function(){return{filterQuery:{genKey:null,code:null,name:"",status:null,page:1,limit:10},list:[],detailList:[],total:0,status:{0:"未处理",1:"处理失败",2:"处理成功"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={genKey:null,code:null,name:"",status:null,page:1,limit:10},this.getList()},getList:function(){var t=this;this.loading=!0,console.log(" this.genKey = "+this.currentRow),this.filterQuery.genKey=this.currentRow.genKey,Tm(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},statusFilterType:function(t){var e={0:"warning",1:"danger",2:"success"};return e[t]},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()}},mounted:function(){},created:function(){this.getList()},filters:{}},Nm=Im,Fm=(a("f614"),Object(g["a"])(Nm,Om,zm,!1,null,null,null)),qm=Fm.exports,Vm=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品编码/商品条码/医保编码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyupErp_submit(e)}},model:{value:t.filterQuery.code,callback:function(e){t.$set(t.filterQuery,"code",e)},expression:"filterQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品通用名"},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"规格型号"},model:{value:t.filterQuery.spec,callback:function(e){t.$set(t.filterQuery,"spec",e)},expression:"filterQuery.spec"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"注册/备案凭证"},model:{value:t.filterQuery.registerNo,callback:function(e){t.$set(t.filterQuery,"registerNo",e)},expression:"filterQuery.registerNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{clearable:"true",placeholder:"生产厂家"},model:{value:t.filterQuery.manufactory,callback:function(e){t.$set(t.filterQuery,"manufactory",e)},expression:"filterQuery.manufactory"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.thirdSysChange},model:{value:t.filterQuery.thirdSys,callback:function(e){t.$set(t.filterQuery,"thirdSys",e)},expression:"filterQuery.thirdSys"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导出\n ")]):t._e(),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allExport}},[t._v("结果全部导出\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSmp}},[t._v("选中上传\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allUploadSmp}},[t._v("一键上传\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadErp}},[t._v("选中下载\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadAllErp}},[t._v("结果全部下载\n ")]):t._e()],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index",width:"80"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"code"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"计量单位",prop:"measname","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"注册证号",prop:"registerNo","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"生产厂家",prop:"manufactory","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.detailDialog(e.row)}}},[t._v("详情\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),t.thrProductsDetailVisible?a("el-dialog",{attrs:{title:"产品信息详情",visible:t.thrProductsDetailVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":""},on:{"update:visible":function(e){t.thrProductsDetailVisible=e}}},[a("thrProductsDetail",{attrs:{data:t.thisData}})],1):t._e()],1)},Rm=[];function Em(t){return Object(et["a"])({url:"/udiwms/thrProducts/importLog/export",method:"post",data:t})}var jm={name:"thrProductsSelect",props:{selectType:{type:Object,required:!0},isDownThrSys:{type:Object,required:!0}},data:function(){return{filterQuery:{thrProductsEntities:[],code:null,name:"",thirdSys:null,spec:null,manufactory:null,registerNo:null,page:1,limit:10,isDownThrSys:null},total:0,thirdSys:[],thirdSysDetail:null,list:[],uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"},thrProductsDetailVisible:!1,thisData:null}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={thrProductsEntities:[],code:null,name:"",thirdSys:"",page:1,limit:20},this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.isDownThrSys=this.isDownThrSys,rs(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},clearAll:function(){var t=this;this.$confirm("此操作将清空所有产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){mm().then((function(e){t.loading=!1,2e4==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.success(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))},handleSelectionChange:function(t){this.multipleSelection=t},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该产品信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};pm(a).then((function(t){e.loading=!1,2e4==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.success(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},detailDialog:function(t){this.thisData=t,this.thrProductsDetailVisible=!0},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSys=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSys,t.getThirdSysDetail(),t.selectSysParam(),t.getList()})).catch((function(){t.loading=!1,t.list=[]}))},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys,key:"piQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSys};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/pi/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSys,this.getThirdSysDetail()},downloadDatas:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys};hm(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))},uploadSmp:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.thrProductsEntities.push(e)})),this.allUploadSmp()},allUploadSmp:function(){var t=this;Ts(this.filterQuery).then((function(e){2e4==e.code?(t.$message.success(e.data),t.$emit("cancelDialog",!0)):(t.$message.error(e.message),t.$emit("cancelDialog",!0))})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},downloadErp:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.thrProductsEntities.push(e)})),this.downloadAllErp()},downloadAllErp:function(){var t=this;fm(this.filterQuery).then((function(e){2e4==e.code?(t.$message.success(e.data),t.$emit("cancelDialog",!0)):(t.$message.error(e.message),t.$emit("cancelDialog",!0))})).catch((function(){t.$message({type:"error",message:"下载失败"})}))},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.thrProductsEntities.push(e)})),this.allExport()},allExport:function(){var t=this;Em(this.filterQuery).then((function(e){2e4==e.code?(t.$message({type:"success",message:"导出成功,后台正在生成Excel文件,请稍后刷新查看!"}),t.$emit("cancelDialog",!0)):(t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0))})).catch((function(){t.$message({type:"error",message:"上传失败"})}))}},components:{thrProductsDetail:xm},mounted:function(){},created:function(){this.getBasicThirdSys()}},Pm=jm,Bm=Object(g["a"])(Pm,Vm,Rm,!1,null,null,null),Um=Bm.exports,Am={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},udiImportDetailVisible:!1,thrProductsSelectVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,templateDlUrl:null,uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,$m(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},formatterThirdSys:function(t){var e=null;return this.thirdSys.forEach((function(a,i){t.thirdSysFk==a.thirdId&&(e=a.thirdName)})),e},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.udiImportDetailVisible=!0},cancelDialog:function(t){this.udiImportDetailVisible=!1,this.thrProductsSelectVisible=!1,t&&this.getList()},sysChange:function(){this.getThirdSysDetail()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该导入记录, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};Lm(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.getList(),t.getThirdSysDetail()})).catch((function(){t.loading=!1,t.list=[]})),Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL,i=e.data.SERVER_IP;t.templateDlUrl=i+"/第三方产品信息导入模板.xlsx",t.uploadFileUrl=a+"/udiwms/thrProducts/importLog/upload",console.log(t.templateDlUrl)}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(this.$message.success("文件上传成功,请稍后刷新查看!"),this.getList())},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"piQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]})),this.uploadData.thirdSys=this.filterQuery.thirdSysFk},downloadProducts:function(){this.selectType=3,this.thrProductsSelectVisible=!0},downloadDatas:function(){var t=this;this.$confirm("此操作从第三方系统下载全部信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={thirdSysFk:t.filterQuery.thirdSysFk};hm(e).then((function(e){2e4==e.code?(t.$message.success(e.data),t.getList()):t.$message.error(e.message)}))}))}},mounted:function(){},components:{thrProductsImportDetail:qm,thrProductsSelect:Um},created:function(){this.getBasicThirdSys()}},Mm=Am,Wm=(a("17af"),Object(g["a"])(Mm,Sm,_m,!1,null,null,null)),Hm=Wm.exports,Km=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号",clearable:""},model:{value:t.filterQuery.billNo,callback:function(e){t.$set(t.filterQuery,"billNo",e)},expression:"filterQuery.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.filterQuery.corpName,callback:function(e){t.$set(t.filterQuery,"corpName",e)},expression:"filterQuery.corpName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型",clearable:"true"},model:{value:t.filterQuery.billAction,callback:function(e){t.$set(t.filterQuery,"billAction",e)},expression:"filterQuery.billAction"}},t._l(t.originTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":"true"},on:{"current-change":t.handleDetail}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),a("el-table-column",{attrs:{label:"第三方单据类型",prop:"billType"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"corpId"}}),a("el-table-column",{attrs:{label:"往来单位",prop:"corpName","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据状态",prop:"billFlag"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"120"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"productId"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"reCount"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"count"}})],1)],1)],1)},Jm=[];function Gm(t){return Object(et["a"])({url:"/udiwms/thrsys/delOrder",method:"post",data:t})}function Xm(t){return Object(et["a"])({url:"/udiwms/thrsys/order/delAll",method:"get",params:t})}function Ym(t){return Object(et["a"])({url:"/udiwms/thrsys/orders/downloadAll",method:"get",params:t})}function Zm(t){return Object(et["a"])({url:"/udiwms/thrsys/orders/orderDownload",method:"post",data:t})}var th={data:function(){return{filterQuery:{billAction:null,billNo:"",originType:null,thirdSysFk:"",page:1,limit:10,corpName:null},total:0,thirdSys:[],thirdSysDetail:null,busTypes:[],originTypes:[],list:[],detailList:[],uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"},loading:!1,actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={billNo:"",thirdSysFk:"",billFlag:null,billAction:null,startDate:null,endDate:null,page:1,limit:10,corpName:null},this.actDateRange=[],this.getList()},getList:function(){var t=this;null!=this.filterQuery.thirdSysFk?(null!=this.actDateRange?(this.filterQuery.startDate=this.actDateRange[0],this.filterQuery.endDate=this.actDateRange[1]):(this.filterQuery.startDate=null,this.filterQuery.endDate=null),this.loading=!0,ur(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))):this.$message.warning("请先选择第三方系统!")},handleDetail:function(t){this.detailList=t.subErpOrders},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该单据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};Gm(a).then((function(t){e.loading=!1,2e4==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},clearAll:function(){var t=this;this.$confirm("此操作将清空所有单据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Xm().then((function(e){t.loading=!1,2e4==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.success(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.selectSysParam(),t.getThirdSysDetail(),t.getBusType()})).catch((function(){t.loading=!1,t.list=[]}))},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSysFk};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/pi/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSysFk,this.getThirdSysDetail()},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"orderQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},downloadDatas:function(){var t=this,e={billAction:this.filterQuery.billAction};Ym(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getlocalName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].localName},getBusType:function(){var t=this,e={enabled:!0};Ur(e).then((function(e){t.busTypes=e.data.list||[]})).catch((function(){})),ru(e).then((function(e){t.originTypes=e.data.list||[]})).catch((function(){}))}},components:{},mounted:function(){},created:function(){this.getBasicThirdSys();var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t]}},eh=th,ah=(a("28f8"),Object(g["a"])(eh,Km,Jm,!1,null,"162bd574",null)),ih=ah.exports,lh=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入业务单据")])],1),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.jumpDl}},[t._v("模板下载\n ")]),this.thirdSysDetail.enabled&&3==this.thirdSysDetail.fromType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadOrderss}},[t._v("\n 下载业务单据\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"导入订单详情","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.udiImportDetailVisible,width:"85%"},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("thrOrderImportDetail",{attrs:{currentRow:t.currentRow}})],1):t._e(),t.thrOrderSelectVisible?a("el-dialog",{attrs:{title:"下载业务单据","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.thrOrderSelectVisible,width:"85%"},on:{"update:visible":function(e){t.thrOrderSelectVisible=e}}},[a("thrOrderSelect",{attrs:{selectType:t.selectType,isDownThrSys:!0},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},sh=[];function oh(t){return Object(et["a"])({url:"/udiwms/thrOrder/importLog/filterDetail",method:"get",params:t})}function rh(t){return Object(et["a"])({url:"/udiwms/thrOrder/importLog/filter",method:"get",params:t})}function nh(t){return Object(et["a"])({url:"/udiwms/thrOrder/importLog/deleteLog",method:"post",data:t})}var ch=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"UDI编码"},model:{value:t.filterQuery.billNo,callback:function(e){t.$set(t.filterQuery,"billNo",e)},expression:"filterQuery.billNo"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"corpId","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"往来单位",prop:"corpName","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据类型",prop:"billType","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据状态",prop:"billFlag",width:"80","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"productId","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"reCount","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"count","show-overflow-tooltip":"true"}})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},uh=[],dh={name:"ThrOrderImportDetail",props:{currentRow:{type:Object,required:!0}},data:function(){return{filterQuery:{genKey:null,billNo:null,status:null,page:1,limit:10},list:[],detailList:[],total:0,status:{0:"未处理",1:"处理失败",2:"处理成功"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={genKey:null,billNo:null,status:null,page:1,limit:10},this.getList()},getList:function(){var t=this;this.loading=!0,console.log(" this.genKey = "+this.currentRow),this.filterQuery.genKey=this.currentRow.genKey,oh(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},statusFilterType:function(t){var e={0:"warning",1:"danger",2:"success"};return e[t]},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()}},mounted:function(){},created:function(){this.getList()},filters:{}},ph=dh,mh=(a("d9df"),Object(g["a"])(ph,ch,uh,!1,null,null,null)),hh=mh.exports,fh=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单据号",clearable:""},model:{value:t.filterQuery.billNo,callback:function(e){t.$set(t.filterQuery,"billNo",e)},expression:"filterQuery.billNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.filterQuery.corpName,callback:function(e){t.$set(t.filterQuery,"corpName",e)},expression:"filterQuery.corpName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.filterQuery.billAction,callback:function(e){t.$set(t.filterQuery,"billAction",e)},expression:"filterQuery.billAction"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("单据日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.actDateRange,callback:function(e){t.actDateRange=e},expression:"actDateRange"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导出\n ")]):t._e(),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allExport}},[t._v("结果全部导出\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("选中上传\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allUploadSMP}},[t._v("一键上传\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadErp}},[t._v("选中下载\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadAllErp}},[t._v("结果全部下载\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":"true"},on:{"selection-change":t.handleSelectionChange,"current-change":t.handleDetail}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),a("el-table-column",{attrs:{label:"单据号",prop:"billNo"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"corpId",width:"100"}}),a("el-table-column",{attrs:{label:"往来单位",prop:"corpName",width:"300","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"billType"}}),a("el-table-column",{attrs:{label:"单据状态",prop:"billFlag",width:"80"}}),a("el-table-column",{attrs:{label:"单据日期",prop:"billdate"}}),a("el-table-column",{attrs:{label:"单据类型",prop:"originType"}}),0!=t.thirdSysDetail.fromType?a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}],null,!1,1755930777)}):t._e()],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"120"}}),a("el-table-column",{attrs:{label:"产品编码",prop:"productId"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"productName","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"spec","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"单据数量",prop:"reCount"}}),a("el-table-column",{attrs:{label:"实际数量",prop:"count"}})],1)],1)],1)},gh=[],yh={name:"ThrOrderSelect",props:{selectType:{type:Object,required:!0},isDownThrSys:{type:Object,required:!0}},data:function(){return{filterQuery:{erpOrderResponses:[],billNo:"",thirdSysFk:"",billFlag:null,billAction:"PurchaseWareHouseIn",startDate:null,endDate:null,page:1,limit:10,isDownThrSys:null},total:0,thirdSys:[],thirdSysDetail:null,busTypes:[],list:[],detailList:[],uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"},loading:!1,multipleSelection:[],actDateRange:[],pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={erpOrderResponses:[],billNo:"",thirdSysFk:"",billFlag:null,billAction:"PurchaseWareHouseIn",startDate:null,endDate:null,page:1,limit:10,isDownThrSys:null},this.actDateRange=[],this.getList()},getList:function(){var t=this;null!=this.filterQuery.thirdSysFk?(null!=this.actDateRange?(this.filterQuery.startDate=this.actDateRange[0],this.filterQuery.endDate=this.actDateRange[1]):(this.filterQuery.startDate=null,this.filterQuery.endDate=null),this.loading=!0,this.filterQuery.isDownThrSys=this.isDownThrSys,ur(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))):this.$message.warning("请先选择第三方系统!")},handleDetail:function(t){this.detailList=t.subErpOrders},handleSelectionChange:function(t){this.multipleSelection=t},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.erpOrderResponses.push(e)})),this.allExport()},allExport:function(){var t=this;il(this.filterQuery).then((function(e){2e4==e.code?t.$message({type:"success",message:"导出成功,后台正在生成Excel文件,请稍后刷新查看!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"})}))},uploadSMP:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.erpOrderResponses.push(e)})),this.allUploadSMP()},allUploadSMP:function(){var t=this;$s(this.filterQuery).then((function(e){2e4==e.code?t.$message.success("提交成功,后台正在上传!"):t.$message.error(e.message),t.$emit("cancelDialog",!0)})).catch((function(){t.$message.error("上传失败!")}))},downloadErp:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.erpOrderResponses.push(e)})),this.downloadAllErp()},downloadAllErp:function(){var t=this;Zm(this.filterQuery).then((function(e){2e4==e.code?t.$message.success("提交成功,后台正在下载!"):t.$message.error(e.message),t.$emit("cancelDialog",!0)})).catch((function(){t.$message.error("下载失败!")}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该单据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};Gm(a).then((function(t){e.loading=!1,2e4==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},clearAll:function(){var t=this;this.$confirm("此操作将清空所有单据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Xm().then((function(e){t.loading=!1,2e4==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.success(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.selectSysParam(),t.getThirdSysDetail(),t.getBusType()})).catch((function(){t.loading=!1,t.list=[]}))},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSysFk};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/pi/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSysFk,this.getThirdSysDetail()},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"orderQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},downloadDatas:function(){var t=this,e={billAction:this.filterQuery.billAction};Ym(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action,t.getList()})).catch((function(){}))}},components:{},mounted:function(){},created:function(){var t=new Date,e=new Date;e.setTime(e.getTime()-6048e5),this.actDateRange=[e,t],this.getBasicThirdSys()}},bh=yh,vh=(a("8849"),Object(g["a"])(bh,fh,gh,!1,null,"1ee90a56",null)),wh=vh.exports,xh={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},udiImportDetailVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"},templateDlUrl:null,busTypes:[],thrOrderSelectVisible:!1}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,rh(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.udiImportDetailVisible=!0},sysChange:function(){this.getThirdSysDetail()},cancelDialog:function(t){this.udiImportDetailVisible=!1,this.thrOrderSelectVisible=!1,t&&this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该业务单据信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};nh(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.getList(),t.getThirdSysDetail()})).catch((function(){t.loading=!1,t.list=[]})),Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL;t.uploadFileUrl=a+"/udiwms/thrOrder/importLog/upload";var i=e.data.SERVER_IP;t.templateDlUrl=i+"/第三方业务单据导入模板.xlsx",console.log(e.data.BASE_URL+"\n"+e.data.BASE_URL2)}))},formatterThirdSys:function(t){var e=null;return this.thirdSys.forEach((function(a,i){t.thirdSysFk==a.thirdId&&(e=a.thirdName)})),e},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(this.$message.success("文件上传成功,请稍后刷新查看!"),this.getList())},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"orderQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]})),this.uploadData.thirdSys=this.filterQuery.thirdSysFk},downloadOrderss:function(){this.selectType=3,this.thrOrderSelectVisible=!0},downloadDatas:function(){var t=this;this.$confirm("此操作从第三方系统下载全部业务单据信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={billAction:t.filterQuery.billAction,thirdSysFk:t.filterQuery.thirdSysFk};Ym(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))}))},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},formatter:function(t,e){return 1==t.isE&&(t.Registrationstate="已注册"),0==t.Registrationstate&&(t.Registrationstate="未注册"),t.Registrationstate}},mounted:function(){},components:{thrOrderImportDetail:hh,thrOrderSelect:wh},created:function(){this.getBasicThirdSys(),this.getBusType(),this.getList()}},Dh=xh,Ch=(a("5da4"),Object(g["a"])(Dh,lh,sh,!1,null,null,null)),kh=Ch.exports,Qh=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"系统ID"},model:{value:t.filterQuery.thirdId,callback:function(e){t.$set(t.filterQuery,"thirdId",e)},expression:"filterQuery.thirdId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"系统名称"},model:{value:t.filterQuery.thirdName,callback:function(e){t.$set(t.filterQuery,"thirdName",e)},expression:"filterQuery.thirdName"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"状态"},model:{value:t.filterQuery.enabled,callback:function(e){t.$set(t.filterQuery,"enabled",e)},expression:"filterQuery.enabled"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"已启用",value:"1"}}),a("el-option",{attrs:{label:"未启用",value:"0"}})],1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":"true"},on:{"current-change":t.handleCurrentChange}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"120",fixed:""}}),a("el-table-column",{attrs:{label:"系统ID",prop:"thirdId",fixed:""}}),a("el-table-column",{attrs:{label:"系统名称",prop:"thirdName",fixed:""}}),a("el-table-column",{attrs:{label:"系统启用",prop:"enabled",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.enabled]))])]}}])}),a("el-table-column",{attrs:{label:"是否主系统",prop:"mainSys",fixed:""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.mainSys]))])]}}])}),a("el-table-column",{attrs:{label:"备注",prop:"remark",fixed:"","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleModifyClick(e.row)}}},[t._v("编辑\n ")])]}}])})],1),t.modifyDialogVisible?a("el-dialog",{attrs:{title:"第三方系统设置","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.modifyDialogVisible,width:"70%"},on:{"update:visible":function(e){t.modifyDialogVisible=e}}},[a("modifyDialog",{attrs:{inputQuery:t.inputQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onModifySubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e()],1),a("el-card",{staticClass:"el-card"},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"接口名称",prop:"name","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"接口启用",prop:"enabled"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.enableMap[e.row.enabled]))])]}}])}),a("el-table-column",{attrs:{label:"数据来源",prop:"enabled"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.dataMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"备注",prop:"remark","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"接口地址",prop:"value",width:"400","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailModifyClick(e.row)}}},[t._v("编辑\n ")])]}}])})],1),t.modifyDetailDialogVisible?a("el-dialog",{attrs:{title:"接口参数设置","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.modifyDetailDialogVisible,width:"70%"},on:{"update:visible":function(e){t.modifyDetailDialogVisible=e}}},[a("modifyDetailDialog",{attrs:{inputDetailQuery:t.inputDetailQuery}}),a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.onDetailModifySubmit}},[t._v("提交\n ")]),a("el-button",{attrs:{type:"primary",size:"small",icon:"search"},on:{click:t.cancelDialog}},[t._v("取消\n ")])],1)],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handlePageChange}}),a("div",{staticStyle:{"margin-top":"18px",color:"#F71616"}},[a("span",[t._v("重要提示:本页功能仅供技术提供方修改 ")])])],1)],1)},Sh=[],_h=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex",align:"middle"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("系统ID: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"mini",splaceholder:"请输入内容",disabled:!0},model:{value:t.inputQuery.thirdId,callback:function(e){t.$set(t.inputQuery,"thirdId",e)},expression:"inputQuery.thirdId"}})],1)]),a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("系统名称: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"mini",splaceholder:"请输入内容"},model:{value:t.inputQuery.thirdName,callback:function(e){t.$set(t.inputQuery,"thirdName",e)},expression:"inputQuery.thirdName"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:10}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("API说明文档: ")])]),a("div",{staticStyle:{"padding-top":"5px"}},[a("a",{attrs:{href:t.inputQuery.guideUrl,target:"_blank"}},[t._v(t._s(t.inputQuery.thirdName)+"接口说明文档")])])])]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.enabled,callback:function(e){t.$set(t.inputQuery,"enabled",e)},expression:"inputQuery.enabled"}},[t._v("是否启用")])],1)]),a("el-col",{staticClass:"el-col",attrs:{span:4}},[a("div",{staticClass:"text item"},[a("el-checkbox",{model:{value:t.inputQuery.mainSys,callback:function(e){t.$set(t.inputQuery,"mainSys",e)},expression:"inputQuery.mainSys"}},[t._v("是否设为主系统")])],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:18}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("第三方服务IP地址: ")])]),a("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini",splaceholder:"请输入内容"},model:{value:t.inputQuery.thridUrl,callback:function(e){t.$set(t.inputQuery,"thridUrl",e)},expression:"inputQuery.thridUrl"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:24}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("备注说明: ")])]),a("el-input",{staticStyle:{width:"80%"},attrs:{type:"textarea",size:"mini",rows:"6",splaceholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputQuery.remark,callback:function(e){t.$set(t.inputQuery,"remark",e)},expression:"inputQuery.remark"}})],1)])],1)],1)},$h=[],Th={name:"inputQuery",props:{inputQuery:{type:Object,required:!0}}},Lh=Th,Oh=(a("337a"),Object(g["a"])(Lh,_h,$h,!1,null,"7ed4f398",null)),zh=Oh.exports,Ih=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex",align:"middle"}},[a("el-col",{staticClass:"el-col",attrs:{span:8}},[a("div",{staticClass:"text item"},[a("span",[t._v("是否启用接口")]),a("el-radio-group",{staticStyle:{"margin-right":"20px","margin-left":"20px"},model:{value:t.inputDetailQuery.enabled,callback:function(e){t.$set(t.inputDetailQuery,"enabled",e)},expression:"inputDetailQuery.enabled"}},[a("el-radio-button",{attrs:{label:!0,size:"mini"}},[t._v("启用")]),a("el-radio-button",{attrs:{label:!1,size:"mini"}},[t._v("禁用")])],1)],1)]),a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("el-radio-group",{staticStyle:{"margin-right":"20px"},attrs:{disabled:!t.inputDetailQuery.enabled},on:{change:t.agreeChange},model:{value:t.inputDetailQuery.fromType,callback:function(e){t.$set(t.inputDetailQuery,"fromType",e)},expression:"inputDetailQuery.fromType"}},[a("el-radio-button",{attrs:{label:0,size:"mini"}},[t._v("接口实时获取")]),a("el-radio-button",{attrs:{label:3,size:"mini"}},[t._v("接口本地缓存")]),a("el-radio-button",{attrs:{label:2,size:"mini"}},[t._v("第三方上传缓存")]),a("el-radio-button",{attrs:{label:1,size:"mini"}},[t._v("文件缓存")])],1)],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex",align:"middle"}},[a("el-col",{staticClass:"el-col",attrs:{span:12}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("接口名称: ")])]),a("el-input",{staticStyle:{width:"200px"},attrs:{size:"mini",splaceholder:"请输入内容",disabled:!0},model:{value:t.inputDetailQuery.name,callback:function(e){t.$set(t.inputDetailQuery,"name",e)},expression:"inputDetailQuery.name"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:18}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("接口地址: ")])]),a("el-input",{staticStyle:{width:"80%"},attrs:{size:"mini",splaceholder:"请输入内容"},model:{value:t.inputDetailQuery.value,callback:function(e){t.$set(t.inputDetailQuery,"value",e)},expression:"inputDetailQuery.value"}})],1)])],1),a("el-row",{staticClass:"el-row",attrs:{gutter:20,type:"flex"}},[a("el-col",{staticClass:"el-col",attrs:{span:24}},[a("div",{staticClass:"text item"},[a("div",{staticClass:"itemTag"},[a("span",[t._v("备注说明: ")])]),a("el-input",{staticStyle:{width:"80%"},attrs:{type:"textarea",size:"mini",rows:"6",splaceholder:"请输入内容"},on:{input:function(e){return t.change()}},model:{value:t.inputDetailQuery.remark,callback:function(e){t.$set(t.inputDetailQuery,"remark",e)},expression:"inputDetailQuery.remark"}})],1)])],1)],1)},Nh=[],Fh={name:"inputDetailQuery",props:{inputDetailQuery:{type:Object,required:!0}},data:function(){return{temp:null}},methods:{agreeChange:function(){var t=this;this.$confirm("请咨询系统技术支持方,否则可能导致基础数据缺失,系统无法正常运行。是否继续","提示",{confirmButtonText:"确定",type:"warning"}).then((function(){t.temp=t.inputDetailQuery.fromType})).catch((function(){t.inputDetailQuery.fromType=t.temp}))}},created:function(){this.temp=this.inputDetailQuery.fromType}},qh=Fh,Vh=(a("d872"),Object(g["a"])(qh,Ih,Nh,!1,null,"3427c93e",null)),Rh=Vh.exports,Eh={data:function(){return{filterQuery:{thirdId:"",thirdName:"",enabled:"1",page:1,limit:20},modifyDialogVisible:!1,modifyDetailDialogVisible:!1,list:[],inputQuery:null,inputDetailQuery:null,enableMap:{true:"是",false:"否"},dataMap:{0:"接口实时获取",1:"文件缓存",2:"第三方上传缓存",3:"接口本地缓存"},detailList:null,total:0}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={thirdId:"",thirdName:"",enabled:null,page:1,limit:20},this.getList()},cancelDialog:function(){this.modifyDialogVisible=!1,this.modifyDetailDialogVisible=!1},handleCurrentChange:function(t){this.getDetailList(t)},getList:function(){var t=this;this.loading=!0,as(this.filterQuery).then((function(e){t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getDetailList:function(t){var e=this,a={thirdSysFk:t.thirdId};this.loading=!0,ls(a).then((function(t){e.loading=!1,e.detailList=t.data.list||[],e.total=t.data.total||0})).catch((function(){e.loading=!1,e.list=[],e.total=0}))},onModifySubmit:function(){var t=this;is(this.inputQuery).then((function(e){2e4==e.code?(t.loading=!1,t.cancelDialog(),t.getList(),t.$message.success(e.data)):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.cancelDialog()}))},onDetailModifySubmit:function(){var t=this;os(this.inputDetailQuery).then((function(e){2e4==e.code?(t.loading=!1,t.cancelDialog(),t.getList(),t.$message.success(e.data)):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.cancelDialog()}))},handleModifyClick:function(t){this.modifyDialogVisible=!0,this.inputQuery=t},handleDetailModifyClick:function(t){this.modifyDetailDialogVisible=!0,this.inputDetailQuery=t}},components:{modifyDialog:zh,modifyDetailDialog:Rh},mounted:function(){},created:function(){this.getList()}},jh=Eh,Ph=(a("b81e"),Object(g["a"])(jh,Qh,Sh,!1,null,"070d6d2e",null)),Bh=Ph.exports,Uh=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{attrs:{inline:!0,model:t.queryParams,size:"mini"}},[a("el-form-item",{attrs:{label:"名称"}},[a("el-input",{attrs:{size:"mini",placeholder:"请输入名称"},model:{value:t.queryParams.name,callback:function(e){t.$set(t.queryParams,"name",e)},expression:"queryParams.name"}})],1),a("el-form-item",[a("span",{staticStyle:{color:"#000","margin-left":"10px","margin-right":"6px"}},[t._v("日期:")]),a("el-date-picker",{attrs:{"picker-options":t.pickerOptions,type:"daterange",format:"yyyy 年 MM 月 dd 日","value-format":"yyyy-MM-dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"ID",prop:"projectGoodsCode"}}),a("el-table-column",{attrs:{label:"生产企业",prop:"manufactureName"}}),a("el-table-column",{attrs:{label:"配送企业",prop:"distributorName"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"productName"}}),a("el-table-column",{attrs:{label:"医保编码",prop:"medicalCode"}}),a("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"createTime","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"更新时间",align:"center",prop:"updateTime","show-overflow-tooltip":!0}})],1),a("el-pagination",{attrs:{"current-page":t.queryParams.page,"page-size":t.queryParams.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},Ah=[];function Mh(t){return Object(et["a"])({url:"/udplat/goods/list",method:"post",data:t})}var Wh={data:function(){return{dateRange:[],loading:!1,list:[],total:0,queryParams:{page:1,limit:10,name:""},pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},created:function(){this.getList()},methods:{handleCurrentChange:function(t){this.queryParams.page=t,this.getList()},onReset:function(){this.$router.push({path:""}),this.queryParams={page:1,limit:10,name:""},this.dateRange=[],this.getList()},onSubmit:function(){this.queryParams.page=1,this.getList()}}},Hh={name:"UdplatGoods",mixins:[Wh],methods:{getList:function(){var t=this;this.loading=!0;var e=this.addDateRange(this.queryParams,this.dateRange);Mh(e).then((function(e){t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(e){t.$message.error(e),t.loading=!1}))},addDateRange:function(t,e){var a=t;return a.startDate=null,a.endDate=null,null!=e&&""!=e&&(a.startDate=e[0],a.endDate=e[1]),a}},created:function(){this.getList()}},Kh=Hh,Jh=Object(g["a"])(Kh,Uh,Ah,!1,null,"485792e7",null),Gh=Jh.exports,Xh=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入产品信息")])],1)],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源系统",prop:"thirdSysFk","show-overflow-tooltip":"",formatter:t.formatterThirdSys}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"导入产品信息详情详情","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.udiImportDetailVisible,width:"85%"},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("thrProductsImportDetail",{attrs:{currentRow:t.currentRow}})],1):t._e()],1)},Yh=[];function Zh(t){return Object(et["a"])({url:"/udplat/goods/import/filter",method:"get",params:t})}function tf(t){return Object(et["a"])({url:"/udplat/goods/import/deleteLog",method:"post",data:t})}var ef={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},udiImportDetailVisible:!1,thrProductsSelectVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,templateDlUrl:null,uploadData:{type:"1"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,Zh(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},formatterThirdSys:function(t){var e=null;return this.thirdSys.forEach((function(a,i){t.thirdSysFk==a.thirdId&&(e=a.thirdName)})),e},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.udiImportDetailVisible=!0},cancelDialog:function(t){this.udiImportDetailVisible=!1,this.thrProductsSelectVisible=!1,t&&this.getList()},sysChange:function(){this.getThirdSysDetail()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该导入记录, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};tf(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.getList(),t.getThirdSysDetail()})).catch((function(){t.loading=!1,t.list=[]})),Yr.a.get("./config.json").then((function(e){var a=e.data.BASE_URL;t.uploadFileUrl=a+"/udplat/goods/import"}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(this.$message.success("文件上传成功,请稍后刷新查看!"),this.getList())},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"piQueryUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]})),this.uploadData.thirdSys=this.filterQuery.thirdSysFk},downloadProducts:function(){this.selectType=3,this.thrProductsSelectVisible=!0},downloadDatas:function(){var t=this;this.$confirm("此操作从第三方系统下载全部信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={thirdSysFk:t.filterQuery.thirdSysFk};hm(e).then((function(e){2e4==e.code?(t.$message.success(e.data),t.getList()):t.$message.error(e.message)}))}))}},mounted:function(){},components:{thrProductsImportDetail:qm,thrProductsSelect:Um},created:function(){this.getBasicThirdSys()}},af=ef,lf=(a("575e"),Object(g["a"])(af,Xh,Yh,!1,null,null,null)),sf=lf.exports,of=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码",clearable:""},model:{value:t.filterQuery.unitId,callback:function(e){t.$set(t.filterQuery,"unitId",e)},expression:"filterQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.thirdSysChange},model:{value:t.filterQuery.thirdSys,callback:function(e){t.$set(t.filterQuery,"thirdSys",e)},expression:"filterQuery.thirdSys"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),this.thirdSysDetail.enabled?t._e():a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.clearAll}},[t._v("清空全部\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"id",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"拼音简写",prop:"spell",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系人",prop:"contact",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系电话",prop:"mobile","show-overflow-tooltip":""}}),0!=t.thirdSysDetail.fromType?a("el-table-column",{attrs:{label:"操作",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row)}}},[t._v("删除\n ")])]}}],null,!1,1755930777)}):t._e()],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},rf=[];function nf(t){return Object(et["a"])({url:"/udiwms/thrsys/delCorps",method:"post",data:t})}function cf(t){return Object(et["a"])({url:"/udiwms/thrsys/corp/delAll",method:"get",params:t})}function uf(t){return Object(et["a"])({url:"/udiwms/thrsys/corp/downloadAll",method:"get",params:t})}function df(t){return Object(et["a"])({url:"/udiwms/thrsys/corp/corpsDlAll",method:"post",data:t})}var pf={data:function(){return{filterQuery:{unitId:null,name:null,thirdSys:null,page:1,limit:20},total:0,list:[],thirdSys:[],thirdSysDetail:null,uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.filterQuery={unitId:null,name:null,thirdSys:null,page:1,limit:20},this.getList()},getList:function(){var t=this;null!=this.filterQuery.thirdSys?(this.loading=!0,Object(Yt["j"])(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))):this.$message.warning("请先选择第三方系统!")},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t.id};nf(a).then((function(t){e.loading=!1,2e4==t.code?(e.$message.success("删除成功"),e.getList()):e.$message.error(t.message)})).catch((function(){e.loading=!1}))})).catch((function(){}))},clearAll:function(){var t=this;this.$confirm("此操作将清空所有往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){cf().then((function(e){t.loading=!1,2e4==e.code?(t.$message.success("删除成功"),t.getList()):t.$message.success(e.message)})).catch((function(){t.loading=!1}))})).catch((function(){}))},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSys=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSys,t.getThirdSysDetail(),t.selectSysParam(),t.getList()})).catch((function(){t.loading=!1,t.list=[]}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSys};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/corp/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSys,this.getThirdSysDetail()},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys,key:"corpUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},downloadDatas:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys};uf(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message)}))}},components:{},mounted:function(){},created:function(){this.getBasicThirdSys()}},mf=pf,hf=Object(g["a"])(mf,of,rf,!1,null,"ec901ea2",null),ff=hf.exports,gf=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.exportExcel}},[t._v("导出Excel文件")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"下载次数",prop:"dlCount","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.downloadExcel(e.row)}}},[t._v("下载\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.thrCorpSelectVisible?a("el-dialog",{attrs:{title:"导出往来单位信息",visible:t.thrCorpSelectVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.thrCorpSelectVisible=e}}},[a("thrCorpSelect",{attrs:{selectType:t.selectType},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},yf=[];function bf(t){return Object(et["a"])({url:"/udiwms/thrCorp/exportLog/filter",method:"get",params:t})}function vf(t){return Object(et["a"])({url:"/udiwms/thrCorp/exportLog/deleteLog",method:"post",data:t})}function wf(t){return Object(et["a"])({url:"/udiwms/thrCorp/importLog/export",method:"post",data:t})}var xf=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码",clearable:""},model:{value:t.filterQuery.unitId,callback:function(e){t.$set(t.filterQuery,"unitId",e)},expression:"filterQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.thirdSysChange},model:{value:t.filterQuery.thirdSys,callback:function(e){t.$set(t.filterQuery,"thirdSys",e)},expression:"filterQuery.thirdSys"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.selectExport}},[t._v("选中导出\n ")]):t._e(),0==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.allExport}},[t._v("结果全部导出\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("选中上传\n ")]):t._e(),1==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.uploadSMP}},[t._v("一键上传\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadErp}},[t._v("选中下载\n ")]):t._e(),3==t.selectType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadAllErp}},[t._v("结果全部下载\n ")]):t._e()],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),a("el-table-column",{attrs:{label:"序号",type:"index",width:"60"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"id",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"拼音简写",prop:"spell",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系人",prop:"contact",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系电话",prop:"mobile","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},Df=[],Cf={name:"ThrCorpSelect",props:{selectType:{type:Object,required:!0},isDownThrSys:{type:Object,required:!0}},data:function(){return{filterQuery:{thrCorpEntities:[],unitId:null,name:null,thirdSys:null,page:1,limit:20,isDownThrSys:null},total:0,list:[],thirdSys:[],thirdSysDetail:null,uploadFileUrl:null,fileList:[],uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={thrCorpEntities:[],unitId:null,name:null,thirdSys:null,page:1,limit:20,isDownThrSys:null},this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.isDownThrSys=this.isDownThrSys,Object(Yt["j"])(this.filterQuery).then((function(e){t.loading=!1,2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},handleSelectionChange:function(t){this.multipleSelection=t},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSys=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSys,t.getThirdSysDetail(),t.selectSysParam(),t.getList()})).catch((function(){t.loading=!1,t.list=[]}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSys};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/corp/upload")}))},thirdSysChange:function(){this.uploadData.thirdSys=this.filterQuery.thirdSys,this.getThirdSysDetail()},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSys,key:"corpUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]}))},downloadErp:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.thrCorpEntities.push(e)})),this.downloadAllErp()},downloadAllErp:function(){var t=this;df(this.filterQuery).then((function(e){2e4==e.code?t.$message.success("提交成功,后台正在下载!"):t.$message.error(e.message),t.$emit("cancelDialog",!0)})).catch((function(){t.$message.error("下载失败!")}))},selectExport:function(){var t=this,e=this.multipleSelection;e.forEach((function(e){t.filterQuery.thrCorpEntities.push(e)})),this.allExport()},allExport:function(){var t=this;wf(this.filterQuery).then((function(e){2e4==e.code?t.$message({type:"success",message:"导出成功,后台正在生成Excel文件,请稍后刷新查看!"}):t.$message({type:"error",message:e.message}),t.$emit("cancelDialog",!0)})).catch((function(){t.$message({type:"error",message:"上传失败"})}))}},components:{},mounted:function(){},created:function(){this.getBasicThirdSys()}},kf=Cf,Qf=Object(g["a"])(kf,xf,Df,!1,null,"4a0ddd2f",null),Sf=Qf.exports,_f={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},selectType:0,thrCorpSelectVisible:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,bf(this.filterQuery).then((function(e){t.loading=!1,2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},exportExcel:function(){this.selectType=0,this.thrCorpSelectVisible=!0},uploadSmp:function(){this.selectType=1,this.thrCorpSelectVisible=!0},downloadExcel:function(t){var e=this;Yr.a.get("./config.json").then((function(a){var i=a.data.BASE_URL,l=i+"/udiwms/thrCorp/exportLog/download?genKey="+t.genKey,s=document.createElement("a");fetch(l).then((function(t){return t.blob()})).then((function(a){s.href=URL.createObjectURL(a),console.log(s.href),s.download=t.filePath.split("/")[t.filePath.split("/").length-1],document.body.appendChild(s),s.click(),e.getList()}))}))},cancelDialog:function(t){t&&this.getList(),this.thrCorpSelectVisible=!1},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};vf(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?this.$message.error(t.message):(console.log(e[0]+"\n"+this.fileList[0]+"\n"+a[0]),this.$message.success("文件上传成功,请稍后刷新查看!"))},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]}},mounted:function(){},components:{thrCorpSelect:Sf},created:function(){this.getList()}},$f=_f,Tf=(a("8451"),Object(g["a"])($f,gf,yf,!1,null,null,null)),Lf=Tf.exports,Of=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"记录ID"},model:{value:t.filterQuery.genKey,callback:function(e){t.$set(t.filterQuery,"genKey",e)},expression:"filterQuery.genKey"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"处理状态"},model:{value:t.filterQuery.status,callback:function(e){t.$set(t.filterQuery,"status",e)},expression:"filterQuery.status"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"处理中",value:"0"}}),a("el-option",{attrs:{label:"已处理",value:"1"}}),a("el-option",{attrs:{label:"异常",value:"2"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择第三方系统"},on:{change:t.sysChange},model:{value:t.filterQuery.thirdSysFk,callback:function(e){t.$set(t.filterQuery,"thirdSysFk",e)},expression:"filterQuery.thirdSysFk"}},t._l(t.thirdSys,(function(e){return a("el-option",{key:e.value,attrs:{label:e.thirdName,value:e.thirdId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.thirdName))]),a("span",{staticStyle:{float:"right",color:"#8492a6","font-size":"13px"}},[t._v(t._s(e.thirdId))])])})),1)],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")]),this.thirdSysDetail.enabled&&1==this.thirdSysDetail.fromType?a("el-upload",{attrs:{action:t.uploadFileUrl,multiple:"",limit:3,data:t.uploadData,"show-file-list":!1,"on-success":t.handleChange,"file-list":t.fileList}},[a("el-button",{attrs:{size:"mini",type:"primary"}},[t._v("导入往来单位")])],1):t._e(),this.thirdSysDetail.enabled&&1==this.thirdSysDetail.fromType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.jumpDl}},[t._v("模板下载\n ")]):t._e(),this.thirdSysDetail.enabled&&3==this.thirdSysDetail.fromType?a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.downloadCorps}},[t._v("\n 下载往来单位\n ")]):t._e()],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list},on:{"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"记录ID",prop:"genKey","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"更新日期",prop:"updateTime","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"来源系统",prop:"thirdSysFk","show-overflow-tooltip":"",formatter:t.formatterThirdSys}}),a("el-table-column",{attrs:{label:"状态",prop:"status","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t.statusFilterType(e.row.status)}},[t._v(t._s(t.status[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"160"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleDetailClick(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.udiImportDetailVisible?a("el-dialog",{attrs:{title:"导入往来单位详情",visible:t.udiImportDetailVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.udiImportDetailVisible=e}}},[a("thrCorpsImportDetail",{attrs:{currentRow:t.currentRow}})],1):t._e(),t.thrCorpSelectVisible?a("el-dialog",{attrs:{title:"下载往来单位信息",visible:t.thrCorpSelectVisible,width:"85%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.thrCorpSelectVisible=e}}},[a("thrCorpSelect",{attrs:{selectType:t.selectType,isDownThrSys:!0},on:{cancelDialog:t.cancelDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},zf=[];function If(t){return Object(et["a"])({url:"/udiwms/thrCorp/importLog/filter",method:"get",params:t})}function Nf(t){return Object(et["a"])({url:"/udiwms/thrCorp/importLog/filterDetail",method:"get",params:t})}function Ff(t){return Object(et["a"])({url:"/udiwms/thrCorp/importLog/deleteLog",method:"post",data:t})}var qf=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位编码",clearable:""},model:{value:t.filterQuery.unitId,callback:function(e){t.$set(t.filterQuery,"unitId",e)},expression:"filterQuery.unitId"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"往来单位",clearable:""},model:{value:t.filterQuery.name,callback:function(e){t.$set(t.filterQuery,"name",e)},expression:"filterQuery.name"}})],1),a("el-form-item",[a("el-button-group",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"拼音简写",prop:"spell",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"社会信用号",prop:"creditNo",width:"140","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系人",prop:"contact",width:"100","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"联系电话",prop:"mobile","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},Vf=[],Rf={name:"ThrCorpsImportDetail",props:{currentRow:{type:Object,required:!0}},data:function(){return{filterQuery:{genKey:null,unitId:null,name:null,status:null,page:1,limit:10},list:[],detailList:[],total:0,status:{0:"未处理",1:"处理失败",2:"处理成功"}}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={genKey:null,unitId:null,name:null,status:null,page:1,limit:10},this.getList()},getList:function(){var t=this;this.loading=!0,console.log(" this.genKey = "+this.currentRow),this.filterQuery.genKey=this.currentRow.genKey,Nf(this.filterQuery).then((function(e){2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message),t.loading=!1})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},statusFilterType:function(t){var e={0:"warning",1:"danger",2:"success"};return e[t]},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()}},mounted:function(){},created:function(){this.getList()},filters:{}},Ef=Rf,jf=(a("02b1"),Object(g["a"])(Ef,qf,Vf,!1,null,null,null)),Pf=jf.exports,Bf={data:function(){return{filterQuery:{genKey:null,status:null,fromType:null,page:1,limit:20,thirdSysFk:null},udiImportDetailVisible:!1,thrCorpSelectVisible:!1,checked:!1,list:[],detailList:[],thirdSys:[],thirdSysDetail:null,total:0,currentRow:null,editQuery:null,fromStatus:{0:"产品信息",1:"库存信息",2:"异常第三方上传"},status:{0:"等待处理",1:"正在处理",2:"处理异常",3:"处理完成"},uploadFileUrl:null,uploadData:{thirdSys:"thirdId"},templateDlUrl:null}},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={fromType:null,genKey:null,status:null,page:1,limit:20,thirdSysFk:null},this.getList()},getList:function(){var t=this;this.loading=!0,If(this.filterQuery).then((function(e){t.loading=!1,2e4==e.code?(t.list=e.data.list||[],t.total=e.data.total||0):t.$message.error(e.message)})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},downloadCorps:function(){this.selectType=3,this.thrCorpSelectVisible=!0},genInCode:function(){this.selectBasicUdiVisible=!0},sysChange:function(){this.getThirdSysDetail()},handleDetailClick:function(t){this.currentRow=t,console.log(this.currentRow.genKey),this.udiImportDetailVisible=!0},cancelDialog:function(t){this.udiImportDetailVisible=!1,this.thrCorpSelectVisible=!1,t&&this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},deleteDialog:function(t){var e=this;this.$confirm("此操作将删除该往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var a={id:t};Ff(a).then((function(t){e.loading=!1,2e4==t.code?e.$message.success("删除成功"):e.$message.error(t.message),e.getList()})).catch((function(){e.loading=!1}))})).catch((function(){}))},getBasicThirdSys:function(){var t=this,e={enabled:!0};as(e).then((function(e){t.thirdSys=e.data.list||[],t.filterQuery.thirdSysFk=t.thirdSys[0].thirdId,t.uploadData.thirdSys=t.filterQuery.thirdSysFk,t.getList(),t.getThirdSysDetail(),t.selectSysParam()})).catch((function(){t.loading=!1,t.list=[]}))},selectSysParam:function(){var t=this,e={key:"thirdIpUrl",thirdSysFk:this.filterQuery.thirdSysFk};Ut(e).then((function(e){2e4==e.code&&(t.uploadFileUrl=e.data.thridUrl+"/udiwms/erp/corp/upload")}))},handleChange:function(t,e,a){console.log(t),2e4!=t.code?(this.$message.error(t.message),this.getList()):(this.$message.success(t.data),this.getList())},statusFilterType:function(t){var e={0:"warning",1:"warning",2:"danger",3:"success"};return e[t]},getThirdSysDetail:function(){var t=this,e={thirdSysFk:this.filterQuery.thirdSysFk,key:"corpUrl"};ss(e).then((function(e){t.thirdSysDetail=e.data})).catch((function(){t.loading=!1,t.list=[]})),this.uploadData.thirdSys=this.filterQuery.thirdSysFk,Yr.a.get("./config.json").then((function(e){var a=e.data.SERVER_IP;t.templateDlUrl=a+"/第三方往来单位信息导入模板.xlsx"}))},jumpDl:function(){window.open(this.templateDlUrl,"_blank")},downloadDatas:function(){var t=this;this.$confirm("此操作从第三方系统下载全部往来单位信息, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var e={thirdSysFk:t.filterQuery.thirdSysFk};uf(e).then((function(e){2e4==e.code?t.$message.success(e.data):t.$message.error(e.message),t.getList()}))}))},formatterThirdSys:function(t){var e=null;return this.thirdSys.forEach((function(a,i){t.thirdSysFk==a.thirdId&&(e=a.thirdName)})),e}},mounted:function(){},components:{thrCorpsImportDetail:Pf,thrCorpSelect:Sf},created:function(){this.getBasicThirdSys()}},Uf=Bf,Af=(a("cc45"),Object(g["a"])(Uf,Of,zf,!1,null,null,null)),Mf=Af.exports,Wf=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品标识DI"},model:{value:t.filterQuery.nameCode,callback:function(e){t.$set(t.filterQuery,"nameCode",e)},expression:"filterQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"批次号"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"请输入供应商名称","remote-method":t.findMethod,size:"mini",loading:t.loading},model:{value:t.filterQuery.unitFk,callback:function(e){t.$set(t.filterQuery,"unitFk",e)},expression:"filterQuery.unitFk"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.erpId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productionDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount"}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount"}}),a("el-table-column",{attrs:{label:"结余数量",prop:"reCount"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.inCount-e.row.outCount)+"\n ")]}}])}),t.showSup?a("el-table-column",{attrs:{label:"供应商",prop:"companyName","show-overflow-tooltip":""}}):t._e(),a("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"库存详情",visible:t.codeDetailVisible,width:"85%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Hf=[];function Kf(t){return Object(et["a"])({url:"/spms/inv/products/filter",method:"get",params:t})}function Jf(t){return Object(et["a"])({url:"/spms/inv/products/filterDetail",method:"get",params:t})}function Gf(t){return Object(et["a"])({url:"/spms/inv/products/delete",method:"post",data:t})}function Xf(t){return Object(et["a"])({url:"/spms/inv/products/stat",method:"get",params:t})}var Yf=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-descriptions",{staticClass:"margin-top",attrs:{title:"产品信息",column:3,size:t.size,border:""}},[a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 产品名称\n ")]),t._v("\n "+t._s(t.idQuery.cpmctymc)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 产品标识\n ")]),t._v("\n "+t._s(t.idQuery.nameCode)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 批次号\n ")]),t._v("\n "+t._s(t.idQuery.batchNo)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 规格型号\n ")]),t._v("\n "+t._s(t.idQuery.ggxh)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 生产日期\n ")]),t._v("\n "+t._s(t.idQuery.productionDate)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 失效日期\n ")]),t._v("\n "+t._s(t.idQuery.expireDate)+"\n ")],2)],1),a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"条码查询"},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getCodeList}},[t._v("查询\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.codeArry}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"条码",prop:"originCode",width:"300","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据类型",prop:"action",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"出入库类型",prop:"mainActionStr",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"订单日期",prop:"updateTime",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"所属扫码单据",prop:"orderIdFk","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"所属业务单据",prop:"stockIdFk","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next,total",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Zf=[],tg={name:"idQuery",props:{idQuery:{type:Object,required:!0}},data:function(){return{query:{batchNo:null,productIdFk:null,customerId:null,page:1,limit:20},codeArry:[],total:0,loading:!0,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,busTypes:[],statData:{}}},components:{draggable:We.a},methods:{onReset:function(){this.$router.push({path:""}),this.query={productIdFk:null,customerId:null,page:1,limit:20},this.getCodeList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getCodeList()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},getCodeList:function(){var t=this;this.loading=!0,this.query.productIdFk=this.idQuery.relIdFk,this.query.batchNo=this.idQuery.batchNo,this.query.supId=this.idQuery.supId,Jf(this.query).then((function(e){t.loading=!1,t.codeArry=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getStat:function(){var t=this;this.query.productIdFk=this.idQuery.relIdFk,this.query.batchNo=this.idQuery.batchNo,this.query.customerId=L["a"].getters.customerId,Xf(this.query).then((function(e){t.loading=!1,t.statData=e.data})).catch((function(){t.loading=!1}))},intentBack:function(){this.$router.go(-1)},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.getCodeList(),this.getStat()}},eg=tg,ag=Object(g["a"])(eg,Yf,Zf,!1,null,null,null),ig=ag.exports,lg={data:function(){return{filterQuery:{cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,page:1,limit:20,customerId:null,unitFk:null},detailQuery:{code:null,productIdFk:null,page:1,limit:20},list:[],codeDetailVisible:!1,total:0,loading:!0,index:null,dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,deleteLoading:!1,busTypes:[],idQuery:null,showSup:!1,fromOptions:[]}},components:{draggable:We.a,codeDetail:ig},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,customerId:null,unitFk:null,page:1,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Kf(this.filterQuery).then((function(e){console.log(e),t.showSup=e.data.showSup,t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t};Gf(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))},intentDetail:function(t){this.idQuery=t,this.idQuery.customerId=null,this.codeDetailVisible=!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},sg=lg,og=Object(g["a"])(sg,Wf,Hf,!1,null,null,null),rg=og.exports,ng=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品标识DI"},model:{value:t.filterQuery.nameCode,callback:function(e){t.$set(t.filterQuery,"nameCode",e)},expression:"filterQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"批次号"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"请输入企业名称","remote-method":t.findMethod,size:"mini",loading:t.loading},model:{value:t.filterQuery.unitFk,callback:function(e){t.$set(t.filterQuery,"unitFk",e)},expression:"filterQuery.unitFk"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.erpId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productionDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount"}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount"}}),a("el-table-column",{attrs:{label:"结余数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.inCount-e.row.outCount)+"\n ")]}}])}),t.showSup?a("el-table-column",{attrs:{label:"供应商",prop:"companyName","show-overflow-tooltip":""}}):t._e(),a("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"库存详情",visible:t.codeDetailVisible,width:"85%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},cg=[];function ug(t){return Object(et["a"])({url:"/spms/pre/inv/products/filter",method:"get",params:t})}function dg(t){return Object(et["a"])({url:"/spms/pre/inv/products/filterDetail",method:"get",params:t})}function pg(t){return Object(et["a"])({url:"/spms/pre/inv/products/delete",method:"post",data:t})}function mg(t){return Object(et["a"])({url:"/spms/pre/inv/products/stat",method:"get",params:t})}var hg=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-descriptions",{staticClass:"margin-top",attrs:{title:"产品信息",column:3,size:t.size,border:""}},[a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 产品名称\n ")]),t._v("\n "+t._s(t.idQuery.cpmctymc)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 产品标识\n ")]),t._v("\n "+t._s(t.idQuery.nameCode)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 批次号\n ")]),t._v("\n "+t._s(t.idQuery.batchNo)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 规格型号\n ")]),t._v("\n "+t._s(t.idQuery.ggxh)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 生产日期\n ")]),t._v("\n "+t._s(t.idQuery.productionDate)+"\n ")],2),a("el-descriptions-item",[a("template",{slot:"label"},[t._v("\n 失效日期\n ")]),t._v("\n "+t._s(t.idQuery.expireDate)+"\n ")],2)],1),a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"条码查询"},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getCodeList}},[t._v("查询\n ")])],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.codeArry}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"条码",prop:"originCode","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据类型",prop:"action",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"出入库类型",prop:"mainActionStr",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"订单日期",prop:"updateTime",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"所属订单",prop:"orderIdFk",width:"200","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next,total",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},fg=[],gg={name:"idQuery",props:{idQuery:{type:Object,required:!0}},data:function(){return{query:{batchNo:null,productIdFk:null,customerId:null,page:1,limit:20},codeArry:[],total:0,loading:!0,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,busTypes:[],statData:{}}},components:{draggable:We.a},methods:{onReset:function(){this.$router.push({path:""}),this.query={productIdFk:null,customerId:null,page:1,limit:20},this.getCodeList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getCodeList()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},getCodeList:function(){var t=this;this.loading=!0,this.query.productIdFk=this.idQuery.relIdFk,this.query.batchNo=this.idQuery.batchNo,this.query.supId=this.idQuery.supId,dg(this.query).then((function(e){t.loading=!1,t.codeArry=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getStat:function(){var t=this;this.query.productIdFk=this.idQuery.relIdFk,this.query.batchNo=this.idQuery.batchNo,this.query.customerId=L["a"].getters.customerId,mg(this.query).then((function(e){t.loading=!1,t.statData=e.data})).catch((function(){t.loading=!1}))},intentBack:function(){this.$router.go(-1)},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.getCodeList(),this.getStat()}},yg=gg,bg=Object(g["a"])(yg,hg,fg,!1,null,null,null),vg=bg.exports,wg={data:function(){return{filterQuery:{cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,page:1,limit:20,customerId:null,unitFk:null},detailQuery:{code:null,productIdFk:null,page:1,limit:20},list:[],fromOptions:[],codeDetailVisible:!1,total:0,loading:!0,index:null,dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,deleteLoading:!1,busTypes:[],idQuery:null,showSup:!1}},components:{draggable:We.a,codeDetail:vg},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,customerId:null,page:1,unitFk:null,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,ug(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.showSup=e.data.showSup,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t};pg(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))},intentDetail:function(t){this.idQuery=t,this.idQuery.customerId=null,this.codeDetailVisible=!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},xg=wg,Dg=Object(g["a"])(xg,ng,cg,!1,null,null,null),Cg=Dg.exports,kg=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品标识DI"},model:{value:t.filterQuery.nameCode,callback:function(e){t.$set(t.filterQuery,"nameCode",e)},expression:"filterQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"批次号"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productionDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount"}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount"}}),a("el-table-column",{attrs:{label:"结余数量",prop:"reCount"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.inCount-e.row.outCount)+"\n ")]}}])}),t.showSup?a("el-table-column",{attrs:{label:"供应商",prop:"companyName","show-overflow-tooltip":""}}):t._e(),a("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"库存详情",visible:t.codeDetailVisible,width:"85%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Qg=[],Sg={data:function(){return{filterQuery:{cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,page:1,limit:20,customerId:null,unitFk:null},detailQuery:{code:null,productIdFk:null,page:1,limit:20},list:[],codeDetailVisible:!1,total:0,loading:!0,index:null,dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,deleteLoading:!1,busTypes:[],idQuery:null,showSup:!1,fromOptions:[]}},components:{draggable:We.a,codeDetail:ig},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,customerId:null,unitFk:null,page:1,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Kf(this.filterQuery).then((function(e){console.log(e),t.showSup=e.data.showSup,t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t};Gf(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery=t},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},_g=Sg,$g=Object(g["a"])(_g,kg,Qg,!1,null,null,null),Tg=$g.exports,Lg=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品标识DI"},model:{value:t.filterQuery.nameCode,callback:function(e){t.$set(t.filterQuery,"nameCode",e)},expression:"filterQuery.nameCode"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"产品名称"},model:{value:t.filterQuery.cpmctymc,callback:function(e){t.$set(t.filterQuery,"cpmctymc",e)},expression:"filterQuery.cpmctymc"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"批次号"},model:{value:t.filterQuery.batchNo,callback:function(e){t.$set(t.filterQuery,"batchNo",e)},expression:"filterQuery.batchNo"}})],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品标识",prop:"nameCode"}}),a("el-table-column",{attrs:{label:"产品名称",prop:"cpmctymc"}}),a("el-table-column",{attrs:{label:"规格型号",prop:"ggxh"}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo"}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productionDate"}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate"}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount"}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount"}}),a("el-table-column",{attrs:{label:"结余数量"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.inCount-e.row.outCount)+"\n ")]}}])}),t.showSup?a("el-table-column",{attrs:{label:"供应商",prop:"companyName","show-overflow-tooltip":""}}):t._e(),a("el-table-column",{attrs:{label:"操作",width:"120",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"库存详情",visible:t.codeDetailVisible,width:"85%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)},Og=[],zg={data:function(){return{filterQuery:{cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,page:1,limit:20,customerId:null,unitFk:null},detailQuery:{code:null,productIdFk:null,page:1,limit:20},list:[],fromOptions:[],codeDetailVisible:!1,total:0,loading:!0,index:null,dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,deleteLoading:!1,busTypes:[],idQuery:null,showSup:!1}},components:{draggable:We.a,codeDetail:vg},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={cpmctymc:null,nameCode:null,relIdFk:null,batchNo:null,customerId:null,page:1,unitFk:null,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,ug(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.showSup=e.data.showSup,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0;var a={id:t};pg(a).then((function(t){2e4==t.code?(e.getList(),e.$message({type:"success",message:"删除成功!"})):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery=t},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},Ig=zg,Ng=Object(g["a"])(Ig,Lg,Og,!1,null,null,null),Fg=Ng.exports,qg=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.query,"label-width":"480px",size:"mini"}},[a("el-form-item",{staticClass:"query-form-item",attrs:{"label-width":"100px"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{placeholder:"UDI码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.query.code,callback:function(e){t.$set(t.query,"code",e)},expression:"query.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"请输入供应商名称","remote-method":t.findMethod,size:"mini",loading:t.loading},model:{value:t.query.supId,callback:function(e){t.$set(t.query,"supId",e)},expression:"query.supId"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.erpId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getCodeList}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.codeArry}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"条码",prop:"code",width:"300","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"单据类型",prop:"action",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"出入库类型",prop:"mainActionStr",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"入库数量",prop:"inCount",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"出库数量",prop:"outCount",width:"120","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"订单日期",prop:"updateTime",width:"150","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"所属扫码单据",prop:"orderIdFk","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"所属业务单据",prop:"stockIdFk","show-overflow-tooltip":""}})],1),a("el-pagination",{attrs:{"page-size":t.query.limit,layout:"prev, pager, next,total",total:t.total},on:{"current-change":t.handleCurrentChange}})],1)],1)},Vg=[];function Rg(t){return Object(et["a"])({url:"/spms/inv/products/trace",method:"get",params:t})}function Eg(t){return Object(et["a"])({url:"/spms/inv/products/order/trace",method:"get",params:t})}var jg={name:"invUdiTrace",props:{idQuery:{type:Object,required:!0}},data:function(){return{idQuery:{},query:{code:null,batchNo:null,productIdFk:null,customerId:null,page:1,limit:20,supId:null},codeArry:[],total:0,loading:!0,index:null,formLoading:!1,formVisible:!1,deleteLoading:!1,orderNo:null,busTypes:[],statData:{},fromOptions:[]}},components:{draggable:We.a},methods:{onReset:function(){this.$router.push({path:""}),this.query={productIdFk:null,customerId:null,page:1,limit:20},this.getCodeList()},onSubmit:function(){this.$router.push({path:"",query:this.query}),this.getCodeList()},handleSizeChange:function(t){this.query.limit=t,this.getCodeList()},handleCurrentChange:function(t){this.query.page=t,this.getCodeList()},getCodeList:function(){var t=this;this.loading=!0,Rg(this.query).then((function(e){t.loading=!1,t.codeArry=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getStat:function(){var t=this;this.query.productIdFk=this.idQuery.relIdFk,this.query.batchNo=this.idQuery.batchNo,this.query.customerId=L["a"].getters.customerId,Xf(this.query).then((function(e){t.loading=!1,t.statData=e.data})).catch((function(){t.loading=!1}))},intentBack:function(){this.$router.go(-1)},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},findMethod:function(t){var e=this;console.log(t),this.fromOptions=[];var a={key:t};Object(Yt["f"])(a).then((function(t){e.loading=!1,e.fromOptions=t.data.page.list||[]})).catch((function(){e.loading=!1}))}},filters:{},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType(),this.getCodeList(),this.getStat()}},Pg=jg,Bg=Object(g["a"])(Pg,qg,Vg,!1,null,null,null),Ug=(Bg.exports,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",{staticClass:"el-card"},[a("el-form",{staticStyle:{display:"flex"},attrs:{inline:!0,model:t.filterQuery,"label-width":"480px",size:"mini"}},[a("el-form-item",{staticClass:"query-form-item",attrs:{"label-width":"100px"}},[a("el-input",{staticStyle:{width:"500px"},attrs:{placeholder:"UDI码"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.keyup_submit(e)}},model:{value:t.filterQuery.code,callback:function(e){t.$set(t.filterQuery,"code",e)},expression:"filterQuery.code"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:"",remote:"",clearable:"true","reserve-keyword":"",placeholder:"请输入供应商名称","remote-method":t.findMethod,size:"mini",loading:t.loading},model:{value:t.filterQuery.supId,callback:function(e){t.$set(t.filterQuery,"supId",e)},expression:"filterQuery.supId"}},t._l(t.fromOptions,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.erpId}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",{staticStyle:{display:"flex"}},[a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.getList}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list,"highlight-current-row":""},on:{"row-click":t.getOrderDetail,"selection-change":t.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id","show-overflow-tooltip":"true"}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"250"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.fromCorp)+"\n ")]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate",width:"150","show-overflow-tooltip":"true"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"校验状态",prop:"contrastStatus",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(1===e.row.contrastStatus)}},[t._v("\n "+t._s(t.erpCheckStatus[e.row.contrastStatus])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")])]}}])})],1),t.successOrderExportPDFSettingVisible?a("el-dialog",{attrs:{title:"导出PDF",visible:t.successOrderExportPDFSettingVisible,width:"80%"},on:{"update:visible":function(e){t.successOrderExportPDFSettingVisible=e},close:t.closeDialog}},[a("successOrderExportPDFSetting",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}})],1),a("el-card",{staticClass:"el-card",attrs:{id:"printJS-form"}},[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{"row-class-name":t.tableRowClassName,data:t.detailList}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"产品通用名",prop:"coName","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"包装规格",prop:"packSpec","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"批次号",prop:"batchNo","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"生产日期",prop:"productDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"失效日期",prop:"expireDate","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"单据数量",prop:"erpCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"实际数量",prop:"reCount","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"扫码数量",prop:"count"}}),a("el-table-column",{attrs:{label:"生产企业",prop:"productCompany","show-overflow-tooltip":!0}}),a("el-table-column",{attrs:{label:"注册/备案凭证号",prop:"authCode","show-overflow-tooltip":!0}})],1)],1),a("el-dialog",{attrs:{title:"选择往来单位",visible:t.dialogTableVisible,width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.query,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"unitId"}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.addDialogVisible?a("el-dialog",{attrs:{title:"选择erp业务单据",visible:t.addDialogVisible,width:"80%"},on:{"update:visible":function(e){t.addDialogVisible=e}}},[a("selectErpOrder",{attrs:{orderId:t.orderId},on:{closeManuDialog:t.closeManuDialog}})],1):t._e(),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-dialog",{attrs:{title:"校验信息",visible:t.errDialogVisible,width:"30%"},on:{"update:visible":function(e){t.errDialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.errDialogVisible=!1}}},[t._v("关 闭")])],1)])],1)}),Ag=[];function Mg(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=Wg(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var i=0,l=function(){};return{s:l,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,o=!0,r=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return o=t.done,t},e:function(t){r=!0,s=t},f:function(){try{o||null==a.return||a.return()}finally{if(r)throw s}}}}function Wg(t,e){if(t){if("string"===typeof t)return Hg(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Hg(t,e):void 0}}function Hg(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=new Array(e);a<e;a++)i[a]=t[a];return i}var Kg={site_id:"",site_name:"",describe:"",ads:[]},Jg={name:"invUdiTraceOrder",props:{isSelect:{type:Boolean,default:!1}},data:function(){return{query:{code:null,batchNo:null,productIdFk:null,customerId:null,page:1,limit:20,supId:null},checkStatus:{1:"校验异常",0:"未校验",2:"正常"},erpCheckStatus:{1:"校验异常",0:"未校验",2:"校验成功"},fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},unitquery:{key:"",page:1,limit:20},unitlist:[],list:[],detailList:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},actDateRange:[],filterQuery:{code:null,batchNo:null,productIdFk:null,customerId:null,page:1,limit:20,supId:null},detailQuery:{orderId:""},deleteData:{id:""},idQuery:{id:""},curIndex:"",adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,successOrderExportPDFSettingVisible:!1,total:0,loading:!0,index:null,formName:null,orderId:"",formMap:{add:"新增",edit:"编辑"},exportQuery:{orderId:"",exportStatus:""},uploadQuery:{orderId:""},busTypes:[],multipleSelection:[],dialogTableVisible:!1,formLoading:!1,formVisible:!1,formData:Kg,deleteLoading:!1,addDialogVisible:!1,errDialogVisible:!1,pickerOptions:{shortcuts:[{text:"最近一周",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,e])}},{text:"最近一个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,e])}},{text:"最近三个月",onClick:function(t){var e=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,e])}}]}}},components:{draggable:We.a,codeDetail:tr,successOrderExportPDFSetting:rr,selectErpOrder:Gr},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={code:null,batchNo:null,productIdFk:null,customerId:null,page:1,limit:20,supId:null},this.actDateRange=[],this.getList()},onSubmit:function(){this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleSelectionChange:function(t){console.log(t),this.multipleSelection=t},handleErrorDetail:function(t){var e=this.list[t];this.errorDetail=e.remark,this.errDialogVisible=!0},mergesOrders:function(){var t=this,e=this.multipleSelection;if(e.length<=1)this.$message.warning("选择的订单需大于1");else{var a=e[0].id,i=e[0].fromCorp,l=e[0].action,s=[];e.forEach((function(e,a){i===e.fromCorp?l===e.action?s.push(e.id):t.$message.warning("业务类型不一致!"):t.$message.warning("往来单位不一致!")}));var o={orderList:s};this.$confirm("所选择的订单将会合并到订单号为"+a+"的订单下","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Oi(o).then((function(e){2e4===e.code?(t.getList(),t.$message({type:"success",message:"合并成功"})):t.$message.error(e.message)}))})).catch((function(){}))}},getList:function(){var t=this;this.loading=!0,this.filterQuery.customerId=L["a"].getters.customerId,Eg(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.detailList=[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},getOrderDetail:function(t){this.loading=!0,this.detailQuery={orderId:t.id},this.refresgOrderDetail()},repeatCheckClick:function(t){var e=this,a={orderId:t.id};this.loading=!0,Wo(a).then((function(a){e.loading=!1,2e4===a.code?(e.$message.success(a.data),e.getList(),e.detailQuery={orderId:t.id},e.refresgOrderDetail()):e.$message.error(a.message)})).catch((function(){e.loading=!1,e.getList(),e.$message.error(response.message)}))},refresgOrderDetail:function(){var t=this;ji(this.detailQuery).then((function(e){console.log(e),t.loading=!1,t.detailList=e.data||[]})).catch((function(){t.loading=!1,t.detailList=[]}))},handleUnitClick:function(t){this.curIndex=t.id},getUnitList:function(){var t=this;this.loading=!0,Ko(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.list||[]})).catch((function(){t.loading=!1}))},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},successOrderExportPDFSetting:function(t){this.idQuery.id="",this.$isNotBlank(t.id)&&(this.idQuery.id=t.id),this.successOrderExportPDFSettingVisible=!0},successOrderExportPDF:function(t){var e=this;console.log(t);var a={orderId:t.id,customerId:L["a"].getters.customerId};this.loading=!0,Eo(a).then((function(t){2e4===t.code?Ro(a).then((function(t){var a=[];a.push(t);var i=window.URL.createObjectURL(new Blob(a,{type:"application/pdf"}));e.loading=!1,window.open(i)})).catch((function(){e.loading=!1})):(e.loading=!1,e.$message.error(t.message))})).catch((function(){e.loading=!1}))},closeDialog:function(){this.successOrderExportPDFSettingVisible=!1,this.getList()},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.unitid,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.refresgOrderDetail(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},tableRowClassName:function(t){var e=t.row;t.rowIndex;return e.reCount===e.count?"success-row":"warning-row"},exportDialog:function(t){var e=this,a=t;"已上传"===a.exportStatus?this.$confirm("该订单已修改, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):0===a.contrastStatus?this.$confirm("该订单校验异常, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):null===a.contrastStatus?this.$confirm("该订单未校验, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){})):this.$confirm("是否确定修改ERP订单?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.uploadOrderDialog(a)})).catch((function(){}))},exportXml:function(t){var e=this;this.loading=!0;var a,i=this.list[t],l=i.id;this.query={corpOrderId:l,page:1,limit:20},Ai(this.query).then((function(t){e.loading=!1,a=t.data.list||[];var s,o='<?xml version="1.0" encoding="utf-8"?>\n<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="终端接口XML Schema-2.0.xsd" SN="" Version="3.0" License="123456">\n<Events>\n<Event Name="'+i.action+'" MainAction="'+i.mainAction+'"><ActionMaping>\n<Action Name="'+i.mainAction+'">\n<ActionData>Code</ActionData>\n<ActionData>CorpOrderID</ActionData>\n<ActionData>Actor</ActionData>\n<ActionData>ActDate</ActionData>\n<ActionData>ToCorpID</ActionData>\n</Action>\n </ActionMaping>\n<DataMaping>\n<MetaData Name="Code" Type="string" />\n<MetaData Name="CorpOrderID" Type="string" />\n<MetaData Name="Actor" Type="string" />\n<MetaData Name="ActDate" Type="Date" />\n<MetaData Name="ToCorpID" Type="string" />\n</DataMaping>\n<DataField>\n',r=Mg(a);try{for(r.s();!(s=r.n()).done;){var n=s.value;null===n.fromCorpId&&(n.fromCorpId="");var c=' <Data Code="'+n.code+'" CorpOrderID="'+n.corpOrderId+'" Actor="'+n.actor+'" ActDate="'+n.actDate+'" ToCorpID="'+n.fromCorpId+'" />\n';o+=c}}catch(d){r.e(d)}finally{r.f()}o+="</DataField>\n</Event>\n</Events>\n</Document>\n";var u=new Blob([o],{type:"text/plain;charset=utf-8"});Object(He["saveAs"])(u,i.action+i.corpOrderId+".xml"),e.exportQuery.orderId=l,e.exportQuery.exportStatus="已上传",Ei(e.exportQuery).then((function(t){e.getList()}))})).catch((function(){e.loading=!1,e.list=[],e.total=0}))},uploadOrderDialog:function(t){var e=this;console.log(t.id+"---"+t.orderid),this.uploadQuery={orderId:t.id},Ui(this.uploadQuery).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeManuDialog:function(t){this.addDialogVisible=!1,t?(this.$message.success("选入成功"),this.refresgOrderDetail(),this.getList()):this.$message.error("选入失败")},cancelDialog:function(){this.addDialogVisible=!1},importOrder:function(t){this.orderId=t.id,this.addDialogVisible=!0},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.query=Object.assign(this.query,t),this.query.limit=parseInt(this.query.limit),this.getList();var e=new Date,a=new Date;a.setTime(a.getTime()-6048e5),this.actDateRange=[a,e]}},Gg=Jg,Xg=(a("12c6"),Object(g["a"])(Gg,Ug,Ag,!1,null,null,null)),Yg=Xg.exports,Zg=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-card",[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.filterQuery,size:"mini"}},[a("el-row",[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"单号"},model:{value:t.filterQuery.id,callback:function(e){t.$set(t.filterQuery,"id",e)},expression:"filterQuery.id"}})],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"出入库类型"},model:{value:t.filterQuery.mainAction,callback:function(e){t.$set(t.filterQuery,"mainAction",e)},expression:"filterQuery.mainAction"}},[a("el-option",{attrs:{label:"全部",value:""}}),a("el-option",{attrs:{label:"入库",value:"WareHouseIn"}}),a("el-option",{attrs:{label:"出库",value:"WareHouseOut"}})],1)],1),a("el-form-item",{staticClass:"query-form-item"},[a("el-select",{attrs:{placeholder:"请选择业务类型"},model:{value:t.filterQuery.action,callback:function(e){t.$set(t.filterQuery,"action",e)},expression:"filterQuery.action"}},t._l(t.busTypes,(function(e){return a("el-option",{key:e.name,attrs:{label:e.name,value:e.action}},[a("span",{staticStyle:{float:"left"}},[t._v(t._s(e.name))])])})),1)],1),a("el-form-item",[a("el-button-group",[a("el-button",{attrs:{type:"primary",icon:"el-icon-refresh"},on:{click:t.onReset}}),a("el-button",{attrs:{type:"primary",icon:"search"},on:{click:t.onSubmit}},[t._v("查询\n ")])],1)],1)],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.list}},[a("el-table-column",{attrs:{label:"序号",type:"index"}}),a("el-table-column",{attrs:{label:"扫码单据类型",prop:"action"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.getActionName(e.row.action)))])]}}])}),a("el-table-column",{attrs:{label:"订单号",prop:"id"}}),a("el-table-column",{attrs:{label:"来源",prop:"fromType"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(t.fromTypeMap[e.row.fromType]))])]}}])}),a("el-table-column",{attrs:{label:"往来单位",prop:"fromCorp",width:"220"},scopedSlots:t._u([{key:"default",fn:function(e){return[null==e.row.fromCorp?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleUnitClick(e.row)}}},[t._v("选择往来单位\n ")])],1):t._e(),null!==e.row.fromCorp?a("p",[a("el-button",{attrs:{type:"primary",size:"mini"},nativeOn:{click:function(a){return a.stopPropagation(),t.handleUnitClick(e.row)}}},[t._v(t._s(e.row.fromCorp)+"\n ")])],1):t._e()]}}])}),a("el-table-column",{attrs:{label:"创建时间",prop:"actDate","show-overflow-tooltip":""},scopedSlots:t._u([{key:"default",fn:function(e){return[a("i",{staticClass:"el-icon-time"}),a("span",[t._v(t._s(e.row.actDate))])]}}])}),a("el-table-column",{attrs:{label:"单据状态",prop:"status",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-tag",{attrs:{type:t._f("statusFilterType")(3==e.row.status)}},[t._v(t._s(t.checkStatus[e.row.status])+"\n ")])]}}])}),a("el-table-column",{attrs:{label:"操作",width:"300",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.addOrders(e.row)}}},[t._v("编辑\n ")]),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.intentDetail(e.row)}}},[t._v("详情\n ")]):t._e(),a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.deleteDialog(e.row.id)}}},[t._v("删除\n ")]),-1!==e.row.status?a("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(a){return a.stopPropagation(),t.onUpload(e.row.id)}}},[t._v("提交\n ")]):t._e()]}}])})],1)],1),a("el-dialog",{attrs:{title:"错误信息",visible:t.dialogVisible,width:"30%","append-to-body":!0},on:{"update:visible":function(e){t.dialogVisible=e}}},[a("span",[t._v(t._s(t.errorDetail))]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){t.dialogVisible=!1}}},[t._v("关 闭")])],1)]),a("el-dialog",{attrs:{title:"选择往来单位","close-on-click-modal":!1,"close-on-press-escape":!1,visible:t.dialogTableVisible,"append-to-body":"",width:"70%"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[a("el-form",{staticClass:"query-form",attrs:{inline:!0,model:t.unitquery,size:"mini"}},[a("el-form-item",{staticClass:"query-form-item"},[a("el-input",{attrs:{placeholder:"搜索"},model:{value:t.unitquery.key,callback:function(e){t.$set(t.unitquery,"key",e)},expression:"unitquery.key"}})],1),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"search"},nativeOn:{click:function(e){return e.stopPropagation(),t.getUnitList()}}},[t._v("查询\n ")])],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.unitlist},on:{"row-click":t.selectUnit}},[a("el-table-column",{attrs:{label:"往来单位ID",prop:"erpId","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位名称",prop:"name","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"往来单位简写",prop:"spell","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"地址",prop:"addr","show-overflow-tooltip":""}}),a("el-table-column",{attrs:{label:"状态",prop:"status"}}),a("el-table-column",{attrs:{label:"类型",prop:"type"}})],1)],1),t.codeDetailVisible?a("el-dialog",{attrs:{title:"单号详情",visible:t.codeDetailVisible,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"80%"},on:{"update:visible":function(e){t.codeDetailVisible=e}}},[a("codeDetail",{attrs:{idQuery:t.idQuery},on:{closeDetailDialog:t.closeDetailDialog}})],1):t._e(),a("el-pagination",{attrs:{"page-size":t.filterQuery.limit,layout:"prev, pager, next",total:t.total},on:{"current-change":t.handleCurrentChange}}),t.addOrderVisible?a("el-dialog",{attrs:{title:"新增订单",visible:t.addOrderVisible,width:"75%","close-on-click-modal":!1,"close-on-press-escape":!1},on:{"update:visible":function(e){t.addOrderVisible=e},close:t.closeDialog}},[a("addOrder",{attrs:{closeDialog:t.closeDialog,idQuery:t.idQuery,addType:t.addType}})],1):t._e()],1)},ty=[],ey={site_id:"",site_name:"",describe:"",ads:[]},ay={name:"AdditionalOrder",data:function(){return{filterQuery:{id:"",mainAction:null,action:null,page:1,limit:20},checkStatus:{"-1":"等待提交",1:"等待处理",2:"等待校验",3:"校验异常",4:"校验成功",5:"等待处理"},curIndex:"",unitquery:{key:"",page:1,limit:20},unitlist:[],unitUpdateQuery:{id:"",fromCorpId:"",fromCorp:""},idQuery:{id:""},addOrderVisible:!1,fromTypeMap:{1:"UDIMS平台",2:"网页新增",3:"pda即时校验",4:"pda未校验",5:"pc端扫码精灵",6:"补录单据",7:"UDI供应商平台"},list:[],adId:[],adSelectList:[],adList:{},adListNoDataText:"无数据",queryAdIdAsyncLoading:!1,codeDetailVisible:!1,total:0,loading:!0,index:null,formName:null,errorDetail:"1111111111111",formMap:{add:"新增",edit:"编辑"},addType:"edit",deleteData:{id:""},dialogTableVisible:!1,formLoading:!1,dialogVisible:!1,formData:ey,deleteLoading:!1,busTypes:[]}},components:{draggable:We.a,codeDetail:hn,addOrder:Cn},methods:{onReset:function(){this.$router.push({path:""}),this.filterQuery={page:1,limit:20},this.getList()},onSubmit:function(){this.loading=!0,this.getList()},handleSizeChange:function(t){this.filterQuery.limit=t,this.getList()},handleCurrentChange:function(t){this.filterQuery.page=t,this.getList()},handleUnitClick:function(t){this.curIndex=t.id,this.dialogTableVisible=!0},closeDetailDialog:function(t){this.codeDetailVisible=!1},closeDialog:function(){this.addOrderVisible=!1,this.getList()},getUnitList:function(){var t=this;this.loading=!0,Object(Yt["f"])(this.unitquery).then((function(e){t.loading=!1,t.unitlist=e.data.page.list||[]})).catch((function(){t.loading=!1}))},selectUnit:function(t){var e=this;console.log(t.id),this.unitUpdateQuery.id=this.curIndex,this.unitUpdateQuery.fromCorp=t.name,this.unitUpdateQuery.fromCorpId=t.erpId,zi(this.unitUpdateQuery).then((function(t){e.dialogTableVisible=!1,e.getList()})).catch((function(){e.dialogTableVisible=!1}))},getList:function(){var t=this;this.loading=!0,this.filterQuery.status=5,this.filterQuery.customerId=L["a"].getters.customerId,$i(this.filterQuery).then((function(e){console.log(e),t.loading=!1,t.list=e.data.list||[],t.total=e.data.total||0})).catch((function(){t.loading=!1,t.list=[],t.total=0}))},deleteOrders:function(t){var e=this;this.loading=!0,this.deleteData.id=t,Fi(this.deleteData).then((function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})).catch((function(){}))},deleteDialog:function(t){var e=this;this.$confirm("此操作将永久删除该订单, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.deleteOrders(t)})).catch((function(){}))},onUpload:function(t){var e=this;this.loading=!0;var a={orderId:""};a.orderId=t,Ri(a).then((function(t){2e4===t.code?(e.$message.success(t.data),e.getList()):e.$message.error(t.message)})).catch((function(){}))},handleErrorDetail:function(t){var e=this.list[t],a=e.remark;this.errorDetail=e.remark,console.log(a+" "+e+" "+e.remark),this.dialogVisible=!0},intentDetail:function(t){this.codeDetailVisible=!0,this.idQuery.id=t.id},getBusType:function(){var t=this,e={enabled:!0};Vr(e).then((function(e){t.busTypes=e.data.list||[],t.filterQuery.billAction=t.busTypes[0].action})).catch((function(){}))},getActionName:function(t){for(var e=0;e<this.busTypes.length;e++)if(this.busTypes[e].action===t)return this.busTypes[e].name},addOrders:function(t){console.log(t),this.idQuery.id="",this.idQuery.actDate="",this.idQuery.corpOrderId="",this.idQuery.billType=t.action,null!==t.id&&void 0!==t.id&&""!==t.id&&(this.idQuery.id=t.id,this.idQuery.actDate=t.actDate,this.idQuery.corpOrderId=t.corpOrderId),this.addOrderVisible=!0}},filters:{statusFilterType:function(t){var e={false:"success",true:"danger"};return e[t]}},mounted:function(){document.body.ondrop=function(t){t.preventDefault(),t.stopPropagation()}},created:function(){this.getBusType();var t=this.$route.query;this.filterQuery=Object.assign(this.filterQuery,t),this.filterQuery.limit=parseInt(this.filterQuery.limit),this.getList()}},iy=ay,ly=Object(g["a"])(iy,Zg,ty,!1,null,null,null),sy=ly.exports;var oy=function(t){return a.e("home").then(function(){return t(a("7a6e"))}.bind(null,a)).catch(a.oe)},ry=function(t){return a.e("home").then(function(){return t(a("bc61"))}.bind(null,a)).catch(a.oe)},ny=function(t){return a.e("home").then(function(){return t(a("ec26"))}.bind(null,a)).catch(a.oe)},cy=function(t){return a.e("home").then(function(){return t(a("b5fd"))}.bind(null,a)).catch(a.oe)},uy=function(t){return a.e("home").then(function(){return t(a("aae1"))}.bind(null,a)).catch(a.oe)},dy=function(t){return a.e("home").then(function(){return t(a("9ed6"))}.bind(null,a)).catch(a.oe)},py=function(t){return a.e("home").then(function(){return t(a("97cd"))}.bind(null,a)).catch(a.oe)},my=[{path:"*",component:uy,hidden:!0},{path:"/401",component:oy,name:"401",hidden:!0},{path:"/404",component:uy,name:"404",hidden:!0},{path:"/500",component:uy,name:"500",hidden:!0},{path:"/login",component:dy,name:"登录",hidden:!0},{path:"/register",component:ry,name:"注册",hidden:!0},{path:"/registerApp",component:ny,name:"注册",hidden:!0},{path:"/forgetPasswd",component:cy,name:"忘记密码",hidden:!0},{path:"/",icon:"shouye",component:q,redirect:"main",name:"首页",hidden:!0,noDropdown:!0,children:[{path:"main",component:py,name:"首页"}]},{path:"/",icon:"showText",component:K,redirect:"showText",name:"文本",hidden:!0,noDropdown:!0,children:[{path:"showText",component:K,name:"文本"}]}],hy=(e["c"]=new o.a({mode:r["b"],routes:my,strict:!1}),[{path:"/userManage",redirect:"/userManage/adminManage/index",component:q,icon:"guanliyuan1",name:"系统管理",hidden:!1,meta:{authRule:["user_manage"]},children:[{path:"authAdmin",component:dt,name:"用户管理",icon:"",meta:{authRule:["admin/auth_admin"]}},{path:"authRole",component:_t,name:"角色管理",icon:"",meta:{authRule:["admin/auth_role"]}},{path:"authPermissionRule",component:Vt,name:"权限管理",icon:"",meta:{authRule:["admin/auth_permission_rule"]}},{path:"/systemParam",component:B,name:"系统参数",redirect:"/systemParam/systemParamConfig",icon:"",meta:{authRule:["systemParam/systemParamConfig"]},children:[{path:"systemParamConfig",component:Kt,name:"运行参数",icon:"",meta:{authRule:["admin/systemParamConfig"]}},{path:"bussinessType",name:"扫码单据类型",component:Ld,meta:{authRule:["product/bussinessType"]}},{path:"bussinessTypeLocl",name:"业务单据类型",component:Wd,meta:{authRule:["product/BussinessTypeLocl"]}},{path:"thirdSys",name:"第三方系统",component:Bh,meta:{authRule:["thrsys/thirdSys"]}}]},{path:"/systemPDFTemplate",component:B,name:"打印模板",redirect:"/systemPDFTemplate/template",icon:"",meta:{authRule:["systemParam/systemPDFTemplate"]},children:[{path:"template",component:Ja,name:"模板管理",icon:"",meta:{authRule:["pdf/template"]}},{path:"module",component:ii,name:"打印设置",icon:"",meta:{authRule:["pdf/module"]}}]}]},{path:"/basicProduct",redirect:"/udiInfo/UdiInfoManage",component:q,icon:"tongyong",name:"基础数据",hidden:!1,noDropdown:!1,meta:{authRule:["basicProduct"]},children:[{path:"/udiInfo",redirect:"/udiInfo/manage",name:"医疗器械信息",component:B,meta:{authRule:["udiInfo/manage"]},children:[{path:"UdiInfoManage",name:"医疗器械信息维护",component:up,meta:{authRule:["product/UdiInfoManage"]}},{path:"udiImport",name:"医疗器械信息导入",component:zp,meta:{authRule:["product/udiImport"]}},{path:"udiinfoExport",name:"医疗器械信息导出",component:lp,meta:{authRule:["product/udiinfoExport"]}},{path:"UdiInfoManageSp",name:"供应商器械信息",component:gp,meta:{authRule:["product/UdiInfoManageSp"]}}]},{path:"/basicCorp",redirect:"/basicCorp/manage",name:"供应商信息",component:B,meta:{authRule:["basicCorp/manage"]},children:[{path:"basicUnitMaintain",name:"供应商信息维护",component:To,meta:{authRule:["basicCorp/basicUnitMaintain"]}},{path:"corpImport",name:"供应商信息导入",component:Hp,meta:{authRule:["basicCorp/corpImport"]}},{path:"corpExport",name:"供应商信息导出",component:cm,meta:{authRule:["basicCorp/corpExport"]}}]},{path:"/thrsys",redirect:"/thrsys/manage",name:"第三方数据",component:B,meta:{authRule:["thrsys/manage"]},children:[{path:"/corps",redirect:"/corps/ThrCorps",name:"往来单位",component:B,meta:{authRule:["thrsys/corp"]},children:[{path:"ThrCorps",name:"往来单位查询",component:ff,meta:{authRule:["thrsys/ThrCorps"]}},{path:"thrCorpsImport",name:"往来单位导入",component:Mf,meta:{authRule:["thrsys/thrCorpsImport"]}},{path:"thrCorpsExport",name:"往来单位导出",component:Lf,meta:{authRule:["thrsys/thrCorpsExport"]}}]},{path:"/products",redirect:"/products/thrProducts",name:"产品信息",component:B,meta:{authRule:["thrsys/products"]},children:[{path:"thrProducts",name:"产品信息查询",component:Qm,meta:{authRule:["thrsys/thrProducts"]}},{path:"thrProductsImport",name:"产品信息导入",component:Hm,meta:{authRule:["thrsys/thrProductsImport"]}}]},{path:"/orders",redirect:"/orders/ThrOrders",name:"业务单据",component:B,meta:{authRule:["thrsys/orders"]},children:[{path:"ThrOrders",name:"业务单据查询",component:ih,meta:{authRule:["thrsys/ThrOrders"]}},{path:"thrOrderImport",name:"业务单据导入",component:kh,meta:{authRule:["thrsys/thrOrderImport"]}}]},{path:"/udplatGoods",redirect:"/udplatGoods/ThrOrders",name:"阳光采购平台",component:B,meta:{authRule:["thrsys/udplatGoods"]},children:[{path:"thrUdplatGoods",name:"阳光采购平台查询",component:Gh,meta:{authRule:["thrsys/thrUdplatGoods"]}},{path:"thrUdplatGoodsImport",name:"阳光采购平台导入",component:sf,meta:{authRule:["thrsys/thrUdplatGoodsImport"]}}]}]}]},{path:"/supplierManagement",redirect:"/supplierManagement/config/index",component:q,icon:"tongyong",name:"供应商管理",hidden:!1,meta:{authRule:["supplierManagement"]},children:[{path:"registerManage",component:ae,name:"新用户审核",icon:"",meta:{authRule:["admin/registerManage"]}},{path:"customerManage",component:je,name:"供应商信息管理",icon:"",meta:{authRule:["admin/customerManage"]}},{path:"/suppliers",redirect:"/suppliers/Enterprise",name:"首营资质管理",component:B,meta:{authRule:["suppliers/Enterprise"]},children:[{path:"customerFileManage",component:ka,name:"供应商资质审核",icon:"",meta:{authRule:["admin/customerFileManage"]}},{path:"customerApplyUpdateManage",component:Fa,name:"供应商变更审核",icon:"",meta:{authRule:["admin/customerApplyUpdateManage"]}},{path:"customerAuditedManage",component:Pa,name:"供应商资质查询",icon:"",meta:{authRule:["admin/customerAuditedManage"]}},{path:"suppliersEnterpriseBasic",component:rl,name:"生产企业资质",icon:"",meta:{authRule:["admin/suppliersEnterpriseBasic"]}}]},{path:"/suppliersT",redirect:"/suppliersT/updateLog",name:"供应商审核记录",component:B,meta:{authRule:["suppliersT/updateLog"]},children:[{path:"basicCompanyUpdateLogTotal",component:uo,name:"企业审核记录",icon:"",meta:{authRule:["basic/basicCompanyUpdateLogTotal"]}},{path:"basicCompanySalesmanUpdateLogTotal",component:Ys,name:"业务员审核记录",icon:"",meta:{authRule:["basic/basicCompanySalesmanUpdateLogTotal"]}}]}]},{path:"/inv",redirect:"/inv/invProducts",component:q,icon:"tongyong",name:"库存管理",hidden:!1,noDropdown:!1,meta:{authRule:["inv"]},children:[{path:"additionalOrder",component:sy,name:"补录单据管理",meta:{authRule:["stock/additionalOrder"]}},{path:"stockOrderDelSearch",component:Ac,name:"业务单据查询",meta:{authRule:["inv/stockOrderDelSearch"]}},{path:"invProducts",component:rg,name:"库存查询",icon:"",meta:{authRule:["inv/invProducts"]}},{path:"invPreProducts",component:Cg,name:"寄售库存查询",icon:"",meta:{authRule:["inv/invPreProducts"]}},{path:"udiTrace",component:Yg,name:"UDI流向查询",icon:"",meta:{authRule:["inv/udiTrace"]}}]},{path:"/inout",component:q,redirect:"/inout/scanOrder",icon:"tongyong",name:"单据管理",noDropdown:!1,meta:{authRule:["inout"]},children:[{path:"/scanOrder",component:B,name:"扫码单据管理",redirect:"/scanOrder/errorOrder",meta:{authRule:["inout/scanOrder"]},children:[{path:"errorOrder",component:In,name:"新增扫码单据",meta:{authRule:["inout/errorOrder"]}},{path:"waitOrder",name:"等待校验单据",component:nc,meta:{authRule:["inout/waitOrder"]}},{path:"main",name:"扫码单据查询",component:on,meta:{authRule:["inout/main"]}},{path:"ioCheckOrder",name:"校验异常单据",component:ec,meta:{authRule:["inout/ioCheckOrder"]}}]},{path:"/busOrder",component:B,name:"业务单据管理",redirect:"/busOrder/stockOrderNew",meta:{authRule:["inout/busOrder"]},children:[{path:"stockOrderNew",component:Eu,name:"新增业务单据",meta:{authRule:["stock/stockOrderNew"]}},{path:"stockOrderEditor",component:fu,name:"单据配货管理",meta:{authRule:["stock/stockOrderEditor"]}},{path:"stockOrderWaitCheck",component:Mu,name:"待校验业务单据",meta:{authRule:["stock/stockOrderWaitCheck"]}},{path:"stockOrder",component:Ic,name:"内部码管理",meta:{authRule:["stock/stockOrder"]}}]},{path:"stockOrderSearch",component:xu,name:"未验收单据",meta:{authRule:["stock/stockOrderSearch"]}},{path:"stockOrderDelSearch",component:Ac,name:"已验收单据",meta:{authRule:["stock/stockOrderDelSearch"]}}]},{path:"/supplier",redirect:"/supplier/basicInstrumentMaintain",component:q,icon:"tongyong",name:"我是供应商",hidden:!1,noDropdown:!1,meta:{authRule:["supplier"]},children:[{path:"basicCompany",name:"本企业信息",component:Ql,meta:{authRule:["basic/basicCompany"]}},{path:"basicCompanyProduct",name:"本企业产品",component:js,meta:{authRule:["basic/basicCompanyProduct"]}},{path:"/spInv",redirect:"/spInv/spInvProducts",name:"本企业库存",component:B,meta:{authRule:["spInv/local"]},children:[{path:"spInvProducts",component:Tg,name:"库存查询",icon:"",hidden:!1,meta:{authRule:["spInv/spInvProducts"]}},{path:"spInvPreProducts",component:Fg,name:"寄售库存查询",icon:"",hidden:!1,meta:{authRule:["spInv/spPreInvProducts"]}}]},{path:"userAccountManage",component:ge,name:"用户列表",icon:"",meta:{authRule:["basic/userAccountManage"]}},{path:"/suppliers",redirect:"/supplier/basicCompanyUpdateLog",name:"审核记录",component:B,meta:{authRule:["suppliers/updateLog"]},children:[{path:"basicCompanyUpdateLog",component:lo,name:"本企业审核记录",icon:"",meta:{authRule:["basic/basicCompanyUpdateLog"]}},{path:"basicCompanySalesmanUpdateLog",component:Ws,name:"业务员审核记录",icon:"",meta:{authRule:["basic/basicCompanySalesmanUpdateLog"]}}]}]}])},a27e:function(t,e,a){"use strict";var i=a("bc3a"),l=a.n(i),s=a("5f72"),o=a("4360"),r=a("3439"),n=a("a18c"),c=(a("863e"),l.a.create({baseURL:r["a"],timeout:15e3}));c.interceptors.request.use((function(t){return o["a"].getters.adminId&&o["a"].getters.token&&(t.headers={ADMIN_ID:o["a"].getters.adminId,ADMIN_TOKEN:o["a"].getters.token}),t}),(function(t){Promise.reject(t)})),c.interceptors.response.use((function(t){var e=t.data;return e.code&&2===e.code&&o["a"].dispatch("fedLogout").then((function(){s["Message"].error("验证失败,请重新登录"),n["c"].push({path:"/login",query:{redirect:n["c"].currentRoute.fullPath}})})),e}),(function(t){return Object(s["Message"])({message:t.message,type:"error",duration:5e3}),Promise.reject(t)})),e["a"]=c},a417:function(t,e,a){"use strict";a("ef8f")},a612:function(t,e,a){},a63e:function(t,e,a){},a753:function(t,e,a){"use strict";a("ef51")},a9ed:function(t,e,a){"use strict";a("e695")},ad9e:function(t,e,a){"use strict";a("01fd")},ae0a:function(t,e,a){},b255:function(t,e,a){},b32d:function(t,e,a){"use strict";a("9140")},b768:function(t,e,a){},b81e:function(t,e,a){"use strict";a("fbba")},b8bb:function(t,e,a){},bab2:function(t,e,a){"use strict";a("214c")},bb5e:function(t,e,a){},bbd0:function(t,e,a){},bcba:function(t,e,a){"use strict";a.d(e,"f",(function(){return l})),a.d(e,"g",(function(){return s})),a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return n})),a.d(e,"d",(function(){return c})),a.d(e,"e",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"h",(function(){return p})),a.d(e,"i",(function(){return m}));var i=a("a27e");function l(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/filter",method:"get",params:t})}function s(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/filter2",method:"get",params:t})}function o(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"post",l="add"===e?"/udiwms/basic/unit/maintain/save":"/udiwms/basic/unit/maintain/update";return Object(i["a"])({url:l,method:a,data:t})}function r(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/combine",method:"post",data:t})}function n(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/combineAll",method:"get",params:t})}function c(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/combineSingle",method:"post",data:t})}function u(t){return Object(i["a"])({url:"/udiwms/basic/unit/maintain/delete",method:"post",data:t})}function d(t){return Object(i["a"])({url:"/udiwms/unitMaintain/filterErp",method:"get",params:t})}function p(t){return Object(i["a"])({url:"/udiwms/unitMaintain/thirdSys/detail",method:"get",params:t})}function m(t){return Object(i["a"])({url:"/udiwms/unit/thirdSys/removeRl",method:"get",params:t})}},bdea:function(t,e,a){"use strict";a("9776")},bf83:function(t,e,a){"use strict";a("a63e")},bf99:function(t,e,a){"use strict";a("e3c0")},bfc6:function(t,e,a){"use strict";a("0930")},c004:function(t,e,a){},c060:function(t,e,a){},c5bf:function(t,e,a){"use strict";a("2eef")},c7c8:function(t,e,a){"use strict";a("b8bb")},c849:function(t,e,a){"use strict";a("14b3")},c8c0:function(t,e,a){},cbba:function(t,e,a){},cc45:function(t,e,a){"use strict";a("178e")},ccaf:function(t,e,a){"use strict";a("3340")},cd79:function(t,e,a){"use strict";a("69a2")},ce15:function(t,e,a){"use strict";a("c8c0")},d4ff:function(t,e,a){},d5d3:function(t,e,a){"use strict";a("c004")},d872:function(t,e,a){"use strict";a("ddb6")},d9df:function(t,e,a){"use strict";a("b768")},d9f5:function(t,e,a){},da6f:function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return r}));var i=a("a78e"),l=a.n(i),s=function(t,e,a){t&&("string"!==typeof e&&(e=JSON.stringify(e)),l.a.set(t,e,{expires:a}))},o=function(t){if(t){var e=l.a.get(t);try{return e=JSON.parse(e),e}catch(a){return e}}},r=function(t){t&&l.a.remove(t)}},ddb6:function(t,e,a){},de21:function(t,e,a){"use strict";a("0f13")},e130:function(t,e,a){},e365:function(t,e,a){"use strict";a("2aae")},e3c0:function(t,e,a){},e50b:function(t,e,a){"use strict";a("e711")},e695:function(t,e,a){},e711:function(t,e,a){},e92b:function(t,e,a){"use strict";a("8fb5")},ea54:function(t,e,a){},eafe:function(t,e,a){},eb9f:function(t,e,a){"use strict";a("ae0a")},ecd9:function(t,e,a){},ed34:function(t,e,a){"use strict";a("265e")},ef3e:function(t,e,a){},ef51:function(t,e,a){},ef8f:function(t,e,a){},f614:function(t,e,a){"use strict";a("8b7e")},f63d:function(t,e,a){},f861:function(t,e,a){},f9f3:function(t,e,a){"use strict";a("c060")},fbba:function(t,e,a){},ff0e:function(t,e,a){"use strict";a("f861")}});
|