(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1483d9b9","chunk-88bee8ea","chunk-729aa423","chunk-3edc0d5c","chunk-2d0e66d0"],{"0264":function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-md",{attrs:{title:t.setting.title,width:"800px",loading:t.loading},on:{close:t.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"物品名称",prop:"goodsName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入物品名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.goodsName,callback:function(e){t.$set(t.formData,"goodsName",e)},expression:"formData.goodsName"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"物品分类",prop:"categoryId"}},[r("el-cascader",{staticStyle:{width:"100%"},attrs:{clearable:"",filterable:"",placeholder:"请选择物品分类",options:t.categoryList,props:{emitPath:!1,value:"id"}},model:{value:t.formData.categoryId,callback:function(e){t.$set(t.formData,"categoryId",e)},expression:"formData.categoryId"}})],1),t._v(" "),t._l(t.formData.models,(function(e,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:t.rules.modelName}},[r("el-input",{staticStyle:{width:"100%"},attrs:{disabled:!!t.setting.id,placeholder:"请输入规格型号名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:e.modelName,callback:function(r){t.$set(e,"modelName",r)},expression:"m.modelName"}})],1)],1),t._v(" "),r("el-col",{attrs:{span:9}},[r("el-form-item",{attrs:{label:"单位",prop:"models."+n+".unit",rules:t.rules.unit}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入单位",clearable:"",maxlength:"20","show-word-limit":""},model:{value:e.unit,callback:function(r){t.$set(e,"unit",r)},expression:"m.unit"}})],1)],1),t._v(" "),r("el-col",{attrs:{span:6}},[t.formData.models.length>1?r("my-button",{key:"d"+n,attrs:{name:"删除",type:"danger"},on:{click:function(e){return t.delCode(n)}}}):t._e(),t._v(" "),n===t.formData.models.length-1?r("my-button",{key:"a"+n,attrs:{name:"新增型号",type:""},on:{click:t.addCode}}):t._e()],1)],1)})),t._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"states"}},[r("el-radio-group",{model:{value:t.formData.states,callback:function(e){t.$set(t.formData,"states",e)},expression:"formData.states"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),r("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1)],2),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],a=r("f76d"),i=r("f6e8"),s=r("f596"),l=r("c56b"),c=r("2f62");function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function f(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),s=new L(n||[]);return o(i,"_invoke",{value:$(t,r,s)}),i}function m(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p="suspendedStart",g="suspendedYield",h="executing",b="completed",y={};function v(){}function w(){}function S(){}var O={};c(O,i,(function(){return this}));var j=Object.getPrototypeOf,x=j&&j(j(P([])));x&&x!==r&&n.call(x,i)&&(O=x);var _=S.prototype=v.prototype=Object.create(O);function D(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,s){var l=m(t[o],t,a);if("throw"!==l.type){var c=l.arg,f=c.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,s)}),(function(t){r("throw",t,i,s)})):e.resolve(f).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,s)}))}s(l.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function $(e,r,n){var o=p;return function(a,i){if(o===h)throw Error("Generator is already running");if(o===b){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var s=n.delegate;if(s){var l=N(s,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var c=m(e,r,n);if("normal"===c.type){if(o=n.done?b:g,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=b,n.method="throw",n.arg=c.arg)}}}function N(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,N(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=m(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function P(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=S,o(_,"constructor",{value:S,configurable:!0}),o(S,"constructor",{value:w,configurable:!0}),w.displayName=c(S,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,c(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},D(k.prototype),c(k.prototype,s,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(d(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},D(_),c(_,l,"Generator"),c(_,i,(function(){return this})),c(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(E),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return s.type="throw",s.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:P(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function d(t,e,r,n,o,a,i){try{var s=t[a](i),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(n,o)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){d(a,n,o,i,s,"next",t)}function s(t){d(a,n,o,i,s,"throw",t)}i(void 0)}))}}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function g(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=y(t,"string");return"symbol"==u(e)?e:e+""}function y(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var v={components:{winMd:a["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!0,categoryList:[],checkAll:!1,checkedList:[],formData:{goodsName:"",states:1,summary:"",categoryId:null,agencyId:"",agencyName:"",models:[{modelName:"",unit:""}]},rules:{goodsName:[{required:!0,message:"请输入物品名称",trigger:"blur"}],categoryId:[{required:!0,message:"请选择物品分类",trigger:"blur"}],modelName:[{required:!0,message:"请输入规格名称",trigger:"blur"}],unit:[{required:!0,message:"请输入单位",trigger:"blur"}]}}},computed:g({},Object(c["b"])(["userInfo"])),created:function(){var t=m(f().mark((function t(){var e=this;return f().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.setting.id){t.next=3;break}return t.next=3,Object(s["f"])({id:this.setting.id}).then((function(t){e.formData=t,e.formData.agencyId||(e.formData.agencyId=e.userInfo.tenantId,e.formData.agencyName=e.userInfo.tenantName)}));case 3:return t.next=5,this.tree_List();case 5:this.loading=!1;case 6:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),methods:{tree_List:function(){var t=m(f().mark((function t(){var e=this;return f().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["b"])().then((function(t){t&&(e.categoryList=t)}));case 2:case"end":return t.stop()}}),t)})));function e(){return t.apply(this,arguments)}return e}(),addCode:function(){this.formData.models.push({modelName:"",unit:""})},delCode:function(t){this.formData.models.splice(t,1)},getEditInfo:function(t){},close:function(){this.$emit("close")},save:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var r=Object.assign({},t.formData);if(t.loading)return;t.loading=!0,t.setting.id?Object(s["e"])(r).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})):(r.orgId=t.setting.orgId,Object(s["a"])(r).then((function(e){t.loading=!1,e?(t.$message.success("保存成功!"),t.close(),t.$emit("search")):t.$message.error("保存失败")})))}else t.$message.error("校验未通过,请检查。")}))}}},w=v,S=r("2877"),O=Object(S["a"])(w,n,o,!1,null,null,null);e["default"]=O.exports},"433d":function(t,e,r){"use strict";var n=r("c559"),o={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};e["a"]=o},"6f7e":function(t,e,r){"use strict";function n(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString().replace(/\s/g,"").replace(/-/g,"").replace(/:/g,"");return e}function o(t){return("00"+t).substr(t.length)}function a(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=e.slice(8,10),i=e.slice(10,12),s=e.slice(12,14),l=r+"-"+n+"-"+o+" "+a+":"+i+":"+s;return l}function i(t){if(null==t||void 0==t||""==t||"null"==t||"undefined"==t)return!0;var e=t.toString(),r=e.slice(0,4),n=e.slice(4,6),o=e.slice(6,8),a=r+"-"+n+"-"+o;return a}function s(t,e){try{t instanceof Date||(t=new Date(t)),void 0!=e&&""!=e||(e="yyyy-MM-dd hh:mm:ss"),/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));var r={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};for(var n in r)if(new RegExp("(".concat(n,")")).test(e)){var a=r[n]+"";e=e.replace(RegExp.$1,1===RegExp.$1.length?a:o(a))}return e}catch(i){return"-"}}function l(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0"),o=t.getHours().toString().padStart(2,"0"),a=t.getMinutes().toString().padStart(2,"0"),i=t.getSeconds().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n," ").concat(o,":").concat(a,":").concat(i)}function c(){var t=new Date,e=t.getFullYear(),r=(t.getMonth()+1).toString().padStart(2,"0"),n=t.getDate().toString().padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n)}function u(t){if(t){t instanceof Date||(t=new Date(t.replace(/-/g,"/")));var e=t.getTime(),r=6e4,n=60*r,o=24*n,a=7*o,i=30*o,s=(new Date).getTime(),l=s-e;if(!(l<0)){var c=l/r,u=l/n,f=l/o,d=l/a,m=l/i,p="";if(m>=1&&m<=3)p=" "+parseInt(m)+"月前";else if(d>=1&&d<=3)p=" "+parseInt(d)+"周前";else if(f>=1&&f<=6)p=" "+parseInt(f)+"天前";else if(u>=1&&u<=23)p=" "+parseInt(u)+"小时前";else if(c>=1&&c<=59)p=" "+parseInt(c)+"分钟前";else if(l>=0&&l<=r)p="刚刚";else{var g=new Date;g.setTime(e);var h=g.getFullYear(),b=g.getMonth()+1<10?"0"+(g.getMonth()+1):g.getMonth()+1,y=g.getDate()<10?"0"+g.getDate():g.getDate();g.getHours()<10?g.getHours():g.getHours(),g.getMinutes()<10?g.getMinutes():g.getMinutes(),g.getSeconds()<10?g.getSeconds():g.getSeconds();p=h+"-"+b+"-"+y}return p}}}r.r(e),r.d(e,"DateToLong",(function(){return n})),r.d(e,"LongToDateTime",(function(){return a})),r.d(e,"LongToDate",(function(){return i})),r.d(e,"formatDate",(function(){return s})),r.d(e,"formattedDate",(function(){return l})),r.d(e,"formattedDateDuan",(function(){return c})),r.d(e,"timeago",(function(){return u}))},9960:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.dialogShow?r("el-dialog",{attrs:{width:"40%",center:!0,"close-on-click-modal":!1,"close-on-press-escape":!1,title:t.dialogTitle,"before-close":t.beforeClose,modal:t.modal,visible:t.dialogShow}},[r("el-row",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[r("el-col",{attrs:{span:24}},[r("el-form",[null!=t.templateSettings.templateUrl?r("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[r("a",{staticClass:"blue-txt",staticStyle:{color:"#409EFF"},attrs:{href:t.templateSettings.templateUrl,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.templateSettings.templateName))])]):t._e(),t._v(" "),r("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[r("el-upload",{ref:t.fileSettings.ref,staticClass:"upload-demo",attrs:{headers:t.headers,name:"file",data:t.fileSettings.data,action:t.fileSettings.uploadUrl,"before-upload":t.beforeAvatarUpload,"on-success":t.handleUploadSuccess,"on-change":t.file,multiple:t.fileSettings.multiple,limit:t.fileSettings.num,accept:t.fileSettings.accept,"auto-upload":t.fileSettings.autoUpload}},[r("el-button",{attrs:{size:"small",type:"primary"}},[t._v(t._s(t.fileSettings.title))]),t._v(" "),r("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v("只能上传"+t._s(t.fileSettings.num)+"个格式为"+t._s(t.fileSettings.accept)+"的文件,且不超过"+t._s(t.fileSettings.max)+"kb")])],1)],1),t._v(" "),r("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[r("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:t.handleSubmit}},[t._v("开始导入")])],1)],1)],1)],1)],1):t._e()},o=[],a=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(t){t&&(this.fileSettings=Object.assign(this.fileSettings,this.importSetting.fileSettings),this.templateSettings=Object.assign(this.templateSettings,this.importSetting.templateSettings),console.log(this.templateSettings),this.fileSettings.onSuccess=this.importSetting.onSuccess)}},mounted:function(){this.headers[i["sessionToken"]]=Object(a["a"])()},methods:{beforeClose:function(){var t=this;this.loading?this.$confirm("正在执行导入,确认关闭?").then((function(){t.importSetting.dialogShow=!1,t.loading=!1})).catch():this.importSetting.dialogShow=!1},beforeAvatarUpload:function(t){var e=this.fileSettings.accept.split(",").indexOf(t.name.substr(t.name.lastIndexOf("."),t.name.length).toLocaleString())>-1;e||this.$message.error("上传文件只能是 ".concat(this.fileSettings.accept," 格式!"));var r=t.size/1024<this.fileSettings.max;return r||this.$message.error("上传文件大小不能超过 "+this.fileSettings.max+"kb!"),e&&r},handleSubmit:function(){this.isUpload?this.$refs[this.fileSettings.ref].submit():this.$message.error("请上传文件")},file:function(t,e){t&&(this.isUpload=!0)},handleUploadSuccess:function(t,e,r){var n=this;this.fileSettings.onSuccess&&(this.loading=!0,this.fileSettings.onSuccess(t,(function(){n.loading=!1,n.importSetting.dialogShow=!1})))}}},l=s,c=r("2877"),u=Object(c["a"])(l,n,o,!1,null,null,null);e["default"]=u.exports},b31c:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-md",{attrs:{title:"新增规格型号",width:"500px",loading:t.loading},on:{close:t.close}},[r("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:t.formData,rules:t.rules,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"型号名称",prop:"modelName"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入型号名称",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.modelName,callback:function(e){t.$set(t.formData,"modelName",e)},expression:"formData.modelName"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"单位",prop:"unit"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入单位",clearable:"",maxlength:"20","show-word-limit":""},model:{value:t.formData.unit,callback:function(e){t.$set(t.formData,"unit",e)},expression:"formData.unit"}})],1),t._v(" "),r("el-form-item",{attrs:{label:"状态",prop:"states"}},[r("el-radio-group",{model:{value:t.formData.states,callback:function(e){t.$set(t.formData,"states",e)},expression:"formData.states"}},[r("el-radio",{attrs:{label:1,border:""}},[t._v("启用")]),t._v(" "),r("el-radio",{attrs:{label:0,border:""}},[t._v("禁用")])],1)],1)],1),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}}),t._v(" "),r("my-button",{attrs:{name:"保存",site:"form"},on:{click:t.save}})],1)],1)},o=[],a=r("f76d"),i=r("f6e8"),s=r("2f62"),l=r("f596");function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=p(t,"string");return"symbol"==c(e)?e:e+""}function p(t,e){if("object"!=c(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var g={name:"specsAdd",components:{winMd:a["a"],myButton:i["a"]},props:{setting:{type:Object,default:function(){}}},data:function(){return{loading:!1,formData:{goodsTemplatesId:"",modelName:"",unit:"",states:1},rules:{modelName:[{required:!0,message:"请输入型号名称",trigger:"blur"}],unit:[{required:!0,message:"请输入单位",trigger:"blur"}]}}},computed:f({},Object(s["b"])(["userInfo"])),created:function(){},methods:{close:function(){this.$emit("close")},save:function(){var t=this;this.$refs.ruleForm.validate((function(e){if(e){var r=Object.assign({},t.formData);if(r.goodsTemplatesId=t.setting.goodsTemplatesId,t.loading)return;t.loading=!0,Object(l["b"])(r).then((function(e){t.loading=!1,t.$message.success("保存成功!"),t.close(),t.$emit("search")})).catch((function(){t.loading=!1}))}else t.$message.error("校验未通过,请检查。")}))}}},h=g,b=r("2877"),y=Object(b["a"])(h,n,o,!1,null,null,null);e["default"]=y.exports},c0cc:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("win-md",{attrs:{title:"规格型号",width:"800px"},on:{close:t.close}},[r("my-table-v2",{ref:"myTable",attrs:{filter:{goodsTemplatesId:t.setting.goodsTemplatesId},table:t.table}}),t._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer",align:"center"},slot:"footer"},[r("my-button",{attrs:{name:"取消",site:"form"},on:{click:t.close}})],1),t._v(" "),t.specsSetting.show?r("specsAdd",{attrs:{setting:t.specsSetting},on:{close:function(e){t.specsSetting.show=!1},search:t.search}}):t._e()],1)},o=[],a=r("f76d"),i=r("f6e8"),s=r("f596"),l=r("b31c"),c=r("2f62"),u=r("80cb"),f=r("433d");function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function m(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?m(Object(r),!0).forEach((function(e){g(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function g(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=b(t,"string");return"symbol"==d(e)?e:e+""}function b(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var y={name:"specs",components:{MyTableV2:u["a"],winMd:a["a"],myButton:i["a"],specsAdd:l["default"]},props:{setting:{type:Object,default:function(){}}},data:function(){var t=this;return{specsSetting:{title:"",id:"",show:!1},table:{autoLoad:!1,showIndex:!0,expand:!1,dataIndex:"goodsTemplatesId",url:f["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){t.showAdd(null)}}]},columns:[{title:"规格型号",field:"modelName",align:"left",minWidth:120},{title:"单位",field:"unit",align:"center",width:100},{field:"states",title:"状态",align:"center",width:100,switch:function(e){var r={};return 1==e.states?Object.assign(r,{value:!0,label:"是",click:function(){t.updState(e)}}):Object.assign(r,{value:!1,label:"否",click:function(){t.updState(e)}}),r}}],operation:{show:!0,width:100,attr:[{title:"删除",events:function(e){t.del(e)}}]},paging:{show:!1,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},computed:p({},Object(c["b"])(["userInfo"])),mounted:function(){var t=this;this.$nextTick((function(){t.search()}))},methods:{showAdd:function(){this.specsSetting.goodsTemplatesId=this.setting.goodsTemplatesId,this.specsSetting.show=!0},updState:function(t){var e=this,r=0==t.states?"启用":"禁用";e.$modal.confirm("确认要"+r+'"'+t.modelName+'"规格吗?').then((function(){var n=Object.assign({},t);n.states=1==t.states?0:1,Object(s["g"])(n).then((function(n){n&&(t.states=1===t.states?0:1,e.$modal.msgSuccess(r+"成功"),e.search())}))}))},del:function(t){var e=this;this.$modal.confirm('是否确认删除名称为"'+t.modelName+'"的规格吗?').then((function(){Object(s["d"])({id:t.id}).then((function(t){}))})).then((function(t){e.$message.success("删除成功!"),e.$refs.myTable.search()})).catch((function(){}))},close:function(){this.$emit("close")},search:function(){this.$refs.myTable.search()}}},v=y,w=r("2877"),S=Object(w["a"])(v,n,o,!1,null,null,null);e["default"]=S.exports},c56b:function(t,e,r){"use strict";r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return i}));var n=r("b775"),o=r("433d");function a(t){return n["a"].get(o["a"].apiBaseURL+"/pc/base/category/select/tree",{params:t})}function i(t){return Object(n["a"])({url:"/pc/base/category/detail",method:"get",params:t})}},c798:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("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:t.items},on:{search:t.fifterForm}})],1),t._v(" "),r("el-row",{staticStyle:{"margin-top":"15px"}},[r("el-col",[r("my-table-v2",{ref:"myTable",attrs:{filter:t.filterFrom,table:t.table}})],1)],1)],1)],1)],1),t._v(" "),t.editSetting.show?r("edit",{attrs:{setting:t.editSetting},on:{close:function(e){t.editSetting.show=!1},search:t.search}}):t._e(),t._v(" "),t.specsSetting.show?r("specs",{attrs:{setting:t.specsSetting},on:{close:function(e){t.specsSetting.show=!1},search:t.search}}):t._e(),t._v(" "),r("my-import",{attrs:{"import-setting":t.importSetting,"dialog-show":t.importSetting.dialogShow,"dialog-title":t.importSetting.dialogTitle}})],1)},o=[],a=r("6f7e"),i=r("befe"),s=r("80cb"),l=r("f6e8"),c=r("433d"),u=r("0264"),f=r("f596"),d=r("9960"),m=r("dee4"),p=r("c0cc"),g={name:"index",components:{Specs:p["default"],MyButton:l["a"],MyTableV2:s["a"],edit:u["default"],myTree:i["a"],myImport:d["default"]},data:function(){var t=this;return{items:[{type:"text",dataIndex:"goodsName",label:"物品名称",placeholder:"请输入",defaultValue:""},{type:"text",dataIndex:"goodsCode",label:"物品编号",placeholder:"请输入",defaultValue:""},{type:"select",dataIndex:"classification",label:"类别",placeholder:"请选择",defaultValue:"",options:[{label:"A",value:"A"},{label:"B",value:"B"},{label:"C",value:"C"}]},{type:"select",dataIndex:"states",label:"状态",placeholder:"请选择",defaultValue:"1",options:[{label:"启用",value:"1"},{label:"禁用",value:"0"}]}],filterFrom:{tenantId:null,userName:null,userPhone:null,states:1},importSetting:{dialogTitle:"导入",dialogShow:!1,fileSettings:{data:{},uploadUrl:Object(m["b"])()+"/pc/base/goods/template/import",accept:".xls",type:"text",loading:!1},templateSettings:{templateName:"导入模板.xls",templateUrl:c["a"].apiBaseURL+"/pc/fin/sys/tenant/getImportTemplate?type=goods"},onSuccess:null},editSetting:{title:"",id:"",orgId:"",show:!1},specsSetting:{title:"",id:"",show:!1},table:{showIndex:!0,expand:!1,url:c["a"].apiBaseURL+"/pc/base/goods/template/list",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"新增",click:function(){t.showAdd(null)}},{name:"导入",click:function(){t.importOrg()}}]},columns:[{title:"物品编号",field:"goodsCode",align:"center",width:120},{title:"物品名称",field:"goodsName",align:"left",minWidth:140},{title:"分类",field:"categoryName",align:"left",minWidth:140},{title:"类别",field:"classification",align:"center",width:80},{title:"所属机构",field:"agencyName",align:"left",minWidth:140},{title:"创建时间",field:"createDate",align:"center",width:160,formatter:function(t){return{value:a["LongToDateTime"](t.createDate)}}},{field:"states",title:"状态",align:"center",width:100,switch:function(e){var r={};return 1==e.states?Object.assign(r,{value:!0,label:"是",click:function(){t.updState(e)}}):Object.assign(r,{value:!1,label:"否",click:function(){t.updState(e)}}),r}}],operation:{show:!0,width:250,attr:[{title:"编辑",events:function(e){t.showAdd(e.id)}},{title:"删除",events:function(e){t.del(e)}},{title:"规格型号",type:"primary",events:function(e){t.showSpecs(e)}}]},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){},methods:{importOrg:function(){var t=this;this.importSetting.dialogShow=!0,this.importSetting.onSuccess=function(e,r){1===e.code?(t.$message.success(e.msg),t.search(1)):t.$message.warning(e.msg),r()}},updState:function(t){var e=this,r=0==t.states?"启用":"禁用";e.$modal.confirm("确认要"+r+'"'+t.goodsName+'"物品吗?').then((function(){var n=Object.assign({},t);n.states=1==t.states?0:1,Object(f["h"])(n).then((function(n){n&&(t.states=1===t.states?0:1,e.$modal.msgSuccess(r+"成功"),e.search())}))}))},del:function(t){var e=this;this.$modal.confirm('是否确认删除名称为"'+t.goodsName+'"的物品吗?').then((function(){Object(f["c"])({id:t.id}).then((function(t){}))})).then((function(t){e.$message.success("删除成功!"),e.search()})).catch((function(){}))},showAdd:function(t){this.editSetting.id=t,this.editSetting.title=t?"编辑":"新增",this.editSetting.show=!0},showSpecs:function(t){this.specsSetting.goodsTemplatesId=t.id,this.specsSetting.show=!0},search:function(t){void 0!=t?this.$refs.myTable.search({pageNum:t}):this.$refs.myTable.search()},fifterForm:function(t){this.filterFrom=Object.assign(this.filterFrom,t),this.search(1)}}},h=g,b=r("2877"),y=Object(b["a"])(h,n,o,!1,null,"f5b30466",null);e["default"]=y.exports},f596:function(t,e,r){"use strict";r.d(e,"a",(function(){return o})),r.d(e,"c",(function(){return a})),r.d(e,"e",(function(){return i})),r.d(e,"f",(function(){return s})),r.d(e,"h",(function(){return l})),r.d(e,"b",(function(){return c})),r.d(e,"d",(function(){return u})),r.d(e,"g",(function(){return f}));var n=r("b775");function o(t){return Object(n["a"])({url:"/pc/base/goods/template/add",method:"post",data:t})}function a(t){return Object(n["a"])({url:"/pc/base/goods/template/del",method:"delete",data:t})}function i(t){return Object(n["a"])({url:"/pc/base/goods/template/edit",method:"post",data:t})}function s(t){return Object(n["a"])({url:"/pc/base/goods/template/detail",method:"get",params:t})}function l(t){return Object(n["a"])({url:"/pc/base/goods/template/updStatus",method:"post",data:t})}function c(t){return Object(n["a"])({url:"/pc/base/goods/models/add",method:"post",data:t})}function u(t){return Object(n["a"])({url:"/pc/base/goods/models/del",method:"delete",data:t})}function f(t){return Object(n["a"])({url:"/pc/base/goods/models/updStatus",method:"post",data:t})}}}]);
|