(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3bc7e395"],{"433d":function(e,t,n){"use strict";var a=n("c559"),r={ftpUrl:a["a"].ftpUrl,apiBaseURL:a["a"].apiBaseURL};t["a"]=r},"6ec5":function(e,t,n){"use strict";n.d(t,"l",(function(){return o})),n.d(t,"a",(function(){return i})),n.d(t,"g",(function(){return u})),n.d(t,"c",(function(){return s})),n.d(t,"j",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"d",(function(){return d})),n.d(t,"e",(function(){return f})),n.d(t,"p",(function(){return g})),n.d(t,"n",(function(){return p})),n.d(t,"m",(function(){return m})),n.d(t,"k",(function(){return h})),n.d(t,"s",(function(){return b})),n.d(t,"r",(function(){return y})),n.d(t,"q",(function(){return w})),n.d(t,"o",(function(){return v})),n.d(t,"b",(function(){return S})),n.d(t,"i",(function(){return T})),n.d(t,"h",(function(){return D}));var a=n("b775"),r=n("433d");function o(e){return a["a"].get(r["a"].apiBaseURL+"/pc/fin/sys/tenant/select/tree_fin_tenant",{params:e})}function i(e){return Object(a["a"])({url:"/pc/base/category/add",method:"post",data:e})}function u(e){return Object(a["a"])({url:"/pc/base/category/edit",method:"post",data:e})}function s(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 l(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 g(e){return Object(a["a"])({url:"/pc/base/warehouse/select/tenant_warehouse",method:"get",params:e})}function p(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(r["a"].apiBaseURL+"/pc/base/category/select/tree",{params:e})}function b(e){return Object(a["a"])({url:"/pc/base/warehouse/select/number",method:"get",params:e})}function y(e){return Object(a["a"])({url:"/pc/base/warehouse/select/in/warehouse/num",method:"get",params:e})}function w(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/user/query/user",method:"get",params:e})}function v(e){return Object(a["a"])({url:"/pc/base/goods/models/queryGoodsModelInfo",method:"get",params:e})}function S(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/add",method:"post",data:e})}function T(e){return Object(a["a"])({url:"/pc/fin/sys/tenant/edit",method:"post",data:e})}function D(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 r(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),r=t.slice(6,8),o=t.slice(8,10),i=t.slice(10,12),u=t.slice(12,14),s=n+"-"+a+"-"+r+" "+o+":"+i+":"+u;return s}function i(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),r=t.slice(6,8),o=n+"-"+a+"-"+r;return o}function u(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:r(o))}return t}catch(i){return"-"}}function s(){var e=new Date,t=e.getFullYear(),n=(e.getMonth()+1).toString().padStart(2,"0"),a=e.getDate().toString().padStart(2,"0"),r=e.getHours().toString().padStart(2,"0"),o=e.getMinutes().toString().padStart(2,"0"),i=e.getSeconds().toString().padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a," ").concat(r,":").concat(o,":").concat(i)}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 l(e){if(e){e instanceof Date||(e=new Date(e.replace(/-/g,"/")));var t=e.getTime(),n=6e4,a=60*n,r=24*a,o=7*r,i=30*r,u=(new Date).getTime(),s=u-t;if(!(s<0)){var c=s/n,l=s/a,d=s/r,f=s/o,g=s/i,p="";if(g>=1&&g<=3)p=" "+parseInt(g)+"月前";else if(f>=1&&f<=3)p=" "+parseInt(f)+"周前";else if(d>=1&&d<=6)p=" "+parseInt(d)+"天前";else if(l>=1&&l<=23)p=" "+parseInt(l)+"小时前";else if(c>=1&&c<=59)p=" "+parseInt(c)+"分钟前";else if(s>=0&&s<=n)p="刚刚";else{var m=new Date;m.setTime(t);var h=m.getFullYear(),b=m.getMonth()+1<10?"0"+(m.getMonth()+1):m.getMonth()+1,y=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();p=h+"-"+b+"-"+y}return p}}}n.r(t),n.d(t,"DateToLong",(function(){return a})),n.d(t,"LongToDateTime",(function(){return o})),n.d(t,"LongToDate",(function(){return i})),n.d(t,"formatDate",(function(){return u})),n.d(t,"formattedDate",(function(){return s})),n.d(t,"formattedDateDuan",(function(){return c})),n.d(t,"timeago",(function(){return l}))},"8a53":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)],1)},r=[],o=n("80cb"),i=n("f6e8"),u=n("433d"),s=n("6ec5"),c=n("6f7e"),l={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:u["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:u["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"}},{type:"select",dataIndex:"baseGoodsModelsId",label:"规格型号",placeholder:"请输入",defaultValue:"",options:[],optionsConfig:{label:"modelName",value:"id",url:u["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:u["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(){s["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=l,f=n("2877"),g=Object(f["a"])(d,a,r,!1,null,"28fd2f8d",null);t["default"]=g.exports}}]);