(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46647c1c","chunk-2d0e66d0"],{"1ee6":function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-container",[a("el-container",[a("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[a("div",{staticClass:"filter-container"},[a("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),a("el-row",{staticStyle:{"margin-top":"15px"}},[a("el-col",[a("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1)],1),e._v(" "),a("my-import",{attrs:{"import-setting":e.importSetting,"dialog-show":e.importSetting.dialogShow,"dialog-title":e.importSetting.dialogTitle}})],1)},i=[],l=a("80cb"),o=a("f6e8"),r=a("433d"),s=(a("6ec5"),a("9960")),c=a("dee4"),u=a("6f7e"),d=a("ecfc"),p={name:"index",components:{MyButton:o["a"],MyTableV2:l["a"],myImport:s["default"]},data:function(){return{items:[{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",defaultValue:"",options:[],cascader:[{key:"inWarehouseId",queryKey:"tenantId"},{key:"goodsTemplateId",queryKey:"agencyId"}],optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null}},{type:"select",dataIndex:"inWarehouseId",label:"部门",placeholder:"请选择",optionsConfig:{url:"/pc/fin/sys/tenant/department/list/all",label:"name",value:"id"},defaultValue:"",options:[]},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",defaultValue:"",options:[],cascader:[{key:"baseGoodsModelsId",queryKey:"goodsTemplatesId"}],optionsConfig:{label:"goodsName",value:"id",url:r["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请输入",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:r["a"].apiBaseURL+"/pc/base/goods/models/query/goodsModel"}},{type:"select",dataIndex:"flowType",label:"类型",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"dict_label",value:"dict_value",url:r["a"].apiBaseURL+"/permit/dict/data/type/FLOW_TYPE"}},{type:"text",dataIndex:"businessFormCode",label:"单号",placeholder:"请输入",defaultValue:""},{type:"date-picker",dataIndex:"dealTimeStart",label:"时间",defaultValue:""},{type:"date-picker",dataIndex:"dealTimeEnd",label:"至",defaultValue:""}],treeDataList:[],filterFrom:{tenantId:null,userName:null,userPhone:null,status:1},importSetting:{dialogTitle:"导入",dialogShow:!1,fileSettings:{data:{},uploadUrl:Object(c["b"])()+"/pc/fin/sys/tenant/import",accept:".xls",type:"text",loading:!1},templateSettings:{templateName:"导入模板.xls",templateUrl:r["a"].apiBaseURL+"/pc/fin/sys/tenant/getImportTemplate"},onSuccess:null},editSetting:{title:"",id:"",orgId:"",show:!1},table:{showIndex:!0,expand:!1,url:r["a"].apiBaseURL+"/pc/warehouse/flow/getDeptTaiZhangList",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"机构",field:"agencyName",align:"left",width:130},{title:"部门",field:"deptName",align:"left",width:130},{title:"物品名称",field:"goodsTemplateName",align:"left",minWidth:130},{title:"规格型号",field:"baseGoodsModelsName",align:"left",width:130},{title:"类型",field:"summary",align:"center",formatter:function(e){var t=Object(d["a"])(e);return{value:t}}},{title:"单号",field:"businessFormCode",align:"center",width:130},{title:"数量",field:"thisCount",align:"center",width:100},{title:"操作前数量",field:"initialCount",align:"center",width:100},{title:"操作后数量",field:"endCount",align:"center",width:100},{title:"操作时间",field:"dealTime",align:"center",width:160,formatter:function(e){return{value:u["LongToDateTime"](e.dealTime)}}}],paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){},methods:{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)}}},f=p,g=a("2877"),m=Object(g["a"])(f,n,i,!1,null,null,null);t["default"]=m.exports},"433d":function(e,t,a){"use strict";var n=a("c559"),i={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};t["a"]=i},"6ec5":function(e,t,a){"use strict";a.d(t,"l",(function(){return l})),a.d(t,"a",(function(){return o})),a.d(t,"g",(function(){return r})),a.d(t,"c",(function(){return s})),a.d(t,"j",(function(){return c})),a.d(t,"f",(function(){return u})),a.d(t,"d",(function(){return d})),a.d(t,"e",(function(){return p})),a.d(t,"p",(function(){return f})),a.d(t,"n",(function(){return g})),a.d(t,"m",(function(){return m})),a.d(t,"k",(function(){return h})),a.d(t,"s",(function(){return b})),a.d(t,"r",(function(){return S})),a.d(t,"q",(function(){return y})),a.d(t,"o",(function(){return v})),a.d(t,"b",(function(){return w})),a.d(t,"i",(function(){return x})),a.d(t,"h",(function(){return T}));var n=a("b775"),i=a("433d");function l(e){return n["a"].get(i["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:e})}function o(e){return Object(n["a"])({url:"/pc/base/category/add",method:"post",data:e})}function r(e){return Object(n["a"])({url:"/pc/base/category/edit",method:"post",data:e})}function s(e){return Object(n["a"])({url:"/pc/base/warehouse/add",method:"post",data:e})}function c(e){return Object(n["a"])({url:"/pc/base/warehouse/edit",method:"post",data:e})}function u(e){return Object(n["a"])({url:"/pc/base/warehouse/del",method:"delete",data:e})}function d(){return Object(n["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function p(e){return Object(n["a"])({url:"/pc/base/category/del",method:"delete",data:e})}function f(e){return Object(n["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:e})}function g(e){return Object(n["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:e})}function m(e){return Object(n["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:e})}function h(e){return n["a"].get(i["a"].apiBaseURL+"/pc/base/category/select/tree",{params:e})}function b(e){return Object(n["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:e})}function S(e){return Object(n["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:e})}function y(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:e})}function v(e){return Object(n["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:e})}function w(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:e})}function x(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:e})}function T(e){return Object(n["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:e})}},"6f7e":function(e,t,a){"use strict";function n(e){if(null==e||void 0==e||""==e||"null"==e||"undefined"==e)return!0;var t=e.toString().replace(/\s/g,"").replace(/-/g,"").replace(/:/g,"");return t}function i(e){return("00"+e).substr(e.length)}function l(e){if(null==e||void 0==e||""==e||"null"==e||"undefined"==e)return!0;var t=e.toString(),a=t.slice(0,4),n=t.slice(4,6),i=t.slice(6,8),l=t.slice(8,10),o=t.slice(10,12),r=t.slice(12,14),s=a+"-"+n+"-"+i+" "+l+":"+o+":"+r;return s}function o(e){if(null==e||void 0==e||""==e||"null"==e||"undefined"==e)return!0;var t=e.toString(),a=t.slice(0,4),n=t.slice(4,6),i=t.slice(6,8),l=a+"-"+n+"-"+i;return l}function r(e,t){try{e instanceof Date||(e=new Date(e)),void 0!=t&&""!=t||(t="yyyy-MM-dd hh:mm:ss"),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));var a={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var n in a)if(new RegExp("(".concat(n,")")).test(t)){var l=a[n]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?l:i(l))}return t}catch(o){return"-"}}function s(){var e=new Date,t=e.getFullYear(),a=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),l=e.getMinutes().toString().padStart(2,"0"),o=e.getSeconds().toString().padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(n," ").concat(i,":").concat(l,":").concat(o)}function c(){var e=new Date,t=e.getFullYear(),a=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0");return"".concat(t,"-").concat(a,"-").concat(n)}function u(e){if(e){e instanceof Date||(e=new Date(e.replace(/-/g,"/")));var t=e.getTime(),a=6e4,n=60*a,i=24*n,l=7*i,o=30*i,r=(new Date).getTime(),s=r-t;if(!(s<0)){var c=s/a,u=s/n,d=s/i,p=s/l,f=s/o,g="";if(f>=1&&f<=3)g=" "+parseInt(f)+"月前";else if(p>=1&&p<=3)g=" "+parseInt(p)+"周前";else if(d>=1&&d<=6)g=" "+parseInt(d)+"天前";else if(u>=1&&u<=23)g=" "+parseInt(u)+"小时前";else if(c>=1&&c<=59)g=" "+parseInt(c)+"分钟前";else if(s>=0&&s<=a)g="刚刚";else{var m=new Date;m.setTime(t);var h=m.getFullYear(),b=m.getMonth()+1<10?"0"+(m.getMonth()+1):m.getMonth()+1,S=m.getDate()<10?"0"+m.getDate():m.getDate();m.getHours()<10?m.getHours():m.getHours(),m.getMinutes()<10?m.getMinutes():m.getMinutes(),m.getSeconds()<10?m.getSeconds():m.getSeconds();g=h+"-"+b+"-"+S}return g}}}a.r(t),a.d(t,"DateToLong",(function(){return n})),a.d(t,"LongToDateTime",(function(){return l})),a.d(t,"LongToDate",(function(){return o})),a.d(t,"formatDate",(function(){return r})),a.d(t,"formattedDate",(function(){return s})),a.d(t,"formattedDateDuan",(function(){return c})),a.d(t,"timeago",(function(){return u}))},9960:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.dialogShow?a("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}},[a("el-row",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[a("el-col",{attrs:{span:24}},[a("el-form",[null!=e.templateSettings.templateUrl?a("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[a("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(" "),a("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[a("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}},[a("el-button",{attrs:{size:"small",type:"primary"}},[e._v(e._s(e.fileSettings.title))]),e._v(" "),a("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(" "),a("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[a("el-button",{staticStyle:{"margin-left":"10px"},attrs:{size:"small",type:"success"},on:{click:e.handleSubmit}},[e._v("开始导入")])],1)],1)],1)],1)],1):e._e()},i=[],l=a("5f87"),o=a("83d6"),r={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[o["sessionToken"]]=Object(l["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 a=e.size/1024