(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5a565e17","chunk-00b1e3a3","chunk-411866d4","chunk-2d0e66d0"],{"279c":function(t,e,n){"use strict";n("6cff")},"2c72":function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a}));var r=n("b775");function i(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/user/select/department",method:"get",params:t})}function o(t){return Object(r["a"])({url:"/pc/base/warehouse/manager/save",method:"post",data:t})}function a(t){return Object(r["a"])({url:"/pc/base/warehouse/manager/list",method:"get",params:t})}},"35f5":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("win-sm",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[n("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[n("el-form-item",{attrs:{label:"仓库名称",prop:"warehouseName"}},[n("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入仓库名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.warehouseName,callback:function(e){t.$set(t.formData,"warehouseName",e)},expression:"formData.warehouseName"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"仓库类型",prop:"classificationCode"}},[n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择仓库类型"},model:{value:t.formData.classificationCode,callback:function(e){t.$set(t.formData,"classificationCode",e)},expression:"formData.classificationCode"}},t._l(t.classList,(function(t){return n("el-option",{key:t.dict_code,attrs:{label:t.dict_label,value:t.dict_code}})})),1)],1),t._v(" "),n("el-form-item",{attrs:{label:"所属机构",prop:"agencyId"}},[n("el-cascader",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择所属机构",options:t.treeList,props:{checkStrictly:!0,emitPath:!1,value:"id"}},model:{value:t.formData.agencyId,callback:function(e){t.$set(t.formData,"agencyId",e)},expression:"formData.agencyId"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"地址"}},[n("el-input",{staticStyle:{width:"100%"},attrs:{maxlength:"200","show-word-limit":"",type:"textarea",rows:3,placeholder:"请输入内容"},model:{value:t.formData.adress,callback:function(e){t.$set(t.formData,"adress",e)},expression:"formData.adress"}})],1),t._v(" "),n("el-form-item",{attrs:{label:"状态",prop:"states"}},[n("el-radio-group",{model:{value:t.formData.states,callback:function(e){t.$set(t.formData,"states",e)},expression:"formData.states"}},[n("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),n("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1)],1),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[n("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),n("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},i=[],o=n("e694"),a=n("f6e8"),s=n("6ec5"),c=n("ed08");function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new D(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_($([])));L&&L!==n&&r.call(L,a)&&(x=L);var O=S.prototype=b.prototype=Object.create(x);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(i,o,a,s){var c=d(t[i],t,o);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==l(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=p;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=I(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=d(e,n,r);if("normal"===l.type){if(i=r.done?v:m,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function I(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function $(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:$(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function f(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){f(o,r,i,a,s,"next",t)}function s(t){f(o,r,i,a,s,"throw",t)}a(void 0)}))}}var d={components:{winSm:o["a"],myButton:a["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,classList:[],treeList:[],checkAll:!1,checkedList:[],formData:{warehouseCode:null,classificationId:null,classificationCode:null,states:1,agencyId:""},rules:{warehouseName:[{required:!0,message:"请输入",trigger:"blur"}],classificationCode:[{required:!0,message:"请选择",trigger:"blur"}],agencyId:[{required:!0,message:"请选择",trigger:["blur","change"]}],states:[{required:!0,message:"请选择状态",trigger:"blur"}]}}},created:function(){var t=h(u().mark((function t(){return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,this.class_List();case 2:return t.next=4,this.tree_List();case 4:this.loading=!1,this.setting.info&&(this.formData=Object.assign({},JSON.parse(this.setting.info)));case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{class_List:function(){var t=h(u().mark((function t(){var e=this;return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,s["d"]().then((function(t){t&&(t.map((function(t){t.dict_code=t.dict_code.toString()})),e.classList=t)}));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),tree_List:function(){var t=h(u().mark((function t(){var e=this;return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,s["l"]().then((function(t){t&&(e.treeList=t,e.$set(e.formData,"agencyIds",Object(c["a"])(e.treeList,e.formData.agencyId)))}));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),getEditInfo:function(t){},close:function(){this.$emit("close")},save:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var n=Object.assign({},t.formData);if(t.loading)return;t.loading=!0,t.setting.id?s["j"](n).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1})):(n.orgId=t.setting.orgId,s["c"](n).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1})))}else t.$message.error("校验未通过,请检查。")}))}}},p=d,m=n("2877"),g=Object(m["a"])(p,r,i,!1,null,null,null);e["default"]=g.exports},"433d":function(t,e,n){"use strict";var r=n("c559"),i={ftpUrl:r["a"].ftpUrl,apiBaseURL:r["a"].apiBaseURL};e["a"]=i},"5a2a":function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("win-md",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[n("div",{staticClass:"section-container"},[n("div",{staticClass:"section-left"},[n("div",{staticClass:"header-row"},[n("span",{staticClass:"title"},[t._v("选择人员:")])]),t._v(" "),n("div",{staticClass:"section-body"},[n("el-tree",{ref:"tree",attrs:{data:t.treeData,"node-key":"id",props:t.defaultProps,"default-expand-all":""},scopedSlots:t._u([{key:"default",fn:function(e){e.node;var r=e.data;return["user"!=r.type?n("div",[t._v(t._s(r.name))]):n("div",{staticClass:"leaf-node",class:r.checked?"checked":"",on:{click:function(e){return t.handleCheckItem(r)}}},[n("div",[t._v(t._s(r.name))]),t._v(" "),n("i",{staticClass:"el-icon-check",staticStyle:{"font-size":"18px","font-weight":"bold",color:"#0d997c","margin-right":"10px"}})])]}}])})],1)]),t._v(" "),n("div",{staticClass:"section-right"},[n("div",{staticClass:"header-row"},[n("span",{staticClass:"title"},[t._v("已选:")]),t._v(" "),n("span",{staticClass:"btn",on:{click:t.handleClear}},[t._v("清空")])]),t._v(" "),n("div",{staticClass:"section-body"},t._l(t.selectdSections,(function(e,r){return n("div",{key:r,staticClass:"section-item"},[n("span",{staticClass:"label"},[t._v(t._s(e.name))]),t._v(" "),n("span",{staticClass:"btn del-btn",on:{click:function(n){return t.handleDel(e)}}},[t._v("删除")])])})),0)])]),t._v(" "),n("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[n("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),n("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)])},i=[],o=n("2c72"),a=n("f76d"),s=n("f6e8");function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */l=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),s=new D(r||[]);return i(a,"_invoke",{value:E(t,n,s)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function w(){}function S(){}var x={};f(x,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_($([])));L&&L!==n&&r.call(L,a)&&(x=L);var O=S.prototype=b.prototype=Object.create(x);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function n(i,o,a,s){var l=d(t[i],t,o);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==c(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,a,s)}),(function(t){n("throw",t,a,s)})):e.resolve(f).then((function(t){u.value=t,a(u)}),(function(t){return n("throw",t,a,s)}))}s(l.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function E(e,n,r){var i=p;return function(o,a){if(i===g)throw Error("Generator is already running");if(i===v){if("throw"===o)throw a;return{value:t,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=I(s,r);if(c){if(c===y)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=v,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=g;var l=d(e,n,r);if("normal"===l.type){if(i=r.done?v:m,l.arg===y)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(i=v,r.method="throw",r.arg=l.arg)}}}function I(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=d(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function $(e){if(e||""===e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),N(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;N(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:$(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}function u(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function f(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){u(o,r,i,a,s,"next",t)}function s(t){u(o,r,i,a,s,"throw",t)}a(void 0)}))}}var h={name:"person",components:{winMd:a["a"],myButton:s["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,loadingText:"加载中",selectdSections:[],treeData:[],formData:{},defaultProps:{children:"children",label:"name"},key:Math.random()}},computed:{checkedKeys:function(){return this.selectdSections.map((function(t){return t.id}))}},created:function(){this.setting.info&&(this.formData=Object.assign({},JSON.parse(this.setting.info))),this.init()},methods:{init:function(){var t=f(l().mark((function t(){var e,n;return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(o["c"])({warehouseId:this.formData.id});case 2:return e=t.sent,this.selectdSections=e.map((function(t){return t.name=t.managerName,t.id=t.managerId,t.checked=!0,t})),t.next=6,Object(o["a"])({agencyId:this.formData.agencyId});case 6:n=t.sent,this.treeData=this.deepList([n]),this.key=Math.random(),this.loading=!1;case 10:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),deepList:function(t){var e=this;return t.map((function(t){return t.children&&t.children.length?e.deepList(t.children):t.checked=e.selectdSections.some((function(e){return t.id===e.id})),t}))},handleCheckItem:function(t){var e=this;if(t.checked){var n=this.selectdSections.findIndex((function(e){return e.id===t.id}));-1!==n&&this.selectdSections.splice(n,1)}else this.selectdSections.push(t);this.treeData[0].children.forEach((function(n,r){n.children&&n.children.forEach((function(n,i){n.id==t.id&&e.$set(e.treeData[0].children[r].children[i],"checked",!n.checked)}))}))},handleDel:function(t){this.handleCheckItem(t)},handleClear:function(){var t=this;this.selectdSections.forEach((function(e){t.handleCheckItem(e)})),this.selectdSections=[]},close:function(){this.$emit("close")},save:function(){var t=this;if(0!==this.selectdSections.length){var e={warehouseId:this.setting.id,warehouseManagerInfoList:[]};this.selectdSections.forEach((function(t){e.warehouseManagerInfoList.push({managerId:t.id,managerName:t.name})})),Object(o["b"])(e).then((function(e){t.$message.success("保存成功!"),t.close(),t.$emit("search")}))}else this.$message.error("请选择库管员!")}}},d=h,p=(n("279c"),n("2877")),m=Object(p["a"])(d,r,i,!1,null,"4febb127",null);e["default"]=m.exports},"6cff":function(t,e,n){},"6ec5":function(t,e,n){"use strict";n.d(e,"l",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"g",(function(){return s})),n.d(e,"c",(function(){return c})),n.d(e,"j",(function(){return l})),n.d(e,"f",(function(){return u})),n.d(e,"d",(function(){return f})),n.d(e,"e",(function(){return h})),n.d(e,"p",(function(){return d})),n.d(e,"n",(function(){return p})),n.d(e,"m",(function(){return m})),n.d(e,"k",(function(){return g})),n.d(e,"s",(function(){return v})),n.d(e,"r",(function(){return y})),n.d(e,"q",(function(){return b})),n.d(e,"o",(function(){return w})),n.d(e,"b",(function(){return S})),n.d(e,"i",(function(){return x})),n.d(e,"h",(function(){return _}));var r=n("b775"),i=n("433d");function o(t){return r["a"].get(i["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function a(t){return Object(r["a"])({url:"/pc/base/category/add",method:"post",data:t})}function s(t){return Object(r["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function c(t){return Object(r["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function l(t){return Object(r["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function u(t){return Object(r["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function f(){return Object(r["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function h(t){return Object(r["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function d(t){return Object(r["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function p(t){return Object(r["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function m(t){return Object(r["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function g(t){return r["a"].get(i["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function v(t){return Object(r["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function y(t){return Object(r["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function b(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function w(t){return Object(r["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function S(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function x(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function _(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}},9960:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return t.dialogShow?n("el-dialog",{attrs:{width:"40%",center:!0,"close-on-click-modal":!1,"close-on-press-escape":!1,title:t.dialogTitle,"before-close":t.beforeClose,modal:t.modal,visible:t.dialogShow}},[n("el-row",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[n("el-col",{attrs:{span:24}},[n("el-form",[null!=t.templateSettings.templateUrl?n("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[n("a",{staticClass:"blue-txt",staticStyle:{color:"#409EFF"},attrs:{href:t.templateSettings.templateUrl,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.templateSettings.templateName))])]):t._e(),t._v(" "),n("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[n("el-upload",{ref:t.fileSettings.ref,staticClass:"upload-demo",attrs:{headers:t.headers,name:"file",data:t.fileSettings.data,action:t.fileSettings.uploadUrl,"before-upload":t.beforeAvatarUpload,"on-success":t.handleUploadSuccess,"on-change":t.file,multiple:t.fileSettings.multiple,limit:t.fileSettings.num,accept:t.fileSettings.accept,"auto-upload":t.fileSettings.autoUpload}},[n("el-button",{attrs:{size:"small",type:"primary"}},[t._v(t._s(t.fileSettings.title))]),t._v(" "),n("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传"+t._s(t.fileSettings.num)+"个格式为"+t._s(t.fileSettings.accept)+"的文件,且不超过"+t._s(t.fileSettings.max)+"kb")])],1)],1),t._v(" "),n("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[n("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:t.handleSubmit}},[t._v("开始导入")])],1)],1)],1)],1)],1):t._e()},i=[],o=n("5f87"),a=n("83d6"),s={props:{importSetting:{type:Object,default:function(){return{}}},dialogShow:{type:Boolean,default:!1},modal:{type:Boolean,default:!1},dialogTitle:{type:String,default:""}},data:function(){return{headers:{},loading:!1,fileSettings:{ref:"myFile",data:{},title:"点击上传",max:1024,num:1,accept:".xlsx",uploadUrl:"",type:"text",multiple:!1,disabled:!1,autoUpload:!1,onSuccess:null},isUpload:!1,templateSettings:{templateName:"模板下载",templateUrl:null}}},watch:{dialogShow:function(t){t&&(this.fileSettings=Object.assign(this.fileSettings,this.importSetting.fileSettings),this.templateSettings=Object.assign(this.templateSettings,this.importSetting.templateSettings),console.log(this.templateSettings),this.fileSettings.onSuccess=this.importSetting.onSuccess)}},mounted:function(){this.headers[a["sessionToken"]]=Object(o["a"])()},methods:{beforeClose:function(){var t=this;this.loading?this.$confirm("正在执行导入,确认关闭?").then((function(){t.importSetting.dialogShow=!1,t.loading=!1})).catch():this.importSetting.dialogShow=!1},beforeAvatarUpload:function(t){var e=this.fileSettings.accept.split(",").indexOf(t.name.substr(t.name.lastIndexOf("."),t.name.length).toLocaleString())>-1;e||this.$message.error("上传文件只能是 ".concat(this.fileSettings.accept," 格式!"));var n=t.size/10240&&(t.importSetting.fileSettings.data={pid:n[0].id})}))},updState:function(t){var e=this,n=0==t.states?"启用":"禁用";e.$modal.confirm("确认要"+n+'"'+t.warehouseName+'"吗?').then((function(){var r=Object.assign({},t);r.states=1==t.states?0:1,u["j"](r).then((function(r){r&&(t.states=1===t.states?0:1,e.$modal.msgSuccess(n+"成功"),e.search())}))}))},del:function(t){var e=this;this.$modal.confirm('是否确认删除名称为"'+t.warehouseName+'"的机构吗?').then((function(){u["f"]({id:t.id}).then((function(t){}))})).then((function(t){e.$message.success("删除成功!"),e.search()})).catch((function(){}))},showAdd:function(){this.editSetting.id=null,this.editSetting.info=null,this.editSetting.title="新增",this.editSetting.show=!0},showAudit:function(t){this.editSetting.id=t.id,this.editSetting.info=JSON.stringify(t),this.editSetting.title="编辑",this.editSetting.show=!0},showPerson:function(t){this.personSetting.id=t.id,this.personSetting.info=JSON.stringify(t),this.personSetting.title="选择库管员",this.personSetting.show=!0},nodeClick:function(t){t=t||{},this.p=Object.assign({},{id:t.id,name:t.name}),void 0!=this.p.id&&null!=this.p.id?(this.filterFrom.tenantId=this.p.id,this.editSetting.orgId=this.p.id):(this.filterFrom.tenantId=null,this.editSetting.orgId=null),this.importSetting.fileSettings.data={pid:t.id},this.search(1)},search:function(t){void 0!=t?this.$refs.myTable.search({pageNum:t}):this.$refs.myTable.search()},fifterForm:function(t){this.filterFrom=Object.assign(this.filterFrom,t),this.search(1)}}},p=d,m=n("2877"),g=Object(m["a"])(p,r,i,!1,null,"22ae47c6",null);e["default"]=g.exports}}]);