tft-fe/dist/js/9707.2daefc8f.js
2023-06-30 14:01:06 +08:00

1 line
6.3 KiB
JavaScript

"use strict";(self["webpackChunktft_mes"]=self["webpackChunktft_mes"]||[]).push([[9707],{9707:function(t,e,r){r.r(e),r.d(e,{default:function(){return C}});var s=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}},[t.tableBtn.length?e("method-btn",{attrs:{slot:"handleBtn",width:80,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-class-add",{ref:"reportClass",on:{successSubmit:t.successSubmit}})],1)],1)},n=[],a=r(475),i=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:"name"}},[e("el-input",{model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1)],1)},o=[],u=r(6527),l={name:"ReportClassAdd",data(){return{form:{id:"",name:""},isEdit:!1,rules:{name:[{required:!0,message:"请输入报表分类名",trigger:"blur"}]}}},methods:{init(t){t?(this.isEdit=!0,this.form.id=t,(0,u.Hg)({id:t}).then((t=>{0===t.code&&(this.form.name=t.data.name)}))):(this.isEdit=!1,this.form.id="")},submitForm(){this.$refs["form"].validate((t=>{if(!t)return!1;this.isEdit?((0,u.a)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))})),this.$emit("successSubmit")):(console.log(this.form),(0,u.m3)({...this.form}).then((t=>{0===t.code&&(this.$message({message:"操作成功",type:"success",duration:1500}),this.$emit("successSubmit"))})),this.$emit("successSubmit"))}))},formClear(){this.$refs.form.resetFields(),this.isEdit=!1}}},c=l,d=r(1001),p=(0,d.Z)(c,i,o,!1,null,null,null),h=p.exports;const m=[{prop:"name",label:"报表分类名"}],f=[{type:"edit",btnName:"编辑"},{type:"delete",btnName:"删除"}];var b={name:"ReportClassification",components:{ReportClassAdd:h},data(){return{formConfig:[{type:"input",label:"关键字",placeholder:"报表分类名",param:"name",width:300},{type:"button",btnName:"查询",name:"search",color:"primary"},{type:"separate"},{type:"button",btnName:"新增",name:"add",color:"success",plain:!0}],tableProps:m,tableData:[],tableBtn:f,tableH:(0,a.NC)(330),total:0,listQuery:{current:1,size:20,name:""},centervisible:!1,addOrEditTitle:""}},mounted(){window.addEventListener("resize",(()=>{this.tableH=(0,a.NC)(265)})),this.getList()},methods:{getList(){(0,u.yk)({...this.listQuery}).then((t=>{0===t.code&&t.data?(this.tableData=t.data.records,this.total=t.data.total):(this.tableData=[],this.total=0)}))},handleClick(t){"edit"===t.type?(this.addOrEditTitle="编辑",this.$nextTick((()=>{this.$refs.reportClass.init(t.data.id)})),this.centervisible=!0):this.$confirm('确认删除报表分类名"'+t.data.name+'"吗?',{type:"warning"}).then((()=>{(0,u.W0)({id:t.data.id}).then((()=>{this.$message({message:"工单删除成功",type:"success",duration:1500,onClose:()=>{}}),this.listQuery.current=1,this.getList()}))})).catch((()=>{}))},buttonClick(t){switch(t.btnName){case"search":this.listQuery.name=t.name,this.listQuery.current=1,this.getList();break;default:this.addOrEditTitle="新增",this.centervisible=!0,this.$nextTick((()=>{this.$refs.reportClass.init()}))}},handleCancel(){this.$refs.reportClass.formClear(),this.centervisible=!1,this.addOrEditTitle=""},handleConfirm(){this.$refs.reportClass.submitForm()},successSubmit(){this.handleCancel(),this.getList()}}},g=b,y=(0,d.Z)(g,s,n,!1,null,null,null),C=y.exports},6527:function(t,e,r){r.d(e,{AT:function(){return C},Hg:function(){return p},J_:function(){return n},Kx:function(){return Z},QL:function(){return u},W0:function(){return h},a:function(){return d},an:function(){return y},bu:function(){return g},fL:function(){return k},gc:function(){return $},kB:function(){return a},m3:function(){return c},oR:function(){return b},sy:function(){return i},uW:function(){return m},uj:function(){return f},wy:function(){return o},yk:function(){return l}});var s=r(8859);function n(t){return(0,s.Z)({url:"/report/report-sheet-category/list",method:"post",data:t})}function a(t){return(0,s.Z)({url:"/report/report-sheet/page",method:"post",data:t})}function i(t){return(0,s.Z)({url:"/report/report-sheet/update",method:"post",data:t})}function o(t){return(0,s.Z)({url:"/report/report-sheet/delete",method:"post",data:t})}function u(t){return(0,s.Z)({url:"/report/report-sheet/get",method:"post",data:t})}function l(t){return(0,s.Z)({url:"/report/report-sheet-category/page",method:"post",data:t})}function c(t){return(0,s.Z)({url:"/report/report-sheet-category/add",method:"post",data:t})}function d(t){return(0,s.Z)({url:"/report/report-sheet-category/update",method:"post",data:t})}function p(t){return(0,s.Z)({url:"/report/report-sheet-category/get",method:"post",data:t})}function h(t){return(0,s.Z)({url:"/report/report-sheet-category/delete",method:"post",data:t})}function m(t){return(0,s.Z)({url:"/report/GlassReport/listGlass",method:"post",data:t})}function f(t){return(0,s.Z)({url:"/report/GlassReport/qualityReport",method:"post",data:t})}function b(t){return(0,s.Z)({url:"/report/GlassReport/qualityReportexport",method:"post",responseType:"blob",data:t})}function g(t){return(0,s.Z)({url:"/report/GlassReport/thickReport",method:"post",data:t})}function y(t){return(0,s.Z)({url:"/report/GlassReport/thickReportexport",method:"post",responseType:"blob",data:t})}function C(t){return(0,s.Z)({url:"/quality/finalpackaging/queryGlassData",method:"post",data:t})}function k(t){return(0,s.Z)({url:"/quality/finalpackaging/claGlassData",method:"post",data:t})}function Z(t){return(0,s.Z)({url:"/report/GlassReport/getGlassVoid",method:"post",data:t})}function $(t){return(0,s.Z)({url:"/report/GlassReport/getUnitVoid",method:"post",data:t})}}}]);