(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-37072cda","chunk-2d0e66d0"],{"433d":function(e,t,n){"use strict";var a=n("c559"),i={ftpUrl:a["a"].ftpUrl,apiBaseURL:a["a"].apiBaseURL};t["a"]=i},"6ec5":function(e,t,n){"use strict";n.d(t,"l",(function(){return o})),n.d(t,"a",(function(){return l})),n.d(t,"g",(function(){return s})),n.d(t,"c",(function(){return r})),n.d(t,"j",(function(){return c})),n.d(t,"f",(function(){return u})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"p",(function(){return p})),n.d(t,"n",(function(){return g})),n.d(t,"m",(function(){return m})),n.d(t,"k",(function(){return h})),n.d(t,"s",(function(){return S})),n.d(t,"r",(function(){return b})),n.d(t,"q",(function(){return y})),n.d(t,"o",(function(){return w})),n.d(t,"b",(function(){return v})),n.d(t,"i",(function(){return x})),n.d(t,"h",(function(){return T}));var a=n("b775"),i=n("433d");function o(e){return a["a"].get(i["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:e})}function l(e){return Object(a["a"])({url:"/pc/base/category/add",method:"post",data:e})}function s(e){return Object(a["a"])({url:"/pc/base/category/edit",method:"post",data:e})}function r(e){return Object(a["a"])({url:"/pc/base/warehouse/add",method:"post",data:e})}function c(e){return Object(a["a"])({url:"/pc/base/warehouse/edit",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/pc/base/warehouse/del",method:"delete",data:e})}function d(){return Object(a["a"])({url:"/pc/base/goods/template/select/classificationCode",method:"get"})}function f(e){return Object(a["a"])({url:"/pc/base/category/del",method:"delete",data:e})}function p(e){return Object(a["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:e})}function g(e){return Object(a["a"])({url:"/pc/base/goods/template/query/goodsTemplate",method:"get",params:e})}function m(e){return Object(a["a"])({url:"/pc/base/goods/models/query/goodsModel",method:"get",params:e})}function h(e){return a["a"].get(i["a"].apiBaseURL+"/pc/base/category/select/tree",{params:e})}function S(e){return Object(a["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:e})}function b(e){return Object(a["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:e})}function y(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:e})}function w(e){return Object(a["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:e})}function v(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:e})}function x(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:e})}function T(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/editState",method:"post",data:e})}},"6f7e":function(e,t,n){"use strict";function a(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 o(e){if(null==e||void 0==e||""==e||"null"==e||"undefined"==e)return!0;var t=e.toString(),n=t.slice(0,4),a=t.slice(4,6),i=t.slice(6,8),o=t.slice(8,10),l=t.slice(10,12),s=t.slice(12,14),r=n+"-"+a+"-"+i+" "+o+":"+l+":"+s;return r}function l(e){if(null==e||void 0==e||""==e||"null"==e||"undefined"==e)return!0;var t=e.toString(),n=t.slice(0,4),a=t.slice(4,6),i=t.slice(6,8),o=n+"-"+a+"-"+i;return o}function s(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 n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(var a in n)if(new RegExp("(".concat(a,")")).test(t)){var o=n[a]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?o:i(o))}return t}catch(l){return"-"}}function r(){var e=new Date,t=e.getFullYear(),n=(e.getMonth()+1).toString().padStart(2,"0"),a=e.getDate().toString().padStart(2,"0"),i=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),l=e.getSeconds().toString().padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a," ").concat(i,":").concat(o,":").concat(l)}function c(){var e=new Date,t=e.getFullYear(),n=(e.getMonth()+1).toString().padStart(2,"0"),a=e.getDate().toString().padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a)}function u(e){if(e){e instanceof Date||(e=new Date(e.replace(/-/g,"/")));var t=e.getTime(),n=6e4,a=60*n,i=24*a,o=7*i,l=30*i,s=(new Date).getTime(),r=s-t;if(!(r<0)){var c=r/n,u=r/a,d=r/i,f=r/o,p=r/l,g="";if(p>=1&&p<=3)g=" "+parseInt(p)+"月前";else if(f>=1&&f<=3)g=" "+parseInt(f)+"周前";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(r>=0&&r<=n)g="刚刚";else{var m=new Date;m.setTime(t);var h=m.getFullYear(),S=m.getMonth()+1<10?"0"+(m.getMonth()+1):m.getMonth()+1,b=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+"-"+S+"-"+b}return g}}}n.r(t),n.d(t,"DateToLong",(function(){return a})),n.d(t,"LongToDateTime",(function(){return o})),n.d(t,"LongToDate",(function(){return l})),n.d(t,"formatDate",(function(){return s})),n.d(t,"formattedDate",(function(){return r})),n.d(t,"formattedDateDuan",(function(){return c})),n.d(t,"timeago",(function(){return u}))},9960:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.dialogShow?n("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}},[n("el-row",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],attrs:{"element-loading-text":"数据导入中"}},[n("el-col",{attrs:{span:24}},[n("el-form",[null!=e.templateSettings.templateUrl?n("el-form-item",{attrs:{label:"下载模板:",prop:"lon"}},[n("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(" "),n("el-form-item",{attrs:{label:"选取文件:",prop:"lon"}},[n("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}},[n("el-button",{attrs:{size:"small",type:"primary"}},[e._v(e._s(e.fileSettings.title))]),e._v(" "),n("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(" "),n("el-form-item",{attrs:{label:"导入数据:",prop:"lon"}},[n("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=[],o=n("5f87"),l=n("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[l["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 n=e.size/1024<this.fileSettings.max;return n||this.$message.error("上传文件大小不能超过 "+this.fileSettings.max+"kb!"),t&&n},handleSubmit:function(){this.isUpload?this.$refs[this.fileSettings.ref].submit():this.$message.error("请上传文件")},file:function(e,t){e&&(this.isUpload=!0)},handleUploadSuccess:function(e,t,n){var a=this;this.fileSettings.onSuccess&&(this.loading=!0,this.fileSettings.onSuccess(e,(function(){a.loading=!1,a.importSetting.dialogShow=!1})))}}},r=s,c=n("2877"),u=Object(c["a"])(r,a,i,!1,null,null,null);t["default"]=u.exports},c906:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"app-container"},[n("el-container",[n("el-container",[n("el-card",{staticClass:"box-card",staticStyle:{width:"100%"},attrs:{shadow:"never"}},[n("div",{staticClass:"filter-container"},[n("my-search",{ref:"searchBar",attrs:{items:e.items},on:{search:e.fifterForm}})],1),e._v(" "),n("el-row",{staticStyle:{"margin-top":"15px"}},[n("el-col",[n("my-table-v2",{ref:"myTable",attrs:{filter:e.filterFrom,table:e.table}})],1)],1)],1)],1)],1),e._v(" "),n("my-import",{attrs:{"import-setting":e.importSetting,"dialog-show":e.importSetting.dialogShow,"dialog-title":e.importSetting.dialogTitle}})],1)},i=[],o=n("80cb"),l=n("f6e8"),s=n("433d"),r=n("6ec5"),c=n("9960"),u=n("dee4"),d=n("6f7e"),f=n("ecfc"),p={name:"index",components:{MyButton:l["a"],MyTableV2:o["a"],myImport:c["default"]},data:function(){return{items:[{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",defaultValue:"",options:[],cascader:[{key:"warehouseId",queryKey:"agencyId"},{key:"goodsTemplateId",queryKey:"agencyId"}],optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null}},{type:"select",dataIndex:"warehouseId",label:"仓库",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"warehouseName",value:"id",url:s["a"].apiBaseURL+"/pc/base/warehouse/select/tenant_warehouse"}},{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:"flowType",label:"类型",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"dict_label",value:"dict_value",url:s["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(u["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},table:{showIndex:!0,expand:!1,url:s["a"].apiBaseURL+"/pc/warehouse/flow/getTaiZhangList",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[]},columns:[{title:"机构",field:"agencyName",align:"left",width:130},{title:"仓库",field:"warehouseName",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(f["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:"zaiTuCount",align:"center",width:100},{title:"操作时间",field:"dealTime",align:"center",width:160,formatter:function(e){return{value:d["LongToDateTime"](e.dealTime)}}}],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(){r["e"]({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},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)}}},g=p,m=n("2877"),h=Object(m["a"])(g,a,i,!1,null,null,null);t["default"]=h.exports},ecfc:function(e,t,n){"use strict";function a(e){var t="",n=["采购入库","调拨","其他出库","部门分发","报废出库","物品退回","物品盘点"];return t=7==e.businessType?1==e.thisType?"盘盈入库":"盘亏出库":2==e.businessType?1==e.thisType?"调拨入库":"调拨出库":n[e.businessType-1],t}t["a"]=a}}]);
|