发票管理apiadmin
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-53e7eb26"],{"2b33":function(t,e,n){},3786:function(t,e,n){"use strict";n.d(e,"g",(function(){return a})),n.d(e,"h",(function(){return i})),n.d(e,"f",(function(){return r})),n.d(e,"i",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"e",(function(){return u})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return m}));var o=n("66df"),a=function(){return o["b"].request({url:"Auth/getGroups",method:"get"})},i=function(t){return o["b"].request({url:"Auth/index",method:"get",params:t})},r=function(t){return o["b"].request({url:"Auth/editRule",method:"post",data:t})},s=function(t){return o["b"].request({url:"Auth/getRuleList",method:"get",params:t})},l=function(t,e){return o["b"].request({url:"Auth/changeStatus",method:"get",params:{status:t,id:e}})},c=function(t){return o["b"].request({url:"Auth/add",method:"post",data:t})},u=function(t){return o["b"].request({url:"Auth/edit",method:"post",data:t})},d=function(t){return o["b"].request({url:"Auth/del",method:"get",params:{id:t}})},m=function(t){return o["b"].request({url:"Auth/delMember",method:"get",params:t})}},"386d":function(t,e,n){"use strict";var o=n("cb7c"),a=n("83a1"),i=n("5f1b");n("214f")("search",1,(function(t,e,n,r){return[function(n){var o=t(this),a=void 0==n?void 0:n[e];return void 0!==a?a.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=r(n,t,this);if(e.done)return e.value;var s=o(t),l=String(this),c=s.lastIndex;a(c,0)||(s.lastIndex=0);var u=i(s,l);return a(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},"5b56":function(t,e,n){"use strict";n("2b33")},"7f5e":function(t,e,n){"use strict";n.r(e);n("7f7f"),n("386d");var o=function(){var t=this,e=t._self._c;return e("div",[e("Row",[e("Col",{attrs:{span:"24"}},[e("Card",{staticClass:"margin-bottom-10"},[e("Form",{attrs:{inline:""}},[e("FormItem",{staticClass:"margin-bottom-0"},[e("Select",{staticStyle:{width:"120px"},attrs:{clearable:"",placeholder:"请选择状态"},model:{value:t.searchConf.status,callback:function(e){t.$set(t.searchConf,"status",e)},expression:"searchConf.status"}},[e("Option",{attrs:{value:1}},[t._v("启用")]),e("Option",{attrs:{value:0}},[t._v("禁用")])],1)],1),e("FormItem",{staticClass:"margin-bottom-0"},[e("Input",{attrs:{placeholder:"请输入组名称"},model:{value:t.searchConf.keywords,callback:function(e){t.$set(t.searchConf,"keywords",e)},expression:"searchConf.keywords"}})],1),e("FormItem",{staticClass:"margin-bottom-0"},[e("Button",{attrs:{type:"primary"},on:{click:t.search}},[t._v(t._s(t.$t("find_button"))+"/"+t._s(t.$t("refresh_button")))])],1)],1)],1)],1)],1),e("Row",[e("Col",{attrs:{span:"24"}},[e("Card",[e("div",{staticClass:"margin-bottom-15"},[e("Button",{directives:[{name:"has",rawName:"v-has",value:"Auth/add",expression:"'Auth/add'"}],attrs:{type:"primary",icon:"md-add"},on:{click:t.alertAdd}},[t._v(t._s(t.$t("add_button")))])],1),e("div",[e("Table",{attrs:{loading:t.listLoading,columns:t.columnsList,data:t.tableData,border:"","disabled-hover":""}})],1),e("div",{staticClass:"margin-top-15",staticStyle:{"text-align":"center"}},[e("Page",{attrs:{total:t.tableShow.listCount,current:t.tableShow.currentPage,"page-size":t.tableShow.pageSize,"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.changePage,"on-page-size-change":t.changeSize}})],1)])],1)],1),e("Modal",{attrs:{width:"668",styles:{top:"30px"}},on:{"on-visible-change":t.doCancel},model:{value:t.modalSetting.show,callback:function(e){t.$set(t.modalSetting,"show",e)},expression:"modalSetting.show"}},[e("p",{staticStyle:{color:"#2d8cf0"},attrs:{slot:"header"},slot:"header"},[e("Icon",{attrs:{type:"md-alert"}}),e("span",[t._v(t._s(t.formItem.id?"编辑":"新增")+"权限组")])],1),e("Form",{ref:"myForm",attrs:{rules:t.ruleValidate,model:t.formItem,"label-width":80}},[e("FormItem",{attrs:{label:"组名称",prop:"name"}},[e("Input",{attrs:{placeholder:"请输入权限组名称"},model:{value:t.formItem.name,callback:function(e){t.$set(t.formItem,"name",e)},expression:"formItem.name"}})],1),e("FormItem",{attrs:{label:"组描述",prop:"description"}},[e("Input",{attrs:{type:"textarea",placeholder:"请输入权限组描述"},model:{value:t.formItem.description,callback:function(e){t.$set(t.formItem,"description",e)},expression:"formItem.description"}})],1)],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{staticClass:"margin-right-10",attrs:{type:"text"},on:{click:t.cancel}},[t._v("取消")]),e("Button",{attrs:{type:"primary",loading:t.modalSetting.loading},on:{click:t.submit}},[t._v("确定")])],1)],1),e("Modal",{attrs:{width:"668",styles:{top:"30px"}},on:{"on-visible-change":t.doCancel},model:{value:t.authSetting.show,callback:function(e){t.$set(t.authSetting,"show",e)},expression:"authSetting.show"}},[e("p",{staticStyle:{color:"#2d8cf0"},attrs:{slot:"header"},slot:"header"},[e("Icon",{attrs:{type:"md-alert"}}),e("span",[t._v(t._s(t.formItem.id?"设置":"新增")+"权限")])],1),e("div",{staticStyle:{"max-height":"560px",overflow:"auto"}},[e("Tree",{ref:"formTree",attrs:{data:t.ruleList,"show-checkbox":"",multiple:""}})],1),e("div",{attrs:{slot:"footer"},slot:"footer"},[e("Button",{staticClass:"margin-right-10",attrs:{type:"text"},on:{click:function(e){t.authSetting.show=!1}}},[t._v("取消")]),e("Button",{attrs:{type:"primary",loading:t.authSetting.loading},on:{click:t.authEdit}},[t._v("确定")])],1)]),e("Modal",{attrs:{width:"998",styles:{top:"30px"}},model:{value:t.memberSetting.show,callback:function(e){t.$set(t.memberSetting,"show",e)},expression:"memberSetting.show"}},[e("p",{staticStyle:{color:"#2d8cf0"},attrs:{slot:"header"},slot:"header"},[e("Icon",{attrs:{type:"information-circled"}}),e("span",[t._v("组成员列表")])],1),e("div",[e("Table",{attrs:{loading:t.memberLoading,columns:t.memberColumns,data:t.memberData,border:"","disabled-hover":""}})],1),e("div",{staticClass:"margin-top-15",staticStyle:{"text-align":"center"}},[e("Page",{attrs:{total:t.memberShow.listCount,current:t.memberShow.currentPage,"page-size":t.memberShow.pageSize,"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.changeMemberPage,"on-page-size-change":t.changeMemberSize}})],1),e("p",{attrs:{slot:"footer"},slot:"footer"})])],1)},a=[],i=n("c24f"),r=n("3786"),s=function(t,e,n,o){if(t.buttonShow.edit)return e("Button",{props:{type:"primary"},style:{margin:"0 5px"},on:{click:function(){t.formItem.id=n.id,t.formItem.name=n.name,t.formItem.description=n.description,t.modalSetting.show=!0,t.modalSetting.index=o}}},t.$t("edit_button"))},l=function(t,e,n,o){if(t.buttonShow.edit)return e("Button",{props:{type:"info",ghost:!0},style:{margin:"0 5px"},on:{click:function(){t.formItem.id=n.id,Object(r["i"])({group_id:n.id}).then((function(e){t.ruleList=e.data.data.list})),t.authSetting.show=!0,t.authSetting.index=o}}},"设置权限")},c=function(t,e,n,o){if(t.buttonShow.del)return e("Poptip",{props:{confirm:!0,title:"您确定要删除这条数据吗? ",transfer:!0},on:{"on-ok":function(){Object(r["c"])(n.id).then((function(e){t.tableData.splice(o,1),t.$Message.success(e.data.msg)}))}}},[e("Button",{style:{margin:"0 5px"},props:{type:"error",placement:"top",loading:n.isDeleting}},t.$t("delete_button"))])},u=function(t,e,n,o){if(t.buttonShow.memberList)return e("Button",{props:{type:"primary"},style:{margin:"0 5px"},on:{click:function(){t.memberSetting.show=!0,t.memberShow.gid=n.id,t.getMemberList()}}},"组成员")},d=function(t,e,n,o){if(t.buttonShow.memberDel)return e("Poptip",{props:{confirm:!0,title:"您确定要删除这条数据吗? ",transfer:!0},on:{"on-ok":function(){Object(r["d"])({uid:n.id,gid:t.memberShow.gid}).then((function(e){t.memberData.splice(o,1),t.$Message.success(e.data.msg)}))}}},[e("Button",{style:{margin:"0 5px"},props:{type:"error",placement:"top",loading:n.isDeleting}},t.$t("delete_button"))])},m={name:"system_auth",data:function(){var t=this;return{ruleList:[],columnsList:[{title:"序号",type:"index",width:65,align:"center"},{title:"权限组",align:"center",key:"name",width:200},{title:"描述",align:"center",key:"description"},{title:"成员授权",align:"center",width:116,render:function(e,n){return e("div",[u(t,e,n.row,n.index)])}},{title:"状态",align:"center",width:100,render:function(e,n){var o=t;return e("i-switch",{attrs:{size:"large"},props:{"true-value":1,"false-value":0,value:n.row.status,disabled:!o.buttonShow.changeStatus},on:{"on-change":function(t){Object(r["b"])(t,n.row.id).then((function(t){o.$Message.success(t.data.msg),o.getList()}))}}},[e("span",{slot:"open"},o.$t("open_choose")),e("span",{slot:"close"},o.$t("close_choose"))])}},{title:"操作",align:"center",width:285,render:function(e,n){return e("div",[l(t,e,n.row,n.index),s(t,e,n.row,n.index),c(t,e,n.row,n.index)])}}],memberColumns:[{title:"序号",type:"index",width:65,align:"center"},{title:"用户账号",align:"center",key:"username"},{title:"用户昵称",align:"center",key:"nickname",width:100},{title:"登录次数",align:"center",key:"login_times",width:100},{title:"最后登录时间",align:"center",key:"last_login_time",width:140},{title:"最后登录IP",align:"center",key:"last_login_ip",width:160},{title:"状态",align:"center",width:100,render:function(t,e){return 1===e.row.status?t("Tag",{props:{color:"green"}},"启用"):t("Tag",{props:{color:"red"}},vm.$t("close_choose"))}},{title:"操作",align:"center",width:115,render:function(e,n){return e("div",[d(t,e,n.row,n.index)])}}],tableData:[],memberData:[],tableShow:{currentPage:1,pageSize:10,listCount:0},memberShow:{currentPage:1,pageSize:10,listCount:0,gid:0},searchConf:{keywords:"",status:""},modalSetting:{show:!1,loading:!1,index:0},authSetting:{show:!1,loading:!1,index:0},memberSetting:{show:!1,loading:!1,index:0},formItem:{name:"",description:"",rules:[],id:0},ruleValidate:{name:[{required:!0,message:"组名称不能为空",trigger:"blur"}]},buttonShow:{edit:!0,del:!0,changeStatus:!0,memberDel:!0,memberList:!0},listLoading:!1,memberLoading:!1}},created:function(){var t=this;t.getList(),t.hasRule("Auth/edit").then((function(e){t.buttonShow.edit=e})),t.hasRule("Auth/del").then((function(e){t.buttonShow.del=e})),t.hasRule("Auth/changeStatus").then((function(e){t.buttonShow.changeStatus=e})),t.hasRule("User/getUsers").then((function(e){t.buttonShow.memberList=e})),t.hasRule("Auth/delMember").then((function(e){t.buttonShow.memberDel=e}))},methods:{authEdit:function(){var t=this;t.formItem.rules=[];var e=t.$refs["formTree"].getCheckedNodes(),n=e.length;if(n)for(var o=0;o<=n-1;o++)this.formItem.rules.push(e[o]["key"]);t.authSetting.loading=!0,Object(r["f"])(t.formItem).then((function(e){t.$Message.success(e.data.msg),t.authSetting.show=!1,t.authSetting.loading=!1})).catch((function(){t.authSetting.loading=!1}))},alertAdd:function(){this.modalSetting.show=!0},submit:function(){var t=this;this.$refs["myForm"].validate((function(e){e&&(t.modalSetting.loading=!0,0===t.formItem.id?Object(r["a"])(t.formItem).then((function(e){t.$Message.success(e.data.msg),t.getList(),t.cancel()})).catch((function(){t.modalSetting.loading=!1})):Object(r["e"])(t.formItem).then((function(e){t.$Message.success(e.data.msg),t.getList(),t.cancel()})).catch((function(){t.modalSetting.loading=!1})))}))},cancel:function(){this.modalSetting.show=!1},doCancel:function(t){t||(this.formItem.id=0,this.$refs["myForm"].resetFields(),this.modalSetting.loading=!1,this.modalSetting.index=0)},changePage:function(t){this.tableShow.currentPage=t,this.getList()},changeSize:function(t){this.tableShow.pageSize=t,this.getList()},changeMemberPage:function(t){this.memberShow.currentPage=t,this.getMemberList()},changeMemberSize:function(t){this.memberShow.pageSize=t,this.getMemberList()},search:function(){this.tableShow.currentPage=1,this.getList()},getList:function(){var t=this,e={page:t.tableShow.currentPage,size:t.tableShow.pageSize,keywords:t.searchConf.keywords,status:t.searchConf.status};t.listLoading=!0,Object(r["h"])(e).then((function(e){t.tableData=e.data.data.list,t.tableShow.listCount=e.data.data.count,t.listLoading=!1}))},getMemberList:function(){var t=this,e={page:t.memberShow.currentPage,size:t.memberShow.pageSize,gid:t.memberShow.gid};t.memberLoading=!0,Object(i["g"])(e).then((function(e){t.memberData=e.data.data.list,t.memberShow.listCount=e.data.data.count,t.memberLoading=!1}))}}},h=m,g=(n("5b56"),n("2877")),f=Object(g["a"])(h,o,a,!1,null,"8f90ce08",null);e["default"]=f.exports},"83a1":function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}}}]);