WangHan
2025-04-03 a1b85ef72062ca80db35546e4216dd564f3e0f57
1
(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<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(l(e)+" is not iterable")}return w.prototype=S,i(O,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:w,configurable:!0}),w.displayName=f(S,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,f(t,c,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(k.prototype),f(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new k(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),f(O,c,"Generator"),f(O,a,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=$,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=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<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=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<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(c(e)+" is not iterable")}return w.prototype=S,i(O,"constructor",{value:S,configurable:!0}),i(S,"constructor",{value:w,configurable:!0}),w.displayName=f(S,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,f(t,u,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},j(k.prototype),f(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new k(h(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(O),f(O,u,"Generator"),f(O,a,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=$,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=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<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=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/1024<this.fileSettings.max;return n||this.$message.error("上传文件大小不能超过 "+this.fileSettings.max+"kb!"),e&&n},handleSubmit:function(){this.isUpload?this.$refs[this.fileSettings.ref].submit():this.$message.error("请上传文件")},file:function(t,e){t&&(this.isUpload=!0)},handleUploadSuccess:function(t,e,n){var r=this;this.fileSettings.onSuccess&&(this.loading=!0,this.fileSettings.onSuccess(t,(function(){r.loading=!1,r.importSetting.dialogShow=!1})))}}},c=s,l=n("2877"),u=Object(l["a"])(c,r,i,!1,null,null,null);e["default"]=u.exports},f1c5: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("div",{staticClass:"app-container"},[n("el-container",[n("el-container",[n("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[n("div",{staticClass:"filter-container"},[n("my-search",{ref:"searchBar",attrs:{items:t.items},on:{search:t.fifterForm}})],1),t._v(" "),n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",[n("my-table-v2",{ref:"myTable",attrs:{filter:t.filterFrom,table:t.table}})],1)],1),t._v(" "),t.editSetting.show?n("edit",{attrs:{setting:t.editSetting},on:{close:function(e){t.editSetting.show=!1},search:t.search}}):t._e(),t._v(" "),t.personSetting.show?n("person",{attrs:{setting:t.personSetting},on:{close:function(e){t.personSetting.show=!1},search:t.search}}):t._e()],1)],1)],1),t._v(" "),n("my-import",{attrs:{"import-setting":t.importSetting,"dialog-show":t.importSetting.dialogShow,"dialog-title":t.importSetting.dialogTitle}})],1)},i=[],o=n("80cb"),a=n("f6e8"),s=n("433d"),c=n("35f5"),l=n("5a2a"),u=n("6ec5"),f=n("9960"),h=n("dee4"),d={name:"index",components:{MyButton:a["a"],MyTableV2:o["a"],edit:c["default"],myImport:f["default"],person:l["default"]},data:function(){var t=this;return{items:[{type:"text",dataIndex:"warehouseName",label:"仓库名称",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"states",label:"状态",placeholder:"请选择",defaultValue:"1",options:[{label:"启用",value:"1"},{label:"禁用",value:"0"}]}],treeDataList:[],filterFrom:{tenantId:null,userName:null,userPhone:null,status:1},importSetting:{dialogTitle:"导入",dialogShow:!1,fileSettings:{data:{},uploadUrl:Object(h["b"])()+"/pc/fin/sys/tenant/import",accept:".xls",type:"text",loading:!1},templateSettings:{templateName:"导入模板.xls",templateUrl:s["a"].apiBaseURL+"/pc/fin/sys/tenant/getImportTemplate"},onSuccess:null},editSetting:{title:"",id:"",orgId:"",show:!1},personSetting:{title:"",id:"",orgId:"",show:!1},table:{showIndex:!0,expand:!1,url:s["a"].apiBaseURL+"/pc/base/warehouse/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){t.showAdd(null)}}]},columns:[{title:"仓库名称",field:"warehouseName",align:"left",minWidth:140},{title:"编号",field:"warehouseCode",align:"center",width:120},{title:"类型",field:"classificationName",align:"center",width:120},{title:"地址",field:"adress",align:"left",minWidth:140},{title:"所属机构",field:"agencyName",align:"left",minWidth:140},{field:"states",title:"状态",align:"center",width:100,switch:function(e){var n={};return 1==e.states?Object.assign(n,{value:!0,label:"是",click:function(){t.updState(e)}}):Object.assign(n,{value:!1,label:"否",click:function(){t.updState(e)}}),n}}],operation:{show:!0,width:240,attr:[{title:"编辑",events:function(e){t.showAudit(e)}},{title:"删除",events:function(e){t.del(e)}},{title:"库管员",type:"primary",events:function(e){t.showPerson(e)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){this.initTreeData()},methods:{importOrg:function(){var t=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(e,n){1===e.code?(t.$message.success(e.msg),t.search(1)):t.$message.warning(e.msg),n()}},initTreeData:function(){var t=this;u["l"]().then((function(e){var n=e||[];t.treeDataList.splice(0,t.treeDataList.length),t.treeDataList=n,n.length>0&&(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}}]);