(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-61179e5f"],{1160: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)],1)},l=[],r=a("80cb"),o=a("f6e8"),i=a("433d"),c=a("b775");function s(e){return Object(c["a"])({url:"/pc/fin/warehouse/ledger/getDeptListExport",responseType:"blob",method:"post",params:e})}function d(e){return d="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},d(e)}function u(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function p(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?u(Object(a),!0).forEach((function(t){f(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):u(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function f(e,t,a){return(t=m(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function m(e){var t=b(e,"string");return"symbol"==d(t)?t:t+""}function b(e,t){if("object"!=d(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,t||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var h={name:"index",components:{MyButton:o["a"],MyTableV2:r["a"]},data:function(){var e=this;return{items:[{type:"cascader",dataIndex:"agencyId",label:"机构",placeholder:"请选择",optionsConfig:{url:"/pc/fin/sys/tenant/select/tree_fin_tenant",props:null},defaultValue:"",options:[]},{type:"select",dataIndex:"departmentId",label:"部门",placeholder:"请选择",defaultValue:"",optionsConfig:{url:"/pc/fin/sys/tenant/department/list/all",label:"name",value:"id"},options:[]},{type:"select",dataIndex:"goodsTemplateId",label:"物品名称",placeholder:"请输入",optionsConfig:{label:"goodsName",value:"id",url:i["a"].apiBaseURL+"/pc/base/goods/template/query/goodsTemplate"},options:[],defaultValue:""},{type:"cascader",dataIndex:"categoryId",label:"分类",placeholder:"请选择",defaultValue:"",options:[],optionsConfig:{label:"label",value:"id",url:i["a"].apiBaseURL+"/pc/base/category/select/tree",props:{checkStrictly:!1,emitPath:!1,value:"id"}}},{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:i["a"].apiBaseURL+"/pc/fin/warehouse/ledger/getDeptLedgerList",tools:{columnsCtrl:{show:!1},generalExport:{show:!1},custom:[{name:"导出",icon:"el-icon-download",click:function(){e.handleExport()}}]},columns:[{title:"机构",field:"agencyName",align:"left",minWidth:130},{title:"部门",field:"departName",align:"left",minWidth:130},{title:"分类",field:"categoryName",align:"left",minWidth:130},{title:"所属类别",field:"costType",align:"center",width:80},{title:"物品名称",field:"goodsTemplateName",align:"left",minWidth:130},{title:"规格型号",field:"baseGoodsModelsName",align:"left",minWidth:130},{title:"单位",field:"unit",align:"center",width:80},{title:"在用数量",field:"kucun",align:"center",width:80}],operation:{show:!1},paging:{show:!0,page:{small:!1,pageNum:1,pageSize:10,total:0}}}}},created:function(){},methods:{handleExport:function(){var e=this,t=this.$loading({lock:!0,text:"导出中,请稍候...",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});s(p({},this.filterFrom)).then((function(a){var n=new Blob([a],{type:"application/vnd.ms-excel"}),l="部门物品查询.xls";if("download"in document.createElement("a")){var r=document.createElement("a");r.download=l,r.style.display="none",r.href=URL.createObjectURL(n),document.body.appendChild(r),r.click(),URL.revokeObjectURL(r.href),document.body.removeChild(r)}else navigator.msSaveBlob(n,l);e.$message.success("导出成功!"),t.close()})).catch((function(){t.close()}))},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)}}},y=h,g=a("2877"),v=Object(g["a"])(y,n,l,!1,null,"d5ff8c4a",null);t["default"]=v.exports},"433d":function(e,t,a){"use strict";var n=a("c559"),l={ftpUrl:n["a"].ftpUrl,apiBaseURL:n["a"].apiBaseURL};t["a"]=l}}]);
|