WangHan
2025-04-03 a1b85ef72062ca80db35546e4216dd564f3e0f57
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-00b1e3a3"],{"279c":function(t,e,n){"use strict";n("6cff")},"2c72":function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a}));var r=n("b775");function o(t){return Object(r["a"])({url:"/pc/fin/sys/tenant/user/select/department",method:"get",params:t})}function i(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})}},"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)])},o=[],i=n("2c72"),a=n("f76d"),c=n("f6e8");function s(t){return s="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},s(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,o=Object.defineProperty||function(t,e,n){t[e]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function h(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new N(r||[]);return o(a,"_invoke",{value:j(t,n,c)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var p="suspendedStart",v="suspendedYield",y="executing",m="completed",g={};function w(){}function b(){}function _(){}var k={};h(k,a,(function(){return this}));var x=Object.getPrototypeOf,L=x&&x(x(P([])));L&&L!==n&&r.call(L,a)&&(k=L);var E=_.prototype=w.prototype=Object.create(k);function S(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(o,i,a,c){var u=d(t[o],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==s(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return n("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,n,r){var o=p;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var s=C(c,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===p)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=y;var u=d(e,n,r);if("normal"===u.type){if(o=r.done?m:v,u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o=m,r.method="throw",r.arg=u.arg)}}}function C(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=d(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.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,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function I(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 D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(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 o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(s(e)+" is not iterable")}return b.prototype=_,o(E,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:b,configurable:!0}),b.displayName=h(_,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,_):(t.__proto__=_,h(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},S(O.prototype),h(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new O(f(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(E),h(E,l,"Generator"),h(E,a,(function(){return this})),h(E,"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=P,N.prototype={constructor:N,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(D),!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 o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(s&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):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),g},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),D(n),g}},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 o=r.arg;D(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function l(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function h(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){l(i,r,o,a,c,"next",t)}function c(t){l(i,r,o,a,c,"throw",t)}a(void 0)}))}}var f={name:"person",components:{winMd:a["a"],myButton:c["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=h(u().mark((function t(){var e,n;return u().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(i["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(i["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,o){n.id==t.id&&e.$set(e.treeData[0].children[r].children[o],"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(i["b"])(e).then((function(e){t.$message.success("保存成功!"),t.close(),t.$emit("search")}))}else this.$message.error("请选择库管员!")}}},d=f,p=(n("279c"),n("2877")),v=Object(p["a"])(d,r,o,!1,null,"4febb127",null);e["default"]=v.exports},"6cff":function(t,e,n){}}]);