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
12 KiB

"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[816],{3973:function(Ce,Q,t){t.r(Q);var f=t(15009),I=t.n(f),L=t(99289),W=t.n(L),J=t(5574),b=t.n(J),re=t(35312),g=t(8232),F=t(66309),Y=t(14726),te=t(13169),K=t(72051),ae=t(17788),T=t(55102),P=t(34041),N=t(71230),$=t(15746),z=t(37804),y=t(67294),k=t(48357),V=t(16250),a=t(85893),le=function(){var oe=(0,y.useState)([]),M=b()(oe,2),w=M[0],se=M[1],he=(0,y.useState)(!1),H=b()(he,2),ie=H[0],e=H[1],i=(0,y.useState)(!1),c=b()(i,2),l=c[0],s=c[1],_=(0,y.useState)(0),v=b()(_,2),x=v[0],C=v[1],D=g.Z.useForm(),E=b()(D,1),O=E[0],j=(0,y.useState)([]),A=b()(j,2),Z=A[0],p=A[1],X=(0,re.useModel)("@@initialState"),S=X.initialState,m=S==null?void 0:S.currentUser,R=function(r){return r?parseFloat((r/1e5).toFixed(2)):0},G=function(r){var n=Z.find(function(u){return u.id===r});return n?n.name:""},U=function(r){O.setFieldsValue(r),e(!0),s(!0),C(r.role?r.role:0)},q=[{title:"\u59D3\u540D",dataIndex:"name"},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(r){return(0,a.jsx)("div",{children:r==null?void 0:r.map(function(n){return(0,a.jsx)(F.Z,{color:"blue",children:G(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(r){var n="";switch(r){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(r){return[(0,a.jsx)("a",{onClick:function(){return U(r)},children:"\u7F16\u8F91"},"edit")]}}],h=[{title:"\u59D3\u540D",dataIndex:"name",ellipsis:!0},{title:"\u5E94\u7528IDs",dataIndex:"appIds",render:function(r){return(0,a.jsx)("div",{children:r==null?void 0:r.map(function(n){return(0,a.jsx)(F.Z,{color:"blue",children:G(n)},n)})})}},{title:"\u89D2\u8272",dataIndex:"role",render:function(r){var n="";switch(r){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(r,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(r,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(r,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(r){return[(0,a.jsx)("a",{onClick:function(){return U(r)},children:"\u7F16\u8F91"},"edit")]}}],de=function(){O.submit()},ce=function(){e(!1)},ee=function(){var o=W()(I()().mark(function r(){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()}},r)}));return function(){return o.apply(this,arguments)}}(),ue=function(){var o=W()(I()().mark(function r(){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()}},r)}));return function(){return o.apply(this,arguments)}}();(0,y.useEffect)(function(){ee(),ue()},[]);var ne=function(){O.resetFields(),e(!0),s(!1),C(0)},ve=function(){var o=W()(I()().mark(function r(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()}},r,null,[[0,5]])}));return function(n){return o.apply(this,arguments)}}();return(0,a.jsxs)("div",{children:[(0,a.jsx)(Y.ZP,{onClick:ne,children:"\u65B0\u5EFA\u8D26\u53F7"}),(0,a.jsxs)(te.Z,{centered:!0,style:{backgroundColor:"white",padding:"20px"},children:[(m==null?void 0:m.role)&&m.role<3&&(0,a.jsx)(V.Z,{tab:"\u6E38\u620F\u4E3B",chi