|
1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[256],{64317:function(oe,J,t){var y=t(1413),d=t(45987),u=t(22270),j=t(62435),D=t(66758),z=t(49994),x=t(86074),H=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],F=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],h=function(p,A){var L=p.fieldProps,i=p.children,s=p.params,E=p.proFieldProps,S=p.mode,T=p.valueEnum,N=p.request,$=p.showSearch,M=p.options,n=(0,d.Z)(p,H),r=(0,j.useContext)(D.Z);return(0,x.jsx)(z.Z,(0,y.Z)((0,y.Z)({valueEnum:(0,u.h)(T),request:N,params:s,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,y.Z)({options:M,mode:S,showSearch:$,getPopupContainer:r.getPopupContainer},L),ref:A,proFieldProps:E},n),{},{children:i}))},U=j.forwardRef(function(a,p){var A=a.fieldProps,L=a.children,i=a.params,s=a.proFieldProps,E=a.mode,S=a.valueEnum,T=a.request,N=a.options,$=(0,d.Z)(a,F),M=(0,y.Z)({options:N,mode:E||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},A),n=(0,j.useContext)(D.Z);return(0,x.jsx)(z.Z,(0,y.Z)((0,y.Z)({valueEnum:(0,u.h)(S),request:T,params:i,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,y.Z)({getPopupContainer:n.getPopupContainer},M),ref:p,proFieldProps:s},$),{},{children:L}))}),b=j.forwardRef(h),R=U,P=b;P.SearchSelect=R,P.displayName="ProFormComponent",J.Z=P},5966:function(oe,J,t){var y=t(97685),d=t(1413),u=t(45987),j=t(21770),D=t(23323),z=t(55241),x=t(97435),H=t(62435),F=t(49994),h=t(86074),U=["fieldProps","proFieldProps"],b=["fieldProps","proFieldProps"],R="text",P=function(i){var s=i.fieldProps,E=i.proFieldProps,S=(0,u.Z)(i,U);return(0,h.jsx)(F.Z,(0,d.Z)({valueType:R,fieldProps:s,filedConfig:{valueType:R},proFieldProps:E},S))},a=function(i){var s=(0,j.Z)(i.open||!1,{value:i.open,onChange:i.onOpenChange}),E=(0,y.Z)(s,2),S=E[0],T=E[1];return(0,h.jsx)(D.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function($){var M,n=$.getFieldValue(i.name||[]);return(0,h.jsx)(z.Z,(0,d.Z)((0,d.Z)({getPopupContainer:function(e){return e&&e.parentNode?e.parentNode:e},onOpenChange:function(e){return T(e)},content:(0,h.jsxs)("div",{style:{padding:"4px 0"},children:[(M=i.statusRender)===null||M===void 0?void 0:M.call(i,n),i.strengthText?(0,h.jsx)("div",{style:{marginTop:10},children:(0,h.jsx)("span",{children:i.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},i.popoverProps),{},{open:S,children:i.children}))}})},p=function(i){var s=i.fieldProps,E=i.proFieldProps,S=(0,u.Z)(i,b),T=(0,H.useState)(!1),N=(0,y.Z)(T,2),$=N[0],M=N[1];return s!=null&&s.statusRender&&S.name?(0,h.jsx)(a,{name:S.name,statusRender:s==null?void 0:s.statusRender,popoverProps:s==null?void 0:s.popoverProps,strengthText:s==null?void 0:s.strengthText,open:$,onOpenChange:M,children:(0,h.jsx)("div",{children:(0,h.jsx)(F.Z,(0,d.Z)({valueType:"password",fieldProps:(0,d.Z)((0,d.Z)({},(0,x.Z)(s,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(r){var e;s==null||(e=s.onBlur)===null||e===void 0||e.call(s,r),M(!1)},onClick:function(r){var e;s==null||(e=s.onClick)===null||e===void 0||e.call(s,r),M(!0)}}),proFieldProps:E,filedConfig:{valueType:R}},S))})}):(0,h.jsx)(F.Z,(0,d.Z)({valueType:"password",fieldProps:s,proFieldProps:E,filedConfig:{valueType:R}},S))},A=P;A.Password=p,A.displayName="ProFormComponent",J.Z=A},18829:function(oe,J,t){t.r(J),t.d(J,{default:function(){return r}});var y=t(5574),d=t.n(y),u=t(62435),j=t(59530),D=t(28459),z=t(15009),x=t.n(z),H=t(99289),F=t.n(H),h=t(95338),U=t(64317),b=t(14726),R=t(17788),P=t(39680),a=t(86074),p={label:"full_name",value:"id"},A=function(o){var l=o.dispatch,X=o.getId,w=o.openModel,m=(0,u.useRef)(),G=(0,u.useState)([]),W=d()(G,2),V=W[0],k=W[1],C=(0,u.useState)(0),q=d()(C,2),ee=q[0],K=q[1],te=(0,u.useState)(1),I=d()(te,2),O=I[0],c=I[1],f=(0,u.useState)(10),_=d()(f,2),ae=_[0],Z=_[1],ie=(0,u.useState)(0),re=d()(ie,2),ue=re[0],se=re[1],le=function(g){X(g)};return(0,u.useEffect)(function(){if(!w.openModal){var B;(B=m.current)===null||B===void 0||B.reload()}return function(){sessionStorage.removeItem("company_info"),sessionStorage.removeItem("post_company_info"),sessionStorage.removeItem("vip_company_info")}},[w.openModal]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,a.jsx)(h.Z,{size:"small",scroll:{y:480,x:"auto"},bordered:!0,actionRef:m,dataSource:V,search:{span:8,labelWidth:"auto"},rowSelection:{type:"checkbox"},columns:[{title:"\u90E8\u95E8\u540D\u79F0",dataIndex:"name",width:200},{title:"\u6240\u5C5E\u4F01\u4E1A",dataIndex:"company_name",width:200},{title:"\u6240\u5C5E\u4F01\u4E1A",dataIndex:"company_id",width:200,hidden:!0,valueType:"select",renderFormItem:function(){return(0,a.jsx)(U.Z,{width:"lg",fieldProps:{fieldNames:p,defaultValue:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).full_name:null},request:function(){var g=F()(x()().mark(function v(ne){return x()().wrap(function(Y){for(;;)switch(Y.prev=Y.next){case 0:return Y.abrupt("return",(0,P.m_v)({page:1,pagesize:100,keyword:ne.keyWords}).then(function(de){return de.data.list}));case 1:case"end":return Y.stop()}},v)}));return function(v){return g.apply(this,arguments)}}(),placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u4F01\u4E1A",onChange:function(v){se(v),(0,P.vNO)({id:v}).then(function(ne){sessionStorage.setItem("company_info",JSON.stringify(ne.data))})}})}},{title:"\u8054\u7CFB\u4EBA",search:!1,width:200,dataIndex:"contact"},{title:"\u8054\u7CFB\u7535\u8BDD",search:!1,width:200,dataIndex:"phone"},{title:"\u624B\u673A",search:!1,width:200,dataIndex:"mobile"},{title:"\u90AE\u7BB1",search:!1,width:200,dataIndex:"email"},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(g,v,ne){return[(0,a.jsx)(b.ZP,{type:"link",onClick:function(){le(v.id),l({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,a.jsx)(b.ZP,{type:"link",danger:!0,onClick:function(){le(v.id),l({type:"openModel/getOpenModal",payload:!0})},children:"\u5220\u9664"},"2")]}}],rowKey:"id",pagination:{current:O,pageSize:ae,showSizeChanger:!0,total:ee,pageSizeOptions:[9,18,27,99],onChange:function(g,v){c(g),Z(v)},onShowSizeChange:function(g,v){c(g),Z(v)}},request:F()(x()().mark(function B(){var g,v=arguments;return x()().wrap(function(Q){for(;;)switch(Q.prev=Q.next){case 0:return g=v.length>0&&v[0]!==void 0?v[0]:{},Q.abrupt("return",(0,P.UEv)({page:O,pagesize:ae,sort:"id",sortby:"desc",keyword:g.name,company_id:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).id:ue}).then(function(Y){k(Y.data.rows),K(Y.data.total)}));case 2:case"end":return Q.stop()}},B)})),onReset:function(){var g;sessionStorage.getItem("company_info")&&sessionStorage.removeItem("company_info"),se(0),(g=m.current)===null||g===void 0||g.reload()},headerTitle:"\u90E8\u95E8\u5217\u8868",toolBarRender:function(){return[(0,a.jsx)(b.ZP,{type:"primary",onClick:function(){R.Z.confirm({title:"\u6279\u91CF\u5220\u9664",content:"\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684\u6570\u636E\u5417,\u53C2\u6570:id",onOk:function(){},onCancel:function(){console.log("Cancel")},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u6279\u91CF\u5220\u9664"}),(0,a.jsx)(b.ZP,{type:"primary",onClick:function(){l({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u90E8\u95E8"})]}})})})},L=(0,j.connect)(function(e){var o=e.dictModel,l=e.openModel;return{dictModel:o,openModel:l}})(A),i=t(97269),s=t(5966),E=t(86250),S=t(42075),T=t(68872),N={label:"full_name",value:"id"},$=function(o){var l=o.dispatch,X=o.dictModel,w=o.openModel,m=o.id,G=(0,u.useRef)(),W=(0,u.useState)(!1),V=d()(W,2),k=V[0],C=V[1],q=(0,u.useState)(null),ee=d()(q,2),K=ee[0],te=ee[1];return(0,u.useEffect)(function(){C(w.openModal)},[w.openModal]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,a.jsx)(R.Z,{open:k,title:m?"\u7F16\u8F91\u90E8\u95E8":"\u6DFB\u52A0\u90E8\u95E8",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:600,onCancel:function(){l({type:"openModel/getOpenModal",payload:!1})},children:(0,a.jsxs)(i.A,{formRef:G,request:F()(x()().mark(function I(){var O;return x()().wrap(function(f){for(;;)switch(f.prev=f.next){case 0:if(!m){f.next=7;break}return f.next=3,(0,P.REc)({id:m});case 3:return O=f.sent,f.abrupt("return",O.data);case 7:return f.abrupt("return",{name:"",company_id:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).id:null,contact:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).contact:"",phone:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).phone:"",mobile:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).mobile:"",email:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).email:""});case 8:case"end":return f.stop()}},I)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(O,c){return(0,a.jsxs)(E.Z,{justify:"flex-end",children:[" ",(0,a.jsx)(S.Z,{children:c})]})},onReset:function(){te(null),C(!1)}},onFinish:function(){var I=F()(x()().mark(function O(c){var f,_;return x()().wrap(function(Z){for(;;)switch(Z.prev=Z.next){case 0:if(console.log(c),!m){Z.next=10;break}return c.id=m,Z.next=5,(0,P.T7U)(c);case 5:f=Z.sent,T.ZP.success("\u63D0\u4EA4\u6210\u529F"),l({type:"openModel/getOpenModal",payload:!1}),Z.next=15;break;case 10:return Z.next=12,(0,P.Ldp)(c);case 12:_=Z.sent,T.ZP.success("\u63D0\u4EA4\u6210\u529F"),l({type:"openModel/getOpenModal",payload:!1});case 15:case"end":return Z.stop()}},O)}));return function(O){return I.apply(this,arguments)}}(),children:[(0,a.jsx)(U.Z,{showSearch:!0,name:"company_id",label:"\u9009\u62E9\u4F01\u4E1A",placeholder:"\u8BF7\u9009\u62E9\u4F01\u4E1A",fieldProps:{fieldNames:N,defaultValue:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).full_name:"",disabled:!!sessionStorage.getItem("company_info")},onChange:function(O){(0,P.vNO)({id:O}).then(function(c){var f;(f=G.current)===null||f===void 0||f.setFieldsValue({contact:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).contact:c.data.contact,phone:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).phone:c.data.phone,mobile:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).mobile:c.data.mobile,email:sessionStorage.getItem("company_info")?JSON.parse(sessionStorage.getItem("company_info")).email:c.data.email})})},request:function(O){return(0,P.m_v)({page:1,pagesize:100,keyword:O.keyWords}).then(function(c){return c.data.list})}}),(0,a.jsx)(s.Z,{name:"name",label:"\u90E8\u95E8\u540D\u79F0",placeholder:"\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0"}]}),(0,a.jsx)(s.Z,{name:"contact",label:"\u8054\u7CFB\u4EBA",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA"}]}),(0,a.jsx)(s.Z,{name:"phone",label:"\u8054\u7CFB\u7535\u8BDD",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"}]}),(0,a.jsx)(s.Z,{name:"mobile",label:"\u624B\u673A\u53F7",placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7"}]}),(0,a.jsx)(s.Z,{name:"email",label:"\u7535\u5B50\u90AE\u7BB1",placeholder:"\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7535\u5B50\u90AE\u7BB1"}]})]})})})})},M=(0,j.connect)(function(e){var o=e.dictModel,l=e.openModel;return{dictModel:o,openModel:l}})($),n=function(o){var l=o.dispatch,X=o.openModel,w=(0,u.useState)(0),m=d()(w,2),G=m[0],W=m[1],V=function(C){W(C)};return(0,u.useEffect)(function(){X.openModal||W(0)},[X.openModal]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(D.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,a.jsx)(L,{getId:V}),(0,a.jsx)(M,{id:G})]})})},r=(0,j.connect)(function(e){var o=e.openModel;return{openModel:o}})(n)},86250:function(oe,J,t){t.d(J,{Z:function(){return M}});var y=t(62435),d=t(93967),u=t.n(d),j=t(98423),D=t(98065),z=t(53124),x=t(92030),H=t(45503);const F=["wrap","nowrap","wrap-reverse"],h=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],U=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],b=(n,r)=>{const e=r.wrap===!0?"wrap":r.wrap;return{[`${n}-wrap-${e}`]:e&&F.includes(e)}},R=(n,r)=>{const e={};return U.forEach(o=>{e[`${n}-align-${o}`]=r.align===o}),e[`${n}-align-stretch`]=!r.align&&!!r.vertical,e},P=(n,r)=>{const e={};return h.forEach(o=>{e[`${n}-justify-${o}`]=r.justify===o}),e};function a(n,r){return u()(Object.assign(Object.assign(Object.assign({},b(n,r)),R(n,r)),P(n,r)))}var p=a;const A=n=>{const{componentCls:r}=n;return{[r]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},L=n=>{const{componentCls:r}=n;return{[r]:{"&-gap-small":{gap:n.flexGapSM},"&-gap-middle":{gap:n.flexGap},"&-gap-large":{gap:n.flexGapLG}}}},i=n=>{const{componentCls:r}=n,e={};return F.forEach(o=>{e[`${r}-wrap-${o}`]={flexWrap:o}}),e},s=n=>{const{componentCls:r}=n,e={};return U.forEach(o=>{e[`${r}-align-${o}`]={alignItems:o}}),e},E=n=>{const{componentCls:r}=n,e={};return h.forEach(o=>{e[`${r}-justify-${o}`]={justifyContent:o}}),e},S=()=>({});var T=(0,x.I$)("Flex",n=>{const{paddingXS:r,padding:e,paddingLG:o}=n,l=(0,H.TS)(n,{flexGapSM:r,flexGap:e,flexGapLG:o});return[A(l),L(l),i(l),s(l),E(l)]},S,{resetStyle:!1}),N=function(n,r){var e={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&r.indexOf(o)<0&&(e[o]=n[o]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,o=Object.getOwnPropertySymbols(n);l<o.length;l++)r.indexOf(o[l])<0&&Object.prototype.propertyIsEnumerable.call(n,o[l])&&(e[o[l]]=n[o[l]]);return e},M=y.forwardRef((n,r)=>{const{prefixCls:e,rootClassName:o,className:l,style:X,flex:w,gap:m,children:G,vertical:W=!1,component:V="div"}=n,k=N(n,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:C,direction:q,getPrefixCls:ee}=y.useContext(z.E_),K=ee("flex",e),[te,I,O]=T(K),c=W!=null?W:C==null?void 0:C.vertical,f=u()(l,o,C==null?void 0:C.className,K,I,O,p(K,n),{[`${K}-rtl`]:q==="rtl",[`${K}-gap-${m}`]:(0,D.n)(m),[`${K}-vertical`]:c}),_=Object.assign(Object.assign({},C==null?void 0:C.style),X);return w&&(_.flex=w),m&&!(0,D.n)(m)&&(_.gap=m),te(y.createElement(V,Object.assign({ref:r,className:f,style:_},(0,j.Z)(k,["justify","wrap","align"])),G))})}}]);
|