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.

2 lines
11 KiB

5 months ago
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{3973:function(Ce,Q,r){r.r(Q);var f=r(15009),I=r.n(f),L=r(99289),W=r.n(L),J=r(5574),b=r.n(J),re=r(35312),g=r(8232),F=r(66309),Y=r(14726),te=r(13169),K=r(72051),ae=r(17788),T=r(55102),y=r(34041),N=r(71230),$=r(15746),z=r(8925),P=r(67294),k=r(48357),H=r(16250),t=r(85893),le=function(){var oe=(0,P.useState)([]),M=b()(oe,2),w=M[0],se=M[1],he=(0,P.useState)(!1),V=b()(he,2),ie=V[0],e=V[1],i=(0,P.useState)(!1),c=b()(i,2),a=c[0],o=c[1],_=(0,P.useState)(0),m=b()(_,2),x=m[0],C=m[1],D=g.Z.useForm(),E=b()(D,1),O=E[0],j=(0,P.useState)([]),A=b()(j,2),Z=A[0],p=A[1],X=(0,re.useModel)("@@initialState"),S=X.initialState,v=S==null?void 0:S.currentUser,R=function(l){return l?parseFloat((l/1e5).toFixed(2)):0},G=function(l){var n=Z.find(function(u){return u.id===l});return n?n.name:""},U=function(l){O.setFieldsValue(l),e(!0),o(!0),C(l.role?l.role:0)},q=[{title:"\u59D3\u540D",dataIndex:"name"},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(l){return(0,t.jsx)("div",{children:l==null?void 0:l.map(function(n){return(0,t.jsx)(F.Z,{color:"blue",children:G(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(l){var n="";switch(l){case 1:n="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:n="\u7BA1\u7406\u5458";break;case 3:n="\u6E38\u620F\u4E3B";break;case 4:n="\u8BBE\u5907\u4E3B";break;default:n=""}return n}},{title:"\u64CD\u4F5C",render:function(l){return[(0,t.jsx)("a",{onClick:function(){return U(l)},children:"\u7F16\u8F91"},"edit")]}}],h=[{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(l){return(0,t.jsx)("div",{children:l==null?void 0:l.map(function(n){return(0,t.jsx)(F.Z,{color:"blue",children:G(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(l){var n="";switch(l){case 1:n="\u8D85\u7EA7\u7BA1\u7406\u5458";break;case 2:n="\u7BA1\u7406\u5458";break;case 3:n="\u6E38\u620F\u4E3B";break;case 4:n="\u8BBE\u5907\u4E3B";break;default:n=""}return n}},{title:"\u672C\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeThisMonth",render:function(l,n){var u;return R((u=n.overview)===null||u===void 0?void 0:u.thisMonthIncome)}},{title:"\u4E0A\u6708\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeLastMonth",render:function(l,n){var u;return R((u=n.overview)===null||u===void 0?void 0:u.lastMonthIncome)}},{title:"\u7D2F\u8BA1\u6536\u5165\uFF08\u5143\uFF09",dataIndex:"incomeTotal",render:function(l,n){var u;return R((u=n.overview)===null||u===void 0?void 0:u.totalIncome)}},{title:"\u5F53\u524D\u5206\u6210\u6BD4\u4F8B",dataIndex:"incomeRate"},{title:"\u64CD\u4F5C",render:function(l){return[(0,t.jsx)("a",{onClick:function(){return U(l)},children:"\u7F16\u8F91"},"edit")]}}],de=function(){O.submit()},ce=function(){e(!1)},ee=function(){var s=W()(I()().mark(function l(){var n;return I()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,k.N0)();case 2:n=d.sent,n.data&&se(n.data);case 4:case"end":return d.stop()}},l)}));return function(){return s.apply(this,arguments)}}(),ue=function(){var s=W()(I()().mark(function l(){var n;return I()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,(0,k.ln)();case 2:n=d.sent,n.data&&p(n.data);case 4:case"end":return d.stop()}},l)}));return function(){return s.apply(this,arguments)}}();(0,P.useEffect)(function(){ee(),ue()},[]);var ne=function(){O.resetFields(),e(!0),o(!1),C(0)},me=function(){var s=W()(I()().mark(function l(n){return I()().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.prev=0,d.next=3,(0,k.P7)(n);case 3:d.next=8;break;case 5:return d.prev=5,d.t0=d.catch(0),d.abrupt("return");case 8:e(!1),ee();case 10:case"end":return d.stop()}},l,null,[[0,5]])}));return function(n){return s.apply(this,arguments)}}();return(0,t.jsxs)("div",{children:[(0,t.jsx)(Y.ZP,{onClick:ne,children:"\u65B0\u5EFA\u8D26\u53F7"}),(0,t.jsxs)(te.Z,{centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(v==null?void 0:v.role)&&v.role<3&&(0,t.jsx)(H.Z,{tab:"\u6E38\u620F\u4E3B",chil