tft-fe/dist/js/7705.3d0d7729.js

1 line
8.3 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[7705],{7705:function(t,e,r){r.r(e),r.d(e,{default:function(){return v}});var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"report-classification"},[e("search-bar",{ref:"searchBarForm",attrs:{formConfigs:t.formConfig},on:{headBtnClick:t.buttonClick}}),e("base-table",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,"table-props":t.tableProps,"table-data":t.tableData,"max-height":t.tableH},on:{emitFun:t.categoryChange}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:180,label:"操作","method-list":t.tableBtn},on:{clickBtn:t.handleClick},slot:"handleBtn"}):t._e()],1),e("pagination",{attrs:{page:t.listQuery.current,limit:t.listQuery.size,total:t.total},on:{"update:page":function(e){return t.$set(t.listQuery,"current",e)},"update:limit":function(e){return t.$set(t.listQuery,"size",e)},pagination:function(e){return t.getList()}}}),e("base-dialog",{attrs:{dialogTitle:t.addOrEditTitle,dialogVisible:t.centervisible,"before-close":t.handleCancel},on:{cancel:t.handleCancel,confirm:t.handleConfirm}},[e("report-name-edit",{ref:"reportNameEdit",on:{successSubmit:t.successSubmit}})],1)],1)},n=[],o=function(){var t=this,e=t._self._c;return e("el-form",{ref:"form",attrs:{rules:t.rules,"label-width":"100px",model:t.form}},[e("el-form-item",{attrs:{label:"报表名称",prop:"fileName"}},[e("el-input",{model:{value:t.form.fileName,callback:function(e){t.$set(t.form,"fileName",e)},expression:"form.fileName"}})],1)],1)},i=[],s=r(6527),l={name:"ReportNameEdit",data(){return{form:{id:"",fileName:""},rules:{fileName:[{required:!0,message:"请输入报表分类名",trigger:"blur"}]}}},methods:{init(t){t&&(this.form.id=t,(0,s.QL)({id:t}).then((t=>{0===t.code&&(this.form.fileName=t.data.fileName)})))},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;(0,s.sy)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success"}),this.$emit("successSubmit"))})),this.$emit("successSubmit")}))},formClear(){this.$refs.form.resetFields()}}},u=l,c=r(1001),d=(0,c.Z)(u,o,i,!1,null,null,null),p=d.exports,m=r(475),h=function(){var t=this,e=t._self._c;return e("div",[e("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},on:{change:t.changeCategory},model:{value:t.categoryId,callback:function(e){t.categoryId=e},expression:"categoryId"}},t._l(t.list,(function(t){return e("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})})),1)],1)},f=[],g={name:"categorySelect",props:{injectData:{type:Object,default:()=>({})}},data(){return{categoryId:"",list:JSON.parse(localStorage.getItem("reportCategory"))}},mounted(){this.init()},methods:{init(){this.categoryId=this.injectData.category},changeCategory(){this.$emit("emitData",{categoryId:this.categoryId,injectData:this.injectData})}},watch:{injectData(t,e){e.enabled!==t.enabled&&this.init()}}},y=g,b=(0,c.Z)(y,h,f,!1,null,null,null),C=b.exports;const N=[{prop:"fileName",label:"报表名称"},{prop:"category",label:"报表分类",subcomponent:C},{prop:"createTime",label:"添加时间",filter:m.g6}],k=[{type:"view",btnName:"预览"},{type:"design",btnName:"设计"},{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var Z={name:"ReportListDetail",components:{ReportNameEdit:p},data(){return{formConfig:[{type:"input",label:"关键字",placeholder:"报表名称",param:"name",width:200},{type:"select",label:"报表分类",selectOptions:[],param:"category",labelField:"name",valueField:"id",defaultSelect:"",width:200},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:N,tableData:[],tableBtn:k,tableH:(0,m.NC)(330),total:0,listQuery:{current:1,size:20,name:"",category:""},typeList:[],centervisible:!1,addOrEditTitle:""}},created(){this.getCategorylist()},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,m.NC)(265)})),this.formConfig[1].defaultSelect=this.$route.params.categoryId||"",this.listQuery.category=this.$route.params.categoryId||""},methods:{getList(){(0,s.kB)({...this.listQuery}).then((t=>{0===t.code&&t.data?(this.tableData=t.data.records,this.total=t.data.total):(this.tableData=[],this.total=0)}))},getCategorylist(){(0,s.J_)({}).then((t=>{0===t.code&&t.data.length>0?(localStorage.setItem("reportCategory",JSON.stringify(t.data)),this.formConfig[1].selectOptions=t.data):localStorage.setItem("reportCategory",""),this.getList()}))},handleClick(t){switch(t.type){case"view":this.$router.push({name:"reportView",params:{name:t.data.name}});break;case"design":this.$router.push({name:"reportDesign",params:{name:t.data.name}});break;case"edit":this.addOrEditTitle="编辑",this.centervisible=!0,this.$nextTick((()=>{this.$refs.reportNameEdit.init(t.data.id)}));break;default:this.$confirm('确认删除报表"'+t.data.name+'"吗?',{type:"warning"}).then((()=>{(0,s.wy)({id:t.data.id}).then((()=>{this.$message({message:"报表删除成功",type:"success"}),this.listQuery.current=1,this.getList()}))})).catch((()=>{}))}},buttonClick(t){switch(t.btnName){case"search":this.listQuery.name=t.name,this.listQuery.category=t.category,this.listQuery.current=1,this.getList();break;default:this.$router.push({path:"/basicConfig/reportManagement/reportDesign"})}},handleCancel(){this.$refs.reportNameEdit.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.reportNameEdit.submitForm()},successSubmit(){this.handleCancel(),this.getList()},categoryChange(t){(0,s.sy)({fileName:t.injectData.fileName,id:t.injectData.id,category:t.categoryId}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success"}),this.getList())}))}}},R=Z,$=(0,c.Z)(R,a,n,!1,null,null,null),v=$.exports},6527:function(t,e,r){r.d(e,{AT:function(){return Z},Hg:function(){return m},J_:function(){return n},Kx:function(){return $},QL:function(){return l},V0:function(){return g},W0:function(){return h},a:function(){return p},an:function(){return k},bu:function(){return N},fL:function(){return R},gc:function(){return v},kB:function(){return o},m3:function(){return d},oR:function(){return C},sy:function(){return i},uW:function(){return y},uj:function(){return b},up:function(){return c},wF:function(){return f},wy:function(){return s},yk:function(){return u}});var a=r(8859);function n(t){return(0,a.Z)({url:"/report/report-sheet-category/list",method:"post",data:t})}function o(t){return(0,a.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function i(t){return(0,a.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function s(t){return(0,a.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function l(t){return(0,a.Z)({url:"/report/report-sheet/get",method:"post",data:t})}function u(t){return(0,a.Z)({url:"/report/report-sheet-category/page",method:"post",data:t})}function c(t){return(0,a.Z)({url:"/report/GlassReport/getReportNum",method:"post",data:t})}function d(t){return(0,a.Z)({url:"/report/report-sheet-category/add",method:"post",data:t})}function p(t){return(0,a.Z)({url:"/report/report-sheet-category/update",method:"post",data:t})}function m(t){return(0,a.Z)({url:"/report/report-sheet-category/get",method:"post",data:t})}function h(t){return(0,a.Z)({url:"/report/report-sheet-category/delete",method:"post",data:t})}function f(t){return(0,a.Z)({url:"/order/proReport/getProductReportData",method:"post",data:t})}function g(t){return(0,a.Z)({url:"/order/proReport/exportProductReport",method:"post",responseType:"blob",data:t,timeout:6e4})}function y(t){return(0,a.Z)({url:"/report/GlassReport/listGlass",method:"post",data:t})}function b(t){return(0,a.Z)({url:"/report/GlassReport/qualityReport",method:"post",data:t})}function C(t){return(0,a.Z)({url:"/report/GlassReport/qualityReportexport",method:"post",responseType:"blob",data:t})}function N(t){return(0,a.Z)({url:"/report/GlassReport/thickReport",method:"post",data:t})}function k(t){return(0,a.Z)({url:"/report/GlassReport/thickReportexport",method:"post",responseType:"blob",data:t})}function Z(t){return(0,a.Z)({url:"/quality/finalpackaging/queryGlassData",method:"post",data:t})}function R(t){return(0,a.Z)({url:"/quality/finalpackaging/claGlassData",method:"post",data:t})}function $(t){return(0,a.Z)({url:"/report/GlassReport/getGlassVoid",method:"post",data:t})}function v(t){return(0,a.Z)({url:"/report/GlassReport/getUnitVoid",method:"post",data:t})}}}]);