(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-411866d4"],{"35f5":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-sm",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"仓库名称",prop:"warehouseName"}},[r("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(" "),r("el-form-item",{attrs:{label:"仓库类型",prop:"classificationCode"}},[r("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 r("el-option",{key:t.dict_code,attrs:{label:t.dict_label,value:t.dict_code}})})),1)],1),t._v(" "),r("el-form-item",{attrs:{label:"所属机构",prop:"agencyId"}},[r("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(" "),r("el-form-item",{attrs:{label:"地址"}},[r("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(" "),r("el-form-item",{attrs:{label:"状态",prop:"states"}},[r("el-radio-group",{model:{value:t.formData.states,callback:function(e){t.$set(t.formData,"states",e)},expression:"formData.states"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),r("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],a=r("e694"),i=r("f6e8"),c=r("6ec5"),s=r("ed08");function u(t){return u="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},u(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={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var a=e&&e.prototype instanceof b?e:b,i=Object.create(a.prototype),c=new N(n||[]);return o(i,"_invoke",{value:D(t,r,c)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p="suspendedStart",m="suspendedYield",g="executing",y="completed",v={};function b(){}function w(){}function L(){}var x={};f(x,i,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(C([])));j&&j!==r&&n.call(j,i)&&(x=j);var O=L.prototype=b.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,a,i,c){var s=h(t[o],t,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(s.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function D(e,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var s=S(c,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var u=h(e,r,n);if("normal"===u.type){if(o=n.done?y:m,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function S(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var a=h(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,v;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}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 $(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 C(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=L,o(O,"constructor",{value:L,configurable:!0}),o(L,"constructor",{value:w,configurable:!0}),w.displayName=f(L,s,"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,L):(t.__proto__=L,f(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},e.awrap=function(t){return{__await:t}},k(E.prototype),f(E.prototype,c,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new E(d(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(O),f(O,s,"Generator"),f(O,i,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,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($),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(i)},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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),$(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;$(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function f(t,e,r,n,o,a,i){try{var c=t[a](i),s=c.value}catch(t){return void r(t)}c.done?e(s):Promise.resolve(s).then(n,o)}function d(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){f(a,n,o,i,c,"next",t)}function c(t){f(a,n,o,i,c,"throw",t)}i(void 0)}))}}var h={components:{winSm:a["a"],myButton:i["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=d(l().mark((function t(){return l().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=d(l().mark((function t(){var e=this;return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c["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=d(l().mark((function t(){var e=this;return l().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,c["l"]().then((function(t){t&&(e.treeList=t,e.$set(e.formData,"agencyIds",Object(s["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 r=Object.assign({},t.formData);if(t.loading)return;t.loading=!0,t.setting.id?c["j"](r).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})).catch((function(){t.loading=!1})):(r.orgId=t.setting.orgId,c["c"](r).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=h,m=r("2877"),g=Object(m["a"])(p,n,o,!1,null,null,null);e["default"]=g.exports},"433d":function(t,e,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};e["a"]=o},"6ec5":function(t,e,r){"use strict";r.d(e,"l",(function(){return a})),r.d(e,"a",(function(){return i})),r.d(e,"g",(function(){return c})),r.d(e,"c",(function(){return s})),r.d(e,"j",(function(){return u})),r.d(e,"f",(function(){return l})),r.d(e,"d",(function(){return f})),r.d(e,"e",(function(){return d})),r.d(e,"p",(function(){return h})),r.d(e,"n",(function(){return p})),r.d(e,"m",(function(){return m})),r.d(e,"k",(function(){return g})),r.d(e,"s",(function(){return y})),r.d(e,"r",(function(){return v})),r.d(e,"q",(function(){return b})),r.d(e,"o",(function(){return w})),r.d(e,"b",(function(){return L})),r.d(e,"i",(function(){return x})),r.d(e,"h",(function(){return _}));var n=r("b775"),o=r("433d");function a(t){return n["a"].get(o["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:t})}function i(t){return Object(n["a"])({url:"/pc/base/category/add",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/pc/base/category/edit",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/pc/base/warehouse/add",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/pc/base/warehouse/edit",method:"post",data:t})}function l(t){return Object(n["a"])({url:"/pc/base/warehouse/del",method:"delete",data:t})}function f(){return Object(n["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function d(t){return Object(n["a"])({url:"/pc/base/category/del",method:"delete",data:t})}function h(t){return Object(n["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:t})}function p(t){return Object(n["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:t})}function m(t){return Object(n["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:t})}function g(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function y(t){return Object(n["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:t})}function v(t){return Object(n["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:t})}function b(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:t})}function w(t){return Object(n["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:t})}function L(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:t})}function x(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:t})}function _(t){return Object(n["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:t})}}}]);
|