1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2e9bea50"],{"0e8f":function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"e",(function(){return o})),a.d(t,"c",(function(){return s})),a.d(t,"d",(function(){return l}));var r=a("b775");function n(e){return Object(r["a"])({url:"/department/addDepartment",method:"post",data:e})}function i(e){return Object(r["a"])({url:"/department/deleteDepartment/"+e,method:"delete"})}function o(e){return Object(r["a"])({url:"/department/updateDepartment",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/department/getDepartment/",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/department/getDepartmentList",method:"post",data:e})}},"195a":function(e,t,a){},de4e:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app-container"},[a("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:"订单编号..."},model:{value:e.filterQuery.managerOrderId,callback:function(t){e.$set(e.filterQuery,"managerOrderId",t)},expression:"filterQuery.managerOrderId"}}),a("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:"用户姓名..."},model:{value:e.filterQuery.userName,callback:function(t){e.$set(e.filterQuery,"userName",t)},expression:"filterQuery.userName"}}),a("el-input",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{placeholder:"党费备注..."},model:{value:e.filterQuery.managerDescript,callback:function(t){e.$set(e.filterQuery,"managerDescript",t)},expression:"filterQuery.managerDescript"}}),a("el-button",{staticClass:"filter-item",attrs:{type:"primary",icon:"el-icon-search"},on:{click:e.handleFilter}},[e._v("搜索")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleCreate}},[e._v("添加新党费信息")]),a("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleDowmExcel}},[e._v("导出Excel")]),a("el-button",{staticClass:"filter-item",attrs:{type:"success",icon:"el-icon-edit"},on:{click:e.handleDowmDemoExcel}},[e._v("导出样表")]),a("el-upload",{staticClass:"inline-block",attrs:{action:"","on-change":e.handleChange,"on-remove":e.handleRemove,"on-exceed":e.handleExceed,limit:e.limitUpload,accept:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel","auto-upload":!1}},[a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],staticClass:"filter-item",attrs:{type:"warning",icon:"el-icon-edit"}},[e._v("导入Excel")])],1),a("div",{staticClass:"filter-container-child"},[a("el-select",{staticStyle:{width:"150px"},attrs:{clearable:"",placeholder:"请选择所属部门"},model:{value:e.filterQuery.departmentName,callback:function(t){e.$set(e.filterQuery,"departmentName",t)},expression:"filterQuery.departmentName"}},e._l(e.departmentList,(function(e){return a("el-option",{key:e.departmentId,attrs:{label:e.departmentName,value:e.departmentId}})})),1),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},attrs:{clearable:"",placeholder:"请选择支付状态"},model:{value:e.filterQuery.payStatus,callback:function(t){e.$set(e.filterQuery,"payStatus",t)},expression:"filterQuery.payStatus"}},[a("el-option",{attrs:{value:"1",label:"已支付"}}),a("el-option",{attrs:{value:"0",label:"未支付",selected:"true"}})],1),a("el-select",{staticClass:"filter-item",staticStyle:{width:"150px"},model:{value:e.filterQuery.descOption,callback:function(t){e.$set(e.filterQuery,"descOption",t)},expression:"filterQuery.descOption"}},[a("el-option",{attrs:{value:"1",label:"降序"}}),a("el-option",{attrs:{value:"0",label:"升序",selected:"true"}})],1)],1),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],attrs:{data:e.list,"element-loading-text":"Loading",border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{align:"center",label:"ID",width:"70",type:"index"}}),a("el-table-column",{attrs:{"class-name":"status-col",label:"党费订单编号",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.managerOrderId||""==t.row.managerOrderId?a("span",[e._v("暂无信息")]):a("span",[e._v(" "+e._s(t.row.managerOrderId))])]}}])}),a("el-table-column",{attrs:{label:"用户姓名",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.userIdEntity.userName||""==t.row.userIdEntity.userName?a("span",[e._v("暂无信息")]):a("span",[e._v(" "+e._s(t.row.userIdEntity.userName))])]}}])}),a("el-table-column",{attrs:{align:"center",prop:"created_at",label:"用户身份号码",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.identityCard||""==t.row.identityCard?a("span",[e._v("暂无信息")]):a("span",[e._v(" "+e._s(t.row.identityCard))])]}}])}),a("el-table-column",{attrs:{label:"所属部门",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.departmentIdEntity.departmentName||""==t.row.departmentIdEntity.departmentName?a("span",[e._v("暂无信息")]):a("span",[e._v(" "+e._s(t.row.departmentIdEntity.departmentName))])]}}])}),a("el-table-column",{attrs:{label:"应缴党费(单位:元)",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[null==t.row.money||""==t.row.money?a("span",[e._v("暂无信息")]):a("span",[e._v(" "+e._s(t.row.money))])]}}])}),a("el-table-column",{attrs:{label:"党费备注",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(" "+e._s(t.row.managerDescript))])]}}])}),a("el-table-column",{attrs:{label:"缴费状态",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[0==t.row.payStatus?a("span",[e._v("未支付")]):e._e(),1==t.row.payStatus?a("span",[e._v("已支付")]):e._e()]}}])}),a("el-table-column",{attrs:{align:"center",prop:"created_at",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{type:"primary",size:"small",disabled:1==t.row.payStatus},on:{click:function(a){return e.handleUpdate(t.row)}}},[e._v("编辑")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteDate(t.row)}}},[e._v("删除")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:e.isShow,expression:"isShow"}],attrs:{type:"primary",size:"small"},on:{click:function(a){return e.qrCode(t.row)}}},[e._v("生成二维码")]),a("el-button",{directives:[{name:"show",rawName:"v-show",value:!e.isShow,expression:"!isShow"}],attrs:{type:"danger",size:"small"}},[e._v("暂无操作")])]}}])})],1),a("div",{staticStyle:{float:"right","margin-top":"30px"}},[a("el-pagination",{attrs:{background:"","current-page":e.currentPage,"page-sizes":[10,20,30,40],"page-size":10,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1),a("el-dialog",{attrs:{title:e.textMap[e.dialogStatus],visible:e.dialogFormVisible},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{ref:"dataForm",attrs:{model:e.form,rules:e.rules}},[a("el-form-item",{staticClass:"dialogShow",attrs:{label:"用户真实姓名:",prop:"userName","label-width":e.formLabelWidth}},[a("el-input",{attrs:{disabled:e.isEdit,autocomplete:"off"},model:{value:e.form.userName,callback:function(t){e.$set(e.form,"userName",t)},expression:"form.userName"}})],1),a("el-form-item",{staticClass:"dialogShow",attrs:{label:"用户身份证号码:",prop:"identityCard","label-width":e.formLabelWidth}},[a("el-input",{attrs:{disabled:e.isEdit,autocomplete:"off"},model:{value:e.form.identityCard,callback:function(t){e.$set(e.form,"identityCard",t)},expression:"form.identityCard"}})],1),a("el-form-item",{staticClass:"dialogShow",attrs:{label:"应缴党费(单位: 元):",prop:"money","label-width":e.formLabelWidth}},[a("el-input",{attrs:{type:"number",autocomplete:"off"},model:{value:e.form.money,callback:function(t){e.$set(e.form,"money",t)},expression:"form.money"}})],1),a("el-form-item",{staticClass:"dialogShow",attrs:{label:"党费备注:",prop:"managerDescript","label-width":e.formLabelWidth}},[a("el-input",{attrs:{autocomplete:"off"},model:{value:e.form.managerDescript,callback:function(t){e.$set(e.form,"managerDescript",t)},expression:"form.managerDescript"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.handleCancle}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){"create"==e.dialogStatus?e.createData():e.updateData()}}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"支付二维码",visible:e.dialogVisible,width:"20%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[a("div",{attrs:{id:"qrcode"}}),a("span",{staticStyle:{float:"right"}},[a("el-button",{attrs:{type:"danger"},on:{click:function(t){return e.downloadImg()}}},[e._v("下载二维码")])],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("确 定")])],1)])],1)},n=[],i=(a("5ab2"),a("6d57"),a("e10e"),a("9a33"),a("47e7"),a("88d6")),o=a("e285"),s=a("0e8f"),l=a("1f57"),c=a.n(l),d=a("52c1");function u(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function m(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){Object(i["a"])(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}var f={data:function(){return{list:null,tempData:{},key:"",isShow:!0,tempIndex:0,listLoading:!0,dialogFormVisible:!1,dialogVisible:!1,dialogStatus:"",textMap:{create:"添加党费信息",update:"修改党费信息"},form:{userName:"",departmentName:"",money:"",identityCard:"",managerDescript:""},isEdit:!1,formLabelWidth:"150px",total:0,currentPage:1,departmentList:{},filterQuery:{pageNum:1,pageSize:10},excelQuery:{},excelList:{},downTime:"",limitUpload:1,QRCodeUrl:"http://www.yphyd.club:8080/manager/pay?managerId=",userName:"",managerDescript:"",rules:{userName:[{required:!0,message:"用户姓名不能为空",trigger:"blur"},{pattern:/^[\u4e00-\u9fa5]{2,4}$/,message:"姓名长度在 2 到 4 个字符"}],identityCard:[{required:!0,message:"身份证号码不能为空",trigger:"blur"},{min:15,max:18,message:"请输入正确的身份证号码"},{pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,message:"请输入正确的用户身份证号码"}],money:[{required:!0,message:"待缴金额不能为空",trigger:"blur"}]}}},computed:m({},Object(d["b"])(["orgId"])),created:function(){this.getList(),this.isShow=!(null===this.orgId)},methods:{getList:function(){var e=this;this.listLoading=!0,this.clearDialogData(),this.listLoading=!1,this.filterQuery.orgId=this.orgId,Object(o["e"])(this.filterQuery).then((function(t){e.list=t.data.list,e.total=t.data.total,Object(s["d"])({orgId:e.orgId}).then((function(t){e.departmentList=t.data.list})),e.listLoading=!1}))},handleCreate:function(){var e=this;this.dialogFormVisible=!0,this.dialogStatus="create",this.isEdit=!1,this.$nextTick((function(){e.$refs["dataForm"].clearValidate()}))},handleUpdate:function(e){var t=this;this.dialogStatus="update",this.isEdit=!0,Object(o["d"])({managerId:e.managerId}).then((function(e){t.form=e.data,t.form.userName=e.data.userIdEntity.userName,t.form.departmentName=e.data.departmentIdEntity.departmentName})),this.dialogFormVisible=!0},handleFilter:function(){this.getList()},handleCancle:function(){this.clearDialogData(),this.dialogFormVisible=!1},clearDialogData:function(){this.form={}},createData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&(e.form.orgId=e.orgId,e.fullscreenLoading=!0,Object(o["a"])(e.form).then((function(t){e.dialogFormVisible=!1,e.fullscreenLoading=!1,e.$notify({title:"部门添加",message:t.msg,type:"success",duration:2e3}),e.getList()})))}))},deleteDate:function(e){var t=this;this.$confirm("此操作将永久删除该条记录, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){Object(o["b"])(e.managerId).then((function(e){t.$notify({title:"删除部门",message:e.msg,type:200===e.status?"success":"error",duration:2e3}),t.getList()}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))},updateData:function(){var e=this;this.$refs["dataForm"].validate((function(t){t&&Object(o["g"])(e.form).then((function(t){e.dialogFormVisible=!1,e.clearDialogData(),e.$notify({title:"更新部门",message:t.msg,type:200===t.status?"success":"error",duration:2e3}),e.getList()}))}))},handleSizeChange:function(e){this.filterQuery.pageSize=e,this.getList()},handleCurrentChange:function(e){this.filterQuery.pageNum=e,this.getList()},handleChange:function(e,t){this.fileTemp=e.raw,this.fileTemp?"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===this.fileTemp.type||"application/vnd.ms-excel"===this.fileTemp.type?this.importfxx(this.fileTemp):this.$message({type:"warning",message:"附件格式错误,请删除后重新上传!"}):this.$message({type:"warning",message:"请上传附件!"})},importfxx:function(e){var t=this;this.file=event.currentTarget.files[0];var r=!1,n=this.file,i=new FileReader;FileReader.prototype.readAsBinaryString=function(e){var r,n,i="",s=!1,l=new FileReader;l.onload=function(e){for(var c=new Uint8Array(l.result),d=c.byteLength,u=0;u<d;u++)i+=String.fromCharCode(c[u]);var m=a("f16e");r=s?m.read(btoa(fixdata(i)),{type:"base64"}):m.read(i,{type:"binary"}),n=m.utils.sheet_to_json(r.Sheets[r.SheetNames[0]]);var f=[];n.map((function(e){var t={};t.userName=e["用户真实姓名"],t.identityCard=e["用户身份证号"],t.money=e["应缴党费(单位: 元)"],t.managerDescript=e["党费备注"],t.money=parseFloat(t.money),f.push(t)})),t.da=f,t.dalen=f.length,f.forEach((function(e){e.orgId=t.orgId,Object(o["a"])(e).then((function(e){t.getList()}))}))},l.readAsArrayBuffer(e)},r?i.readAsArrayBuffer(n):i.readAsBinaryString(n)},handleExceed:function(){this.$message({type:"warning",message:"一次最多只能上传一个附件!"})},handleRemove:function(e,t){this.fileTemp=null},handleDowmExcel:function(){var e=this;this.$confirm("此操作将导出excel文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.downloadLoading=!0,e.excelQuery.managerOrderId=e.filterQuery.managerOrderId,e.excelQuery.userName=e.filterQuery.userName,e.excelQuery.managerDescript=e.filterQuery.managerDescript,e.excelQuery.departmentName=e.filterQuery.departmentName,e.excelQuery.payStatus=e.filterQuery.payStatus,e.excelQuery.descOption=e.filterQuery.descOption,e.excelQuery.orgId=e.filterQuery.orgId,Object(o["e"])(e.excelQuery).then((function(t){e.excelList=t.data.list;for(var r=0;r<e.excelList.length;r++)e.excelList[r].userName=e.excelList[r].userIdEntity.userName,e.excelList[r].departmentName=e.excelList[r].departmentIdEntity.departmentName,1===e.excelList[r].payStatus?e.excelList[r].isPay="已支付":0===e.excelList[r].payStatus&&(e.excelList[r].isPay="未支付");Promise.resolve().then(a.bind(null,"39a0")).then((function(t){var a=["党费订单编号","用户姓名","所属部门","应缴党费(单位: 元)","党费备注","支付状态","最近修改时间"],r=["managerOrderId","userName","departmentName","money","managerDescript","isPay","managerLastTime"],n=e.formatJson(r,e.excelList);e.downTime=e.moment(new Date).format("YYYY年MM月DD日 HH时mm分ss秒"),t.export_json_to_excel({header:a,data:n,filename:"党费缴费信息表_"+e.downTime}),e.downloadLoading=!1}))})).catch((function(){}))}))},formatJson:function(e,t){return t.map((function(t){return e.map((function(e){return t[e]}))}))},handleDowmDemoExcel:function(){var e=this;this.$confirm("此操作将导出excel模板文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.downloadLoading=!0,Promise.resolve().then(a.bind(null,"39a0")).then((function(t){var a=["用户真实姓名","用户身份证号","应缴党费(单位: 元)","党费备注"],r="";t.export_json_to_excel({header:a,data:r,filename:"党费管理模板"}),e.downloadLoading=!1}))})).catch((function(){}))},qrCode:function(e){this.dialogVisible=!0,this.userName=e.userIdEntity.userName,null==e.managerDescript||""===e.managerDescript?this.managerDescript="无备注信息":this.managerDescript=e.managerDescript,this.$nextTick((function(){document.getElementById("qrcode").innerHTML="",this.qrcode=new c.a("qrcode",{width:270,height:270,text:this.QRCodeUrl+e.managerId,colorDark:"#109dff",colorLight:"#d9d9d9"})}))},downloadImg:function(e){console.log(this.userName),console.log(this.managerDescript);var t=document.getElementById("qrcode").getElementsByTagName("canvas"),a=document.getElementById("qrcode").getElementsByTagName("img"),r=document.createElement("a"),n=t[0].toDataURL("image/jpg"),i=navigator.userAgent;if(-1!==i.indexOf("Trident")&&-1!==i.indexOf("Windows")){var o=atob(n.split(",")[1]),s=o.length,l=new Uint8Array(s);while(s--)l[s]=o.charCodeAt(s);var c=new Blob([l]);window.navigator.msSaveOrOpenBlob(c,JSON.stringify(this.qCodesData.goodsName)+".png")}else if(i.indexOf("Firefox")>-1){var d=this.base64ToBlob(n),u=document.createEvent("HTMLEvents");u.initEvent("click",!0,!0),r.download=this.userName+"_"+this.managerDescript,r.href=URL.createObjectURL(d),r.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}else a.src=t[0].toDataURL("image/jpg"),r.href=a.src,r.download=this.userName+"_"+this.managerDescript,r.click()}}},p=f,g=(a("f967"),a("4023")),h=Object(g["a"])(p,r,n,!1,null,null,null);t["default"]=h.exports},e285:function(e,t,a){"use strict";a.d(t,"a",(function(){return n})),a.d(t,"b",(function(){return i})),a.d(t,"g",(function(){return o})),a.d(t,"d",(function(){return s})),a.d(t,"e",(function(){return l})),a.d(t,"f",(function(){return c})),a.d(t,"c",(function(){return d}));var r=a("b775");function n(e){return Object(r["a"])({url:"/manager/addManager",method:"post",data:e})}function i(e){return Object(r["a"])({url:"/manager/deleteManager/"+e,method:"delete"})}function o(e){return Object(r["a"])({url:"/manager/updateManager",method:"post",data:e})}function s(e){return Object(r["a"])({url:"/manager/getManager/",method:"get",params:e})}function l(e){return Object(r["a"])({url:"/manager/getManagerList",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/manager/getPayTotal",method:"post",data:e})}function d(e){return Object(r["a"])({url:"/manager/getBarStatistics",method:"post",data:e})}},f967:function(e,t,a){"use strict";var r=a("195a"),n=a.n(r);n.a}}]);
|