Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

2 wiersze
4.9 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[581,1322],{58709:function(se,j,e){"use strict";e.r(j),e.d(j,{default:function(){return X}});var o=e(2824),le=e(34792),y=e(48086),F=e(3182),W=e(94043),c=e.n(W),u=e(67294),$=e(78009),G=e(85224),U=e(16894),oe=e(71194),H=e(50146),ie=e(57663),Y=e(71577),de=e(77883),z=e(85482),ce=e(9715),i=e(86835),me=e(47673),S=e(4107),ve=e(43358),B=e(34041),t=e(85893),K=function(n){var m=B.Z.Option,g=B.Z.OptGroup;return(0,t.jsx)(H.Z,{title:n.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:n.modalVisible,bodyStyle:{padding:"32px 40px 48px"},footer:null,onCancel:function(){n.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,t.jsxs)(i.Z,{layout:"horizontal",labelCol:{span:4},preserve:!1,initialValues:n.values,onFinish:n.onFinish,children:[(0,t.jsx)(i.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(S.Z,{})}),(0,t.jsx)(i.Z.Item,{name:"companyName",label:"\u4F01\u4E1A\u540D\u79F0",rules:[{required:!0,max:30}],children:(0,t.jsx)(S.Z,{placeholder:"\u8BF7\u8F93\u5165\u4F01\u4E1A\u540D\u79F0",disabled:!0})}),(0,t.jsx)(i.Z.Item,{name:"userName",label:"\u8054\u7CFB\u4EBA",rules:[{required:!0,max:20}],children:(0,t.jsx)(S.Z,{placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",disabled:!0})}),(0,t.jsx)(i.Z.Item,{name:"phone",label:"\u7535\u8BDD",rules:[{max:20,pattern:/0?(13|14|15|18|17)[0-9]{9}$/,message:"\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E"}],children:(0,t.jsx)(S.Z,{placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD",disabled:!0})}),(0,t.jsx)(i.Z.Item,{name:"TMCDeviceNum",label:"\u8BBE\u5907\u6570\u91CF",rules:[{required:!0}],children:(0,t.jsx)(z.Z,{step:1,min:1,max:1e3,precision:10})}),(0,t.jsx)(i.Z.Item,{children:(0,t.jsx)(Y.Z,{type:"primary",htmlType:"submit",children:"\u5BA1\u6838\u901A\u8FC7"})})]})})},J=K,I=e(48971),D={companyPage:function(n){return(0,I.WY)("/kitchen/api/CompanyHelper/companypage",{method:"POST",data:n})},updateCompany:function(n){return(0,I.WY)("/kitchen/api/CompanyHelper/ApproveCompany",{method:"POST",data:n})}},L=function(){var h=(0,F.Z)(c().mark(function n(m){return c().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,D.updateCompany(m).then(function(p){if(!p.succeeded)return y.default.error(p.errors),!1;p.data?y.default.success("\u5BA1\u6838\u5B8C\u6210"):y.default.error("\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 3:return a.abrupt("return",!0);case 6:return a.prev=6,a.t0=a.catch(0),y.default.error("\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),a.abrupt("return",!1);case 10:case"end":return a.stop()}},n,null,[[0,6]])}));return function(m){return h.apply(this,arguments)}}(),Q=function(){var n=(0,u.useState)(),m=(0,o.Z)(n,2),g=m[0],a=m[1],p=(0,u.useState)(),A=(0,o.Z)(p,2),he=A[0],pe=A[1],w=(0,u.useState)({}),T=(0,o.Z)(w,2),k=T[0],M=T[1],q=(0,u.useState)(),P=(0,o.Z)(q,2),fe=P[0],_=P[1],x=(0,u.useRef)(),ee=(0,u.useState)(),V=(0,o.Z)(ee,2),ye=V[0],E=V[1],te=(0,u.useState)(),R=(0,o.Z)(te,2),C=R[0],ae=R[1],ne=(0,u.useState)(),O=(0,o.Z)(ne,2),Se=O[0],xe=O[1],re=(0,u.useState)(),b=(0,o.Z)(re,2),Ce=b[0],Ze=b[1],ue=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(s,r){return(0,t.jsx)("a",{onClick:function(){E(r),_(!0)},children:s})}},{title:"\u4F01\u4E1A\u540D\u79F0",dataIndex:"companyName"},{title:"\u8054\u7CFB\u4EBA\u59D3\u540D",dataIndex:"userName"},{title:"\u7535\u8BDD",dataIndex:"phone"},{title:"\u72B6\u6001",dataIndex:"status",hideInForm:!0,valueEnum:{0:{text:"\u5F85\u5BA1\u6838",status:"Processing"},1:{text:"\u5DF2\u5BA1\u6838",status:"Success"}}},{title:"\u64CD\u4F5C",dataIndex:"option",valueType:"option",render:function(s,r){return[r.status===0&&(0,t.jsxs)("a",{onClick:function(){a(!0),M(r)},children:[" ","\u5BA1\u6838"]})]}}];return(0,t.jsxs)($.ZP,{children:[(0,t.jsx)(U.ZP,{headerTitle:"\u7533\u8BF7\u8BD5\u7528\u5217\u8868",actionRef:x,rowKey:"id",search:{labelWidth:120},request:function(){var d=(0,F.Z)(c().mark(function s(r){var l,Z;return c().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return l=[],Z=0,f.next=4,D.companyPage(r).then(function(N){l=N.data.data,Z=N.data.total});case 4:return f.abrupt("return",{data:l,success:!0,total:Z});case 5:case"end":return f.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),columns:ue,rowSelection:{onChange:function(s,r){ae(r)}}}),(C==null?void 0:C.length)>0&&(0,t.jsx)(G.Z,{extra:(0,t.jsxs)("div",{children:["\u5DF2\u9009\u62E9"," ",(0,t.jsx)("a",{style:{fontWeight:600},children:C.length})," ","\u9879 \xA0\xA0"]})}),(0,t.jsx)(J,{onFinish:function(){var d=(0,F.Z)(c().mark(function s(r){var l;return c().wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return l=!1,v.next=3,L(r);case 3:l=v.sent,l&&(a(!1),E(void 0),x.current&&x.current.reload()),x.current.reload();case 6:case"end":return v.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),onCancel:function(){a(!1),M({})},modalVisible:g,values:k||{}})]})},X=Q}}]);