Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

2 rader
5.0 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[581,1322],{58709:function(re,j,e){"use strict";e.r(j),e.d(j,{default:function(){return Q}});var o=e(2824),c=e(39428),se=e(34792),y=e(48086),F=e(3182),r=e(67294),$=e(78009),G=e(85224),U=e(16894),le=e(71194),H=e(50146),oe=e(57663),D=e(71577),ie=e(77883),Y=e(85986),de=e(9715),i=e(55843),ce=e(47673),Z=e(4107),me=e(43358),B=e(34041),t=e(85893),z=function(a){var m=B.Z.Option,g=B.Z.OptGroup;return(0,t.jsx)(H.Z,{title:a.values.id?"\u7F16\u8F91":"\u65B0\u5EFA",width:640,visible:a.modalVisible,bodyStyle:{padding:"32px 40px 1px 48px"},footer:null,onCancel:function(){a.onCancel()},destroyOnClose:!0,maskClosable:!1,children:(0,t.jsxs)(i.Z,{layout:"horizontal",labelCol:{span:4},preserve:!1,initialValues:a.values,onFinish:a.onFinish,children:[(0,t.jsx)(i.Z.Item,{name:"id",hidden:!0,children:(0,t.jsx)(Z.Z,{})}),(0,t.jsx)(i.Z.Item,{name:"companyName",label:"\u4F01\u4E1A\u540D\u79F0",rules:[{required:!0,max:30}],children:(0,t.jsx)(Z.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)(Z.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)(Z.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)(Y.Z,{step:1,min:1,max:1e3,precision:10})}),(0,t.jsxs)(i.Z.Item,{children:[(0,t.jsx)(D.Z,{htmlType:"button",style:{float:"right",left:10},onClick:a.onCancel,children:"\u53D6\u6D88"}),(0,t.jsx)(D.Z,{type:"primary",htmlType:"submit",style:{float:"right"},children:"\u5BA1\u6838\u901A\u8FC7"})]})]})})},K=z,I=e(48971),A={companyPage:function(a){return(0,I.WY)("/kitchen/api/CompanyHelper/companypage",{method:"POST",data:a})},updateCompany:function(a){return(0,I.WY)("/kitchen/api/CompanyHelper/ApproveCompany",{method:"POST",data:a})}},J=function(){var v=(0,F.Z)((0,c.Z)().mark(function a(m){return(0,c.Z)().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,A.updateCompany(m).then(function(f){if(!f.succeeded)return y.default.error(f.errors),!1;f.data?y.default.success("\u5BA1\u6838\u5B8C\u6210"):y.default.error("\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01")});case 3:return n.abrupt("return",!0);case 6:return n.prev=6,n.t0=n.catch(0),y.default.error("\u5BA1\u6838\u5931\u8D25\u8BF7\u91CD\u8BD5\uFF01"),n.abrupt("return",!1);case 10:case"end":return n.stop()}},a,null,[[0,6]])}));return function(m){return v.apply(this,arguments)}}(),L=function(){var a=(0,r.useState)(),m=(0,o.Z)(a,2),g=m[0],n=m[1],f=(0,r.useState)(),T=(0,o.Z)(f,2),he=T[0],ve=T[1],X=(0,r.useState)({}),M=(0,o.Z)(X,2),w=M[0],P=M[1],k=(0,r.useState)(),R=(0,o.Z)(k,2),fe=R[0],q=R[1],x=(0,r.useRef)(),_=(0,r.useState)(),V=(0,o.Z)(_,2),pe=V[0],E=V[1],ee=(0,r.useState)(),b=(0,o.Z)(ee,2),C=b[0],te=b[1],ae=(0,r.useState)(),O=(0,o.Z)(ae,2),ye=O[0],Ze=O[1],ne=(0,r.useState)(),N=(0,o.Z)(ne,2),xe=N[0],Ce=N[1],ue=[{title:"\u4E3B\u952E",dataIndex:"id",tip:"key",hideInSearch:!0,hideInTable:!0,render:function(s,u){return(0,t.jsx)("a",{onClick:function(){E(u),q(!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,u){return[u.status===0&&(0,t.jsxs)("a",{onClick:function(){n(!0),P(u)},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)((0,c.Z)().mark(function s(u){var l,S;return(0,c.Z)().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return l=[],S=0,p.next=4,A.companyPage(u).then(function(W){l=W.data.data,S=W.data.total});case 4:return p.abrupt("return",{data:l,success:!0,total:S});case 5:case"end":return p.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),columns:ue,rowSelection:{onChange:function(s,u){te(u)}}}),(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)(K,{onFinish:function(){var d=(0,F.Z)((0,c.Z)().mark(function s(u){var l;return(0,c.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return l=!1,h.next=3,J(u);case 3:l=h.sent,l&&(n(!1),E(void 0),x.current&&x.current.reload()),x.current.reload();case 6:case"end":return h.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),onCancel:function(){n(!1),P({})},modalVisible:g,values:w||{}})]})},Q=L}}]);