(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-25afeb27","chunk-5bb73842","chunk-352751a5","chunk-bb660846","chunk-67189526","chunk-2d230fe7","chunk-2d22d7e6","chunk-2d0e64e8","chunk-35058f9a","chunk-2620d8ef","chunk-5a0a1983","chunk-d150d8a0","chunk-7778ab62","chunk-3f5e2ac6","chunk-40ba4bb3","chunk-3e45d87d","chunk-32a4da6e","chunk-62cecca1","chunk-09d1c450","chunk-86e15c26","chunk-711db7a6","chunk-3dfc7367","chunk-5a565e17","chunk-1483d9b9","chunk-06ce4ff3","chunk-00884018","chunk-0825917c","chunk-19338f41","chunk-46647c1c","chunk-08b2476e","chunk-37072cda","chunk-5527f2ee","chunk-4c579a62","chunk-7bd0fbd7","chunk-7546d655","chunk-c1e7a890","chunk-1ae8f23e","chunk-3bc7e395","chunk-76741b4f","chunk-e6f4b6f4","chunk-9598585e","chunk-61179e5f","chunk-57cab3be","chunk-407cdc65","chunk-6fee7f9a","chunk-299640e1","chunk-a80eb4f6","chunk-b30fc9ac","chunk-2d2105d3","chunk-cc8a3952","chunk-306c626c","chunk-0a1e07a4","chunk-5c564d2a","chunk-04ce482c","chunk-eb9bb078","chunk-e12d3f04","chunk-106818c5","chunk-42627ebc","chunk-7a509419","chunk-4bf015fa","chunk-22a71f38","chunk-6c48fa9a","chunk-7a08b7a2","chunk-3504480b","chunk-ffd74c96","chunk-e3350e26","chunk-4b0d1d89","chunk-434b193a","chunk-fb9400d0","chunk-053084f0","chunk-4beb77b6","chunk-c787d1bc","chunk-89e24c3c","chunk-0eb47b9e","chunk-00b1e3a3","chunk-115cef7f","chunk-40ef04d7","chunk-5fcc42b3","chunk-7f9702fa","chunk-88bee8ea","chunk-729aa423","chunk-6ddcf9b0","chunk-004e11de","chunk-b10391a6","chunk-43e9ecd8","chunk-411866d4","chunk-7a6184df","chunk-1eea7300","chunk-1c9a8ee8","chunk-ce5d5238","chunk-5d23e54f","chunk-968b41d0","chunk-92e5b0d0","chunk-7679a1ce","chunk-1f1f0f92","chunk-3edc0d5c","chunk-1f36b22e","chunk-4dd11f2e","chunk-299d5891","chunk-943a1100","chunk-648c8a16","chunk-2d0e66d0","chunk-2d22234c","chunk-2d207d25","chunk-2d0b219b","chunk-2d22979b","chunk-2d207f67","chunk-2d0dd7e4","chunk-2d0db05b","chunk-2d0ab927","chunk-2d0aa195","chunk-2d0c9509","chunk-2d0e64e8","chunk-77346fba"],{"0048":function(e,t,r){},"00fd":function(e,t,r){var n=r("9e69"),a=Object.prototype,o=a.hasOwnProperty,i=a.toString,s=n?n.toStringTag:void 0;function l(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(l){}var a=i.call(e);return n&&(t?e[s]=r:delete e[s]),a}e.exports=l},"0264":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{attrs:{title:e.setting.title,width:"800px",loading:e.loading},on:{close:e.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"物品名称",prop:"goodsName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入物品名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:e.formData.goodsName,callback:function(t){e.$set(e.formData,"goodsName",t)},expression:"formData.goodsName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"物品分类",prop:"categoryId"}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{clearable:"",filterable:"",placeholder:"请选择物品分类",options:e.categoryList,props:{emitPath:!1,value:"id"}},model:{value:e.formData.categoryId,callback:function(t){e.$set(e.formData,"categoryId",t)},expression:"formData.categoryId"}})],1),e._v(" "),e._l(e.formData.models,(function(t,n){return r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:9}},[r("el-form-item",{attrs:{label:"规格型号",prop:"models."+n+".modelName",rules:e.rules.modelName}},[r("el-input",{staticStyle:{width:"100%"},attrs:{disabled:!!e.setting.id,placeholder:"请输入规格型号名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.modelName,callback:function(r){e.$set(t,"modelName",r)},expression:"m.modelName"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:9}},[r("el-form-item",{attrs:{label:"单位",prop:"models."+n+".unit",rules:e.rules.unit}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入单位",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.unit,callback:function(r){e.$set(t,"unit",r)},expression:"m.unit"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:6}},[e.formData.models.length>1?r("my-button",{key:"d"+n,attrs:{name:"删除",type:"danger"},on:{click:function(t){return e.delCode(n)}}}):e._e(),e._v(" "),n===e.formData.models.length-1?r("my-button",{key:"a"+n,attrs:{name:"新增型号",type:""},on:{click:e.addCode}}):e._e()],1)],1)})),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"states"}},[r("el-radio-group",{model:{value:e.formData.states,callback:function(t){e.$set(e.formData,"states",t)},expression:"formData.states"}},[r("el-radio",{attrs:{label:1,border:""}},[e._v("启用")]),e._v(" "),r("el-radio",{attrs:{label:0,border:""}},[e._v("禁用")])],1)],1)],2),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.save}})],1)],1)},a=[],o=r("f76d"),i=r("f6e8"),s=r("f596"),l=r("c56b"),c=r("2f62");function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new L(n||[]);return a(i,"_invoke",{value:j(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",b={};function y(){}function w(){}function _(){}var x={};c(x,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(P([])));O&&O!==r&&n.call(O,i)&&(x=O);var k=_.prototype=y.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function r(a,o,i,s){var l=p(e[a],e,o);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==u(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function j(t,r,n){var a=m;return function(o,i){if(a===g)throw Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=g;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?v:h,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,s,"next",e)}function s(e){f(o,n,a,i,s,"throw",e)}i(void 0)}))}}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function p(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){p(o,n,a,i,s,"next",e)}function s(e){p(o,n,a,i,s,"throw",e)}i(void 0)}))}}var h={components:{winSm:o["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){var e=this,t=function(t,r,n){e.checkedList.length<1?n(new Error("至少选择一个")):n()};return{deptmentOptions:[],loading:!0,checkAll:!1,checkedList:[],roleList:[{id:1,label:"王涵1"},{id:2,label:"王涵2"}],queryParams:{pageNum:1,pageSize:10,roleName:void 0,roleKey:void 0,status:void 0,orgId:1},roleOptions:[],roleCheckStrictly:!0,defaultProps:{children:"childList",label:"name"},formData:{sysDeptId:"",userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},rules:{sysDeptId:[{required:!0,message:"请选择部门",trigger:"change"}],userName:[{required:!0,message:"请输入人员姓名",trigger:"blur"}],userCode:[{required:!0,message:"请输入登录名",trigger:"blur"}],userPhone:[{required:!0,message:"请输入手机号",trigger:"blur"}],sex:[{required:!0,message:"请选择性别",trigger:"change"}],seq:[{required:!0,message:"请输入顺序号",trigger:"blur"}],roleSetting:[{validator:t,required:!0,trigger:"blur"}]}}},created:function(){var e=m(f().mark((function e(){return f().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.title=this.setting.title,null==this.setting.id){e.next=4;break}return e.next=4,this.getInfo();case 4:return e.next=6,this.getAllRole();case 6:return e.next=8,this.getDeptmentOptions();case 8:this.loading=!1;case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{getAllRole:function(){var e=m(f().mark((function e(){var t=this;return f().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",e.next=3,l["k"]({dataScope:this.setting.data_scope}).then((function(e){t.roleOptions=e||[],t.loading=!1}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getDeptmentOptions:function(){var e=m(f().mark((function e(){var t=this;return f().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(u["d"])({tenantId:this.setting.tenantId}).then((function(e){t.deptmentOptions=e}));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleCheckAllChange:function(e){this.checkedList=e?this.roleOptions.map((function(e){return e.role_id})):[]},handleCheckedCitiesChange:function(e){var t=e.length;this.checkAll=t===this.roleOptions.length},getInfo:function(){var e=m(f().mark((function e(){var t=this;return f().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.title=this.setting.title,e.next=3,c["h"]({id:this.setting.id}).then((function(e){var r=e.data;t.formData=Object.assign(t.formData,r),null!=t.formData.projectStart&&t.formData.projectStart>0&&(t.formData.projectStart=s["LongToDateTime"](t.formData.projectStart)),null!=t.formData.projectEnd&&t.formData.projectEnd>0&&(t.formData.projectEnd=s["LongToDateTime"](t.formData.projectEnd)),t.checkedList=e.list.map((function(e){return e.role_id})),e.list.length==t.roleOptions.length&&t.handleCheckedCitiesChange(e.list)}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),close:function(){this.formData={sysDeptId:"",userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},this.$emit("close")},save:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(t){var r=Object.assign({},e.formData);if(r.roleList=e.checkedList,r.tenantId=e.setting.tenantId,r.tenantCode=e.setting.tenantCode,0==r.ctiStatus&&(r.agentJid="",r.workgroupJid="",r.clientNumber="",r.clientPwd=""),null!=r.projectStart&&null!=r.projectEnd&&(r.projectStart=s["DateToLong"](r.projectStart),r.projectEnd=s["DateToLong"](r.projectEnd),r.projectStart>=r.projectEnd))return void e.$message.error("服务结束时间不能小于或者等于服务开始时间");if(null==r.projectStart&&null!=r.projectEnd||null!=r.projectStart&&null==r.projectEnd)return void e.$message.error("服务开始时间和服务结束时间必须成对出现");if(e.loading)return;e.loading=!0,r.id?c["k"](r).then((function(t){e.loading=!1,t?(e.$message.success("保存成功!"),e.close(),e.$emit("search")):e.$message.error("保存失败")})).catch((function(){e.loading=!1})):c["a"](r).then((function(t){e.loading=!1,t?(e.$message.success("保存成功!"),e.close(),e.$emit("search")):e.$message.error("保存失败")})).catch((function(){e.loading=!1}))}else e.$message.error("校验未通过,请检查。")}))},getWorkgroupsAll:function(){var e=this;callCenter.getWorkgroupsAll().then((function(t){e.workgroups=t.workgroups}))},getWorkgroupAgents:function(e){var t=this;this.formData.agentJid="",this.formData.clientNumber="",this.formData.clientPwd="",this.agentExtendEntiry.agentId="",this.formData.workgroupJid=this.workgroup.workgroupJID,callCenter.getWorkgroupAgents(e).then((function(e){t.agents=e.agents}))},onClickAgent:function(e){this.formData.agentJid=e.agentExtendEntiry.agentId,this.formData.clientNumber=e.agentExtendEntiry.ccClientNumber,this.formData.clientPwd=e.agentExtendEntiry.ccClientPWD}}},g=h,v=r("2877"),b=Object(v["a"])(g,n,a,!1,null,null,null);t["default"]=b.exports},1489:function(e,t,r){},1684:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1)],1)],1)},a=[],o=r("80cb"),i=r("f6e8"),s=r("433d"),l=r("2c4d");function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)}))}}var p={components:{win:o["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,data_scope:null,checkAll:!1,checkedList:[],roleList:[{id:1,label:"王涵1"},{id:2,label:"王涵2"}],queryParams:{pageNum:1,pageSize:10,roleName:void 0,roleKey:void 0,status:0,orgId:1},roleOptions:[],roleCheckStrictly:!0,defaultProps:{children:"childList",label:"name"},formData:{userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null}}},created:function(){var e=f(u().mark((function e(){return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.title=this.setting.title,null==this.setting.id){e.next=4;break}return e.next=4,this.getInfo();case 4:return e.next=6,this.getAllRole();case 6:this.loading=!1;case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{getAllRole:function(){var e=f(u().mark((function e(){var t=this;return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",e.next=3,s["k"]({dataScope:this.setting.data_scope}).then((function(e){t.roleOptions=e||[],t.loading=!1}));case 3:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),handleCheckAllChange:function(e){this.checkedList=e?this.roleOptions.map((function(e){return e.role_id})):[]},handleCheckedCitiesChange:function(e){var t=e.length;this.checkAll=t===this.roleOptions.length},getInfo:function(){var e=f(u().mark((function e(){var t=this;return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,l["h"]({id:this.setting.id}).then((function(e){var r=e.data;t.formData=Object.assign(t.formData,r),t.checkedList=e.list.map((function(e){return e.role_id})),e.list.length===t.roleOptions.length&&t.handleCheckedCitiesChange(e.list)}));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),close:function(){this.formData={userName:"",userCode:"",userPhone:"",sex:1,status:1,remark:"",seq:null},this.$emit("close")},save:function(){var e=this,t=Object.assign({},this.formData);if(t.roleList=this.checkedList,t.id){if(this.loading)return;this.loading=!0,l["m"](t).then((function(t){e.loading=!1,t?(e.$message.success("保存成功!"),e.close(),e.$emit("search")):e.$message.error("保存失败")})).catch((function(){e.loading=!1}))}}}},m=p,h=r("2877"),g=Object(h["a"])(m,n,a,!1,null,null,null);t["default"]=g.exports},"2b3e":function(e,t,r){var n=r("585a"),a="object"==typeof self&&self&&self.Object===Object&&self,o=n||a||Function("return this")();e.exports=o},"2c4d":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"d",(function(){return o})),r.d(t,"g",(function(){return i})),r.d(t,"e",(function(){return s})),r.d(t,"f",(function(){return l})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return u}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/fin/warehouse/ledger/getListExport",responseType:"blob",method:"post",params:e})}function o(e){return Object(n["a"])({url:"/pc/warehouse/warningConfig/add",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/pc/warehouse/warningConfig/upd",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/pc/warehouse/warningConfig/getById",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/pc/warehouse/warningConfig/del",method:"delete",data:e})}function c(e){return Object(n["a"])({url:"/pc/warehouse/warning/getList",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/pc/warehouse/warning/getWarningTypeNum",method:"get",params:e})}},"2c72":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/user/select/department",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/pc/base/warehouse/manager/save",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/pc/base/warehouse/manager/list",method:"get",params:e})}},"2d6d":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAYCAYAAAD6S912AAADU0lEQVR4AZWVQ6AsRx/Ff6dHz7Zx9X2xbTu7WPtolewugnW0j23bts1n229QJz23ejp+OO2uql/9z6mB2LbwZ2fPoFC8DTyHRqNPe90/h21I/w06cwTFIVdUt1av/PHn+SOQ6GybSqlc6NVu9/btFNBfnX8k9m0LFi2f8cnn33vjxs0gafCggez2/9nMmjFxDrhPu997+7aA0V6peNuGDZuPfPfDr7102Sq1OpnsJDF18hj23auLIUMG3k7trzEot1dO7VVrV37z/dwRX3z1C+C8Sw5NhRCZ9tytjf93TadcLvVql7v7ANRvL9Ftc+YtnfHBx9+xYcMmIwn/MxA5VX+bTXZNq2SvPdrVMXvSHOw++dvz/eRzH7B4ySqk3BxjJu1KeeBwWqpuXusVi75WBGPnlcYR06eO58Rj9qaIYMHCJgwgQCIwHHja9UyadQgt/fDxfXr1wctQwCYaz2X71zlLhUwRTMPOc2o+GGTzFwVDowFgAcT2SDZIjk9FEhEMBDvrLoEfvuU0kHTACVdx4IlX4yYwGGNkjBQvrTwxCIoQO4IBZX6yZjuvxOB6sIiSHFokHAJSkgEV7ThOHEkCS8h2MILYHifOpXiKkyaJiRnKNELMxETJzu7dSoLg2I/cIohYJRgHtSzH1yHEvtkqC9xi555DXDBQBCtmTqRHa0UScMDBcbBTXzZKJBsUiAqYmlFkhTxnGRIpD6FIy5yzLEHx3gIIAfL2YOwYbxzeMgTZVCTxRqlAmesQK6becFM5sB5MMIqZR2bcsDJoAqarYwKJhJoiXu2/LlRwfmQvjWKFThJpxvTRIJB/O/dipJ6vvlo44823f2Ll6o00QlzR9OpgYxDRRz+gIFFIpGIiRo0cxHHH/p+O9glzsC8Rmfzb+b1bqrWejz76jdff/JF6DrSCyT5r0IQVk34gRx7ezv77zlhTqZRvgg03aubja3JghF48A2q9a9dvueiFF7/hux+W9EPTQ0hOYSoIZs0czemn7cnwYQNfx8VLNPP2Odv+C5h3wcUQer78YuGMN976idWrNwEwcuRATjhuFzo6x82hoRR09+v8TWIb8vw0hi3Vno8/mgvAfvtNX1Mpp/ZCtAewU8A8hkK9l4Tp1OppVdv+G/0dKLn2DSGdBAMAAAAASUVORK5CYII="},"2e39":function(e,t,r){"use strict";function n(e,t){var r=t.length,n=e.length;if(n>r)return!1;if(n===r)return e===t;e:for(var a=0,o=0;a=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)}))}}var p={components:{winSm:o["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 e=f(u().mark((function e(){return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.class_List();case 2:return e.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 e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),methods:{class_List:function(){var e=f(u().mark((function e(){var t=this;return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["d"]().then((function(e){e&&(e.map((function(e){e.dict_code=e.dict_code.toString()})),t.classList=e)}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),tree_List:function(){var e=f(u().mark((function e(){var t=this;return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,s["l"]().then((function(e){e&&(t.treeList=e,t.$set(t.formData,"agencyIds",Object(l["a"])(t.treeList,t.formData.agencyId)))}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),getEditInfo:function(e){},close:function(){this.$emit("close")},save:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(t){var r=Object.assign({},e.formData);if(e.loading)return;e.loading=!0,e.setting.id?s["j"](r).then((function(t){e.loading=!1,t?(e.$message.success("保存成功!"),e.close(),e.$emit("search")):e.$message.error("保存失败")})).catch((function(){e.loading=!1})):(r.orgId=e.setting.orgId,s["c"](r).then((function(t){e.loading=!1,t?(e.$message.success("保存成功!"),e.close(),e.$emit("search")):e.$message.error("保存失败")})).catch((function(){e.loading=!1})))}else e.$message.error("校验未通过,请检查。")}))}}},m=p,h=r("2877"),g=Object(h["a"])(m,n,a,!1,null,null,null);t["default"]=g.exports},3679:function(e,t,r){"use strict";r("b2f5")},3729:function(e,t,r){var n=r("9e69"),a=r("00fd"),o=r("29f3"),i="[object Null]",s="[object Undefined]",l=n?n.toStringTag:void 0;function c(e){return null==e?void 0===e?s:i:l&&l in Object(e)?a(e):o(e)}e.exports=c},"3cfc":function(e,t,r){"use strict";r("9bf0")},"3ef9":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-sm",{attrs:{title:e.setting.title+"盘点",width:"800px"},on:{close:e.close}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"盘点单名",prop:"businessFormName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{clearable:"",maxlength:"20",placeholder:"请输入"},model:{value:e.formData.businessFormName,callback:function(t){e.$set(e.formData,"businessFormName",t)},expression:"formData.businessFormName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"盘点仓库",prop:"warehouseId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},on:{change:e.getPdr},model:{value:e.formData.warehouseId,callback:function(t){e.$set(e.formData,"warehouseId",t)},expression:"formData.warehouseId"}},e._l(e.warehouseOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.warehouseName,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"盘点人",prop:"operatorUserId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.formData.operatorUserId,callback:function(t){e.$set(e.formData,"operatorUserId",t)},expression:"formData.operatorUserId"}},e._l(e.operatorOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.managerName,value:e.managerId}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"监盘人",prop:"monitorUserId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.formData.monitorUserId,callback:function(t){e.$set(e.formData,"monitorUserId",t)},expression:"formData.monitorUserId"}},e._l(e.operatorOptions2,(function(e){return r("el-option",{key:e.id,attrs:{label:e.userName,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入内容",resize:"none",maxlength:"100","show-word-limit":""},model:{value:e.formData.remark,callback:function(t){e.$set(e.formData,"remark",t)},expression:"formData.remark"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.save}})],1)],1)},a=[],o=r("6ec5"),i=r("806c"),s=r("2c72"),l=r("e694"),c=r("f6e8"),u=r("6f7e"),d=r("2f62");function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t1&&(e.loading=!1)}))},getPdr:function(){var e=this;Object(s["c"])({warehouseId:this.formData.warehouseId}).then((function(t){e.count++,e.operatorOptions=t,e.count>1&&(e.loading=!1)}))},getJpr:function(){var e=this;Object(o["q"])({tenantId:this.userInfo.tenantId}).then((function(t){e.count++,e.operatorOptions2=t,e.count>1&&(e.loading=!1)}))},getEditInfo:function(e){},close:function(){this.$emit("close")},save:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(t){var r=Object.assign({},e.formData);e.loading=!0,e.setting.id?Object(i["d"])(r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(){e.loading=!1})):Object(i["a"])(r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(){e.loading=!1}))}else e.$message.error("校验未通过,请检查。")}))}}},y=b,w=r("2877"),_=Object(w["a"])(y,n,a,!1,null,null,null);t["default"]=_.exports},"3f97":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-dialog",{attrs:{title:"选择用户",visible:e.visible,width:"800px",top:"5vh","append-to-body":""},on:{"update:visible":function(t){e.visible=t}}},[r("el-form",{ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0}},[r("el-form-item",{attrs:{label:"用户名称",prop:"userName"}},[r("el-input",{attrs:{placeholder:"请输入用户名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.userName,callback:function(t){e.$set(e.queryParams,"userName",t)},expression:"queryParams.userName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"手机号码",prop:"phonenumber"}},[r("el-input",{attrs:{placeholder:"请输入手机号码",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.phonenumber,callback:function(t){e.$set(e.queryParams,"phonenumber",t)},expression:"queryParams.phonenumber"}})],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),r("el-row",[r("el-table",{ref:"table",attrs:{data:e.userList,height:"260px"},on:{"row-click":e.clickRow,"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),r("el-table-column",{attrs:{label:"用户名称",prop:"user_name","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"用户昵称",prop:"nick_name","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"邮箱",prop:"email","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"手机",prop:"phonenumber","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"状态",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("dict-tag",{attrs:{options:e.dict.type.sys_normal_disable,value:t.row.status}})]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"create_time",width:"180"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.create_time)))])]}}])})],1),e._v(" "),r("el-pagination",{attrs:{"current-page":e.queryParams.pageNum,"page-sizes":e.constants.page.limit,layout:e.constants.page.layout,total:this.total},on:{"size-change":e.getList,"current-change":e.getList}})],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.handleSelectUser}},[e._v("确 定")]),e._v(" "),r("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取 消")])],1)],1)},a=[],o=r("3528"),i={props:{roleId:{type:[Number,String]}},data:function(){return{constants:this.$constants,visible:!1,userIds:[],total:0,userList:[],queryParams:{pageNum:1,pageSize:10,roleId:void 0,userName:void 0,phonenumber:void 0}}},methods:{show:function(){this.queryParams.roleId=this.roleId,this.getList(),this.visible=!0},clickRow:function(e){this.$refs.table.toggleRowSelection(e)},handleSelectionChange:function(e){this.userIds=e.map((function(e){return e.id}))},getList:function(){var e=this;Object(o["l"])(this.queryParams).then((function(t){e.userList=t.datas,e.total=t.totalRows}))},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleSelectUser:function(){var e=this,t=this.queryParams.roleId,r=this.userIds.join(",");""!=r?Object(o["e"])({roleId:t,userIds:r}).then((function(t){e.$modal.msgSuccess(t.msg),1===t.code&&(e.visible=!1,e.$emit("ok"))})):this.$modal.msgError("请选择要分配的用户")}}},s=i,l=r("2877"),c=Object(l["a"])(s,n,a,!1,null,null,null);t["default"]=c.exports},"3fb2":function(e,t,r){"use strict";r("95d7")},"3fe1":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1),e._v(" "),e.detailSetting.show?r("detail",{attrs:{setting:e.detailSetting},on:{close:function(t){e.detailSetting.show=!1}}}):e._e()],1)],1)],1),e._v(" "),r("my-import",{attrs:{"import-setting":e.importSetting,"dialog-show":e.importSetting.dialogShow,"dialog-title":e.importSetting.dialogTitle}})],1)},a=[],o=r("6f7e"),i=r("80cb"),s=r("f6e8"),l=r("433d"),c=r("bee9"),u=r("6ec5"),d=r("9960"),f=r("dee4"),p={name:"index",components:{MyButton:s["a"],MyTableV2:i["a"],detail:c["default"],myImport:d["default"]},data:function(){var e=this;return{items:[{type:"text",dataIndex:"businessFormCode",label:"单号",placeholder:"请输入",defaultValue:""},{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null},cascader:[{key:"goodsTemplateId",queryKey:"agencyId"}],defaultValue:"",options:[]},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",defaultValue:"",options:[],cascader:[{key:"baseGoodsModelsId",queryKey:"goodsTemplatesId"}],optionsConfig:{label:"goodsName",value:"id",url:l["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请输入",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:l["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel"}},{type:"text",dataIndex:"createName",label:"创建人",placeholder:"请输入",defaultValue:""},{type:"date-picker",dataIndex:"incomeTimeStart",label:"时间",defaultValue:""},{type:"date-picker",dataIndex:"incomeTimeEnd",label:"至",defaultValue:""}],treeDataList:[],filterFrom:{tenantId:null,agencyId:[],status:1},importSetting:{dialogTitle:"导入",dialogShow:!1,fileSettings:{data:{},uploadUrl:Object(f["b"])()+"/pc/fin/sys/tenant/import",accept:".xls",type:"text",loading:!1},templateSettings:{templateName:"导入模板.xls",templateUrl:l["a"].apiBaseURL+"/pc/fin/sys/tenant/getImportTemplate"},onSuccess:null},detailSetting:{title:"",id:"",orgId:"",show:!1},table:{showIndex:!0,expand:!1,url:l["a"].apiBaseURL+"/pc/whForm/procure/detail/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"单号",field:"businessFormCode",align:"center",width:130},{title:"物品名称",field:"goodsTemplateName",align:"left",minWidth:140},{title:"规格型号",field:"baseGoodsModelsName",align:"left",width:130},{title:"单价",field:"price",align:"center",formatter:function(e){return{value:e.price/100}}},{title:"入库数量",field:"counts",align:"center"},{title:"金额",field:"amount",align:"center",formatter:function(e){return{value:e.amount/100}}},{title:"所属机构",field:"agencyName",align:"center",width:130},{title:"创建人",field:"buyerName",align:"center",width:90},{title:"操作时间",field:"procureTime",align:"center",width:160,formatter:function(e){return{value:o["LongToDateTime"](e.procureTime)}}}],operation:{show:!0,width:100,attr:[{title:"详情",events:function(t){e.showDetail(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){},methods:{importOrg:function(){var e=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(t,r){1===t.code?(e.$message.success(t.msg),e.search(1)):e.$message.warning(t.msg),r()}},updState:function(e){var t=this,r=0==e.status?"启用":"禁用";t.$modal.confirm("确认要"+r+'"'+e.name+'"吗?').then((function(){var n=Object.assign({},e);n.status=1==e.status?0:1,u["g"](n).then((function(n){n&&(e.status=1===e.status?0:1,t.$modal.msgSuccess(r+"成功"),t.search())}))}))},del:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.name+'"的机构吗?').then((function(){u["e"]({id:e.id}).then((function(e){}))})).then((function(e){t.$message.success("删除成功!"),t.search()})).catch((function(){}))},showDetail:function(e){this.detailSetting.id=e.businessId,this.detailSetting.title="详情",this.detailSetting.show=!0},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.filterFrom.incomeTimeStart&&(this.filterFrom.incomeTimeStart=this.filterFrom.incomeTimeStart.replace(/\-/g,"")),this.filterFrom.incomeTimeEnd&&(this.filterFrom.incomeTimeEnd=this.filterFrom.incomeTimeEnd.replace(/\-/g,"")),this.search(1)}}},m=p,h=r("2877"),g=Object(h["a"])(m,n,a,!1,null,"509743b6",null);t["default"]=g.exports},"3fe4":function(e,t,r){},"408c":function(e,t,r){var n=r("2b3e"),a=function(){return n.Date.now()};e.exports=a},4148:function(e,t,r){"use strict";r("87e5")},4200:function(e,t,r){},4254:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"divBox"},[r("el-card",{staticClass:"box-card"},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0}},[r("el-form-item",{attrs:{label:"顶级单位",prop:"orgId"}},[r("el-select",{attrs:{placeholder:"选择顶级单位"},on:{change:function(t){return e.getList()}},model:{value:e.queryParams.orgId,callback:function(t){e.$set(e.queryParams,"orgId",t)},expression:"queryParams.orgId"}},e._l(this.rootOrgList,(function(e){return r("el-option",{key:e.id,attrs:{label:e.dept_name,value:e.id}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"部门名称",prop:"deptName"}},[r("el-input",{attrs:{placeholder:"请输入部门名称",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.deptName,callback:function(t){e.$set(e.queryParams,"deptName",t)},expression:"queryParams.deptName"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-select",{attrs:{placeholder:"部门状态",clearable:""},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.constants.normalOrDisabled,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dept:add"],expression:"['system:dept:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:function(t){return e.handleAdd(null)}}},[e._v("新增顶级机构")])],1),e._v(" "),r("el-col",{attrs:{span:1.5}},[r("el-button",{attrs:{type:"info",plain:"",icon:"el-icon-sort",size:"mini"},on:{click:e.toggleExpandAll}},[e._v("展开/折叠")])],1)],1),e._v(" "),e.refreshTable?r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.deptList,"row-key":"id","default-expand-all":e.isExpandAll,"tree-props":{children:"children",hasChildren:"hasChildren"}}},[r("el-table-column",{attrs:{prop:"dept_name",label:"部门名称",width:"260"}}),e._v(" "),r("el-table-column",{attrs:{prop:"order_num",label:"排序",width:"200"}}),e._v(" "),r("el-table-column",{attrs:{prop:"status",label:"状态",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(0==t.row.status?"正常":"禁用"))])]}}],null,!1,2845654517)}),e._v(" "),r("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"create_time",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(e.parseTime(t.row.create_time)))])]}}],null,!1,1382655209)}),e._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dept:edit"],expression:"['system:dept:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(r){return e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dept:add"],expression:"['system:dept:add']"}],attrs:{size:"mini",type:"text",icon:"el-icon-plus"},on:{click:function(r){return e.handleAdd(t.row)}}},[e._v("新增")]),e._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dept:remove:query"],expression:"['system:dept:remove:query']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(r){return e.handleDelete(t.row)}}},[e._v("删除")])]}}],null,!1,4234669894)})],1):e._e()],1),e._v(" "),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"600px","append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[r("el-row",[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"机构类型",prop:"org_type"}},[r("el-select",{attrs:{placeholder:"机构类型"},model:{value:e.form.org_type,callback:function(t){e.$set(e.form,"org_type",t)},expression:"form.org_type"}},e._l(e.constants.sysOrgType,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),r("el-row",[0!==e.form.parent_id?r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"上级机构",prop:"parent_id"}},[r("treeselect",{attrs:{options:e.deptOptions,normalizer:e.normalizer,placeholder:"选择上级机构"},model:{value:e.form.parent_id,callback:function(t){e.$set(e.form,"parent_id",t)},expression:"form.parent_id"}})],1)],1):e._e()],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"机构名称",prop:"dept_name"}},[r("el-input",{attrs:{placeholder:"请输入机构名称"},model:{value:e.form.dept_name,callback:function(t){e.$set(e.form,"dept_name",t)},expression:"form.dept_name"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"显示排序",prop:"order_num"}},[r("el-input-number",{attrs:{"controls-position":"right",min:0},model:{value:e.form.order_num,callback:function(t){e.$set(e.form,"order_num",t)},expression:"form.order_num"}})],1)],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"负责人",prop:"leader"}},[r("el-input",{attrs:{placeholder:"请输入负责人",maxlength:"20"},model:{value:e.form.leader,callback:function(t){e.$set(e.form,"leader",t)},expression:"form.leader"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"联系电话",prop:"phone"}},[r("el-input",{attrs:{placeholder:"请输入联系电话",maxlength:"11"},model:{value:e.form.phone,callback:function(t){e.$set(e.form,"phone",t)},expression:"form.phone"}})],1)],1)],1),e._v(" "),r("el-row",[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[r("el-input",{attrs:{placeholder:"请输入邮箱",maxlength:"50"},model:{value:e.form.email,callback:function(t){e.$set(e.form,"email",t)},expression:"form.email"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"机构状态"}},[r("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.constants.normalOrDisabled,(function(t){return r("el-radio",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})),1)],1)],1)],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),r("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},a=[],o=r("fcb7"),i=r("ca17"),s=r.n(i),l=(r("542c"),{name:"Dept",components:{Treeselect:s.a},data:function(){return{constants:this.$constants,loading:!0,showSearch:!0,deptList:[],rootOrgList:[],selectedRootOrgId:void 0,deptOptions:[],title:"",open:!1,isExpandAll:!0,refreshTable:!0,queryParams:{deptName:void 0,status:void 0,loadSelect:0},form:{},rules:{dept_name:[{required:!0,message:"部门名称不能为空",trigger:"blur"}],order_num:[{required:!0,message:"显示排序不能为空",trigger:"blur"}],email:[{type:"email",message:"请输入正确的邮箱地址",trigger:["blur","change"]}],phone:[{pattern:/^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message:"请输入正确的手机号码",trigger:"blur"}]}}},created:function(){this.getList()},methods:{switchOrgRootList:function(){},getList:function(){var e=this;this.loading=!0,this.queryParams.loadSelect=0,Object(o["d"])(this.queryParams).then((function(t){e.rootOrgList=t.rootOrgList,e.selectedRootOrgId=t.selectedRootOrgId,e.queryParams.orgId=e.selectedRootOrgId,e.deptList=e.handleTree(t.deptList,"id","parent_id"),e.loading=!1}))},normalizer:function(e){return e.children&&!e.children.length&&delete e.children,{id:e.id,label:e.dept_name,children:e.children}},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={id:void 0,parent_id:void 0,dept_name:void 0,order_num:void 0,leader:void 0,phone:void 0,email:void 0,status:"0",org_id:void 0,org_type:void 0},this.resetForm("form")},handleQuery:function(){this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.queryParams.orgId=this.selectedRootOrgId,this.handleQuery()},handleAdd:function(e){var t=this;this.reset(),void 0!=e&&null!=e?(this.form.parent_id=e.id,this.form.org_type="9",this.queryParams.loadSelect=1,Object(o["d"])(this.queryParams).then((function(e){t.deptOptions=t.handleTree(e.deptList,"id","parent_id")})),this.title="添加机构"):(this.form.org_id=0,this.form.parent_id=0,this.form.org_type="0",this.title="添加顶级机构"),this.open=!0},toggleExpandAll:function(){var e=this;this.refreshTable=!1,this.isExpandAll=!this.isExpandAll,this.$nextTick((function(){e.refreshTable=!0}))},handleUpdate:function(e){var t=this;this.reset(),Object(o["c"])(e.id).then((function(e){t.form=e,t.form.org_type=e.org_type+"",t.form.status=e.status+"",t.open=!0,t.title="修改机构"})),this.queryParams.loadSelect=1,Object(o["d"])(this.queryParams).then((function(e){t.deptOptions=t.handleTree(e.deptList,"id","parent_id")}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(void 0!=e.form.id?Object(o["i"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(o["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.dept_name+'"的数据项?').then((function(){return Object(o["b"])(e.id)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))}}}),c=l,u=r("2877"),d=Object(u["a"])(c,n,a,!1,null,null,null);t["default"]=d.exports},4260:function(e,t,r){"use strict";r("8dbd")},"433d":function(e,t,r){"use strict";var n=r("c559"),a={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};t["a"]=a},4391:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-col",{attrs:{span:5}},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("my-tree",{ref:"searchTree",attrs:{"tree-list":e.treeDataList},on:{setNode:e.nodeClick,search:e.search}})],1)],1),e._v(" "),r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"8px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1),e._v(" "),e.editSetting.show?r("edit",{attrs:{setting:e.editSetting},on:{close:function(t){e.editSetting.show=!1},search:function(t){return e.search()}}}):e._e()],1)},a=[],o=r("befe"),i=r("80cb"),s=r("433d"),l=r("9af9"),c=r("6ec5"),u={name:"Dict",components:{MyTableV2:i["a"],myTree:o["a"],edit:l["default"]},data:function(){var e=this;return{treeDataList:[],constants:this.$constants,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,typeList:[],title:"",open:!1,dateRange:[],editSetting:{title:"",id:"",show:!1},filterFrom:{},items:[{type:"text",dataIndex:"name",label:"部门名称",placeholder:"请输入",defaultValue:""},{type:"text",dataIndex:"code",label:"编号",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"status",label:"状态",placeholder:"请选择",defaultValue:"1",options:[{value:"1",label:"启用"},{value:"0",label:"禁用"}]}],table:{showIndex:!0,expand:!1,url:s["a"].apiBaseURL+"/pc/fin/sys/tenant/department/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){e.handleAdd(null)}}]},columns:[{title:"编号",field:"code",align:"center",width:80},{title:"部门",field:"name",align:"left",minWidth:200},{title:"顺序号",field:"orderNum",align:"center",width:100},{title:"备注",field:"remark",align:"left",minWidth:200},{title:"状态",field:"status",align:"center",width:100,formatter:function(e){return{value:1===e.status?"启用":"禁用"}}}],operation:{width:100,align:"center",show:!0,attr:[{title:"编辑",events:function(t){e.showEdit(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){this.initTreeData()},methods:{initTreeData:function(){var e=this;c["l"]().then((function(t){var r=t||[];e.treeDataList.splice(0,e.treeDataList.length),e.treeDataList=r,e.treeDataList&&e.treeDataList.length>0&&(e.tenantId=e.treeDataList[0].id,e.tenantName=e.treeDataList[0].label,e.tenantCode=e.treeDataList[0].code)}))},nodeClick:function(e){this.p=Object.assign({},{id:e.id,name:e.name}),this.p.id?(this.filterFrom.tenantId=this.p.id,this.editSetting.tenantId=this.p.id):(this.filterFrom.tenantId=null,this.editSetting.tenantId=null),this.search(1)},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},handleAdd:function(){this.editSetting.tenantId?(this.editSetting.id=null,this.editSetting.info=null,this.editSetting.title="新增",this.editSetting.show=!0):this.$message.warning("请先选择左侧机构")},showEdit:function(e){console.log(e),this.editSetting.id=e.id,this.editSetting.info=e,this.editSetting.title="编辑",this.editSetting.show=!0}}},d=u,f=r("2877"),p=Object(f["a"])(d,n,a,!1,null,null,null);t["default"]=p.exports},"43d4":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-row",{attrs:{gutter:15}},[r("el-col",{attrs:{span:5}},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("my-tree",{ref:"searchTree",attrs:{"tree-list":e.treeDataList},on:{setNode:e.nodeClick,search:e.search}})],1)],1),e._v(" "),r("el-col",{attrs:{span:19}},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1)],1),e._v(" "),e.editSetting.show?r("edit",{attrs:{setting:e.editSetting},on:{close:function(t){e.editSetting.show=!1},search:e.search}}):e._e(),e._v(" "),e.editRoleSetting.show?r("editRole",{attrs:{setting:e.editRoleSetting},on:{close:function(t){e.editRoleSetting.show=!1},search:e.search}}):e._e()],1)},a=[],o=r("befe"),i=r("80cb"),s=r("f6e8"),l=r("433d"),c=r("169e"),u=r("145d"),d=r("2a3d"),f=r("6ec5"),p=r("c24f"),m=(r("6f7e"),{name:"index",components:{MyButton:s["a"],MyTableV2:i["a"],myTree:o["a"],edit:u["default"],editRole:d["default"]},data:function(){var e=this;return{items:c["default"],treeDataList:[],filterFrom:{tenantCode:null,userName:null,userCode:null},curOrgId:null,tenantId:null,tenantCode:null,tenantName:null,data_scope:0,editSetting:{title:"",id:"",tenantId:"",show:!1},editRoleSetting:{title:"",data_scope:0,id:"",show:!1},table:{showIndex:!0,expand:!1,url:l["a"].apiBaseURL+"/pc/fin/sys/tenant/user/select/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){e.showAdd(null)}}]},columns:[{title:"人员姓名",field:"userName",align:"left",minWidth:140},{title:"登录名",field:"userCode",align:"left",minWidth:140},{title:"手机号",field:"userPhone",align:"center",width:110},{title:"所属机构",field:"tenantName",align:"center",minWidth:150},{title:"部门",field:"sysDeptName",align:"center"},{field:"status",title:"状态",align:"center",width:80,switch:function(t){var r={};return 1==t.status?Object.assign(r,{value:!0,label:"启用",click:function(){e.updState(t)}}):Object.assign(r,{value:!1,label:"禁用",click:function(){e.updState(t)}}),r}}],operation:{show:!0,width:"250",attr:[{title:"角色",events:function(t){e.showEditRole(t.id)}},{title:"编辑",events:function(t){e.showAdd(t.id)}},{title:"密码初始化",events:function(t){e.updPassWord(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){this.initTreeData(),this.data_scope=this.$store.getters.userInfo?this.$store.getters.userInfo.lv:"",0===this.data_scope&&(this.data_scope=1),this.editSetting.data_scope=this.data_scope,this.editRoleSetting.data_scope=this.data_scope},methods:{importUser:function(){var e=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(t,r){1===t.code?(e.$message.success(t.msg),e.search(1)):e.$message.warning(t.msg),r()}},initTreeData:function(){var e=this;f["l"]().then((function(t){var r=t||[];e.treeDataList.splice(0,e.treeDataList.length),e.treeDataList=r,e.treeDataList&&e.treeDataList.length>0&&(e.tenantId=e.treeDataList[0].id,e.tenantName=e.treeDataList[0].label,e.tenantCode=e.treeDataList[0].code)}))},updState:function(e){var t=this,r=0===e.status?"启用":"禁用";t.$modal.confirm("确认要"+r+'"'+e.userName+'"吗?').then((function(){var n=Object.assign({},e);n.status=1===e.status?0:1,p["p"](n).then((function(n){n&&(e.status=1===e.status?0:1,t.$modal.msgSuccess(r+"成功"))}))}))},nodeClick:function(e){e=e||{},this.p=Object.assign({},{id:e.id,name:e.name,code:e.code,lv:e.lv});var t=Number(this.data_scope)+(e.lv-1);void 0!=this.p.code&&null!=this.p.code?(this.filterFrom.tenantCode=this.p.code,this.tenantId=this.p.id,this.tenantName=this.p.name,this.editSetting.tenantCode=this.p.code,this.editSetting.data_scope=t,this.editRoleSetting.data_scope=t):this.filterFrom.tenantCode=0,this.table.paging.page.pageNum=1,this.search(1)},updPassWord:function(e){var t=this;this.$modal.confirm('是否确认初始化名称为"'+e.userName+'"的密码?').then((function(){p["l"](e).then((function(e){}))})).then((function(e){t.$modal.confirm("初始化密码成功,新密码为:123456").then((function(e){})).catch((function(){})),t.search()})).catch((function(){}))},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search()},showAdd:function(e){var t="添加";null!=e&&(t="编辑"),this.tenantName?(this.editSetting.tenantId=this.tenantId,this.editSetting.tenantName=this.tenantName,this.editSetting.id=e,this.editSetting.title=t,this.editSetting.show=!0):this.$message.warning("请选择您要添加人员的机构!")},del:function(e){var t=this;e.isDelete=0,this.$modal.confirm('是否要删除"'+e.userName+'"的账号?').then((function(){p["p"](e).then((function(e){}))})).then((function(e){t.$message.success("删除成功!"),t.search()})).catch((function(){}))},showEditRole:function(e){var t="添加";null!=e&&(t="编辑角色"),this.editRoleSetting.id=e,this.editRoleSetting.title=t,this.editRoleSetting.show=!0},reset:function(){this.filterFrom.tenantCode=null,this.filterFrom.userName=null,this.filterFrom.userCode=null,this.filterFrom.status=1,this.search(1)}}}),h=m,g=r("2877"),v=Object(g["a"])(h,n,a,!1,null,"ff5ab22c",null);t["default"]=v.exports},4416:function(e,t){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=r},"448a":function(e,t,r){var n=r("2236"),a=r("11b0"),o=r("6613"),i=r("0676");function s(e){return n(e)||a(e)||o(e)||i()}e.exports=s,e.exports.__esModule=!0,e.exports["default"]=e.exports},"44b5":function(e,t,r){},4512:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-detail",attrs:{title:e.setting.title,width:"800px",loading:e.loading},on:{close:e.close}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("报废单号:")]),e._v(" "),r("span",[e._v(e._s(e.detail.businessFormCode))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("仓库:")]),e._v(" "),r("span",[e._v(e._s(e.detail.warehouseName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("所属机构:")]),e._v(" "),r("span",[e._v(e._s(e.detail.agencyName))])])],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("创建人:")]),e._v(" "),r("span",[e._v(e._s(e.detail.operatorName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("报废时间:")]),e._v(" "),r("span",[e._v(e._s(e._f("formatTime")(e.detail.dealTime)))])])],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{staticClass:"img-row",attrs:{span:24}},[r("span",[e._v("报废手续:")]),e._v(" "),e._l(e.fileList,(function(t,n){return r("div",{key:n,staticClass:"img-box",on:{click:function(r){return e.handlePreview(t)}}},[r("img",{staticClass:"img",attrs:{src:e.getUrl(t.path),alt:""}})])}))],2)],1),e._v(" "),e._l(e.detail.scrappedGoods,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("物品分类:")]),e._v(" "),r("span",[e._v(e._s(t.categoryName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("物品名称:")]),e._v(" "),r("span",[e._v(e._s(t.goodsName))])])],1),e._v(" "),r("el-table",{staticStyle:{"margin-top":"20px"},attrs:{data:t.models,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsName",label:"规格型号",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"单位",prop:"unit",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"报废数量",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"scrappedName",label:"报废原因",align:"center"}})],1)],1)})),e._v(" "),r("div",{staticStyle:{display:"none"},attrs:{id:"uploadPreviewImages"}},e._l(e.fileList,(function(t,n){return r("span",{key:n},[e.checkImg(t.name)?r("img",{staticClass:"v-img",staticStyle:{width:"100px",height:"100px"},attrs:{src:e.getUrl(t.path),alt:t.name}}):e._e()])})),0)],2)},a=[],o=r("3430"),i=r("f76d"),s=r("6f7e"),l=r("dee4"),c=r("c82c"),u=r.n(c),d=(r("0808"),r("aa3a")),f=null,p={components:{winMd:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,scrapReasonOptions:[],fileList:[],detail:{baseCategoryName:"",businessFormCode:"",goodsTemplateName:"",uploadFiles:"",agencyId:"",agencyName:"",states:"",createName:"",time:"",scrappedGoods:[]}}},filters:{formatTime:function(e){if(e)return s["LongToDateTime"](e)}},created:function(){var e=this;Object(o["b"])({id:this.setting.id}).then((function(t){e.detail=t,e.loading=!1,e.fileList=e.detail.uploadFiles?JSON.parse(e.detail.uploadFiles):[],e.$nextTick((function(){e.initPreviewImg()}))})),Object(d["d"])("SCRAP_REASON").then((function(t){e.scrapReasonOptions=t}))},methods:{getDictName:function(e){var t=this.scrapReasonOptions.find((function(t){return t.dict_value==e}));return t?t.dict_label:""},initPreviewImg:function(){null!=f&&f.destroy();var e=document.querySelector("#uploadPreviewImages");f=new u.a(e,{})},handlePreview:function(e){if(!this.checkImg(e.name))return!1;for(var t=0,r=0;r0&&void 0!==arguments[0]?arguments[0]:{};return Object(n["a"])({url:"/pc/p/dash/board/totalData",method:"get",params:e})},queryPlanMoney:function(){return Object(n["a"])({url:"/pc/p/dash/board/planMoney",method:"get"})},queryProjectYear:function(){return Object(n["a"])({url:"/pc/p/dash/board/yearProjectNum",method:"get"})},queryProjectNumByType:function(){return Object(n["a"])({url:"/pc/p/dash/board/projectNumByType",method:"get"})},queryProjectNumByBatch:function(){return Object(n["a"])({url:"/pc/p/dash/board/projectNumByBatch",method:"get"})},queryProjectList:function(){return Object(n["a"])({url:"/pc/p/dash/board/projectNodeTime",method:"get"})},queryProjectMap:function(){return Object(n["a"])({url:"/pc/p/dash/board/totalDataByOrg",method:"get"})}}},5234:function(e,t,r){"use strict";r("e2f2")},"542c":function(e,t,r){},"54b9":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-edit",attrs:{title:e.setting.title+"报废",width:"800px"},on:{close:e.close}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"ruleForm",staticClass:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[r("div",{staticClass:"main-w"},[r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"机构",prop:"agencyName"}},[r("el-input",{attrs:{value:e.formData.agencyName,disabled:""}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报废仓库",prop:"warehouseId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.formData.warehouseId,callback:function(t){e.$set(e.formData,"warehouseId",t)},expression:"formData.warehouseId"}},e._l(e.warehouses,(function(e){return r("el-option",{key:e.id,attrs:{label:e.warehouseName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报废人",prop:"operatorName"}},[r("el-input",{attrs:{value:e.formData.operatorName,disabled:""}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报废时间",prop:"dealTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{clearable:"",type:"datetime",value:"yyyy-MM-dd HH:mm:ss","value-format":"yyyyMMddHHmmss",placeholder:"请选择日期"},model:{value:e.formData.dealTime,callback:function(t){e.$set(e.formData,"dealTime",t)},expression:"formData.dealTime"}})],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"报废审批手续",prop:"uploadFiles"}},[r("upload",{ref:"uploadRef",attrs:{values:e.fileList,settings:e.uploadSettings},on:{"on-change":e.uploadChange}})],1)],1)],1),e._v(" "),e._l(e.formData.scrappedGoodsInfo,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品分类",prop:"scrappedGoodsInfo."+n+".baseCategoryId",rules:{required:!0,message:"请选择物品分类",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.categoryOptions,props:{value:"id",emitPath:!1},"show-all-levels":!1,filterable:"",clearable:""},on:{change:function(t){return e.categoryChange(t,n)}},model:{value:t.baseCategoryId,callback:function(r){e.$set(t,"baseCategoryId",r)},expression:"goodsItem.baseCategoryId"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品名称",prop:"scrappedGoodsInfo."+n+".baseGoodsTemplateId",rules:e.rules.baseGoodsTemplateId}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!t.baseCategoryId},on:{change:function(t){return e.goodsTemplateChange(t,n)}},model:{value:t.baseGoodsTemplateId,callback:function(r){e.$set(t,"baseGoodsTemplateId",r)},expression:"goodsItem.baseGoodsTemplateId"}},e._l(t.goodsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.goodsName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"规格型号",prop:"scrappedGoodsInfo["+n+"].modelsIds",rules:{required:!0,message:"请选择规格型号",trigger:"change"}}},[r("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",clearable:"",placeholder:t.baseGoodsTemplateId?"请选择规格型号":"请先选择物品名称",disabled:!t.baseGoodsTemplateId},on:{change:function(t){return e.modelChange(t,n)},"remove-tag":function(t){return e.modelRemoveTag(t,n)},clear:function(t){return e.modelRemoveTag(-1,n)}},model:{value:t.modelsIds,callback:function(r){e.$set(t,"modelsIds",r)},expression:"goodsItem.modelsIds"}},e._l(t.modelsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.modelName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-table",{attrs:{data:t.scrappedGoodsList,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsId",label:"型号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.getGoodsModelsName(t.row.baseGoodsModelsId))+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"total",label:"剩余数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.total)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"报废数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-input",{model:{value:t.row.counts,callback:function(r){e.$set(t.row,"counts",e._n(r))},expression:"scope.row.counts"}})]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"scrappedCode",label:"报废原因",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-select",{attrs:{placeholder:"请选择"},model:{value:t.row.scrappedCode,callback:function(r){e.$set(t.row,"scrappedCode",r)},expression:"scope.row.scrappedCode"}},e._l(e.scrapReasonOptions,(function(e){return r("el-option",{key:e.dict_code,attrs:{label:e.dict_label,value:e.dict_code}})})),1)]}}],null,!0)})],1),e._v(" "),r("div",{staticClass:"btn-group"},[e.formData.scrappedGoodsInfo.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除")]):e._e(),e._v(" "),e.formData.scrappedGoodsInfo.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品")]):e._e()],1)],1)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1)],1)},a=[],o=r("3430"),i=r("6ec5"),s=r("c56b"),l=r("f6e8"),c=r("f76d"),u=r("decf"),d=r("dee4"),f=r("2f62"),p=r("aa3a"),m=r("6f7e");function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function g(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e){return _(e)||w(e)||y(e)||b()}function b(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function y(e,t){if(e){if("string"==typeof e)return x(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}function w(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _(e){if(Array.isArray(e))return x(e)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function O(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function k(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){O(o,n,a,i,s,"next",e)}function s(e){O(o,n,a,i,s,"throw",e)}i(void 0)}))}}function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function d(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){u(o,n,a,i,s,"next",e)}function s(e){u(o,n,a,i,s,"throw",e)}i(void 0)}))}}var f={name:"person",components:{winMd:i["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(e){return e.id}))}},created:function(){this.setting.info&&(this.formData=Object.assign({},JSON.parse(this.setting.info))),this.init()},methods:{init:function(){var e=d(c().mark((function e(){var t,r;return c().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["c"])({warehouseId:this.formData.id});case 2:return t=e.sent,this.selectdSections=t.map((function(e){return e.name=e.managerName,e.id=e.managerId,e.checked=!0,e})),e.next=6,Object(o["a"])({agencyId:this.formData.agencyId});case 6:r=e.sent,this.treeData=this.deepList([r]),this.key=Math.random(),this.loading=!1;case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),deepList:function(e){var t=this;return e.map((function(e){return e.children&&e.children.length?t.deepList(e.children):e.checked=t.selectdSections.some((function(t){return e.id===t.id})),e}))},handleCheckItem:function(e){var t=this;if(e.checked){var r=this.selectdSections.findIndex((function(t){return t.id===e.id}));-1!==r&&this.selectdSections.splice(r,1)}else this.selectdSections.push(e);this.treeData[0].children.forEach((function(r,n){r.children&&r.children.forEach((function(r,a){r.id==e.id&&t.$set(t.treeData[0].children[n].children[a],"checked",!r.checked)}))}))},handleDel:function(e){this.handleCheckItem(e)},handleClear:function(){var e=this;this.selectdSections.forEach((function(t){e.handleCheckItem(t)})),this.selectdSections=[]},close:function(){this.$emit("close")},save:function(){var e=this;if(0!==this.selectdSections.length){var t={warehouseId:this.setting.id,warehouseManagerInfoList:[]};this.selectdSections.forEach((function(e){t.warehouseManagerInfoList.push({managerId:e.id,managerName:e.name})})),Object(o["b"])(t).then((function(t){e.$message.success("保存成功!"),e.close(),e.$emit("search")}))}else this.$message.error("请选择库管员!")}}},p=f,m=(r("279c"),r("2877")),h=Object(m["a"])(p,n,a,!1,null,"4febb127",null);t["default"]=h.exports},"5a43":function(e,t){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0,expression:"total>0"}],attrs:{total:e.total,page:e.pageNum,limit:e.pageSize},on:{"update:page":function(t){e.pageNum=t},"update:limit":function(t){e.pageSize=t}}}),e._v(" "),r("el-form",{attrs:{"label-width":"100px"}},[r("el-form-item",{staticStyle:{"text-align":"center","margin-left":"-120px","margin-top":"30px"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm()}}},[e._v("提交")]),e._v(" "),r("el-button",{on:{click:function(t){return e.close()}}},[e._v("返回")])],1)],1)],1)},a=[],o=r("c0c7"),i={name:"AuthRole",data:function(){return{loading:!0,total:0,pageNum:1,pageSize:10,roleIds:[],roles:[],form:{}}},created:function(){var e=this,t=this.$route.params&&this.$route.params.userId;t&&(this.loading=!0,Object(o["d"])(t).then((function(t){e.form=t.data.user,e.roles=t.data.roles,e.total=e.roles.length,e.$nextTick((function(){e.roles.forEach((function(t){t.flag&&e.$refs.table.toggleRowSelection(t)}))})),e.loading=!1})))},methods:{clickRow:function(e){this.$refs.table.toggleRowSelection(e)},handleSelectionChange:function(e){this.roleIds=e.map((function(e){return e.role_id}))},getRowKey:function(e){return e.role_id},submitForm:function(){var e=this,t=this.form.id,r=this.roleIds.join(",");Object(o["i"])({userId:t,roleIds:r}).then((function(t){e.$modal.msgSuccess("授权成功"),e.close()}))},close:function(){var e={path:"/system/user"};this.$tab.closeOpenPage(e)}}},s=i,l=r("2877"),c=Object(l["a"])(s,n,a,!1,null,null,null);t["default"]=c.exports},"5e19":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container stock-container"},[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("div",{staticClass:"table-tool-bar",staticStyle:{"margin-bottom":"15px"}},[r("my-button",{attrs:{name:"新增",site:"tools",size:"medium"},on:{click:e.handleAdd}}),e._v(" "),r("my-button",{attrs:{name:"导入",site:"tools",size:"medium"},on:{click:function(t){return e.openImport()}}})],1),e._v(" "),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],style:{"overflow-y":"auto",height:"calc(100vh - 320px)"}},[e.list.length?r("el-row",{staticClass:"card",attrs:{gutter:5}},e._l(e.list,(function(t,n){return r("el-col",{key:n,staticClass:"cm-item"},[r("el-card",{staticClass:"card-data"},[r("div",{staticClass:"card-container"},[r("div",{staticClass:"card-header"},[r("div",{staticClass:"card-header-left"},[r("span",[e._v("分发单号:")]),e._v(" "),r("span",{staticClass:"value"},[e._v(e._s(t.businessFormCode))])]),e._v(" "),r("div",{staticClass:"card-header-right"},[r("el-button",{attrs:{name:"查看详情",site:"form",type:"primary",size:"mini"},on:{click:function(r){return e.handleDetail(t)}}},[e._v("\n 查看详情\n ")])],1)]),e._v(" "),r("div",{staticClass:"one-hed"},[r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("部门:")]),e._v(e._s(t.inWarehouseName))]),e._v(" "),r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("分发人:")]),e._v(e._s(t.outOperatorName))]),e._v(" "),r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("分发时间:")]),e._v(e._s(e._f("formatTime")(t.createTime))+"\n ")])]),e._v(" "),r("div",{staticClass:"card-end"},e._l(t.fromTransferTemplateInfoList,(function(t,n){return r("div",{key:n,staticClass:"item"},[r("div",{staticClass:"name"},[e._v(e._s(t.goodsName))]),e._v(" "),r("div",{staticClass:"value-box"},[r("div",{staticClass:"value-box-item"},[r("span",{staticClass:"label"},[e._v("数量:")]),e._v(" "),r("span",{staticClass:"value"},[e._v(e._s(t.count))]),e._v(" "),r("span",{staticClass:"unit"},[e._v(e._s(t.unit))])])])])})),0)])])],1)})),1):r("el-empty",{attrs:{description:"暂无数据"}})],1),e._v(" "),r("el-pagination",{attrs:{small:!1,"current-page":e.pageNum,"page-sizes":[5,10,20,50,100,200,300,400,500],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1)],1),e._v(" "),e.uploadPageSetting.show?r("uploadPage",{ref:"uploadRef",attrs:{setting:e.uploadPageSetting},on:{close:function(t){e.uploadPageSetting.show=!1},search:e.refreshData}}):e._e(),e._v(" "),e.editSetting.show?r("edit",{ref:"editRef",attrs:{setting:e.editSetting},on:{close:function(t){e.editSetting.show=!1},search:e.refreshData}}):e._e(),e._v(" "),e.detailSetting.show?r("detail",{ref:"detailRef",attrs:{setting:e.detailSetting},on:{close:function(t){e.detailSetting.show=!1}}}):e._e(),e._v(" "),r("my-import",{attrs:{"import-setting":e.importSetting,"dialog-show":e.importSetting.dialogShow,"dialog-title":e.importSetting.dialogTitle}})],1)},a=[],o=r("a083"),i=r("f6e8"),s=r("433d"),l=r("9960"),c=r("9939"),u=r("9205"),d=r("b277"),f=r("271c"),p=r("5f87"),m=r("dee4");function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function g(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除\n ")]):e._e(),e._v(" "),e.formData.goods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品\n ")]):e._e()],1)],2)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1),e._v(" "),e.fenfaSetting.show?r("win-md",{attrs:{title:"选择分发单",width:"800px"},on:{close:function(t){e.fenfaSetting.show=!1}}},[r("el-table",{attrs:{data:e.fenfaData,"highlight-current-row":"",height:"407"},on:{"current-change":e.handleCurrentChange}},[r("el-table-column",{attrs:{label:"分发单号",prop:"businessFormCode",align:"left"}}),e._v(" "),r("el-table-column",{attrs:{label:"物品名称",prop:"baseGoodsTemplateName",align:"left"}}),e._v(" "),r("el-table-column",{attrs:{label:"分发数量",prop:"totalCount",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"剩余数量",prop:"useCount",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"分发时间",prop:"inTime",width:"160",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v("\n "+e._s(e.DateFormatter.LongToDateTime(r.inTime))+"\n ")]}}],null,!1,1576381030)})],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:function(t){e.fenfaSetting.show=!1,e.fenfaSetting.baseGoodsTemplateId=null,e.curFenfa=null,e.fenfaData=[]}}}),e._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleConfirm}},[e._v("确定")])],1)],1):e._e()],1)},a=[],o=r("8eb74"),i=r("6ec5"),s=r("c56b"),l=r("f6e8"),c=r("f76d"),u=r("e694"),d=r("decf"),f=r("dee4"),p=r("2f62"),m=r("6f7e"),h=r("6f82"),g=r("4bbc");function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new L(n||[]);return a(i,"_invoke",{value:j(e,r,s)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",m="executing",h="completed",g={};function y(){}function w(){}function _(){}var x={};c(x,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(P([])));O&&O!==r&&n.call(O,i)&&(x=O);var k=_.prototype=y.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function r(a,o,i,s){var l=d(e[a],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function j(t,r,n){var a=f;return function(o,i){if(a===m)throw Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=m;var c=d(t,r,n);if("normal"===c.type){if(a=n.done?h:p,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=h,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function y(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){y(o,n,a,i,s,"next",e)}function s(e){y(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;te.userUseCount?r(new Error("退回数量不能大于在用数量")):void r():r(new Error("请输入数字值")):r(new Error("请输入退回数量"))},DateFormatter:m,loading:!0,departmentOptions:[],categoryOptions:[],modelList:[],fenfaSetting:{show:!1,goodsIdx:null,baseGoodsTemplateId:null,id:""},curFenfa:null,fenfaData:[],formData:{departmentId:"",dealTime:m["formatDate"](new Date,"yyyyMMddhhmmss"),procureDoc:"",goods:[]},goodsItem:{businessFormCode:"",transBusinessId:"",baseCategoryId:"",baseGoodsTemplateId:"",goodsTemplateName:"",goodsOptions:[],models:[]},modelsItem:{baseGoodsModelsId:"",worehouseCount:0,counts:null,unit:null},rules:{departmentId:[{required:!0,message:"请选择部门",trigger:"change"}],dealTime:[{required:!0,message:"请选择",trigger:"change"}],procureDoc:[{required:!0,message:"请上传",trigger:"change"}],baseCategoryId:[{required:!0,message:"请选择",trigger:"change"}],baseGoodsTemplateId:[{required:!0,message:"请选择物品",trigger:"change"}],businessFormCode:[{required:!0,message:"请选择分发单",trigger:"change"}],counts:[{required:!0,message:"请输入",trigger:"change"}],reason:[{required:!0,message:"请选择",trigger:"change"}]},uploadSettings:{title:"上传",max:20,num:10,tip:"",uploadUrl:Object(f["d"])(),multiple:!0,disabled:!1}}},computed:x({},Object(p["b"])(["userInfo"])),created:function(){this.init()},methods:{init:function(){var e=w(b().mark((function e(){var t;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getdeptmentList();case 2:return e.next=4,Object(s["b"])();case 4:t=e.sent,this.categoryOptions=this.removeEmptyChildren(t),this.getgoodsTemplate(),this.formData.departmentId=this.userInfo.sysDeptId,this.formData.operatorName=this.userInfo.userName,this.loading=!1;case 10:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getdeptmentList:function(){var e=w(b().mark((function e(){var t=this;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["d"])({tenantId:this.userInfo.tenantId}).then((function(e){t.departmentOptions=e,t.formData.goods.push(JSON.parse(JSON.stringify(t.goodsItem)))})).catch((function(e){console.log("err",e)}));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),removeEmptyChildren:function(e){var t=this;return e.forEach((function(e){e.children&&e.children.length?t.removeEmptyChildren(e.children):delete e.children})),e},getgoodsTemplate:function(e,t){var r=this;Object(i["n"])({categoryId:e||""}).then((function(e){t||0==t?r.$set(r.formData.goods[t],"goodsOptions",e):r.goodsTemplatelAll=e}))},getGoodsTemplateName:function(e){var t=this.goodsTemplatelAll.find((function(t){return t.id==e}));if(t)return t.goodsName},getGoodsModelsName:function(e){var t=this.goodsModelAll.find((function(t){return t.id==e}));if(t)return t.modelName},categoryChange:function(e,t){this.formData.goods[t].goodsOptions=[],this.formData.goods[t].baseGoodsTemplateId="",this.formData.goods[t].goodsTemplateName="",this.formData.goods[t].models=[],this.getgoodsTemplate(e,t)},goodsTemplateChange:function(e,t){this.formData.goods[t].models=[],this.formData.goods[t].businessFormCode="",this.formData.goods[t].goodsTemplateName=this.getGoodsTemplateName(e)},showFenFa:function(e){var t=this;this.loading=!0,Object(h["a"])({departmentId:this.formData.departmentId,baseGoodsTemplateId:this.formData.goods[e].baseGoodsTemplateId}).then((function(r){t.loading=!1,r&&0!==r.length?(t.fenfaSetting.show=!0,t.fenfaSetting.baseGoodsTemplateId=t.formData.goods[e].baseGoodsTemplateId,t.fenfaSetting.goodsIdx=e,t.fenfaData=r):t.$message.error("未查询到需要退回的分发单")})).catch((function(e){t.loading=!1}))},uploadChange:function(){var e=this.$refs.uploadRef.fileList;this.formData.procureDoc=JSON.stringify(e)},addGoods:function(){this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem)))},removeGoods:function(e){this.formData.goods.splice(e,1)},handleCurrentChange:function(e){this.curFenfa=e},handleConfirm:function(){var e=this;if(this.curFenfa){var t=this.formData.goods.findIndex((function(t){return t.businessFormCode==e.curFenfa.businessFormCode})),r=this.formData.goods.findIndex((function(t){return t.baseGoodsTemplateId==e.fenfaSetting.baseGoodsTemplateId}));-1===r||r===this.fenfaSetting.goodsIdx||-1===t||t===this.fenfaSetting.goodsIdx?Object(h["b"])({transBusinessId:this.curFenfa.transBusinessId,baseGoodsTemplateId:this.fenfaSetting.baseGoodsTemplateId}).then((function(t){if(t){var r=[];for(var n in t){var a=t[n];a.map((function(e){e.counts=null})),r.push(a)}e.formData.goods[e.fenfaSetting.goodsIdx].models=r,e.formData.goods[e.fenfaSetting.goodsIdx].businessFormCode=e.curFenfa.businessFormCode,e.formData.goods[e.fenfaSetting.goodsIdx].transBusinessId=e.curFenfa.transBusinessId}e.fenfaSetting.show=!1})):this.$message.error("同一个物品不能选择相同的分发单")}else this.$message.error("请选择分发单")},handleSubmit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(t){var r=JSON.parse(JSON.stringify(e.formData));if(r.goods.map((function(e){delete e.goodsOptions;var t=[];e.models.map((function(e){e.map((function(e){e.counts&&e.counts>0&&t.push(e)}))})),e.models=t})),r.goods=r.goods.filter((function(e){return e.models.length>0})),0===r.goods.length)return void e.$message.error("请至少填写一个退回物品");if(e.loading)return;e.loading=!0,Object(g["a"])(r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,e.$message.error("保存失败")}))}else e.$message.error("校验未通过,请检查。")}))},close:function(){this.formData={warehouseId:"",dealTime:"",goods:[]},this.$emit("close")}}},I=C,j=(r("ee78"),r("2877")),T=Object(j["a"])(I,n,a,!1,null,"30eed26a",null);t["default"]=T.exports},"6b6f":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-edit",attrs:{title:e.setting.title+"采购入库",width:"800px",loading:e.loading},on:{close:e.close}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"ruleForm",staticClass:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[r("div",{staticClass:"main-w"},[r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"入库仓库",prop:"warehouseId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",clearable:""},model:{value:e.formData.warehouseId,callback:function(t){e.$set(e.formData,"warehouseId",t)},expression:"formData.warehouseId"}},e._l(e.warehouses,(function(e){return r("el-option",{key:e.id,attrs:{label:e.warehouseName,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"采购时间",prop:"procureTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",clearable:"",value:"yyyy-MM-dd HH:mm:ss","value-format":"yyyyMMddHHmmss",placeholder:"请选择日期"},model:{value:e.formData.procureTime,callback:function(t){e.$set(e.formData,"procureTime",t)},expression:"formData.procureTime"}})],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"采购类型",prop:"buyType"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.formData.buyType,callback:function(t){e.$set(e.formData,"buyType",t)},expression:"formData.buyType"}},e._l(e.buyTypeOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"采购入库手续",prop:"procureDoc"}},[r("upload",{ref:"uploadRef",attrs:{values:e.fileList,settings:e.uploadSettings},on:{"on-change":e.uploadChange}})],1)],1)],1),e._v(" "),e._l(e.formData.procureGoods,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品分类",prop:"procureGoods."+n+".baseCategoryId",rules:{required:!0,message:"请选择物品分类",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.categoryOptions,props:{value:"id",emitPath:!1},"show-all-levels":!1,filterable:"",clearable:""},on:{change:function(t){return e.categoryChange(t,n)}},model:{value:t.baseCategoryId,callback:function(r){e.$set(t,"baseCategoryId",r)},expression:"goodsItem.baseCategoryId"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品名称",prop:"procureGoods."+n+".baseGoodsTemplateId",rules:e.rules.baseGoodsTemplateId}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!t.baseCategoryId},on:{change:function(t){return e.goodsTemplateChange(t,n)}},model:{value:t.baseGoodsTemplateId,callback:function(r){e.$set(t,"baseGoodsTemplateId",r)},expression:"goodsItem.baseGoodsTemplateId"}},e._l(t.goodsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.goodsName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"规格型号",prop:"procureGoods."+n+".modelsIds",rules:{required:!0,message:"请选择规格型号",trigger:"change"}}},[r("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",clearable:"",placeholder:t.baseGoodsTemplateId?"请选择规格型号":"请先选择物品名称",disabled:!t.baseGoodsTemplateId},on:{change:function(t){return e.modelChange(t,n)},"remove-tag":function(t){return e.modelRemoveTag(t,n)},clear:function(t){return e.modelRemoveTag(-1,n)}},model:{value:t.modelsIds,callback:function(r){e.$set(t,"modelsIds",r)},expression:"goodsItem.modelsIds"}},e._l(t.modelsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.modelName,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"供货商",prop:"supplier"}},[r("el-input",{attrs:{clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.supplier,callback:function(r){e.$set(t,"supplier",r)},expression:"goodsItem.supplier"}})],1)],1)],1),e._v(" "),r("el-table",{attrs:{data:t.models,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsId",label:"规格型号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.getGoodsModelsName(t.row.baseGoodsModelsId))+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{label:"单位",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.unit)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"priceYuan",label:"单价(元)",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{"label-width":"0",prop:"procureGoods["+n+"].models["+t.$index+"].priceYuan",rules:e.rules.priceYuan}},[r("el-input",{attrs:{type:"number"},on:{change:function(r){return e.priceChange(r,n,t.$index)}},model:{value:t.row.priceYuan,callback:function(r){e.$set(t.row,"priceYuan",e._n(r))},expression:"scope.row.priceYuan"}})],1)]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"采购数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{"label-width":"0",prop:"procureGoods["+n+"].models["+t.$index+"].counts",rules:e.rules.counts}},[r("el-input",{model:{value:t.row.counts,callback:function(r){e.$set(t.row,"counts",e._n(r))},expression:"scope.row.counts"}})],1)]}}],null,!0)})],1),e._v(" "),r("div",{staticClass:"btn-group"},[e.formData.procureGoods.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除\n ")]):e._e(),e._v(" "),e.formData.procureGoods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品\n ")]):e._e()],1)],1)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1)],1)},a=[],o=r("5688"),i=r("c56b"),s=r("f6e8"),l=r("f76d"),c=r("decf"),u=r("dee4"),d=r("ed08"),f=r("2f62"),p=r("6f7e");function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e){return y(e)||b(e)||v(e)||g()}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){if(e){if("string"==typeof e)return w(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){x(o,n,a,i,s,"next",e)}function s(e){x(o,n,a,i,s,"throw",e)}i(void 0)}))}}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t=1&&p<=3)m=" "+parseInt(p)+"月前";else if(f>=1&&f<=3)m=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)m=" "+parseInt(d)+"天前";else if(u>=1&&u<=23)m=" "+parseInt(u)+"小时前";else if(c>=1&&c<=59)m=" "+parseInt(c)+"分钟前";else if(l>=0&&l<=r)m="刚刚";else{var h=new Date;h.setTime(t);var g=h.getFullYear(),v=h.getMonth()+1<10?"0"+(h.getMonth()+1):h.getMonth()+1,b=h.getDate()<10?"0"+h.getDate():h.getDate();h.getHours()<10?h.getHours():h.getHours(),h.getMinutes()<10?h.getMinutes():h.getMinutes(),h.getSeconds()<10?h.getSeconds():h.getSeconds();m=g+"-"+v+"-"+b}return m}}}r.r(t),r.d(t,"DateToLong",(function(){return n})),r.d(t,"LongToDateTime",(function(){return o})),r.d(t,"LongToDate",(function(){return i})),r.d(t,"formatDate",(function(){return s})),r.d(t,"formattedDate",(function(){return l})),r.d(t,"formattedDateDuan",(function(){return c})),r.d(t,"timeago",(function(){return u}))},"6f82":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i})),r.d(t,"e",(function(){return s})),r.d(t,"d",(function(){return l}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/warehouse/procureModel/getFfOrderByGoodsIdAndDept",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/pc/warehouse/procureModel/getGoodsUseInfoByFfOrderAndGoodId",method:"get",params:e})}function i(e){return Object(n["a"])({url:"/pc/l/wh/form/scrapped/deptAdd",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/pc/l/wh/form/scrapped/deptList",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/pc/l/wh/form/scrapped/deptDetail",method:"get",params:e})}},"701e":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{ref:"dataMap",staticStyle:{width:"100%",height:"100%"}})},a=[],o=r("97d8"),i=r("313e"),s=r.n(i),l=r("51ef");function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new L(n||[]);return a(i,"_invoke",{value:j(e,r,s)}),i}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",h="suspendedYield",g="executing",v="completed",b={};function y(){}function w(){}function _(){}var x={};d(x,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(P([])));O&&O!==r&&n.call(O,i)&&(x=O);var k=_.prototype=y.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){d(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function r(a,o,i,s){var l=p(e[a],e,o);if("throw"!==l.type){var u=l.arg,d=u.value;return d&&"object"==c(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function j(t,r,n){var a=m;return function(o,i){if(a===g)throw Error("Generator is already running");if(a===v){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===b)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=g;var c=p(t,r,n);if("normal"===c.type){if(a=n.done?v:h,c.arg===b)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=v,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var o=p(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,b;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){d(o,n,a,i,s,"next",e)}function s(e){d(o,n,a,i,s,"throw",e)}i(void 0)}))}}s.a.registerMap("河南",o);var p={name:"data-map",mounted:function(){var e=f(u().mark((function e(){var t,r,n;return u().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=s.a.init(this.$refs.dataMap),e.next=3,l["a"].queryProjectMap();case 3:r=e.sent,console.log("resData",r),n={backgroundColor:"rgba(21, 21, 21, 0.2)",tooltip:{trigger:"item",confine:!0,backgroundColor:"rgba(21, 21, 21, 0.82)",borderColor:"#FFFFCC",showDelay:0,hideDelay:0,enterable:!0,transitionDuration:0,extraCssText:"z-index:100;",formatter:function(e,t,r){var n="";return n='\n
\n
'.concat(e.name,'
\n
\n

进行中

\n

').concat(e.value,'个

\n
\n
\n

未开工

\n

').concat(e.data.ywtd,'个

\n
\n
\n

已完工

\n

416个

\n
\n
\n

已关闭

\n

416个

\n
\n
\n

已超期

\n

416个

\n
\n
\n

计划总投资

\n

416万

\n
\n
\n

已下达投资

\n

416万

\n
\n
'),n}},geo:{map:"河南",zoom:1.2,left:"center",top:"middle",label:{normal:{show:!0,color:"#fff",fontSize:16},emphasis:{show:!0,color:"#fff"}},roam:!0,scaleLimit:{min:1,max:40},itemStyle:{normal:{shadowColor:"rgba(0, 0, 0, 0.5)",shadowBlur:10,shadowOffsetX:-5,shadowOffsetY:-5,areaColor:{type:"linear",x:1,y:0,x2:.5,y2:1,colorStops:[{offset:0,color:"#5E9BBE"},{offset:1,color:"#2972D6"}],global:!1},borderColor:"#8ACFEE",borderWidth:1},emphasis:{areaColor:{type:"linear",x:1,y:0,x2:.5,y2:1,colorStops:[{offset:0,color:"#F9D746"},{offset:1,color:"#D88B10"}],global:!1}}}},series:[{type:"map",map:"河南",label:{show:!0},geoIndex:0,data:[{name:"郑州市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"焦作市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"新乡市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"商丘市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"信阳市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"周口市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"开封市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"驻马店市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"南阳市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"许昌市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"漯河市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"平顶山市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"安阳市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"鹤壁市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"濮阳市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"济源市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"洛阳市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233},{name:"三门峡市",value:123344,ywtd:998,gdzs:9802,jxz:863,zsk:233}]}]},n&&t.setOption(n);case 7:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},m=p,h=r("2877"),g=Object(h["a"])(m,n,a,!1,null,"737aec19",null);t["default"]=g.exports},7025:function(e,t,r){},7037:function(e,t){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports["default"]=e.exports},7286:function(e,t,r){"use strict";r("0048")},7297:function(e,t,r){},"72f0":function(e,t){function r(e){return function(){return e}}e.exports=r},"73f6":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{width:"100%"}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",{staticClass:"font-18 font-bold"},[e._v("类别数量统计")])]),e._v(" "),r("div",{staticStyle:{height:"300px"},attrs:{id:"LBSLTJ"}})])],1)},a=[],o=r("313e"),i={name:"LBSLTJ",props:{num:{type:Object,default:{aTotalNum:0,aTotalPrice:0,bTotalNum:0,bTotalPrice:0,cTotalNum:0,cTotalPrice:0,tenantId:0,totalNum:0,totalPrice:0,xiaFaNum:0,zhanYouPercent:0}}},watch:{num:function(){this.options.series[0].data=[{value:parseFloat(this.num.aTotalNum),name:"A类"},{value:parseFloat(this.num.bTotalNum),name:"B类"},{value:parseFloat(this.num.cTotalNum),name:"C类"}],this.myChart.setOption(this.options)}},data:function(){return{myChart:null,options:{}}},mounted:function(){this.getCenterLine()},methods:{getCenterLine:function(){var e=this,t=document.getElementById("LBSLTJ");this.myChart=o["init"](t),window.addEventListener("resize",(function(){e.changeWidth()})),this.options={color:["#1877FF","#5EDEA5","#F7BE12","#55C6E1","#ED653B"],tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{orient:"vertical",right:0,top:60,bottom:20},series:[{name:"类别数量统计",type:"pie",minAngle:2,avoidLabelOverlap:!0,itemStyle:{normal:{label:{show:!0,formatter:function(e){return e.name+"\n "+e.percent.toFixed(1)+"%"}},labelLine:{show:!0,length:.01}}},data:[{value:parseFloat(this.num.aTotalNum),name:"A类"},{value:parseFloat(this.num.bTotalNum),name:"B类"},{value:parseFloat(this.num.cTotalNum),name:"C类"}]}]},this.options&&this.myChart.setOption(this.options)},changeWidth:function(){this.myChart.resize()}}},s=i,l=(r("221f"),r("2877")),c=Object(l["a"])(s,n,a,!1,null,"4c400f86",null);t["default"]=c.exports},"798c":function(e,t,r){},"7b1d":function(e,t,r){"use strict";r("ee6c")},"7bdd":function(e,t,r){},"7e09":function(e,t,r){},"7ef5":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%",height:"192px",position:"relative"}},[r("div",{ref:"batchPlan",staticStyle:{width:"100%",height:"100%"}}),e._v(" "),e._m(0),e._v(" "),r("div",{staticClass:"tag-box"},e._l(e.dataList,(function(t,n){return r("div",{key:n,staticClass:"item-box"},[r("div",{staticClass:"example",style:{background:t.color}}),e._v(" "),r("div",{staticClass:"name"},[e._v(e._s(t.name))]),e._v(" "),r("div",{staticClass:"value"},[e._v(e._s(t.value)+"%")])])})),0)])},a=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"title-box"},[r("p",{staticClass:"num"},[e._v("100%")]),e._v(" "),r("p",[e._v("批次计划")])])}],o=r("51ef"),i=r("313e"),s=r.n(i);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){b(o,n,a,i,s,"next",e)}function s(e){b(o,n,a,i,s,"throw",e)}i(void 0)}))}}var w={name:"Role",components:{MyTableV2:l["a"]},data:function(){var e=this;return{radio:3,scopeOption:[{value:1,label:"省"},{value:2,label:"市"},{value:3,label:"县"}],constants:this.$constants,rootOrgList:[],selectedRootOrgId:void 0,loading:!0,ids:[],single:!0,multiple:!0,showSearch:!0,total:0,roleList:[],title:"",open:!1,openDataScope:!1,menuExpand:!1,menuNodeAll:!1,deptExpand:!0,deptNodeAll:!1,dateRange:[],dataScopeOptions:[{value:"1",label:"全部数据权限"},{value:"2",label:"自定数据权限"},{value:"3",label:"本部门数据权限"},{value:"4",label:"本部门及以下数据权限"},{value:"5",label:"仅本人数据权限"}],menuOptions:[],deptOptions:[],items:u["default"],queryParams:{roleName:"",roleKey:"",status:0},tableShow:!1,table:{autoLoad:!1,showIndex:!0,expand:!1,url:c["a"].apiBaseURL+"/pc/fin/sys/tenant/user/query/role",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){e.handleAdd(null)}}]},columns:[{title:"角色编号",field:"role_id",align:"center",width:135},{title:"角色名称",field:"role_name",align:"left",minWidth:200},{title:"显示顺序",field:"role_sort",align:"center",width:100},{title:"状态",field:"status",align:"center",width:100,switch:function(t){var r={};return 0==t.status?Object.assign(r,{value:!0,label:"启用",click:function(){e.handleStatusChange(t)}}):Object.assign(r,{value:!1,label:"禁用",click:function(){e.handleStatusChange(t)}}),r}},{title:"备注",field:"remark",align:"left",minWidth:200}],operation:{width:150,align:"center",show:!0,attr:[{title:"修改",events:function(t){e.handleUpdate(t)}},{title:"删除",events:function(t){e.handleDelete(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}},form:{role_name:"",role_key:"",role_sort:"",data_scope:1,status:1},defaultProps:{children:"children",label:"menu_name"},rules:{role_name:[{required:!0,message:"角色名称不能为空",trigger:"blur"}],role_key:[{required:!1,message:"权限字符不能为空",trigger:"blur"}],role_sort:[{required:!0,message:"角色顺序不能为空",trigger:"blur"}]}}},created:function(){this.getRootOrgList()},methods:{fifterForm:function(e){this.queryParams=Object.assign(this.queryParams,e),this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},getRootOrgList:function(){var e=this;Object(s["e"])().then((function(t){e.rootOrgList=t,e.selectedRootOrgId=e.rootOrgList[0].id,e.queryParams.orgId=e.selectedRootOrgId})).then((function(){e.tableShow=!0,e.$nextTick((function(){e.search(1)}))}))},getList:function(){var e=this;this.selectedRootOrgId=this.queryParams.orgId,Object(o["j"])(this.queryParams).then((function(t){e.roleList=t.datas,e.total=t.totalRows}))},getMenuTreeselect:function(){var e=y(v().mark((function e(){var t=this;return v().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(i["f"])().then((function(e){t.menuOptions=e}));case 2:case"end":return e.stop()}}),e)})));function t(){return e.apply(this,arguments)}return t}(),getDeptTreeselect:function(){var e=this;Object(s["h"])().then((function(t){e.deptOptions=t}))},getMenuAllCheckedKeys:function(){var e=this.$refs.menu.getCheckedKeys(),t=this.$refs.menu.getHalfCheckedKeys();return e.unshift.apply(e,t),e},getDeptAllCheckedKeys:function(){var e=this.$refs.dept.getCheckedKeys(),t=this.$refs.dept.getHalfCheckedKeys();return e.unshift.apply(e,t),e},getRoleMenuTreeselect:function(e){var t=this;return Object(i["e"])(e).then((function(e){return t.menuOptions=e.menus,e}))},getRoleDeptTreeselect:function(e){var t=this;return Object(s["g"])(e).then((function(e){return t.deptOptions=e.depts,e}))},handleStatusChange:function(e){var t=this,r=0==e.status?"禁用":"启用";this.$modal.confirm("确认要"+r+'"'+e.role_name+'"角色吗?').then((function(){return e.status=0==e.status?1:0,Object(o["f"])(e)})).then((function(){t.$modal.msgSuccess(r+"成功"),t.search()})).catch((function(){e.status=0==e.status?1:0}))},cancel:function(){this.open=!1,this.reset()},cancelDataScope:function(){this.openDataScope=!1,this.reset()},reset:function(){void 0!=this.$refs.menu&&this.$refs.menu.setCheckedKeys([]),this.menuExpand=!1,this.menuNodeAll=!1,this.deptExpand=!0,this.deptNodeAll=!1,this.form={org_id:void 0,role_id:void 0,role_name:void 0,data_scope:this.$store.getters.userInfo?this.$store.getters.userInfo.lv:1,role_key:"None",role_sort:0,status:0,menuIds:[],deptIds:[],menu_check_strictly:!0,dept_check_strictly:!0,remark:void 0},this.resetForm("form")},changeSize:function(e){this.queryParams.pageSize=e,this.getList()},changePage:function(e){this.queryParams.pageNum=e,this.getList()},handleQuery:function(){this.queryParams.pageNum=1,this.queryParams.orgId=this.selectedRootOrgId,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.roleId})),this.single=1!=e.length,this.multiple=!e.length},handleCommand:function(e,t){switch(e){case"handleDataScope":this.handleDataScope(t);break;case"handleAuthUser":this.handleAuthUser(t);break;default:break}},handleCheckedTreeExpand:function(e,t){if("menu"==t)for(var r=this.menuOptions,n=0;n"+e.msg+"","导入结果",{dangerouslyUseHTMLString:!0}),this.getList()},submitFileForm:function(){this.$refs.upload.submit()},normalizer:function(e){null!=e.children&&"null"!=e.children||delete e.children}}},b=v,y=r("2877"),w=Object(y["a"])(b,n,a,!1,null,null,null);t["default"]=w.exports},"822f":function(e,t,r){"use strict";r.r(t),t["default"]={data:function(){return{statesOptions:[{label:"全部",value:""},{label:"待出库",value:"0"},{label:"待接收",value:"1"},{label:"已接收",value:"2"},{label:"已撤销",value:"4"}]}},methods:{getStatesLabel:function(e){var t=this.statesOptions.find((function(t){return t.value==e}));return t?t.label:""}}}},8311:function(e,t,r){"use strict";r("1a07")},"84d8":function(e,t,r){},8638:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticStyle:{width:"100%"}},[r("el-card",{staticClass:"box-card"},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",{staticClass:"font-18 font-bold"},[e._v("类别金额统计")])]),e._v(" "),r("div",{staticStyle:{height:"300px"},attrs:{id:"LBJETJ"}})])],1)},a=[],o=r("313e"),i={name:"LBJETJ",props:{num:{type:Object,default:{aTotalNum:0,aTotalPrice:0,bTotalNum:0,bTotalPrice:0,cTotalNum:0,cTotalPrice:0,tenantId:0,totalNum:0,totalPrice:0,xiaFaNum:0,zhanYouPercent:0}}},watch:{num:function(){this.options.series[0].data=[{value:parseFloat(this.num.aTotalPrice),name:"A类"},{value:parseFloat(this.num.bTotalPrice),name:"B类"},{value:parseFloat(this.num.cTotalPrice),name:"C类"}],this.myChart.setOption(this.options)}},data:function(){return{myChart:null,options:{}}},mounted:function(){this.getCenterLine()},methods:{getCenterLine:function(){var e=this,t=document.getElementById("LBJETJ");this.myChart=o["init"](t),window.addEventListener("resize",(function(){e.changeWidth()})),this.options={color:["#1877FF","#5EDEA5","#F7BE12","#55C6E1","#ED653B"],tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{orient:"vertical",right:0,top:60,bottom:20},series:[{name:"类别金额统计",type:"pie",minAngle:2,avoidLabelOverlap:!0,itemStyle:{normal:{label:{show:!0,formatter:function(e){return e.name+"\n "+e.percent.toFixed(1)+"%"}},labelLine:{show:!0,length:.01}}},data:[{value:parseFloat(this.num.aTotalPrice),name:"A类"},{value:parseFloat(this.num.bTotalPrice),name:"B类"},{value:parseFloat(this.num.cTotalPrice),name:"C类"}]}]},this.options&&this.myChart.setOption(this.options)},changeWidth:function(){this.myChart.resize()}}},s=i,l=(r("e3f8"),r("2877")),c=Object(l["a"])(s,n,a,!1,null,"3829bd99",null);t["default"]=c.exports},"87e5":function(e,t,r){},"8a53":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1)],1)],1)},a=[],o=r("80cb"),i=r("f6e8"),s=r("433d"),l=r("6ec5"),c=r("6f7e"),u={name:"index",components:{MyButton:i["a"],MyTableV2:o["a"]},data:function(){return{items:[{type:"cascader",dataIndex:"categoryId",label:"分类",placeholder:"请选择",defaultValue:"",options:[],cascader:[{key:"goodsTemplateId",queryKey:"categoryId"}],optionsConfig:{label:"label",value:"id",url:s["a"].apiBaseURL+"/pc/base/category/select/tree",props:{checkStrictly:!1,emitPath:!1,value:"id"}}},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",defaultValue:"",options:[],cascader:[{key:"baseGoodsModelsId",queryKey:"goodsTemplatesId"}],optionsConfig:{label:"goodsName",value:"id",url:s["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请输入",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:s["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel"}},{type:"select",dataIndex:"costType",label:"类别",placeholder:"请选择",defaultValue:"",options:[{label:"A",value:"1"},{label:"B",value:"2"},{label:"C",value:"3"}]}],treeDataList:[],filterFrom:{tenantId:null,userName:null,userPhone:null,status:1},editSetting:{title:"",id:"",orgId:"",show:!1},table:{showIndex:!0,expand:!1,url:s["a"].apiBaseURL+"/pc/warehouse/warning/getList",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"物品名称",field:"baseGoodsTemplateName",align:"left",minWidth:140},{title:"规格型号",field:"baseGoodsModelsName",align:"left",minWidth:130},{title:"单位",field:"unit",align:"center",width:80},{title:"当前库存",field:"warehouseCount",align:"center",width:130},{title:"保底库存",field:"lowerLimit",align:"center",width:130},{title:"封顶库存",field:"upperLimit",align:"center",width:130},{title:"状态",field:"warningType",align:"center",width:90,formatter:function(e){return{type:1==e.warningType?"warning":"danger",value:1==e.warningType?"库存已超":"预计缺货"}}},{title:"预警时间",field:"warningTime",align:"center",width:160,formatter:function(e){return{value:c["LongToDateTime"](e.warningTime)}}}],paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){},methods:{del:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.name+'"的机构吗?').then((function(){l["e"]({id:e.id}).then((function(e){}))})).then((function(e){t.$message.success("删除成功!"),t.search()})).catch((function(){}))},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)}}},d=u,f=r("2877"),p=Object(f["a"])(d,n,a,!1,null,"28fd2f8d",null);t["default"]=p.exports},"8bea":function(e,t,r){"use strict";r("2f73")},"8d74":function(e,t,r){var n=r("4cef"),a=/^\s+/;function o(e){return e?e.slice(0,n(e)+1).replace(a,""):e}e.exports=o},"8dbd":function(e,t,r){},"8eb74":function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"b",(function(){return i})),r.d(t,"d",(function(){return s}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/add",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/edit",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/detail",method:"get",params:e})}function s(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/department/list/all",method:"get",params:e})}},"904d":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container stock-container"},[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("div",{staticClass:"table-tool-bar",staticStyle:{"margin-bottom":"15px"}},[r("my-button",{attrs:{name:"新增",site:"tools",size:"medium"},on:{click:e.handleAdd}})],1),e._v(" "),r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[r("div",{style:{"overflow-y":"auto",height:"calc(100vh - 352px)"}},[e.list.length?r("el-row",{staticClass:"card",attrs:{gutter:5}},e._l(e.list,(function(t,n){return r("el-col",{key:n,staticClass:"cm-item"},[r("el-card",{staticClass:"card-data"},[r("div",{staticClass:"card-container"},[r("div",{staticClass:"card-header"},[r("div",{staticClass:"card-header-left"},[r("span",[e._v("出库单号:")]),e._v(" "),r("span",{staticClass:"value"},[e._v(e._s(t.businessFormCode))])]),e._v(" "),r("div",{staticClass:"card-header-right"},[r("el-button",{attrs:{site:"form",type:"success",size:"mini"},on:{click:function(r){return e.handleExport("outputExport","出库单-"+t.businessFormCode,{id:t.id})}}},[e._v("导出出库单")]),e._v(" "),r("el-button",{attrs:{name:"查看详情",site:"form",type:"info",size:"mini"},on:{click:function(r){return e.handleDetail(t)}}},[e._v("查看详情")])],1)]),e._v(" "),r("div",{staticClass:"one-hed"},[r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("机构:")]),e._v(e._s(t.agencyName))]),e._v(" "),r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("操作人:")]),e._v(e._s(t.operatorName))]),e._v(" "),r("div",{staticClass:"box"},[r("span",{staticClass:"span-two"},[e._v("出库时间:")]),e._v(e._s(e._f("formatTime")(t.dealTime))+"\n ")])]),e._v(" "),r("div",{staticClass:"card-end"},e._l(t.formOutputTemplateInfoList,(function(t,n){return r("div",{key:n,staticClass:"item"},[r("div",{staticClass:"name"},[e._v(e._s(t.goodsName))]),e._v(" "),r("div",{staticClass:"value-box"},[r("div",{staticClass:"value-box-item"},[r("span",{staticClass:"label"},[e._v("数量:")]),e._v(" "),r("span",{staticClass:"value"},[e._v(e._s(t.count))]),e._v(" "),r("span",{staticClass:"unit"},[e._v(e._s(t.unit))])])])])})),0)])])],1)})),1):r("el-empty",{attrs:{description:"暂无数据"}})],1)]),e._v(" "),r("el-pagination",{attrs:{small:!1,"current-page":e.pageNum,"page-sizes":[5,10,20,50,100,200,300,400,500],"page-size":e.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)],1)],1)],1),e._v(" "),e.editSetting.show?r("edit",{ref:"editRef",attrs:{setting:e.editSetting},on:{close:function(t){e.editSetting.show=!1},search:e.refreshData}}):e._e(),e._v(" "),e.detailSetting.show?r("detail",{ref:"detailRef",attrs:{setting:e.detailSetting},on:{close:function(t){e.detailSetting.show=!1}}}):e._e()],1)},a=[],o=r("efdb"),i=r("f6e8"),s=r("9960"),l=r("ae0b"),c=r("9f01"),u=r("271c"),d=r("433d");function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function m(e){for(var t=1;t")])],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.waitLoading,expression:"waitLoading"}],staticClass:"top-tb",attrs:{data:e.waitWorkData,height:"220","show-header":!1,size:"medium"}},[r("el-table-column",{attrs:{prop:"businessFormCode",align:"center",width:"130"}}),e._v(" "),r("el-table-column",{attrs:{prop:"inWarehouseName",align:"left","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:n.inWarehouseName,placement:"top-start"}},[r("div",{staticClass:"font-14 color-333",staticStyle:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},[e._v("\n "+e._s(n.inWarehouseName)+"\n ")])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"operatorName",align:"center",width:"80"}}),e._v(" "),r("el-table-column",{attrs:{prop:"createTime",align:"center",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",{staticClass:"font-14 color-333"},[e._v(e._s(e.formattTime(t.row.createTime)))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"date",label:"操作",fixed:"right",align:"center",width:"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{staticStyle:{padding:"4px 15px"},attrs:{size:"mini",type:"primary"},nativeOn:{click:function(r){return r.preventDefault(),e.aduitThis(t.row)}}},[e._v("处理")])]}}])}),e._v(" "),r("el-empty",{attrs:{slot:"empty",description:"暂无数据"},slot:"empty"})],1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-card",{attrs:{shadow:"never"}},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",{staticClass:"font-18 font-bold"},[e._v("预警通知")])]),e._v(" "),r("div",{staticClass:"f-r f-r-between m-b-10"},[r("el-radio-group",{attrs:{size:"mini"},on:{change:e.changeEarlyWarning},model:{value:e.earlyWarningType,callback:function(t){e.earlyWarningType=t},expression:"earlyWarningType"}},[r("el-radio-button",{attrs:{label:""}},[e._v("全部")]),e._v(" "),r("el-radio-button",{attrs:{label:"2"}},[e._v("缺货 "),e.warningTypeNum.lowNum?r("span",[e._v("("+e._s(e.warningTypeNum.lowNum)+")")]):e._e()]),e._v(" "),r("el-radio-button",{attrs:{label:"1"}},[e._v("超出 "),e.warningTypeNum.upNum?r("span",[e._v("("+e._s(e.warningTypeNum.upNum)+")")]):e._e()])],1),e._v(" "),r("div",{staticClass:"to-more",on:{click:function(t){return e.nav("/stock/ledger/alertQuery")}}},[e._v("查看更多 >")])],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.earlyLoading,expression:"earlyLoading"}],staticClass:"top-tb",attrs:{data:e.earlyWarningData,height:"220","show-header":!1,size:"medium"}},[r("el-table-column",{attrs:{prop:"baseGoodsTemplateName",align:"left","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:n.baseGoodsTemplateName,placement:"top-start"}},[r("div",{staticClass:"font-14 color-333",staticStyle:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},[e._v("\n "+e._s(n.baseGoodsTemplateName)+"\n ")])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"baseGoodsModelsName",align:"left","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:n.baseGoodsModelsName,placement:"top-start"}},[r("div",{staticClass:"font-14 color-333",staticStyle:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden"}},[e._v("\n "+e._s(n.baseGoodsModelsName)+"\n ")])])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"surplus",align:"left","min-width":"130"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("span",{staticClass:"font-14 color-333"},[e._v("剩余"+e._s(n.warehouseCount)+e._s(n.unit))])]}}])}),e._v(" "),r("el-table-column",{attrs:{prop:"warningTime",align:"center",width:"160"},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.row;return[r("span",{staticClass:"font-14 color-333"},[e._v(e._s(e.formattTime(n.warningTime)))])]}}])}),e._v(" "),r("el-empty",{attrs:{slot:"empty",description:"暂无数据"},slot:"empty"})],1)],1)],1)],1),e._v(" "),r("div",{staticClass:"f-r f-r-between total-list"},[r("div",{staticClass:"total-item"},[r("div",{staticClass:"font-14 color-666"},[e._v("物品数量")]),e._v(" "),r("div",{staticClass:"font-14 color-333",staticStyle:{"margin-top":"6px"}},[r("span",{staticClass:"total-num"},[e._v(e._s(e.goodsNumPrice.totalNum))])])]),e._v(" "),r("div",{staticClass:"total-item"},[r("div",{staticClass:"font-14 color-666"},[e._v("资产总金额")]),e._v(" "),r("div",{staticClass:"font-14 color-333",staticStyle:{"margin-top":"6px"}},[r("span",{staticClass:"total-num"},[e._v(e._s(e.goodsNumPrice.totalPrice))]),e._v("万元\n ")])]),e._v(" "),r("div",{staticClass:"total-item"},[r("div",{staticClass:"font-14 color-666"},[e._v("物品占用率")]),e._v(" "),r("div",{staticClass:"font-14 color-333",staticStyle:{"margin-top":"6px"}},[r("span",{staticClass:"total-num"},[e._v(e._s(e.goodsNumPrice.zhanYouPercent)+"%")])])]),e._v(" "),r("div",{staticClass:"total-item"},[r("div",{staticClass:"font-14 color-666"},[e._v("A类物品数量")]),e._v(" "),r("div",{staticClass:"font-14 color-333",staticStyle:{"margin-top":"6px"}},[r("span",{staticClass:"total-num"},[e._v(e._s(e.goodsNumPrice.aTotalNum))])])]),e._v(" "),r("div",{staticClass:"total-item"},[r("div",{staticClass:"font-14 color-666"},[e._v("B类物品数量")]),e._v(" "),r("div",{staticClass:"font-14 color-333",staticStyle:{"margin-top":"6px"}},[r("span",{staticClass:"total-num"},[e._v(e._s(e.goodsNumPrice.bTotalNum))])])])]),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:12}},[r("LBSLTJ",{attrs:{num:e.goodsNumPrice}})],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("LBJETJ",{attrs:{num:e.goodsNumPrice}})],1)],1),e._v(" "),r("XYZC")],1)},a=[],o=r("271c"),i=r("5fd4"),s=r("6f7e"),l=r("a083"),c=r("2c4d");function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t1?r("i",{staticClass:"el-icon-remove-outline",staticStyle:{color:"#f56c6c","font-size":"16px",cursor:"pointer"},on:{click:function(r){return e.handleDel(n,o,t.$index)}}}):e._e(),e._v(" "),a.procureModelUserList.length-1==t.$index?r("i",{staticClass:"el-icon-circle-plus-outline",staticStyle:{color:"#0d997c","font-size":"16px",cursor:"pointer"},on:{click:function(r){return e.handleAdd(n,o,t.$index)}}}):e._e()]}}],null,!0)})],1)],1):r("el-col",{staticStyle:{padding:"15px 0"},attrs:{span:10}},[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"分发数量:",prop:"transferGoods."+n+".models."+o+".counts",rules:[{validator:e.checkCounts,type:2,worehouseCount:a.worehouseCount,trigger:["blur","change"]}],"label-width":"80"}},[r("el-input",{staticStyle:{width:"160px"},model:{value:a.counts,callback:function(t){e.$set(a,"counts",e._n(t))},expression:"mItem.counts"}})],1)],1)],1)})),e._v(" "),r("div",{staticClass:"btn-group"},[e.formData.transferGoods.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除\n ")]):e._e(),e._v(" "),e.formData.transferGoods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品\n ")]):e._e()],1)],2)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1)],1)},a=[],o=r("5688"),i=r("a083"),s=r("8eb74"),l=r("c56b"),c=r("f6e8"),u=r("f76d"),d=r("decf"),f=r("dee4"),p=r("2f62"),m=r("6f7e"),h=r("6ec5");function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function v(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=w(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function b(e){return x(e)||_(e)||w(e)||y()}function y(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function w(e,t){if(e){if("string"==typeof e)return S(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function _(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function x(e){if(Array.isArray(e))return S(e)}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function k(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function C(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){k(o,n,a,i,s,"next",e)}function s(e){k(o,n,a,i,s,"throw",e)}i(void 0)}))}}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function j(e){for(var t=1;te.worehouseCount)return r(new Error("分发数量不能大于剩余数量"));if(1===e.type){var n=0;if(e.userList.map((function(e){n+=e.goodsNum||0})),n>e.worehouseCount)return r(new Error("分发数量总和不能大于剩余数量"))}r()},loading:!0,fileList:[],departmentOptions:[],categoryOptions:[],modelList:[],formData:{transferBusinessType:1,departmentId:"",departmentName:"",operatorName:"",tel:"",createTime:m["formatDate"](new Date,"yyyyMMddhhmmss"),procureDoc:"",transferGoods:[]},goodsItem:{baseCategoryId:"",classification:"",baseGoodsTemplateId:"",goodsTemplateName:"",goodsOptions:[],modelsOptions:[],models:[],modelsIds:[]},modelsItem:{baseGoodsModelsId:"",procureModelUserList:[],counts:""},clistItem:{goodsNum:null,nowUserName:null,nowUserPhone:null},rules:{departmentId:[{required:!0,message:"请选择部门",trigger:"change"}],operatorName:[{required:!0,message:"请填写领取人",trigger:"blur"}],tel:[{required:!0,message:"请填写联系电话",trigger:"blur"}],createTime:[{required:!0,message:"请选择分发时间",trigger:"change"}],procureDoc:[{required:!0,message:"请上传审批手续",trigger:"change"}],baseCategoryIds:[{required:!0,message:"请选择",trigger:"change"}],baseGoodsTemplateId:[{required:!0,message:"请选择",trigger:"change"},{validator:t,trigger:["blur","change"]}],modelsIds:[{required:!0,message:"请选择",trigger:"change"}],transferGoods:[{models:[{counts:[{required:!0,message:"请输入",trigger:"change"},{type:"number",message:"数量必须为整数"}],procureModelUserList:[{goodsNum:[{required:!0,message:"请输入",trigger:"blur"}],nowUserName:[{required:!0,message:"请输入",trigger:"blur"}],nowUserPhone:[{required:!0,message:"请输入",trigger:"blur"}]}]}]}]},uploadSettings:{title:"上传",max:20,num:10,tip:"",uploadUrl:Object(f["d"])(),multiple:!0,disabled:!1}}},computed:j({},Object(p["b"])(["userInfo"])),created:function(){this.init()},methods:{init:function(){var e=C(O().mark((function e(){var t;return O().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getdeptmentList();case 2:return e.next=4,Object(l["b"])();case 4:t=e.sent,this.categoryOptions=this.removeEmptyChildren(t),this.loading=!1,this.getgoodsTemplate(),this.getgoodsModel();case 9:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getdeptmentList:function(){var e=this;Object(s["d"])({tenantId:this.userInfo.tenantId}).then((function(t){e.departmentOptions=t,e.formData.transferGoods.push(JSON.parse(JSON.stringify(e.goodsItem)))})).catch((function(e){console.log("err",e)}))},removeEmptyChildren:function(e){var t=this;return e.forEach((function(e){e.children&&e.children.length?t.removeEmptyChildren(e.children):delete e.children})),e},getgoodsTemplate:function(e,t){var r=this;Object(o["b"])({categoryId:e||"",agencyId:this.userInfo.tenantId}).then((function(e){t||0==t?(r.$set(r.formData.transferGoods[t],"goodsOptions",e),r.$set(r.formData.transferGoods[t],"classification",e[0].classification)):r.goodsTemplatelAll=e}))},getgoodsModel:function(e,t){var r=this;Object(o["a"])({goodsTemplatesId:e||"",agencyId:this.userInfo.tenantId}).then((function(e){t||0==t?r.$set(r.formData.transferGoods[t],"modelsOptions",e):r.goodsModelAll=e}))},getGoodsTemplateName:function(e){var t=this.goodsTemplatelAll.find((function(t){return t.id==e}));if(t)return t.goodsName},getGoodsModelsName:function(e){var t=this.goodsModelAll.find((function(t){return t.id==e}));if(t)return t.modelName},categoryChange:function(e,t){this.formData.transferGoods[t].goodsOptions=[],this.formData.transferGoods[t].baseGoodsTemplateId="",this.formData.transferGoods[t].goodsTemplateName="",this.formData.transferGoods[t].modelsOptions=[],this.formData.transferGoods[t].modelsIds=[],this.formData.transferGoods[t].models=[],this.getgoodsTemplate(e,t)},goodsTemplateChange:function(e,t){this.formData.transferGoods[t].modelsOptions=[],this.formData.transferGoods[t].modelsIds=[],this.formData.transferGoods[t].models=[],this.formData.transferGoods[t].goodsTemplateName=this.getGoodsTemplateName(e),this.getgoodsModel(e,t)},modelChange:function(){var e=C(O().mark((function e(t,r){var n,a,o,i,s,l,c;return O().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=b(this.formData.transferGoods[r].models),a=JSON.stringify(n),o=v(t),e.prev=3,o.s();case 5:if((i=o.n()).done){e.next=15;break}if(s=i.value,-1!==a.indexOf(s)){e.next=13;break}return e.next=10,Object(h["r"])({baseGoodsModelsId:s,states:1,agencyId:this.userInfo.tenantId});case 10:l=e.sent,c=[JSON.parse(JSON.stringify(this.clistItem))],n.push(j(j({},this.modelsItem),{},{baseGoodsModelsId:s,procureModelUserList:c,worehouseCount:l}));case 13:e.next=5;break;case 15:e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](3),o.e(e.t0);case 20:return e.prev=20,o.f(),e.finish(20);case 23:this.formData.transferGoods[r].models=n;case 24:case"end":return e.stop()}}),e,this,[[3,17,20,23]])})));function t(t,r){return e.apply(this,arguments)}return t}(),modelRemoveTag:function(e,t){var r=this.formData.transferGoods[t].models,n=r.findIndex((function(t){return t.baseGoodsModelsId==e}));this.formData.transferGoods[t].models.splice(n,1)},handleAdd:function(e,t,r){this.formData.transferGoods[e].models[t].procureModelUserList.push(JSON.parse(JSON.stringify(this.clistItem)))},handleDel:function(e,t,r){this.formData.transferGoods[e].models[t].procureModelUserList.splice(r,1)},priceChange:function(e,t,r){this.formData.transferGoods[t].models[r].price=100*e},uploadChange:function(){var e=this.$refs.uploadRef.fileList;this.formData.procureDoc=JSON.stringify(e)},addGoods:function(){this.formData.transferGoods.push(JSON.parse(JSON.stringify(this.goodsItem)))},removeGoods:function(e){this.formData.transferGoods.splice(e,1)},handleSubmit:function(){var e=this;console.log("formData",this.formData),this.$refs["ruleForm"].validate((function(t){if(t){if(e.formData.transferGoods.map((function(e){e.models.map((function(t){if("A"===e.classification){var r=0;t.procureModelUserList.map((function(e){r+=parseInt(e.goodsNum||"0")})),t.counts=r}}))})),e.formData.departmentName=e.$refs.department.selected.currentLabel,e.formData.outAgencyId=e.userInfo.tenantId,e.loading)return;e.loading=!0,Object(i["d"])(e.formData).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,console.log("create err",t)}))}else e.$message.error("校验未通过,请检查。")}))},close:function(){this.formData={warehouseId:"",procureTime:"",transferGoods:[]},this.$emit("close")}}},P=L,E=(r("11e2"),r("2877")),$=Object(E["a"])(P,n,a,!1,null,"68f6d552",null);t["default"]=$.exports},9960:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return e.dialogShow?r("el-dialog",{attrs:{width:"40%",center:!0,"close-on-click-modal":!1,"close-on-press-escape":!1,title:e.dialogTitle,"before-close":e.beforeClose,modal:e.modal,visible:e.dialogShow}},[r("el-row",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[r("el-col",{attrs:{span:24}},[r("el-form",[null!=e.templateSettings.templateUrl?r("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[r("a",{staticClass:"blue-txt",staticStyle:{color:"#409EFF"},attrs:{href:e.templateSettings.templateUrl,target:"_blank",rel:"noreferrer noopener"}},[e._v(e._s(e.templateSettings.templateName))])]):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[r("el-upload",{ref:e.fileSettings.ref,staticClass:"upload-demo",attrs:{headers:e.headers,name:"file",data:e.fileSettings.data,action:e.fileSettings.uploadUrl,"before-upload":e.beforeAvatarUpload,"on-success":e.handleUploadSuccess,"on-change":e.file,multiple:e.fileSettings.multiple,limit:e.fileSettings.num,accept:e.fileSettings.accept,"auto-upload":e.fileSettings.autoUpload}},[r("el-button",{attrs:{size:"small",type:"primary"}},[e._v(e._s(e.fileSettings.title))]),e._v(" "),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[e._v("只能上传"+e._s(e.fileSettings.num)+"个格式为"+e._s(e.fileSettings.accept)+"的文件,且不超过"+e._s(e.fileSettings.max)+"kb")])],1)],1),e._v(" "),r("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:e.handleSubmit}},[e._v("开始导入")])],1)],1)],1)],1)],1):e._e()},a=[],o=r("5f87"),i=r("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(e){e&&(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[i["sessionToken"]]=Object(o["a"])()},methods:{beforeClose:function(){var e=this;this.loading?this.$confirm("正在执行导入,确认关闭?").then((function(){e.importSetting.dialogShow=!1,e.loading=!1})).catch():this.importSetting.dialogShow=!1},beforeAvatarUpload:function(e){var t=this.fileSettings.accept.split(",").indexOf(e.name.substr(e.name.lastIndexOf("."),e.name.length).toLocaleString())>-1;t||this.$message.error("上传文件只能是 ".concat(this.fileSettings.accept," 格式!"));var r=e.size/10241?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除")]):e._e(),e._v(" "),e.formData.transferGoods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品")]):e._e()],1)],1)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1)],1)},a=[],o=r("a083"),i=r("6ec5"),s=r("f6e8"),l=r("f76d"),c=r("decf"),u=r("dee4"),d=r("2f62"),f=r("6f7e");function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function h(e){return y(e)||b(e)||v(e)||g()}function g(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){if(e){if("string"==typeof e)return w(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function b(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function y(e){if(Array.isArray(e))return w(e)}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){x(o,n,a,i,s,"next",e)}function s(e){x(o,n,a,i,s,"throw",e)}i(void 0)}))}}function O(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;ta&&(this.$message.warning("数量超过现有库存"),n.counts=a)},handleSubmit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(t){if(e.loading)return;e.loading=!0,Object(o["d"])(e.formData).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,console.log("edit err",t),e.$message.error("保存失败")}))}else e.$message.error("校验未通过,请检查。")}))},close:function(){this.$emit("close")}}},N=T,D=(r("5234"),r("2877")),L=Object(D["a"])(N,n,a,!1,null,"3881f82a",null);t["default"]=L.exports},"9e69":function(e,t,r){var n=r("2b3e"),a=n.Symbol;e.exports=a},"9e72":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("div",{staticStyle:{"margin-top":"15px"}},[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)])],1)},a=[],o=r("80cb"),i=r("433d"),s=r("6f7e"),l={components:{MyTableV2:o["a"]},data:function(){return{items:[{type:"text",dataIndex:"userName",label:"登录账号",placeholder:"请输入",defaultValue:""}],filterFrom:{userName:null},table:{showIndex:!0,expand:!1,url:i["a"].apiBaseURL+"/pc/p/login/info/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"登录账号",field:"userName",align:"left",minWidth:110},{title:"登录用户",field:"sysUserName",align:"left",minWidth:80},{title:"登录用户单位",field:"sysUserUnit",align:"left",minWidth:80},{title:"登录IP",field:"ipaddr",align:"center"},{title:"浏览器类型",field:"browser",align:"center"},{title:"登录状态",field:"status",align:"center",formatter:function(e){return{value:1==e.status?"登录成功":"登录失败"}}},{title:"提示消息",field:"msg",align:"left"},{title:"访问时间",field:"login_time",align:"center",width:180,formatter:function(e){return{value:Object(s["LongToDateTime"])(e.loginTime)}}}],operation:{show:!1},paging:{show:!0,page:{small:!1,pageNumber:1,pageSize:10,total:0}}}}},mounted:function(){},methods:{search:function(e){void 0!=e?this.$refs.myTable.search(e):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)}}},c=l,u=r("2877"),d=Object(u["a"])(c,n,a,!1,null,"03e34f16",null);t["default"]=d.exports},"9ed6":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"login-container"},[n("img",{staticClass:"logo-name",attrs:{src:r("f6ce"),alt:"低值易耗品库存管理系统"}}),e._v(" "),n("el-row",{staticClass:"flex-1 min-1200",attrs:{type:"flex",justify:"center",align:"center",gutter:20}},[n("el-col",[n("div",{staticClass:"form-main w1050"},[n("el-row",[n("el-col",{attrs:{span:12}},[n("img",{staticClass:"logo-lf",attrs:{src:r("4c5a"),alt:"登录"}})]),e._v(" "),n("el-col",{attrs:{span:12}},[n("div",{staticClass:"login-box"},[n("el-form",{ref:"loginForm",attrs:{id:"loginForm",model:e.loginForm,rules:e.loginRules}},[n("h3",{staticClass:"title"},[e._v("欢迎登录")]),e._v(" "),n("div",{staticClass:"f-lable"},[e._v("账号")]),e._v(" "),n("el-form-item",{attrs:{prop:"account"}},[n("el-input",{ref:"account",attrs:{id:"input-b",placeholder:"请输入账号",name:"account",type:"text","auto-complete":"on"},model:{value:e.loginForm.account,callback:function(t){e.$set(e.loginForm,"account",t)},expression:"loginForm.account"}})],1),e._v(" "),n("div",{staticClass:"f-lable"},[e._v("密码")]),e._v(" "),n("el-form-item",{attrs:{prop:"password"}},[n("el-input",{key:e.passwordType,ref:"pwd",attrs:{id:"input-block",type:e.passwordType,placeholder:"请输入密码",name:"password","auto-complete":"on"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleLogin(t)}},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}}),e._v(" "),n("span",{staticClass:"show-pwd",on:{click:e.showPwd}},[n("svg-icon",{attrs:{"icon-class":"password"===e.passwordType?"eye":"eye-open"}})],1)],1),e._v(" "),"code"===e.loginForm.verifyType&&e.captchaEnabled?[n("div",{staticClass:"f-lable"},[e._v("验证码")]),e._v(" "),n("el-form-item",{staticClass:"captcha",attrs:{prop:"code"}},[n("el-input",{staticStyle:{width:"218px"},attrs:{placeholder:"验证码",type:"text",tabindex:"3",autocomplete:"off"},model:{value:e.loginForm.code,callback:function(t){e.$set(e.loginForm,"code","string"===typeof t?t.trim():t)},expression:"loginForm.code"}}),e._v(" "),n("div",{staticClass:"imgs",on:{click:function(t){return e.getCode()}}},[n("img",{attrs:{src:e.codeUrl}}),e._v(" "),n("span",{directives:[{name:"show",rawName:"v-show",value:e.showCaptchatImg,expression:"showCaptchatImg"}]},[e._v("已失效")])])],1)]:e._e(),e._v(" "),n("el-button",{staticClass:"login-btn",attrs:{id:"loginBtn",loading:e.loading,disabled:e.disabled},nativeOn:{click:function(t){return t.preventDefault(),e.handleLogin(t)}}},[e._v("登录\n ")])],2)],1)])],1)],1)])],1)],1)},a=[],o=(r("61f7"),r("c24f")),i=r("a18c"),s={name:"Login",data:function(){return{verify:!1,showCaptchatImg:!1,codeUrl:"",fullWidth:document.body.clientWidth,swiperOption:{pagination:{el:".pagination"},autoplay:{enabled:!1,disableOnInteraction:!1,delay:3e3}},loginForm:{account:"",password:"",uuid:"",code:"",loginType:"user_pass",verifyType:"code"},loginRules:{account:[{required:!0,trigger:"blur",message:"请输入用户名"}],password:[{required:!0,trigger:"blur",message:"请输入密码"}],code:[{required:!0,message:"请输入正确的验证码",trigger:"blur"}]},passwordType:"password",capsTooltip:!1,loading:!1,showDialog:!1,redirect:void 0,otherQuery:{},disabled:!1,isWeixin:this.$wechat.isWeixin(),captchaEnabled:!1}},components:{},watch:{fullWidth:function(e){if(!this.timer){this.screenWidth=e,this.timer=!0;var t=this;setTimeout((function(){t.timer=!1}),400)}},$route:{handler:function(e){var t=e.query;t&&(this.redirect=t.redirect,this.otherQuery=this.getOtherQuery(t))},immediate:!0}},created:function(){var e=this;document.onkeydown=function(t){if(-1!==e.$route.path.indexOf("login")){var r=window.event.keyCode;13===r&&e.handleLogin()}},window.addEventListener("resize",this.handleResize)},mounted:function(){""===this.loginForm.account?this.$refs.account.focus():""===this.loginForm.pwd&&this.$refs.password.focus(),this.getCode()},methods:{verifyTrue:function(){this.verify=!0},verifyFalse:function(){this.verify=!1},checkCapslock:function(e){var t=e.key;this.capsTooltip=t&&1===t.length&&t>="A"&&t<="Z"},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.pwd.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return!1;e.success(null)}))},success:function(e){var t=this;this.loginForm.captcha=this.$store.state.user.captcha;var r=this.$loading({lock:!0,text:"正在登录中."});this.$store.dispatch("user/login",this.loginForm).then((function(){t.$store.dispatch("user/getInfo").then((function(e){t.$store.dispatch("permission/generateRoutes",e.roles).then((function(e){i["a"].options.routes=e,i["a"].addRoutes(e),t.$router.push({path:t.redirect||"/dashboard",query:t.otherQuery}),r.close(),t.disabled=!0}))})).catch((function(e){r.close(),t.disabled=!1,t.$wechat.isPhone()&&t.$dialog.error(e.message),t.loginForm.code=null,t.getCode()}))})).catch((function(e){r.close(),t.disabled=!1,t.$wechat.isPhone()&&t.$dialog.error(e.message),t.loginForm.code=null,t.getCode()}))},getCode:function(){var e=this;"code"===this.loginForm.verifyType?Object(o["d"])().then((function(t){e.captchaEnabled=void 0===t.captchaEnabled||t.captchaEnabled,e.captchaEnabled&&(e.codeUrl="data:image/jpeg;base64,"+t.img),e.loginForm.uuid=t.uuid,e.showCaptchatImg=!1,setTimeout((function(){e.showCaptchatImg=!0}),27e4)})).catch((function(e){console.log(e)})):"jigsaw"===this.loginForm.verifyType?(this.loginForm.code="jigsaw",this.loginForm.uuid=""):"slide"===this.loginForm.verifyType||"sms"===this.loginForm.verifyType?Object(o["e"])().then((function(t){e.loginForm.uuid=t.uuid})).catch((function(e){console.error(e)})):this.$message.error("不支持的验证码类型:"+this.loginForm.verifyType)},getOtherQuery:function(e){return Object.keys(e).reduce((function(t,r){return"redirect"!==r&&(t[r]=e[r]),t}),{})}}},l=s,c=(r("97ee"),r("3679"),r("2877")),u=Object(c["a"])(l,n,a,!1,null,"6478b3af",null);t["default"]=u.exports},"9f01":function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-detail",attrs:{title:e.setting.title,width:"800px",loading:e.loading},on:{close:e.close}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("出库单号:")]),e._v(" "),r("span",[e._v(e._s(e.detail.businessFormCode))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("出库仓库:")]),e._v(" "),r("span",[e._v(e._s(e.detail.warehouseName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("所属机构:")]),e._v(" "),r("span",[e._v(e._s(e.detail.agencyName))])])],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("创建人:")]),e._v(" "),r("span",[e._v(e._s(e.detail.operatorName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("出库时间:")]),e._v(" "),r("span",[e._v(e._s(e._f("formatTime")(e.detail.dealTime)))])])],1),e._v(" "),e.fileList&&e.fileList.length?r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{staticClass:"img-row",attrs:{span:24}},[r("span",[e._v("出库手续:")]),e._v(" "),e._l(e.fileList,(function(t,n){return r("div",{key:n,staticClass:"img-box",on:{click:function(r){return e.handlePreview(t)}}},[r("img",{staticClass:"img",attrs:{src:e.getUrl(t.path),alt:""}})])}))],2)],1):e._e(),e._v(" "),e._l(e.detail.fromOutputGoods,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("物品分类:")]),e._v(" "),r("span",[e._v(e._s(t.categoryName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("物品名称:")]),e._v(" "),r("span",[e._v(e._s(t.goodsName))])])],1),e._v(" "),r("el-table",{staticStyle:{"margin-top":"20px"},attrs:{data:t.models,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsName",label:"规格型号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.baseGoodsModelsName)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{label:"单位",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.unit)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"出库数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.counts)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"totalAmount",label:"金额",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.totalAmount)+"\n ")]}}],null,!0)})],1)],1)})),e._v(" "),r("div",{staticStyle:{display:"none"},attrs:{id:"uploadPreviewImages"}},e._l(e.fileList,(function(t,n){return r("span",{key:n},[e.checkImg(t.name)?r("img",{staticClass:"v-img",staticStyle:{width:"100px",height:"100px"},attrs:{src:e.getUrl(t.path),alt:t.name}}):e._e()])})),0)],2)},a=[],o=r("efdb"),i=r("f76d"),s=r("6f7e"),l=r("dee4"),c=r("c82c"),u=r.n(c),d=(r("0808"),null),f={components:{winMd:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,fileList:[],detail:{categoryName:"",businessFormCode:"",goodsName:"",agencyId:"",agencyName:"",states:"",createName:"",fromOutputGoods:[]}}},filters:{formatTime:function(e){if(e)return s["LongToDateTime"](e)}},created:function(){var e=this;Object(o["b"])({id:this.setting.id}).then((function(t){e.detail=t,e.fileList=e.detail.doc?JSON.parse(e.detail.doc):[],e.loading=!1,e.$nextTick((function(){e.initPreviewImg()}))}))},methods:{initPreviewImg:function(){null!=d&&d.destroy();var e=document.querySelector("#uploadPreviewImages");d=new u.a(e,{})},handlePreview:function(e){if(!this.checkImg(e.name))return!1;for(var t=0,r=0;r=0},getUrl:function(e){return"http://"==e.substr(0,7).toLowerCase()||"https://"==e.substr(0,8).toLowerCase()?e:Object(l["c"])()+e},close:function(){this.$emit("close")}}},p=f,m=(r("3401"),r("2877")),h=Object(m["a"])(p,n,a,!1,null,"145e5635",null);t["default"]=h.exports},"9f17":function(e,t,r){"use strict";r("6ccf")},a083:function(e,t,r){"use strict";r.d(t,"d",(function(){return a})),r.d(t,"f",(function(){return o})),r.d(t,"g",(function(){return i})),r.d(t,"a",(function(){return s})),r.d(t,"b",(function(){return l})),r.d(t,"e",(function(){return c})),r.d(t,"h",(function(){return u})),r.d(t,"c",(function(){return d})),r.d(t,"i",(function(){return f})),r.d(t,"k",(function(){return p})),r.d(t,"j",(function(){return m}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/add",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/import",method:"post",data:e})}function i(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/list",method:"get",params:e})}function s(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/get/parent/tenant",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/pc/base/goods/template/query/warehouse/goods",method:"get",params:e})}function c(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/detail",method:"get",params:e})}function u(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/output",method:"post",params:e})}function d(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/income",method:"post",params:e})}function f(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/updStatus",method:"post",params:e})}function p(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/use/record",method:"get",params:e})}function m(e){return Object(n["a"])({url:"/pc/l/wh/form/transfer/useInfo/update",method:"POST",data:e})}},a118:function(e,t,r){},a19c:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-card",{staticClass:"box-card",attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container",staticStyle:{"margin-bottom":"10px"}},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.filterForm}})],1),e._v(" "),r("div",{staticClass:"title"},[e._v("物品统计表")]),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[r("el-table-column",{attrs:{align:"center",prop:"orgName",label:"机构","min-width":"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"warehouseName",label:"仓库/部门","min-width":"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"goodsCode",label:"物品编码",width:"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"goodsTemplateName",label:"物品名称","min-width":"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"baseGoodsModelsName",label:"规格型号","min-width":"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"zaiKuNum",label:"在库/在用数量",width:"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"baoFeiNum",label:"报废数",width:"150"}}),e._v(" "),r("el-table-column",{attrs:{align:"center",prop:"totalNum",label:"总数量",width:"150"}})],1)],1)],1)},a=[],o=r("b775");function i(e){return Object(o["a"])({url:"/pc/warehouse/goodsStatistics",method:"get",params:e})}var s=r("6f7e"),l=r("433d"),c={data:function(){return{items:[{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",defaultValue:"",options:[],cascader:[{key:"baseWarehouseId",queryKey:"agencyId"},{key:"goodsTemplateId",queryKey:"agencyId"}],optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null}},{type:"select",dataIndex:"baseWarehouseId",label:"仓库",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"warehouseName",value:"id",url:l["a"].apiBaseURL+"/pc/base/warehouse/select/tenant_warehouse"}},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",defaultValue:"",options:[],cascader:[{key:"categoryId",queryKey:"goodsTemplatesId"}],optionsConfig:{label:"goodsName",value:"id",url:l["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:l["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel"}},{type:"select",dataIndex:"costType",label:"类别",placeholder:"请选择",defaultValue:"",options:[{label:"A",value:"1"},{label:"B",value:"2"},{label:"C",value:"3"}]}],tableData:[],loading:!0,params:{examYear:Object(s["formatDate"])(new Date,"yyyyMMdd")}}},mounted:function(){this.getTableData({})},methods:{filterForm:function(e){this.params=e,this.getTableData(e)},getTableData:function(e){var t=this;this.loading=!0,i(e).then((function(e){t.tableData=e,t.loading=!1})).catch((function(){t.loading=!1}))}}},u=c,d=(r("130d"),r("2877")),f=Object(d["a"])(u,n,a,!1,null,"1d47760e",null);t["default"]=f.exports},a1ba:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div")},a=[],o={created:function(){this.b=b}},i=o,s=r("2877"),l=Object(s["a"])(i,n,a,!1,null,null,null);t["default"]=l.exports},a36b:function(e,t,r){e.exports=r.p+"static/img/404.a57b6f31.png"},a387:function(e,t,r){"use strict";r.r(t);var n=r("2f62");function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&(e.importSetting.fileSettings.data={pid:r[0].id})}))},updState:function(e){var t=this,r=0==e.status?"启用":"禁用";t.$modal.confirm("确认要"+r+'"'+e.name+'"吗?').then((function(){var n=Object.assign({},e);n.status=1==e.status?0:1,n.isOnlyState="1",d["h"](n).then((function(n){n&&(e.status=1===e.status?0:1,t.$modal.msgSuccess(r+"成功"),t.search())}))}))},del:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.name+'"的机构吗?').then((function(){d["e"]({id:e.id}).then((function(e){}))})).then((function(e){t.$message.success("删除成功!"),t.search()})).catch((function(){}))},showAdd:function(){this.editSetting.orgId?(this.editSetting.id=null,this.editSetting.info=null,this.editSetting.title="新增",this.editSetting.show=!0):this.$message.warning("请先选择左侧机构")},showAudit:function(e){this.editSetting.id=e.id,this.editSetting.info=JSON.stringify(e),this.editSetting.title="编辑",this.editSetting.show=!0},nodeClick:function(e){e=e||{},this.p=Object.assign({},{id:e.id,name:e.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:e.id},this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)}}},h=m,g=r("2877"),v=Object(g["a"])(h,n,a,!1,null,"1dfcb06f",null);t["default"]=v.exports},ae0b:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-edit",attrs:{title:e.setting.title+"出库",width:"800px"},on:{close:e.close}},[r("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"ruleForm",staticClass:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[r("div",{staticClass:"main-w"},[r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"出库仓库",prop:"warehouseId"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",clearable:""},model:{value:e.formData.warehouseId,callback:function(t){e.$set(e.formData,"warehouseId",t)},expression:"formData.warehouseId"}},e._l(e.warehouseOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.warehouseName,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"出库时间",prop:"dealTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",clearable:"",value:"yyyy-MM-dd HH:mm:ss","value-format":"yyyyMMddHHmmss",placeholder:"请选择日期"},model:{value:e.formData.dealTime,callback:function(t){e.$set(e.formData,"dealTime",t)},expression:"formData.dealTime"}})],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"出库手续",prop:"doc"}},[r("upload",{ref:"uploadRef",attrs:{settings:e.uploadSettings},on:{"on-change":e.uploadChange}})],1)],1)],1),e._v(" "),e._l(e.formData.goods,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品分类",prop:"goods."+n+".baseCategoryId",rules:{required:!0,message:"请选择",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.categoryOptions,placeholder:"请选择物品分类",props:{value:"id",emitPath:!1},"show-all-levels":!1,filterable:"",clearable:""},on:{change:function(t){return e.categoryChange(t,n)}},model:{value:t.baseCategoryId,callback:function(r){e.$set(t,"baseCategoryId",r)},expression:"goodsItem.baseCategoryId"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品名称",prop:"goods."+n+".baseGoodsTemplateId",rules:e.rules.baseGoodsTemplateId}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!t.baseCategoryId},on:{change:function(t){return e.goodsTemplateChange(t,n)}},model:{value:t.baseGoodsTemplateId,callback:function(r){e.$set(t,"baseGoodsTemplateId",r)},expression:"goodsItem.baseGoodsTemplateId"}},e._l(t.goodsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.goodsName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"规格型号",prop:"goods."+n+".modelsIds",rules:{required:!0,message:"请选择规格型号",trigger:"change"}}},[r("el-select",{staticStyle:{width:"100%"},attrs:{multiple:"",clearable:"",placeholder:t.baseGoodsTemplateId?"请选择规格型号":"请先选择物品名称",disabled:!t.baseGoodsTemplateId},on:{change:function(t){return e.modelChange(t,n)},"remove-tag":function(t){return e.modelRemoveTag(t,n)},clear:function(t){return e.modelRemoveTag(-1,n)}},model:{value:t.modelsIds,callback:function(r){e.$set(t,"modelsIds",r)},expression:"goodsItem.modelsIds"}},e._l(t.modelsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.modelName,value:e.id}})})),1)],1)],1)],1),e._v(" "),r("el-table",{attrs:{data:t.models,stripe:!0}},[r("el-table-column",{attrs:{prop:"baseGoodsModelsId",label:"规格型号",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e.getGoodsModelsName(t.row.baseGoodsModelsId))+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{label:"单位",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.unit)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"price",label:"现有库存",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.worehouseCount)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"出库数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-form-item",{attrs:{"label-width":"0",prop:"goods."+n+".models."+t.$index+".counts",rules:e.rules.counts}},[r("el-input",{attrs:{type:"number"},on:{change:function(r){return e.countsChange(r,n,t.$index)}},model:{value:t.row.counts,callback:function(r){e.$set(t.row,"counts",r)},expression:"scope.row.counts"}})],1)]}}],null,!0)})],1),e._v(" "),r("div",{staticClass:"btn-group"},[e.formData.goods.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除")]):e._e(),e._v(" "),e.formData.goods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品")]):e._e()],1)],1)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("el-button",{attrs:{name:"保存",type:"primary",size:"medium",loading:e.btnloading},on:{click:e.handleSubmit}},[e._v("保存")])],1)],1)},a=[],o=r("6ec5"),i=r("efdb"),s=r("c56b"),l=r("f6e8"),c=r("f76d"),u=r("decf"),d=r("dee4"),f=r("2f62"),p=r("6f7e");function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=b(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}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 o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}function g(e){return w(e)||y(e)||b(e)||v()}function v(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function w(e){if(Array.isArray(e))return _(e)}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function S(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){S(o,n,a,i,s,"next",e)}function s(e){S(o,n,a,i,s,"throw",e)}i(void 0)}))}}function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;ta&&(this.$message.warning("数额超过现有库存"),n.counts=a>0?a:null)},handleSubmit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(t){if(e.loading)return;e.loading=!0,e.btnloading=!0,console.log("this.formData",e.formData),Object(i["a"])(e.formData).then((function(t){e.$message.success("保存成功!"),e.btnloading=!1,e.loading=!1,e.close(),e.$emit("search")})).catch((function(t){console.log("edit err",t),e.btnloading=!1,e.loading=!1,e.$message.error("保存失败")}))}else e.$message.error("校验未通过,请检查。"),e.btnloading=!1}))},close:function(){this.formData={warehouseId:"",dealTime:"",goods:[]},this.$emit("close")}}},D=N,L=(r("0bcb"),r("2877")),P=Object(L["a"])(D,n,a,!1,null,"28fdcaf6",null);t["default"]=P.exports},af77:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{attrs:{title:e.setting.title,width:"1200px"},on:{close:e.close}},[r("el-row",{staticStyle:{"margin-bottom":"20px"},attrs:{gutter:20,type:"flex",align:"middle"}},[r("el-col",{attrs:{span:6}},[e._v("盘点单号:"+e._s(e.formData.businessFormCode))]),e._v(" "),r("el-col",{attrs:{span:6}},[e._v("盘点任务:"+e._s(e.formData.businessFormName))]),e._v(" "),r("el-col",{attrs:{span:6}},[e._v("盘点仓库:"+e._s(e.formData.warehouseName))])],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"the-table",attrs:{data:e.formData.formInventoryGoodsList,height:"500",stripe:!0}},[r("el-table-column",{attrs:{prop:"goodsTemplateName",label:"物品名称"}}),e._v(" "),r("el-table-column",{attrs:{prop:"baseGoodsModelsName",label:"型号",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"inventoryCount",label:"应盘数量",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"realNum",label:"实盘数量",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"status",label:"状态",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v("\n "+e._s(e._f("typeName")(r.status))+"\n ")]}}])})],1)],1)},a=[],o=r("f76d"),i=r("f6e8"),s=r("806c"),l={components:{winMd:o["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!1,formData:{businessFormCode:"2023080812",businessFormName:"2023年9月盘点单",warehouseName:"开封市仓库",formInventoryGoodsList:[]}}},filters:{typeName:function(e){switch(e){case 1:return"正常";case 2:return"盘盈";case 3:return"盘亏";default:return""}}},created:function(){var e=this;Object(s["c"])({id:this.setting.id}).then((function(t){e.formData=t}))},methods:{close:function(){this.$emit("close")},save:function(){}}},c=l,u=r("2877"),d=Object(u["a"])(c,n,a,!1,null,null,null);t["default"]=d.exports},b03a:function(e,t,r){},b047:function(e,t,r){var n=r("1a8c"),a=r("408c"),o=r("b4b0"),i="Expected a function",s=Math.max,l=Math.min;function c(e,t,r){var c,u,d,f,p,m,h=0,g=!1,v=!1,b=!0;if("function"!=typeof e)throw new TypeError(i);function y(t){var r=c,n=u;return c=u=void 0,h=t,f=e.apply(n,r),f}function w(e){return h=e,p=setTimeout(S,t),g?y(e):f}function _(e){var r=e-m,n=e-h,a=t-r;return v?l(a,d-n):a}function x(e){var r=e-m,n=e-h;return void 0===m||r>=t||r<0||v&&n>=d}function S(){var e=a();if(x(e))return O(e);p=setTimeout(S,_(e))}function O(e){return p=void 0,b&&c?y(e):(c=u=void 0,f)}function k(){void 0!==p&&clearTimeout(p),h=0,c=m=u=p=void 0}function C(){return void 0===p?f:O(a())}function I(){var e=a(),r=x(e);if(c=arguments,u=this,m=e,r){if(void 0===p)return w(m);if(v)return clearTimeout(p),p=setTimeout(S,t),y(m)}return void 0===p&&(p=setTimeout(S,t)),f}return t=o(t)||0,n(r)&&(g=!!r.leading,v="maxWait"in r,d=v?s(o(r.maxWait)||0,t):d,b="trailing"in r?!!r.trailing:b),I.cancel=k,I.flush=C,I}e.exports=c},b08c:function(e,t,r){"use strict";r("db9e")},b277:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-detail",attrs:{title:"导入分发单文件",width:"800px",loading:e.loading},on:{close:e.close}},[r("upload",{ref:"uploadRef",attrs:{values:e.fileList,settings:e.uploadSettings},on:{"on-change":e.uploadChange}}),e._v(" "),r("el-button",{staticStyle:{float:"right","margin-right":"50px","margin-top":"20px"},attrs:{name:"确定分发",site:"form",type:"primary",size:"mini"},on:{click:function(t){return e.distribute()}}},[e._v("\n 确定分发\n ")])],1)},a=[],o=r("f76d"),i=r("6f7e"),s=r("dee4"),l=r("c82c"),c=r.n(l),u=(r("0808"),r("dcec")),d=r("decf"),f=r("a083"),p=null,m={computed:{de:function(){return u["a"]}},components:{winMd:o["a"],upload:d["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{procureDoc:"",uploadSettings:{title:"上传",max:20,num:10,tip:"",uploadUrl:Object(s["d"])(),multiple:!0,disabled:!1},loading:!0,fileList:[],detail:{baseCategoryName:"",businessFormCode:"",goodsTemplateName:"",procureDoc:"",agencyId:"",agencyName:"",states:"",createName:"",time:"",procureGoods:[{},{}],fileKey:Math.random()}}},filters:{formatTime:function(e){return e?i["LongToDateTime"](e):"-"},formatPrice:function(e){return e/100}},created:function(){this.loading=!1,this.fileList=[]},methods:{initPreviewImg:function(){null!=p&&p.destroy();var e=document.querySelector("#uploadPreviewImages");p=new c.a(e,{})},handlePreview:function(e){if(!this.checkImg(e.name))return!1;for(var t=0,r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);r1?r-1:0),a=1;ar.bottom?e.scrollTop=Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+a,e.scrollHeight):n.top-a0},single:function(){return!this.multiple},visibleOptionIds:function(){var e=this,t=[];return this.traverseAllNodesByIndex((function(r){if(e.localSearch.active&&!e.shouldOptionBeIncludedInSearchResult(r)||t.push(r.id),r.isBranch&&!e.shouldExpand(r))return!1})),t},hasVisibleOptions:function(){return 0!==this.visibleOptionIds.length},showCountOnSearchComputed:function(){return"boolean"===typeof this.showCountOnSearch?this.showCountOnSearch:this.showCount},hasBranchNodes:function(){return this.forest.normalizedOptions.some((function(e){return e.isBranch}))},shouldFlattenOptions:function(){return this.localSearch.active&&this.flattenSearchResults}},watch:{alwaysOpen:function(e){e?this.openMenu():this.closeMenu()},branchNodesFirst:function(){this.initialize()},disabled:function(e){e&&this.menu.isOpen?this.closeMenu():e||this.menu.isOpen||!this.alwaysOpen||this.openMenu()},flat:function(){this.initialize()},internalValue:function(e,t){var r=K(e,t);r&&this.$emit("input",this.getValue(),this.getInstanceId())},matchKeys:function(){this.initialize()},multiple:function(e){e&&this.buildForestState()},options:{handler:function(){this.async||(this.initialize(),this.rootOptionsStates.isLoaded=Array.isArray(this.options))},deep:!0,immediate:!0},"trigger.searchQuery":function(){this.async?this.handleRemoteSearch():this.handleLocalSearch(),this.$emit("search-change",this.trigger.searchQuery,this.getInstanceId())},value:function(){var e=this.extractCheckedNodeIdsFromValue(),t=K(e,this.internalValue);t&&this.fixSelectedNodeIds(e)}},methods:{verifyProps:function(){var e=this;if(p((function(){return!e.async||e.searchable}),(function(){return'For async search mode, the value of "searchable" prop must be true.'})),null!=this.options||this.loadOptions||p((function(){return!1}),(function(){return'Are you meant to dynamically load options? You need to use "loadOptions" prop.'})),this.flat&&p((function(){return e.multiple}),(function(){return'You are using flat mode. But you forgot to add "multiple=true"?'})),!this.flat){var t=["autoSelectAncestors","autoSelectDescendants","autoDeselectAncestors","autoDeselectDescendants"];t.forEach((function(t){p((function(){return!e[t]}),(function(){return'"'.concat(t,'" only applies to flat mode.')}))}))}},resetFlags:function(){this._blurOnSelect=!1},initialize:function(){var e=this.async?this.getRemoteSearchEntry().options:this.options;if(Array.isArray(e)){var t=this.forest.nodeMap;this.forest.nodeMap=q(),this.keepDataOfSelectedNodes(t),this.forest.normalizedOptions=this.normalize(Z,e,t),this.fixSelectedNodeIds(this.internalValue)}else this.forest.normalizedOptions=[]},getInstanceId:function(){return null==this.instanceId?this.id:this.instanceId},getValue:function(){var e=this;if("id"===this.valueFormat)return this.multiple?this.internalValue.slice():this.internalValue[0];var t=this.internalValue.map((function(t){return e.getNode(t).raw}));return this.multiple?t:t[0]},getNode:function(e){return p((function(){return null!=e}),(function(){return"Invalid node id: ".concat(e)})),null==e?null:e in this.forest.nodeMap?this.forest.nodeMap[e]:this.createFallbackNode(e)},createFallbackNode:function(e){var t=this.extractNodeFromValue(e),r=this.enhancedNormalizer(t).label||"".concat(e," (unknown)"),n={id:e,label:r,ancestors:[],parentNode:Z,isFallbackNode:!0,isRootNode:!0,isLeaf:!0,isBranch:!1,isDisabled:!1,isNew:!1,index:[-1],level:0,raw:t};return this.$set(this.forest.nodeMap,e,n)},extractCheckedNodeIdsFromValue:function(){var e=this;return null==this.value?[]:"id"===this.valueFormat?this.multiple?this.value.slice():[this.value]:(this.multiple?this.value:[this.value]).map((function(t){return e.enhancedNormalizer(t)})).map((function(e){return e.id}))},extractNodeFromValue:function(e){var t=this,r={id:e};if("id"===this.valueFormat)return r;var n=this.multiple?Array.isArray(this.value)?this.value:[]:this.value?[this.value]:[],a=Y(n,(function(r){return r&&t.enhancedNormalizer(r).id===e}));return a||r},fixSelectedNodeIds:function(e){var t=this,r=[];if(this.single||this.flat||this.disableBranchNodes||this.valueConsistsOf===ce)r=e;else if(this.valueConsistsOf===ue)e.forEach((function(e){r.push(e);var n=t.getNode(e);n.isBranch&&t.traverseDescendantsBFS(n,(function(e){r.push(e.id)}))}));else if(this.valueConsistsOf===de){var n=q(),a=e.slice();while(a.length){var o=a.shift(),i=this.getNode(o);r.push(o),i.isRootNode||(i.parentNode.id in n||(n[i.parentNode.id]=i.parentNode.children.length),0===--n[i.parentNode.id]&&a.push(i.parentNode.id))}}else if(this.valueConsistsOf===fe){var s=q(),l=e.filter((function(e){var r=t.getNode(e);return r.isLeaf||0===r.children.length}));while(l.length){var c=l.shift(),u=this.getNode(c);r.push(c),u.isRootNode||(u.parentNode.id in s||(s[u.parentNode.id]=u.parentNode.children.length),0===--s[u.parentNode.id]&&l.push(u.parentNode.id))}}var d=K(this.forest.selectedNodeIds,r);d&&(this.forest.selectedNodeIds=r),this.buildForestState()},keepDataOfSelectedNodes:function(e){var t=this;this.forest.selectedNodeIds.forEach((function(r){if(e[r]){var n=_e({},e[r],{isFallbackNode:!0});t.$set(t.forest.nodeMap,r,n)}}))},isSelected:function(e){return!0===this.forest.selectedNodeMap[e.id]},traverseDescendantsBFS:function(e,t){if(e.isBranch){var r=e.children.slice();while(r.length){var n=r[0];n.isBranch&&r.push.apply(r,i()(n.children)),t(n),r.shift()}}},traverseDescendantsDFS:function(e,t){var r=this;e.isBranch&&e.children.forEach((function(e){r.traverseDescendantsDFS(e,t),t(e)}))},traverseAllNodesDFS:function(e){var t=this;this.forest.normalizedOptions.forEach((function(r){t.traverseDescendantsDFS(r,e),e(r)}))},traverseAllNodesByIndex:function(e){var t=function t(r){r.children.forEach((function(r){!1!==e(r)&&r.isBranch&&t(r)}))};t({children:this.forest.normalizedOptions})},toggleClickOutsideEvent:function(e){e?document.addEventListener("mousedown",this.handleClickOutside,!1):document.removeEventListener("mousedown",this.handleClickOutside,!1)},getValueContainer:function(){return this.$refs.control.$refs["value-container"]},getInput:function(){return this.getValueContainer().$refs.input},focusInput:function(){this.getInput().focus()},blurInput:function(){this.getInput().blur()},handleMouseDown:m((function(e){if(e.preventDefault(),e.stopPropagation(),!this.disabled){var t=this.getValueContainer().$el.contains(e.target);t&&!this.menu.isOpen&&(this.openOnClick||this.trigger.isFocused)&&this.openMenu(),this._blurOnSelect?this.blurInput():this.focusInput(),this.resetFlags()}})),handleClickOutside:function(e){this.$refs.wrapper&&!this.$refs.wrapper.contains(e.target)&&(this.blurInput(),this.closeMenu())},handleLocalSearch:function(){var e=this,t=this.trigger.searchQuery,r=function(){return e.resetHighlightedOptionWhenNecessary(!0)};if(!t)return this.localSearch.active=!1,r();this.localSearch.active=!0,this.localSearch.noResults=!0,this.traverseAllNodesDFS((function(t){var r;t.isBranch&&(t.isExpandedOnSearch=!1,t.showAllChildrenOnSearch=!1,t.isMatched=!1,t.hasMatchedDescendants=!1,e.$set(e.localSearch.countMap,t.id,(r={},l()(r,re,0),l()(r,ne,0),l()(r,ae,0),l()(r,oe,0),r)))}));var n=t.trim().toLocaleLowerCase(),a=n.replace(/\s+/g," ").split(" ");this.traverseAllNodesDFS((function(t){e.searchNested&&a.length>1?t.isMatched=a.every((function(e){return Ce(!1,e,t.nestedSearchLabel)})):t.isMatched=e.matchKeys.some((function(r){return Ce(!e.disableFuzzyMatching,n,t.lowerCased[r])})),t.isMatched&&(e.localSearch.noResults=!1,t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id][ne]++})),t.isLeaf&&t.ancestors.forEach((function(t){return e.localSearch.countMap[t.id][oe]++})),t.parentNode!==Z&&(e.localSearch.countMap[t.parentNode.id][re]+=1,t.isLeaf&&(e.localSearch.countMap[t.parentNode.id][ae]+=1))),(t.isMatched||t.isBranch&&t.isExpandedOnSearch)&&t.parentNode!==Z&&(t.parentNode.isExpandedOnSearch=!0,t.parentNode.hasMatchedDescendants=!0)})),r()},handleRemoteSearch:function(){var e=this,t=this.trigger.searchQuery,r=this.getRemoteSearchEntry(),n=function(){e.initialize(),e.resetHighlightedOptionWhenNecessary(!0)};if((""===t||this.cacheOptions)&&r.isLoaded)return n();this.callLoadOptionsProp({action:le,args:{searchQuery:t},isPending:function(){return r.isLoading},start:function(){r.isLoading=!0,r.isLoaded=!1,r.loadingError=""},succeed:function(a){r.isLoaded=!0,r.options=a,e.trigger.searchQuery===t&&n()},fail:function(e){r.loadingError=Ie(e)},end:function(){r.isLoading=!1}})},getRemoteSearchEntry:function(){var e=this,t=this.trigger.searchQuery,r=this.remoteSearch[t]||_e({},Oe(),{options:[]});if(this.$watch((function(){return r.options}),(function(){e.trigger.searchQuery===t&&e.initialize()}),{deep:!0}),""===t){if(Array.isArray(this.defaultOptions))return r.options=this.defaultOptions,r.isLoaded=!0,r;if(!0!==this.defaultOptions)return r.isLoaded=!0,r}return this.remoteSearch[t]||this.$set(this.remoteSearch,t,r),r},shouldExpand:function(e){return this.localSearch.active?e.isExpandedOnSearch:e.isExpanded},shouldOptionBeIncludedInSearchResult:function(e){return!!e.isMatched||(!(!e.isBranch||!e.hasMatchedDescendants||this.flattenSearchResults)||!(e.isRootNode||!e.parentNode.showAllChildrenOnSearch))},shouldShowOptionInMenu:function(e){return!(this.localSearch.active&&!this.shouldOptionBeIncludedInSearchResult(e))},getControl:function(){return this.$refs.control.$el},getMenu:function(){var e=this.appendToBody?this.$refs.portal.portalTarget:this,t=e.$refs.menu.$refs.menu;return t&&"#comment"!==t.nodeName?t:null},setCurrentHighlightedOption:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.menu.current;if(null!=n&&n in this.forest.nodeMap&&(this.forest.nodeMap[n].isHighlighted=!1),this.menu.current=e.id,e.isHighlighted=!0,this.menu.isOpen&&r){var a=function(){var r=t.getMenu(),n=r.querySelector('.vue-treeselect__option[data-id="'.concat(e.id,'"]'));n&&h(r,n)};this.getMenu()?a():this.$nextTick(a)}},resetHighlightedOptionWhenNecessary:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.menu.current;!e&&null!=t&&t in this.forest.nodeMap&&this.shouldShowOptionInMenu(this.getNode(t))||this.highlightFirstOption()},highlightFirstOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds[0];this.setCurrentHighlightedOption(this.getNode(e))}},highlightPrevOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)-1;if(-1===e)return this.highlightLastOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightNextOption:function(){if(this.hasVisibleOptions){var e=this.visibleOptionIds.indexOf(this.menu.current)+1;if(e===this.visibleOptionIds.length)return this.highlightFirstOption();this.setCurrentHighlightedOption(this.getNode(this.visibleOptionIds[e]))}},highlightLastOption:function(){if(this.hasVisibleOptions){var e=H()(this.visibleOptionIds);this.setCurrentHighlightedOption(this.getNode(e))}},resetSearchQuery:function(){this.trigger.searchQuery=""},closeMenu:function(){!this.menu.isOpen||!this.disabled&&this.alwaysOpen||(this.saveMenuScrollPosition(),this.menu.isOpen=!1,this.toggleClickOutsideEvent(!1),this.resetSearchQuery(),this.$emit("close",this.getValue(),this.getInstanceId()))},openMenu:function(){this.disabled||this.menu.isOpen||(this.menu.isOpen=!0,this.$nextTick(this.resetHighlightedOptionWhenNecessary),this.$nextTick(this.restoreMenuScrollPosition),this.options||this.async||this.loadRootOptions(),this.toggleClickOutsideEvent(!0),this.$emit("open",this.getInstanceId()))},toggleMenu:function(){this.menu.isOpen?this.closeMenu():this.openMenu()},toggleExpanded:function(e){var t;this.localSearch.active?(t=e.isExpandedOnSearch=!e.isExpandedOnSearch,t&&(e.showAllChildrenOnSearch=!0)):t=e.isExpanded=!e.isExpanded,t&&!e.childrenStates.isLoaded&&this.loadChildrenOptions(e)},buildForestState:function(){var e=this,t=q();this.forest.selectedNodeIds.forEach((function(e){t[e]=!0})),this.forest.selectedNodeMap=t;var r=q();this.multiple&&(this.traverseAllNodesByIndex((function(e){r[e.id]=X})),this.selectedNodes.forEach((function(t){r[t.id]=te,e.flat||e.disableBranchNodes||t.ancestors.forEach((function(t){e.isSelected(t)||(r[t.id]=ee)}))}))),this.forest.checkedStateMap=r},enhancedNormalizer:function(e){return _e({},e,{},this.normalizer(e,this.getInstanceId()))},normalize:function(e,t,r){var n=this,o=t.map((function(e){return[n.enhancedNormalizer(e),e]})).map((function(t,o){var i=a()(t,2),s=i[0],c=i[1];n.checkDuplication(s),n.verifyNodeShape(s);var u=s.id,d=s.label,f=s.children,m=s.isDefaultExpanded,h=e===Z,g=h?0:e.level+1,v=Array.isArray(f)||null===f,b=!v,y=!!s.isDisabled||!n.flat&&!h&&e.isDisabled,w=!!s.isNew,_=n.matchKeys.reduce((function(e,t){return _e({},e,l()({},t,ke(s[t]).toLocaleLowerCase()))}),{}),x=h?_.label:e.nestedSearchLabel+" "+_.label,S=n.$set(n.forest.nodeMap,u,q());if(n.$set(S,"id",u),n.$set(S,"label",d),n.$set(S,"level",g),n.$set(S,"ancestors",h?[]:[e].concat(e.ancestors)),n.$set(S,"index",(h?[]:e.index).concat(o)),n.$set(S,"parentNode",e),n.$set(S,"lowerCased",_),n.$set(S,"nestedSearchLabel",x),n.$set(S,"isDisabled",y),n.$set(S,"isNew",w),n.$set(S,"isMatched",!1),n.$set(S,"isHighlighted",!1),n.$set(S,"isBranch",v),n.$set(S,"isLeaf",b),n.$set(S,"isRootNode",h),n.$set(S,"raw",c),v){var O,k=Array.isArray(f);n.$set(S,"childrenStates",_e({},Oe(),{isLoaded:k})),n.$set(S,"isExpanded","boolean"===typeof m?m:g=0&&a.top<=i||a.top<0&&a.bottom>0,u=l>o+ye,d=s>o+ye;c?"auto"!==e.openDirection?e.menu.placement=Xt[e.openDirection]:e.menu.placement=u||!d?"bottom":"top":e.closeMenu()}},setupMenuSizeWatcher:function(){var e=this.instance,t=e.getMenu();this.menuSizeWatcher||(this.menuSizeWatcher={remove:j(t,this.adjustMenuOpenDirection)})},setupMenuResizeAndScrollEventListeners:function(){var e=this.instance,t=e.getControl();this.menuResizeAndScrollEventListeners||(this.menuResizeAndScrollEventListeners={remove:D(t,this.adjustMenuOpenDirection)})},removeMenuSizeWatcher:function(){this.menuSizeWatcher&&(this.menuSizeWatcher.remove(),this.menuSizeWatcher=null)},removeMenuResizeAndScrollEventListeners:function(){this.menuResizeAndScrollEventListeners&&(this.menuResizeAndScrollEventListeners.remove(),this.menuResizeAndScrollEventListeners=null)}},render:function(){var e=arguments[0];return e("div",{ref:"menu-container",class:"vue-treeselect__menu-container",style:this.menuContainerStyle},[e("transition",{attrs:{name:"vue-treeselect__menu--transition"}},[this.renderMenu()])])}},tr=er,rr=$e(tr,Yt,Kt,!1,null,null,null);rr.options.__file="src/components/Menu.vue";var nr=rr.exports,ar=r(14),or=r.n(ar);function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sr(e){for(var t=1;t=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){f(o,n,a,i,s,"next",e)}function s(e){f(o,n,a,i,s,"throw",e)}i(void 0)}))}}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=e.upperLimit?r(new Error(1===e.type?"保底库存必须小于封顶库存":"封顶库存必须大于保底库存")):void r():r(new Error("请输入数字值")):r(new Error(1===e.type?"请输入保底数量":"请输入封顶数量"))},loading:!0,type:"",warehouses:[],agencyOptions:[],categoryOptions:[],goodsTemplatelOptions:[],modelsOptions:[],formData:{warehouseType:0,baseWarehouseId:"",baseCategoryIds:"",baseCategoryId:"",baseGoodsTemplateId:"",modelsIds:[],models:[]},rules:{baseWarehouseId:[{required:!0,message:"请选择预警仓库",trigger:"change"}],baseCategoryId:[{required:!0,message:"请选择物品分类",trigger:"change"}],baseGoodsTemplateId:[{required:!0,message:"请选择物品",trigger:"change"}],modelsIds:[{required:!0,message:"请选择规格型号",trigger:"change"}],lowerLimit:[{required:!0,message:"请输入",trigger:"blur"},{type:"number",message:"请输入数字值",trigger:"blur"}],upperLimit:[{required:!0,message:"请输入",trigger:"blur"},{type:"number",message:"请输入数字值",trigger:"blur"}]}}},computed:h({},Object(c["b"])(["userInfo"])),created:function(){this.init()},methods:{init:function(){var e=p(d().mark((function e(){var t,r;return d().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getWarehouseList();case 2:return e.next=4,this.getCategoryTree();case 4:if(!this.setting.id){e.next=18;break}return this.type="edit",e.next=8,Object(l["e"])({id:this.setting.id});case 8:return t=e.sent,e.next=11,Object(s["o"])({baseGoodsModelsId:t.baseGoodsModelsId});case 11:r=e.sent,t.baseCategoryId=r[0].categoryId,this.getgoodsTemplate(t.baseCategoryId),this.getgoodsModel(t.baseGoodsTemplateId),this.formData=Object.assign({},t),this.formData.modelsIds=[t.baseGoodsModelsId],this.getWarehouseList();case 18:this.loading=!1;case 19:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getWarehouseList:function(){var e=this;Object(s["p"])({agencyId:this.userInfo.tenantId}).then((function(t){e.warehouses=t,e.warehouses.length&&!e.formData.baseWarehouseId&&(e.formData.baseWarehouseId=e.warehouses[0].id)})).catch((function(e){console.log("err",e)}))},getCategoryTree:function(){var e=this;return new Promise(function(){var t=p(d().mark((function t(r){var n;return d().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(s["k"])();case 2:n=t.sent,e.categoryOptions=e.removeEmptyChildren(n),r();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},getgoodsTemplate:function(e){var t=this;Object(s["n"])({categoryId:e||"",agencyId:this.userInfo.tenantId}).then((function(e){t.goodsTemplatelOptions=e}))},getgoodsModel:function(e){var t=this;Object(s["m"])({goodsTemplatesId:e||""}).then((function(e){t.modelsOptions=e}))},getGoodsModelsName:function(e){var t=this.modelsOptions.find((function(t){return t.id==e}));if(t)return t.modelName},categoryChange:function(e){this.goodsTemplatelOptions=[],this.modelsOptions=[],this.formData.baseGoodsTemplateId="",this.formData.modelsIds=[],this.formData.models=[],this.getgoodsTemplate(e)},goodsTemplateChange:function(e){this.formData.modelsIds=[],this.formData.models=[],this.formData.baseGoodsTemplateId=e,this.getgoodsModel(e)},removeEmptyChildren:function(e){var t=this;return e.forEach((function(e){e.children&&e.children.length?t.removeEmptyChildren(e.children):delete e.children})),e},modelChange:function(e){var t=this.formData.models,r=JSON.stringify(t);e.forEach((function(e,n){r&&!r.includes(e)&&t.push({baseGoodsModelsId:e,lowerLimit:null,upperLimit:null})}))},modelRemoveTag:function(e){if(-1!==e){var t=this.formData.models.findIndex((function(t){return t.baseGoodsModelsId==e}));this.formData.models.splice(t,1)}else this.formData.models=[]},getEditInfo:function(e){},close:function(){this.$emit("close")},save:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(t){if(e.loading)return;if(e.loading=!0,e.setting.id){var r={id:e.setting.id,lowerLimit:e.formData.lowerLimit,upperLimit:e.formData.upperLimit};Object(l["g"])(r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,e.$message.error("保存失败")}))}else{var n={warehouseType:e.formData.warehouseType,baseWarehouseId:e.formData.baseWarehouseId,baseGoodsTemplateId:e.formData.baseGoodsTemplateId,modelConfigStr:JSON.stringify(e.formData.models)};Object(l["d"])(n).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,e.$message.error("保存失败")}))}}else e.$message.error("校验未通过,请检查。")}))}}},w=y,_=r("2877"),x=Object(_["a"])(w,n,a,!1,null,null,null);t["default"]=x.exports},db9e:function(e,t,r){},dc72:function(e,t,r){"use strict";r("0c55")},de19:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-sm",{attrs:{title:e.setting.title,width:"800px",loading:e.loading},on:{close:e.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.formData,rules:e.rules,"label-width":"100px"}},[e.setting.pid?r("el-form-item",{key:e.key,attrs:{label:"上级分类",prop:"fatherCategoryName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{clearable:"",maxlength:"20","show-word-limit":"",disabled:""},model:{value:e.formData.fatherCategoryName,callback:function(t){e.$set(e.formData,"fatherCategoryName",t)},expression:"formData.fatherCategoryName"}})],1):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"分类名称",prop:"categoryName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入分类名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:e.formData.categoryName,callback:function(t){e.$set(e.formData,"categoryName",t)},expression:"formData.categoryName"}})],1),e._v(" "),2==e.plevels?r("el-form-item",{attrs:{label:"价值类别",prop:"classification"}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择价值类别",clearable:""},model:{value:e.formData.classification,callback:function(t){e.$set(e.formData,"classification",t)},expression:"formData.classification"}},e._l(e.options,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1):e._e(),e._v(" "),r("el-form-item",{attrs:{label:"顺序",prop:"orderNumber"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{type:"number",placeholder:"请填写顺序号",clearable:"",maxlength:"20","show-word-limit":""},model:{value:e.formData.orderNumber,callback:function(t){e.$set(e.formData,"orderNumber",t)},expression:"formData.orderNumber"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"states"}},[r("el-radio-group",{model:{value:e.formData.states,callback:function(t){e.$set(e.formData,"states",t)},expression:"formData.states"}},[r("el-radio",{attrs:{label:1,border:""}},[e._v("启用")]),e._v(" "),r("el-radio",{attrs:{label:0,border:""}},[e._v("禁用")])],1)],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.save}})],1)],1)},a=[],o=r("e694"),i=r("f6e8"),s=r("6ec5"),l=r("aa3a"),c=r("c56b"),u={components:{winSm:o["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!1,checkAll:!1,checkedList:[],options:[],formData:{fatherCategoryId:"",fatherCategoryName:"",categoryName:"",classification:"",orderNumber:"",states:1},rules:{fatherCategoryName:[{required:!0,message:"请输入",trigger:"blur"}],categoryName:[{required:!0,message:"请输入",trigger:"blur"}],classification:[{required:!0,message:"请选择",trigger:"change"}],orderNumber:[{required:!0,message:"请输入",trigger:"blur"}]},key:Math.random(),plevels:1}},created:function(){var e=this;"编辑"==this.setting.title?this.formData=Object.assign({},JSON.parse(this.setting.info)):this.formData.fatherCategoryId=this.setting.pid,this.getCategoryName(),Object(l["d"])("GOODS_PRICE").then((function(t){e.options=t.map((function(e){return e.label=e.dict_label,e.value=e.dict_value,e}))}))},methods:{getEditInfo:function(e){},getCategoryName:function(){var e=this;this.formData.fatherCategoryId&&Object(c["a"])({id:this.formData.fatherCategoryId}).then((function(t){e.formData.fatherCategoryName=t.categoryName,e.key=Math.random(),e.plevels=t.levels}))},close:function(){this.$emit("close")},save:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(t){var r=Object.assign({},e.formData);if(e.loading)return;e.loading=!0,e.setting.id?s["g"](r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1})):(r.orgId=e.setting.orgId,s["a"](r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})))}else e.$message.error("校验未通过,请检查。")}))}}},d=u,f=r("2877"),p=Object(f["a"])(d,n,a,!1,null,null,null);t["default"]=p.exports},de37:function(e,t,r){"use strict";r.r(t),t["default"]=[{type:"text",dataIndex:"categoryName",label:"分类名称",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"classification",label:"类别",placeholder:"请选择",defaultValue:"",options:[]},{type:"select",dataIndex:"states",label:"状态",placeholder:"请选择",defaultValue:"1",options:[{label:"启用",value:"1"},{label:"禁用",value:"0"}]}]},de42:function(e,t,r){"use strict";r("7bdd")},df0f:function(e,t,r){"use strict";r.r(t);var n=function(e,t){var r=document.createElement("_"),n=r.appendChild(document.createElement("_")),a=r.appendChild(document.createElement("_")),o=n.appendChild(document.createElement("_")),i=void 0,s=void 0;return n.style.cssText=r.style.cssText="height:100%;left:0;opacity:0;overflow:hidden;pointer-events:none;position:absolute;top:0;transition:0s;width:100%;z-index:-1",o.style.cssText=a.style.cssText="display:block;height:100%;transition:0s;width:100%",o.style.width=o.style.height="200%",e.appendChild(r),l(),u;function l(){c();var o=e.offsetWidth,u=e.offsetHeight;o===i&&u===s||(i=o,s=u,a.style.width=2*o+"px",a.style.height=2*u+"px",r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight,t({width:o,height:u})),n.addEventListener("scroll",l),r.addEventListener("scroll",l)}function c(){n.removeEventListener("scroll",l),r.removeEventListener("scroll",l)}function u(){c(),e.removeChild(r)}};t["default"]=n},e0ef:function(e,t,r){var n=r("4b17"),a="Expected a function";function o(e,t){var r;if("function"!=typeof t)throw new TypeError(a);return e=n(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}e.exports=o},e134:function(e,t,r){"use strict";r("18db")},e2f2:function(e,t,r){},e34e:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-edit",attrs:{title:"物品报废",width:"900px",loading:e.loading},on:{close:e.close}},[r("el-form",{ref:"ruleForm",staticClass:"form",attrs:{model:e.formData,rules:e.rules,"label-width":"120px"}},[r("div",{staticClass:"main-w"},[r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"部门",prop:"departmentId"}},[r("el-select",{ref:"department",staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择"},model:{value:e.formData.departmentId,callback:function(t){e.$set(e.formData,"departmentId",t)},expression:"formData.departmentId"}},e._l(e.departmentOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.name,value:e.id,clearable:""}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报废人",prop:"operatorName"}},[r("el-input",{attrs:{disabled:""},model:{value:e.formData.operatorName,callback:function(t){e.$set(e.formData,"operatorName",t)},expression:"formData.operatorName"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"报废时间",prop:"dealTime"}},[r("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"datetime",value:"yyyy-MM-dd HH:mm:ss","value-format":"yyyyMMddHHmmss",placeholder:"请选择日期"},model:{value:e.formData.dealTime,callback:function(t){e.$set(e.formData,"dealTime",t)},expression:"formData.dealTime"}})],1)],1)],1),e._v(" "),r("el-row",{staticClass:"headerHeight",attrs:{gutter:24}},[r("el-col",{attrs:{span:24}},[r("el-form-item",{attrs:{label:"报废审批手续",prop:"procureDoc"}},[r("upload",{ref:"uploadRef",attrs:{settings:e.uploadSettings},on:{"on-change":e.uploadChange}})],1)],1)],1),e._v(" "),e._l(e.formData.goods,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:24}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品分类",prop:"goods."+n+".baseCategoryId",rules:{required:!0,message:"请选择物品分类",trigger:"change"}}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{options:e.categoryOptions,props:{value:"id",emitPath:!1},"show-all-levels":!1,filterable:"",clearable:""},on:{change:function(t){return e.categoryChange(t,n)}},model:{value:t.baseCategoryId,callback:function(r){e.$set(t,"baseCategoryId",r)},expression:"goodsItem.baseCategoryId"}})],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"物品名称",prop:"goods."+n+".baseGoodsTemplateId",rules:e.rules.baseGoodsTemplateId}},[r("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:t.baseCategoryId?"请选择物品":"请先选择物品分类",filterable:"",clearable:"",disabled:!t.baseCategoryId},on:{change:function(t){return e.goodsTemplateChange(t,n)}},model:{value:t.baseGoodsTemplateId,callback:function(r){e.$set(t,"baseGoodsTemplateId",r)},expression:"goodsItem.baseGoodsTemplateId"}},e._l(t.goodsOptions,(function(e){return r("el-option",{key:e.id,attrs:{label:e.goodsName,value:e.id}})})),1)],1)],1),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-form-item",{attrs:{label:"选择分发单",prop:"goods."+n+".businessFormCode",rules:e.rules.businessFormCode}},[r("div",{on:{click:function(t){return e.showFenFa(n)}}},[r("el-input",{staticClass:"cursor-p",attrs:{placeholder:"请选择分发单",readonly:"",placeholder:t.baseGoodsTemplateId?"请选择分发单":"请先选择物品",disabled:!t.baseGoodsTemplateId,"suffix-icon":"el-icon-arrow-down"},model:{value:t.businessFormCode,callback:function(r){e.$set(t,"businessFormCode",r)},expression:"goodsItem.businessFormCode"}})],1)])],1)],1),e._v(" "),e._l(t.models,(function(t,a){return r("div",{key:a,staticClass:"card3"},[r("el-row",{staticStyle:{height:"50px"},attrs:{gutter:24,type:"flex",align:"middle"}},[r("el-col",{attrs:{span:12}},[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"规格型号:",prop:"baseGoodsModelsId"}},[e._v("\n "+e._s(t[0].modelName)+"\n ")])],1),e._v(" "),r("el-col",{attrs:{span:6}},[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"单位:",prop:"baseGoodsModelsId","label-width":"80"}},[e._v("\n "+e._s(t[0].unit)+"\n ")])],1),e._v(" "),r("el-col",{attrs:{span:6}},[r("el-form-item",{staticStyle:{"margin-bottom":"0"},attrs:{label:"物品类别:",prop:"baseGoodsModelsId","label-width":"80"}},[e._v("\n "+e._s(t[0].classification)+"\n ")])],1)],1),e._v(" "),r("el-table",{attrs:{data:t,stripe:!0}},[t[0].nowUserName?r("el-table-column",{attrs:{width:"100",prop:"price",label:"使用人",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.nowUserName)+"\n ")]}}],null,!0)}):e._e(),e._v(" "),r("el-table-column",{attrs:{width:"100",prop:"price",label:"分发数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.goodsNum)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{width:"100",prop:"price",label:"在用数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.userUseCount)+"\n ")]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"报废数量",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;t.$index;return[r("el-form-item",{attrs:{"label-width":"0",prop:"goods."+n+".models."+a+".counts",rules:[{validator:e.checkCounts,counts:o.counts,userUseCount:o.userUseCount,trigger:["blur","change"]}]}},[r("el-input",{attrs:{clearable:"",type:"number"},model:{value:o.counts,callback:function(t){e.$set(o,"counts",e._n(t))},expression:"row.counts"}})],1)]}}],null,!0)}),e._v(" "),r("el-table-column",{attrs:{prop:"counts",label:"报废原因",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;t.$index;return[r("el-form-item",{attrs:{"label-width":"0",prop:"goods."+n+".models."+a+".scrappedCode",rules:[{validator:e.checkReason,counts:o.counts,scrappedCode:o.scrappedCode,trigger:["blur","change"]}]}},[r("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:o.scrappedCode,callback:function(t){e.$set(o,"scrappedCode",t)},expression:"row.scrappedCode"}},e._l(e.scrapReasonOptions,(function(e){return r("el-option",{key:e.dict_code,attrs:{label:e.dict_label,value:e.dict_code}})})),1)],1)]}}],null,!0)})],1)],1)})),e._v(" "),r("div",{staticClass:"btn-group"},[e.formData.goods.length>1?r("el-button",{attrs:{name:"移除",type:"danger",plain:"",size:"mini"},on:{click:function(t){return e.removeGoods(n)}}},[e._v("移除\n ")]):e._e(),e._v(" "),e.formData.goods.length-1==n?r("el-button",{attrs:{name:"新增物品",type:"primary",plain:"",size:"mini"},on:{click:e.addGoods}},[e._v("新增物品\n ")]):e._e()],1)],2)}))],2)]),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:e.close}}),e._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:e.handleSubmit}})],1),e._v(" "),e.fenfaSetting.show?r("win-md",{attrs:{title:"选择分发单",width:"800px"},on:{close:function(t){e.fenfaSetting.show=!1}}},[r("el-table",{attrs:{data:e.fenfaData,"highlight-current-row":"",height:"407"},on:{"current-change":e.handleCurrentChange}},[r("el-table-column",{attrs:{label:"分发单号",prop:"businessFormCode",align:"left"}}),e._v(" "),r("el-table-column",{attrs:{label:"物品名称",prop:"baseGoodsTemplateName",align:"left"}}),e._v(" "),r("el-table-column",{attrs:{label:"分发数量",prop:"totalCount",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"剩余数量",prop:"useCount",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"分发时间",prop:"inTime",width:"160",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[e._v("\n "+e._s(e.DateFormatter.LongToDateTime(r.inTime))+"\n ")]}}],null,!1,1576381030)})],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:function(t){e.fenfaSetting.show=!1,e.fenfaSetting.baseGoodsTemplateId=null,e.curFenfa=null,e.fenfaData=[]}}}),e._v(" "),r("el-button",{attrs:{type:"primary",size:"medium"},on:{click:e.handleConfirm}},[e._v("确定")])],1)],1):e._e()],1)},a=[],o=r("8eb74"),i=r("6ec5"),s=r("6f82"),l=r("c56b"),c=r("f6e8"),u=r("f76d"),d=r("e694"),f=r("decf"),p=r("dee4"),m=r("2f62"),h=r("6f7e"),g=r("aa3a");function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof y?t:y,i=Object.create(o.prototype),s=new L(n||[]);return a(i,"_invoke",{value:j(e,r,s)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",p="suspendedYield",m="executing",h="completed",g={};function y(){}function w(){}function _(){}var x={};c(x,i,(function(){return this}));var S=Object.getPrototypeOf,O=S&&S(S(P([])));O&&O!==r&&n.call(O,i)&&(x=O);var k=_.prototype=y.prototype=Object.create(x);function C(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function I(e,t){function r(a,o,i,s){var l=d(e[a],e,o);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,s)}),(function(e){r("throw",e,i,s)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,s)}))}s(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function j(t,r,n){var a=f;return function(o,i){if(a===m)throw Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var s=n.delegate;if(s){var l=T(s,n);if(l){if(l===g)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=m;var c=d(t,r,n);if("normal"===c.type){if(a=n.done?h:p,c.arg===g)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=h,n.method="throw",n.arg=c.arg)}}}function T(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,g;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function D(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(N,this),this.reset(!0)}function P(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function y(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){y(o,n,a,i,s,"next",e)}function s(e){y(o,n,a,i,s,"throw",e)}i(void 0)}))}}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;te.userUseCount?r(new Error("报废数量不能大于在用数量")):void r():r(new Error("请输入数字值")):r()},checkReason:function(e,t,r){if(e.counts&&!e.scrappedCode)return r(new Error("请选择报废原因"));r()},DateFormatter:h,loading:!0,departmentOptions:[],categoryOptions:[],modelList:[],fenfaSetting:{show:!1,goodsIdx:null,baseGoodsTemplateId:null,id:""},curFenfa:null,fenfaData:[],formData:{departmentId:"",dealTime:h["formatDate"](new Date,"yyyyMMddhhmmss"),procureDoc:"",goods:[]},goodsItem:{businessFormCode:"",transBusinessId:"",baseCategoryId:"",baseGoodsTemplateId:"",goodsTemplateName:"",goodsOptions:[],models:[]},modelsItem:{baseGoodsModelsId:"",worehouseCount:0,counts:null,unit:null},rules:{departmentId:[{required:!0,message:"请选择部门",trigger:"change"}],dealTime:[{required:!0,message:"请选择",trigger:"change"}],procureDoc:[{required:!0,message:"请上传",trigger:"change"}],baseCategoryId:[{required:!0,message:"请选择",trigger:"change"}],baseGoodsTemplateId:[{required:!0,message:"请选择物品",trigger:"change"}],businessFormCode:[{required:!0,message:"请选择分发单",trigger:"change"}],counts:[{required:!0,message:"请输入",trigger:"change"}],reason:[{required:!0,message:"请选择",trigger:"change"}]},uploadSettings:{title:"上传",max:20,num:10,tip:"",uploadUrl:Object(p["d"])(),multiple:!0,disabled:!1},scrapReasonOptions:[]}},computed:x({},Object(m["b"])(["userInfo"])),created:function(){this.init()},methods:{init:function(){var e=w(b().mark((function e(){var t,r=this;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.getdeptmentList();case 2:return e.next=4,Object(l["b"])();case 4:t=e.sent,this.categoryOptions=this.removeEmptyChildren(t),this.getgoodsTemplate(),this.formData.departmentId=this.userInfo.sysDeptId,this.formData.operatorName=this.userInfo.userName,this.loading=!1,Object(g["d"])("SCRAP_REASON").then((function(e){r.scrapReasonOptions=e}));case 11:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),getdeptmentList:function(){var e=w(b().mark((function e(){var t=this;return b().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(o["d"])({tenantId:this.userInfo.tenantId}).then((function(e){t.departmentOptions=e,t.formData.goods.push(JSON.parse(JSON.stringify(t.goodsItem)))})).catch((function(e){console.log("err",e)}));case 2:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}(),removeEmptyChildren:function(e){var t=this;return e.forEach((function(e){e.children&&e.children.length?t.removeEmptyChildren(e.children):delete e.children})),e},getgoodsTemplate:function(e,t){var r=this;Object(i["n"])({categoryId:e||""}).then((function(e){t||0==t?r.$set(r.formData.goods[t],"goodsOptions",e):r.goodsTemplatelAll=e}))},getGoodsTemplateName:function(e){var t=this.goodsTemplatelAll.find((function(t){return t.id==e}));if(t)return t.goodsName},getGoodsModelsName:function(e){var t=this.goodsModelAll.find((function(t){return t.id==e}));if(t)return t.modelName},categoryChange:function(e,t){this.formData.goods[t].goodsOptions=[],this.formData.goods[t].baseGoodsTemplateId="",this.formData.goods[t].businessFormCode="",this.formData.goods[t].goodsTemplateName="",this.formData.goods[t].models=[],this.getgoodsTemplate(e,t)},goodsTemplateChange:function(e,t){this.formData.goods[t].models=[],this.formData.goods[t].goodsTemplateName=this.getGoodsTemplateName(e),this.formData.goods[t].businessFormCode=""},showFenFa:function(e){var t=this;this.loading=!0,Object(s["a"])({departmentId:this.formData.departmentId,baseGoodsTemplateId:this.formData.goods[e].baseGoodsTemplateId}).then((function(r){t.loading=!1,r&&0!==r.length?(t.fenfaSetting.show=!0,t.fenfaSetting.baseGoodsTemplateId=t.formData.goods[e].baseGoodsTemplateId,t.fenfaSetting.goodsIdx=e,t.fenfaData=r):t.$message.error("未查询到可以报废的分发单")})).catch((function(e){t.loading=!1}))},uploadChange:function(){var e=this.$refs.uploadRef.fileList;this.formData.procureDoc=JSON.stringify(e)},addGoods:function(){this.formData.goods.push(JSON.parse(JSON.stringify(this.goodsItem)))},removeGoods:function(e){this.formData.goods.splice(e,1)},handleCurrentChange:function(e){this.curFenfa=e},handleConfirm:function(){var e=this;if(this.curFenfa){var t=this.formData.goods.findIndex((function(t){return t.businessFormCode==e.curFenfa.businessFormCode})),r=this.formData.goods.findIndex((function(t){return t.baseGoodsTemplateId==e.fenfaSetting.baseGoodsTemplateId}));-1===r||r===this.fenfaSetting.goodsIdx||-1===t||t===this.fenfaSetting.goodsIdx?Object(s["b"])({transBusinessId:this.curFenfa.transBusinessId,baseGoodsTemplateId:this.fenfaSetting.baseGoodsTemplateId}).then((function(t){if(t){var r=[];for(var n in t){var a=t[n];a.map((function(e){e.counts=null,e.scrappedCode=null})),r.push(a)}e.formData.goods[e.fenfaSetting.goodsIdx].models=r,e.formData.goods[e.fenfaSetting.goodsIdx].businessFormCode=e.curFenfa.businessFormCode,e.formData.goods[e.fenfaSetting.goodsIdx].transBusinessId=e.curFenfa.transBusinessId}e.fenfaSetting.show=!1})):this.$message.error("同一个物品不能选择相同的分发单")}else this.$message.error("请选择分发单")},handleSubmit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(t){var r=JSON.parse(JSON.stringify(e.formData));if(r.goods.map((function(e){delete e.goodsOptions;var t=[];e.models.map((function(e){e.map((function(e){e.counts&&e.counts>0&&t.push(e)}))})),e.models=t})),r.goods=r.goods.filter((function(e){return e.models.length>0})),0===r.goods.length)return void e.$message.error("请至少填写一个报废物品");if(e.loading)return;e.loading=!0,Object(s["c"])(r).then((function(t){e.loading=!1,e.$message.success("保存成功!"),e.close(),e.$emit("search")})).catch((function(t){e.loading=!1,e.$message.error("保存失败")}))}else e.$message.error("校验未通过,请检查。")}))},close:function(){this.formData={warehouseId:"",dealTime:"",goods:[]},this.$emit("close")}}},I=C,j=(r("1294"),r("2877")),T=Object(j["a"])(I,n,a,!1,null,"59a0160c",null);t["default"]=T.exports},e3f8:function(e,t,r){"use strict";r("7297")},e3fa:function(e,t,r){"use strict";r("d4df")},e50d:function(e,t,r){var n=r("7037")["default"];function a(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var a=r.call(e,t||"default");if("object"!=n(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}e.exports=a,e.exports.__esModule=!0,e.exports["default"]=e.exports},e526:function(e,t,r){},e554:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"projectYear",staticStyle:{width:"100%",height:"100%"}})},a=[],o=r("313e"),i=r.n(o),s=r("51ef"),l={name:"project-year",data:function(){return{loading:!0}},mounted:function(){var e=this,t=i.a.init(this.$refs.projectYear);window.addEventListener("resize",(function(){e.$nextTick((function(){t.resize()}))})),s["a"].queryProjectYear().then((function(t){console.log("resqueryProjectYear",t),e.loading=!1})),t.setOption({tooltip:{trigger:"axis"},grid:{right:20,left:50,top:30,bottom:20},legend:{right:0,top:0,textStyle:{color:"#ADB1B4",fontSize:13}},xAxis:[{type:"category",axisLine:{lineStyle:{color:"#0D496E"}},axisLabel:{show:!0,textStyle:{fontSize:12,color:"#ADB1B4"}},data:["2017年","2018年","2018年","2019年"]},{type:"category",show:!1,data:["2017年","2018年","2018年","2019年"]}],yAxis:{type:"value",splitLine:{show:!1},axisLine:{show:!1},axisLabel:{show:!0,textStyle:{fontSize:12,color:"#ADB1B4"}}},series:[{name:"完工项目",data:[256,856,354,26],type:"bar",barWidth:10,itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#E8B351"},{offset:1,color:"#DBA33A"}],global:!1}}},{name:"新增项目",data:[56,856,54,26],type:"bar",barWidth:10,itemStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"#00F0FF"},{offset:1,color:"#23ACE6"}],global:!1}}},{tooltip:{show:!1},xAxisIndex:1,itemStyle:{color:"rgba(180, 180, 180, 0.2)"},data:[1e3,1e3,1e3,1e3],barWidth:48,emphasis:{itemStyle:{color:{type:"linear",x:0,x2:0,y:0,y2:1,colorStops:[{offset:0,color:"rgba(64, 247, 176, 0.25)"},{offset:1,color:"rgba(17, 34, 64, 0.25)"}]}}},type:"bar"}]})}},c=l,u=r("2877"),d=Object(u["a"])(c,n,a,!1,null,null,null);t["default"]=d.exports},e58d:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"divBox"},[r("el-card",{staticClass:"box-card"},[r("el-form",{directives:[{name:"show",rawName:"v-show",value:e.showSearch,expression:"showSearch"}],ref:"queryForm",attrs:{model:e.queryParams,size:"small",inline:!0,"label-width":"68px"}},[r("el-form-item",{attrs:{label:"字典名称",prop:"dictType"}},[r("el-select",{model:{value:e.queryParams.dictType,callback:function(t){e.$set(e.queryParams,"dictType",t)},expression:"queryParams.dictType"}},e._l(e.typeOptions,(function(e){return r("el-option",{key:e.dict_id,attrs:{label:e.dict_name,value:e.dict_type}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"字典标签",prop:"dictLabel"}},[r("el-input",{attrs:{placeholder:"请输入字典标签",clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleQuery(t)}},model:{value:e.queryParams.dictLabel,callback:function(t){e.$set(e.queryParams,"dictLabel",t)},expression:"queryParams.dictLabel"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-select",{attrs:{placeholder:"数据状态",clearable:""},model:{value:e.queryParams.status,callback:function(t){e.$set(e.queryParams,"status",t)},expression:"queryParams.status"}},e._l(e.constants.normalOrDisabled,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)],1),e._v(" "),r("el-form-item",[r("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),r("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),r("el-row",{staticClass:"mb8",attrs:{gutter:10}},[r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:add"],expression:"['system:dict:add']"}],attrs:{type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.handleAdd}},[e._v("新增")])],1),e._v(" "),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],attrs:{type:"danger",plain:"",icon:"el-icon-delete",size:"mini",disabled:e.multiple},on:{click:e.handleDelete}},[e._v("删除")])],1),e._v(" "),r("el-col",{attrs:{span:1.5}},[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:export"],expression:"['system:dict:export']"}],attrs:{type:"warning",plain:"",icon:"el-icon-download",size:"mini"},on:{click:e.handleExport}},[e._v("导出")])],1),e._v(" "),r("el-col",{attrs:{span:1.5}},[r("el-button",{attrs:{type:"warning",plain:"",icon:"el-icon-close",size:"mini"},on:{click:e.handleClose}},[e._v("关闭")])],1)],1),e._v(" "),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{data:e.dataList},on:{"selection-change":e.handleSelectionChange}},[r("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{label:"字典ID",align:"center",prop:"dict_code"}}),e._v(" "),r("el-table-column",{attrs:{label:"字典名称",align:"center",prop:"dict_label"},scopedSlots:e._u([{key:"default",fn:function(t){return[""==t.row.list_class||"default"==t.row.list_class?r("span",[e._v(e._s(t.row.dict_label))]):r("el-tag",{attrs:{type:"primary"==t.row.list_class?"":t.row.list_class}},[e._v(e._s(t.row.dict_label))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"字典值",align:"center",prop:"dict_value"}}),e._v(" "),r("el-table-column",{attrs:{label:"排序",align:"center",prop:"dict_sort"}}),e._v(" "),r("el-table-column",{attrs:{label:"状态",align:"center",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("span",[e._v(e._s(0==t.row.status?"正常":"禁用"))])]}}])}),e._v(" "),r("el-table-column",{attrs:{label:"父id",align:"center",prop:"parent_id"}}),e._v(" "),r("el-table-column",{attrs:{label:"备注",align:"center",prop:"remark","show-overflow-tooltip":!0}}),e._v(" "),r("el-table-column",{attrs:{label:"创建时间",align:"center",prop:"create_time",width:"180"}}),e._v(" "),r("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:edit"],expression:"['system:dict:edit']"}],attrs:{size:"mini",type:"text",icon:"el-icon-edit"},on:{click:function(r){return e.handleUpdate(t.row)}}},[e._v("修改")]),e._v(" "),r("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["system:dict:remove"],expression:"['system:dict:remove']"}],attrs:{size:"mini",type:"text",icon:"el-icon-delete"},on:{click:function(r){return e.handleDelete(t.row)}}},[e._v("删除")])]}}])})],1),e._v(" "),r("el-pagination",{attrs:{"current-page":e.queryParams.pageNum,"page-sizes":e.constants.page.limit,layout:e.constants.page.layout,total:this.total},on:{"size-change":e.getList,"current-change":e.getList}})],1),e._v(" "),r("el-dialog",{attrs:{title:e.title,visible:e.open,width:"500px","before-close":e.cancel,"append-to-body":""},on:{"update:visible":function(t){e.open=t}}},[r("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"80px"}},[r("el-form-item",{attrs:{label:"字典ID"}},[r("el-input",{attrs:{disabled:!1,placeholder:"一个唯一数字"},model:{value:e.form.dict_code,callback:function(t){e.$set(e.form,"dict_code",t)},expression:"form.dict_code"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"字典类型"}},[r("el-input",{attrs:{disabled:!0},model:{value:e.form.dict_type,callback:function(t){e.$set(e.form,"dict_type",t)},expression:"form.dict_type"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"字典名称",prop:"dict_label"}},[r("el-input",{attrs:{placeholder:"请输入数据标签"},model:{value:e.form.dict_label,callback:function(t){e.$set(e.form,"dict_label",t)},expression:"form.dict_label"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"字典值",prop:"dict_value"}},[r("el-input",{attrs:{placeholder:"不填和字典ID一致"},model:{value:e.form.dict_value,callback:function(t){e.$set(e.form,"dict_value",t)},expression:"form.dict_value"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"样式属性",prop:"css_class"}},[r("el-input",{attrs:{placeholder:"请输入样式属性"},model:{value:e.form.css_class,callback:function(t){e.$set(e.form,"css_class",t)},expression:"form.css_class"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"显示排序",prop:"dict_sort"}},[r("el-input-number",{attrs:{"controls-position":"right",min:0},model:{value:e.form.dict_sort,callback:function(t){e.$set(e.form,"dict_sort",t)},expression:"form.dict_sort"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"回显样式",prop:"list_class"}},[r("el-select",{model:{value:e.form.list_class,callback:function(t){e.$set(e.form,"list_class",t)},expression:"form.list_class"}},e._l(e.listClassOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label+"("+e.value+")",value:e.value}})})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"status"}},[r("el-radio-group",{model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.constants.normalOrDisabled,(function(t){return r("el-radio",{key:t.value,attrs:{label:1*t.value}},[e._v(e._s(t.label))])})),1)],1),e._v(" "),r("el-form-item",{attrs:{label:"父字典ID",prop:"dict_label"}},[r("el-input",{attrs:{placeholder:"父字典id,必填"},model:{value:e.form.parent_id,callback:function(t){e.$set(e.form,"parent_id",t)},expression:"form.parent_id"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"备注",prop:"remark"}},[r("el-input",{attrs:{type:"textarea",placeholder:"请输入内容"},model:{value:e.form.remark,callback:function(t){e.$set(e.form,"remark",t)},expression:"form.remark"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("确 定")]),e._v(" "),r("el-button",{on:{click:e.cancel}},[e._v("取 消")])],1)],1)],1)},a=[],o=r("aa3a"),i=r("ed45");function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t0&&(e.tenantId=e.treeDataList[0].id,e.tenantName=e.treeDataList[0].label,e.tenantCode=e.treeDataList[0].code)}))},nodeClick:function(e){console.log(e,"param"),this.search(1)},fifterForm:function(e){this.queryParams=Object.assign(this.queryParams,e),this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},dateTo:function(e){return s["LongToDateTime"](e)},changeSize:function(e){this.queryParams.pageSize=e,this.getList()},changePage:function(e){this.queryParams.pageNum=e,this.getList()},getList:function(){var e=this;this.loading=!0,Object(i["d"])(this.queryParams).then((function(t){e.typeList=t.datas,e.total=t.totalRows,e.loading=!1}))},cancel:function(){this.open=!1,this.reset()},reset:function(){this.form={dictId:void 0,dictName:void 0,dictType:void 0,status:"0",remark:void 0},this.resetForm("form")},handleQuery:function(){this.queryParams.pageNum=1,this.getList()},resetQuery:function(){this.dateRange=[],this.resetForm("queryForm"),this.handleQuery()},handleAdd:function(){this.reset(),this.open=!0,this.title="添加字典类型"},handleSelectionChange:function(e){this.ids=e.map((function(e){return e.dictId})),this.single=1!=e.length,this.multiple=!e.length},handleUpdate:function(e){var t=this;this.reset();var r=e.dict_id||this.ids;Object(i["c"])(r).then((function(e){t.form=e,t.form.dictName=t.form.dict_name,t.form.dictType=t.form.dict_type,t.open=!0,t.title="修改字典类型"}))},submitForm:function(){var e=this;this.$refs["form"].validate((function(t){t&&(void 0!=e.form.dictId?Object(i["g"])(e.form).then((function(t){e.$modal.msgSuccess("修改成功"),e.open=!1,e.getList()})):Object(i["a"])(e.form).then((function(t){e.$modal.msgSuccess("新增成功"),e.open=!1,e.getList()})))}))},handleDelete:function(e){var t=this,r=e.dictId||this.ids;this.$modal.confirm('是否确认删除字典编号为"'+r+'"的数据项?').then((function(){return Object(i["b"])(r)})).then((function(){t.getList(),t.$modal.msgSuccess("删除成功")})).catch((function(){}))},handleExport:function(){this.download("system/dict/type/export",m({},this.queryParams),"type_".concat((new Date).getTime(),".xlsx"))},handleRefreshCache:function(){var e=this;Object(i["f"])().then((function(){e.$modal.msgSuccess("刷新成功"),e.$store.dispatch("dict/cleanDict")}))}}},y=b,w=r("2877"),_=Object(w["a"])(y,n,a,!1,null,null,null);t["default"]=_.exports},ef3c:function(e,t,r){"use strict";r.r(t);var n,a,o={created:function(){var e=this.$route,t=e.params,r=e.query,n=t.path;this.$router.replace({path:"/"+n,query:r})},render:function(e){return e()}},i=o,s=r("2877"),l=Object(s["a"])(i,n,a,!1,null,null,null);t["default"]=l.exports},efd6:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{ref:"form",staticStyle:{width:"500px",margin:"auto"},attrs:{model:e.user,rules:e.rules,"label-width":"80px"}},[n("el-form-item",{attrs:{label:"头像"}},[n("input",{staticStyle:{display:"none"},attrs:{id:"imgInput",type:"file",accept:"image/*"},on:{change:e.sendImg}}),e._v(" "),n("div",{staticClass:"avatar-box"},[n("el-avatar",{attrs:{size:100,src:e.user.avatar?e.getHead():r("7960")}}),e._v(" "),n("label",{staticClass:"upload",attrs:{for:"imgInput"}},[n("i",{staticClass:"el-icon-camera"})])],1)]),e._v(" "),n("el-form-item",{attrs:{label:"用户姓名",prop:"userName"}},[n("el-input",{attrs:{maxlength:"30"},model:{value:e.user.userName,callback:function(t){e.$set(e.user,"userName",t)},expression:"user.userName"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"登录名"}},[n("el-input",{attrs:{disabled:"",maxlength:"30"},model:{value:e.user.userCode,callback:function(t){e.$set(e.user,"userCode",t)},expression:"user.userCode"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"性别",required:""}},[n("el-radio-group",{model:{value:e.user.sex,callback:function(t){e.$set(e.user,"sex",t)},expression:"user.sex"}},[n("el-radio",{attrs:{label:1}},[e._v("男")]),e._v(" "),n("el-radio",{attrs:{label:0}},[e._v("女")])],1)],1),e._v(" "),n("el-form-item",{attrs:{label:"手机号码",prop:"userPhone"}},[n("el-input",{attrs:{maxlength:"11"},model:{value:e.user.userPhone,callback:function(t){e.$set(e.user,"userPhone",t)},expression:"user.userPhone"}})],1),e._v(" "),n("el-form-item",{attrs:{label:"邮箱",prop:"email"}},[n("el-input",{attrs:{maxlength:"50"},model:{value:e.user.email,callback:function(t){e.$set(e.user,"email",t)},expression:"user.email"}})],1),e._v(" "),n("el-form-item",[n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.submit}},[e._v("保存")]),e._v(" "),n("el-button",{attrs:{type:"danger",size:"mini"},on:{click:e.close}},[e._v("关闭")])],1)],1)},a=[],o=r("2f62"),i=r("c24f"),s=r("dee4");function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t="A"&&t<="Z"},showPwd:function(){var e=this;"password"===this.passwordType?this.passwordType="":this.passwordType="password",this.$nextTick((function(){e.$refs.pwd.focus()}))},handleLogin:function(){var e=this;this.$refs.loginForm.validate((function(t){if(!t)return!1;e.success(null)}))},success:function(e){var t=this;this.loginForm.captcha=this.$store.state.user.captcha;var r=this.$loading({lock:!0,text:"正在登录中."});this.$store.dispatch("user/login",this.loginForm).then((function(){t.$store.dispatch("user/getInfo").then((function(e){t.$router.push({path:t.redirect||"/dashboard",query:t.otherQuery}),r.close(),t.disabled=!0})).catch((function(e){r.close(),t.disabled=!1,t.$wechat.isPhone()&&t.$dialog.error(e.message),t.loginForm.code=null,t.getCode()}))})).catch((function(e){r.close(),t.disabled=!1,t.$wechat.isPhone()&&t.$dialog.error(e.message),t.loginForm.code=null,t.getCode()}))},getCode:function(){var e=this;"code"===this.loginForm.verifyType?Object(o["d"])().then((function(t){e.captchaEnabled=void 0===t.captchaEnabled||t.captchaEnabled,e.captchaEnabled&&(e.codeUrl="data:image/jpeg;base64,"+t.img),e.loginForm.uuid=t.uuid,e.showCaptchatImg=!1,setTimeout((function(){e.showCaptchatImg=!0}),27e4)})).catch((function(e){console.log(e)})):"jigsaw"===this.loginForm.verifyType?(this.loginForm.code="jigsaw",this.loginForm.uuid=""):"slide"===this.loginForm.verifyType||"sms"===this.loginForm.verifyType?Object(o["e"])().then((function(t){e.loginForm.uuid=t.uuid})).catch((function(e){console.error(e)})):this.$message.error("不支持的验证码类型:"+this.loginForm.verifyType)},getOtherQuery:function(e){return Object.keys(e).reduce((function(t,r){return"redirect"!==r&&(t[r]=e[r]),t}),{})}}},s=i,l=(r("1328"),r("7286"),r("2877")),c=Object(l["a"])(s,n,a,!1,null,"50724f27",null);t["default"]=c.exports},f146:function(e,t,r){},f1c5:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1),e._v(" "),e.editSetting.show?r("edit",{attrs:{setting:e.editSetting},on:{close:function(t){e.editSetting.show=!1},search:e.search}}):e._e(),e._v(" "),e.personSetting.show?r("person",{attrs:{setting:e.personSetting},on:{close:function(t){e.personSetting.show=!1},search:e.search}}):e._e()],1)],1)],1),e._v(" "),r("my-import",{attrs:{"import-setting":e.importSetting,"dialog-show":e.importSetting.dialogShow,"dialog-title":e.importSetting.dialogTitle}})],1)},a=[],o=r("80cb"),i=r("f6e8"),s=r("433d"),l=r("35f5"),c=r("5a2a"),u=r("6ec5"),d=r("9960"),f=r("dee4"),p={name:"index",components:{MyButton:i["a"],MyTableV2:o["a"],edit:l["default"],myImport:d["default"],person:c["default"]},data:function(){var e=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(f["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(){e.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(t){var r={};return 1==t.states?Object.assign(r,{value:!0,label:"是",click:function(){e.updState(t)}}):Object.assign(r,{value:!1,label:"否",click:function(){e.updState(t)}}),r}}],operation:{show:!0,width:240,attr:[{title:"编辑",events:function(t){e.showAudit(t)}},{title:"删除",events:function(t){e.del(t)}},{title:"库管员",type:"primary",events:function(t){e.showPerson(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){this.initTreeData()},methods:{importOrg:function(){var e=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(t,r){1===t.code?(e.$message.success(t.msg),e.search(1)):e.$message.warning(t.msg),r()}},initTreeData:function(){var e=this;u["l"]().then((function(t){var r=t||[];e.treeDataList.splice(0,e.treeDataList.length),e.treeDataList=r,r.length>0&&(e.importSetting.fileSettings.data={pid:r[0].id})}))},updState:function(e){var t=this,r=0==e.states?"启用":"禁用";t.$modal.confirm("确认要"+r+'"'+e.warehouseName+'"吗?').then((function(){var n=Object.assign({},e);n.states=1==e.states?0:1,u["j"](n).then((function(n){n&&(e.states=1===e.states?0:1,t.$modal.msgSuccess(r+"成功"),t.search())}))}))},del:function(e){var t=this;this.$modal.confirm('是否确认删除名称为"'+e.warehouseName+'"的机构吗?').then((function(){u["f"]({id:e.id}).then((function(e){}))})).then((function(e){t.$message.success("删除成功!"),t.search()})).catch((function(){}))},showAdd:function(){this.editSetting.id=null,this.editSetting.info=null,this.editSetting.title="新增",this.editSetting.show=!0},showAudit:function(e){this.editSetting.id=e.id,this.editSetting.info=JSON.stringify(e),this.editSetting.title="编辑",this.editSetting.show=!0},showPerson:function(e){this.personSetting.id=e.id,this.personSetting.info=JSON.stringify(e),this.personSetting.title="选择库管员",this.personSetting.show=!0},nodeClick:function(e){e=e||{},this.p=Object.assign({},{id:e.id,name:e.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:e.id},this.search(1)},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)}}},m=p,h=r("2877"),g=Object(h["a"])(m,n,a,!1,null,"22ae47c6",null);t["default"]=g.exports},f282:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[r("el-container",[r("el-container",[r("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[r("div",{staticClass:"filter-container"},[r("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1),e._v(" "),e.detailSetting.show?r(e.activeDetail,{tag:"component",attrs:{setting:e.detailSetting},on:{close:function(t){e.detailSetting.show=!1}}}):e._e()],1)],1)],1)],1)},a=[],o=r("80cb"),i=r("f6e8"),s=r("433d"),l=r("9960"),c=r("6f7e"),u=r("ecfc"),d=r("9f01"),f=r("bee9"),p=r("6df5"),m=r("af77"),h=r("4512"),g=r("9205"),v=r("edd4"),b=r("f5fa"),y={name:"index",components:{MyButton:i["a"],MyTableV2:o["a"],detail:d["default"],myImport:l["default"],purchaseDetail:f["default"],transferDetail:p["default"],inventoryDetail:m["default"],scrapDetail:h["default"],distributionDetail:g["default"],itemscrDetail:v["default"],returnNoteDetail:b["default"]},data:function(){var e=this;return{activeDetail:"",items:[{type:"text",dataIndex:"businessFormCode",label:"单号",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"flowType",label:"类型",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"dict_label",value:"dict_value",url:s["a"].apiBaseURL+"/permit/dict/data/type/FLOW_TYPE"}},{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null},cascader:[{key:"goodsTemplateId",queryKey:"agencyId"}],defaultValue:"",options:[]},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请选择",defaultValue:"",options:[],cascader:[{key:"baseGoodsModelsId",queryKey:"goodsTemplatesId"}],optionsConfig:{label:"goodsName",value:"id",url:s["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:s["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel"}},{type:"text",dataIndex:"createName",label:"创建人",placeholder:"请输入",defaultValue:""},{type:"date-picker",dataIndex:"startTime",label:"时间",defaultValue:""},{type:"date-picker",dataIndex:"endTime",label:"至",defaultValue:""}],treeDataList:[],filterFrom:{tenantId:null,userName:null,userPhone:null,status:1},editSetting:{title:"",id:"",orgId:"",show:!1},detailSetting:{title:"详情",id:"",show:!1},table:{showIndex:!0,expand:!1,url:s["a"].apiBaseURL+"/pc/l/wh/form/output/detail/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"类型",field:"thisType",align:"left",formatter:function(e){var t=Object(u["a"])(e);return{value:t}}},{title:"单号",field:"businessFormCode",align:"center",width:130},{title:"物品名称",field:"goodsTemplateName",align:"left",minWidth:130},{title:"规格型号",field:"baseGoodsModelsName",align:"left",minWidth:130},{title:"出入库数量",field:"thisCount",align:"center",width:100},{title:"金额",field:"totalPrice",align:"center",width:100},{title:"所属机构",field:"agencyName",align:"left",minWidth:130},{title:"创建人",field:"operatorName",align:"left",width:100},{title:"操作时间",field:"dealTime",align:"center",width:160,formatter:function(e){return{value:c["LongToDateTime"](e.dealTime)}}}],operation:{show:!0,width:100,attr:[{title:"详情",events:function(t){e.showDetail(t)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}},components:{1:"purchaseDetail",2:"returnNoteDetail",3:"transferDetail",4:"inventoryDetail",5:"itemscrDetail",6:"transferDetail",7:"inventoryDetail",8:"scrapDetail",9:"detail"}}},created:function(){},methods:{showDetail:function(e){this.activeDetail=this.components[e.mixType],this.detailSetting.id=e.id,this.detailSetting.info=JSON.stringify(e),this.detailSetting.title="详情",this.detailSetting.show=!0},search:function(e){void 0!=e?this.$refs.myTable.search({pageNum:e}):this.$refs.myTable.search()},fifterForm:function(e){this.filterFrom=Object.assign(this.filterFrom,e),this.search(1)}}},w=y,_=r("2877"),x=Object(_["a"])(w,n,a,!1,null,"1b46c624",null);t["default"]=x.exports},f48e:function(e,t,r){},f556:function(e,t,r){"use strict";r("0d93")},f596:function(e,t,r){"use strict";r.d(t,"a",(function(){return a})),r.d(t,"c",(function(){return o})),r.d(t,"e",(function(){return i})),r.d(t,"f",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"b",(function(){return c})),r.d(t,"d",(function(){return u})),r.d(t,"g",(function(){return d}));var n=r("b775");function a(e){return Object(n["a"])({url:"/pc/base/goods/template/add",method:"post",data:e})}function o(e){return Object(n["a"])({url:"/pc/base/goods/template/del",method:"delete",data:e})}function i(e){return Object(n["a"])({url:"/pc/base/goods/template/edit",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/pc/base/goods/template/detail",method:"get",params:e})}function l(e){return Object(n["a"])({url:"/pc/base/goods/template/updStatus",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/pc/base/goods/models/add",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/pc/base/goods/models/del",method:"delete",data:e})}function d(e){return Object(n["a"])({url:"/pc/base/goods/models/updStatus",method:"post",data:e})}},f5fa:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("win-md",{staticClass:"stock-detail",attrs:{title:"部门物品退回单详情",loading:e.loading},on:{close:e.close}},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("退回单号:")]),e._v(" "),r("span",[e._v(e._s(e.detail.businessFormCode))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("所属机构:")]),e._v(" "),r("span",[e._v(e._s(e.detail.agencyName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("部门:")]),e._v(" "),r("span",[e._v(e._s(e.detail.departmentName))])])],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("退回人:")]),e._v(" "),r("span",[e._v(e._s(e.detail.operatorName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("退回时间:")]),e._v(" "),r("span",[e._v(e._s(e._f("formatTime")(e.detail.dealTime)))])])],1),e._v(" "),r("el-row",{staticStyle:{"margin-top":"20px"},attrs:{gutter:20}},[r("el-col",{staticClass:"img-row",attrs:{span:24}},[r("span",[e._v("退回手续:")]),e._v(" "),e._l(e.fileList,(function(t,n){return r("div",{key:n,staticClass:"img-box",on:{click:function(r){return e.handlePreview(t)}}},[r("img",{staticClass:"img",attrs:{src:e.getUrl(t.path),alt:""}})])}))],2)],1),e._v(" "),e._l(e.detail.goodsTemplateInfoList,(function(t,n){return r("div",{key:n,staticClass:"goods-card"},[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:7}},[r("span",[e._v("物品分类:")]),e._v(" "),r("span",[e._v(e._s(t.categoryName))])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("span",[e._v("物品名称:")]),e._v(" "),r("span",[e._v(e._s(t.baseGoodsTemplateName))])]),e._v(" "),r("el-col",{attrs:{span:3}},[r("span",[e._v("类别:")]),e._v(" "),r("span",[e._v(e._s(t.type)+"类")])]),e._v(" "),r("el-col",{attrs:{span:6}},[r("span",[e._v("分发单号:")]),e._v(" "),r("span",[e._v(e._s(t.businessFormCode))])])],1),e._v(" "),e._l(t.modelInfoList,(function(n,a){return r("div",{key:a,staticClass:"card3"},["A"===t.type?r("el-row",{attrs:{gutter:24,type:"flex",align:"middle"}},[r("el-col",{attrs:{span:8}},[r("span",[e._v("规格型号:")]),e._v(" "),r("span",[e._v(e._s(n.baseGoodsModelsName))])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("span",[e._v("单位:")]),e._v(" "),r("span",[e._v(e._s(n.unit))])])],1):e._e(),e._v(" "),r("el-table",{staticStyle:{"margin-top":"15px"},attrs:{data:n.useInfoList}},["A"!==t.type?r("el-table-column",{attrs:{prop:"baseGoodsModelsName",label:"规格型号",align:"left"},scopedSlots:e._u([{key:"default",fn:function(t){t.row;return[e._v("\n "+e._s(n.baseGoodsModelsName)+"\n ")]}}],null,!0)}):e._e(),e._v(" "),"A"!==t.type?r("el-table-column",{attrs:{prop:"unit",label:"单位",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){t.row;return[e._v("\n "+e._s(n.unit)+"\n ")]}}],null,!0)}):e._e(),e._v(" "),"A"===t.type?r("el-table-column",{attrs:{prop:"useName",label:"使用人",align:"left"}}):e._e(),e._v(" "),r("el-table-column",{attrs:{prop:"useUnm",label:"在用数量",align:"center"}}),e._v(" "),r("el-table-column",{attrs:{prop:"returnNum",label:"退回数量",align:"center"}})],1)],1)}))],2)})),e._v(" "),r("div",{staticStyle:{display:"none"},attrs:{id:"uploadPreviewImages"}},e._l(e.fileList,(function(t,n){return r("span",{key:n},[e.checkImg(t.name)?r("img",{staticClass:"v-img",staticStyle:{width:"100px",height:"100px"},attrs:{src:e.getUrl(t.path),alt:t.name}}):e._e()])})),0)],2)},a=[],o=r("f76d"),i=r("6f7e"),s=r("dee4"),l=r("c82c"),c=r.n(l),u=(r("0808"),r("4bbc")),d=null,f={components:{winMd:o["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,fileList:[],detail:{baseCategoryName:"",businessFormCode:"",goodsTemplateName:"",procureDoc:"",agencyId:"",agencyName:"",states:"",createName:"",time:"",procureGoods:[{},{}],fileKey:Math.random()}}},filters:{formatTime:function(e){return e?i["LongToDateTime"](e):"-"},formatPrice:function(e){return e/100}},created:function(){var e=this;Object(u["b"])({id:this.setting.id}).then((function(t){e.detail=t,e.loading=!1,e.fileList=e.detail.procureDoc?JSON.parse(e.detail.procureDoc):[],e.$nextTick((function(){e.initPreviewImg()}))}))},methods:{initPreviewImg:function(){null!=d&&d.destroy();var e=document.querySelector("#uploadPreviewImages");d=new c.a(e,{})},handlePreview:function(e){if(!this.checkImg(e.name))return!1;for(var t=0,r=0;r