1 |
- "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[313],{64317:function(le,w,t){var S=t(1413),u=t(45987),i=t(22270),Z=t(62435),K=t(66758),z=t(34176),E=t(86074),k=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],y=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],P=function(s,B){var e=s.fieldProps,o=s.children,n=s.params,C=s.proFieldProps,v=s.mode,R=s.valueEnum,A=s.request,F=s.showSearch,c=s.options,I=(0,u.Z)(s,k),L=(0,Z.useContext)(K.Z);return(0,E.jsx)(z.Z,(0,S.Z)((0,S.Z)({valueEnum:(0,i.h)(R),request:A,params:n,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,S.Z)({options:c,mode:v,showSearch:F,getPopupContainer:L.getPopupContainer},e),ref:B,proFieldProps:C},I),{},{children:o}))},U=Z.forwardRef(function(f,s){var B=f.fieldProps,e=f.children,o=f.params,n=f.proFieldProps,C=f.mode,v=f.valueEnum,R=f.request,A=f.options,F=(0,u.Z)(f,y),c=(0,S.Z)({options:A,mode:C||"multiple",labelInValue:!0,showSearch:!0,suffixIcon:null,autoClearSearchValue:!0,optionLabelProp:"label"},B),I=(0,Z.useContext)(K.Z);return(0,E.jsx)(z.Z,(0,S.Z)((0,S.Z)({valueEnum:(0,i.h)(v),request:R,params:o,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,S.Z)({getPopupContainer:I.getPopupContainer},c),ref:s,proFieldProps:n},F),{},{children:e}))}),D=Z.forwardRef(P),O=U,x=D;x.SearchSelect=O,x.displayName="ProFormComponent",w.Z=x},5966:function(le,w,t){var S=t(97685),u=t(1413),i=t(45987),Z=t(21770),K=t(23323),z=t(55241),E=t(97435),k=t(62435),y=t(34176),P=t(86074),U=["fieldProps","proFieldProps"],D=["fieldProps","proFieldProps"],O="text",x=function(o){var n=o.fieldProps,C=o.proFieldProps,v=(0,i.Z)(o,U);return(0,P.jsx)(y.Z,(0,u.Z)({valueType:O,fieldProps:n,filedConfig:{valueType:O},proFieldProps:C},v))},f=function(o){var n=(0,Z.Z)(o.open||!1,{value:o.open,onChange:o.onOpenChange}),C=(0,S.Z)(n,2),v=C[0],R=C[1];return(0,P.jsx)(K.Z.Item,{shouldUpdate:!0,noStyle:!0,children:function(F){var c,I=F.getFieldValue(o.name||[]);return(0,P.jsx)(z.Z,(0,u.Z)((0,u.Z)({getPopupContainer:function(m){return m&&m.parentNode?m.parentNode:m},onOpenChange:function(m){return R(m)},content:(0,P.jsxs)("div",{style:{padding:"4px 0"},children:[(c=o.statusRender)===null||c===void 0?void 0:c.call(o,I),o.strengthText?(0,P.jsx)("div",{style:{marginTop:10},children:(0,P.jsx)("span",{children:o.strengthText})}):null]}),overlayStyle:{width:240},placement:"rightTop"},o.popoverProps),{},{open:v,children:o.children}))}})},s=function(o){var n=o.fieldProps,C=o.proFieldProps,v=(0,i.Z)(o,D),R=(0,k.useState)(!1),A=(0,S.Z)(R,2),F=A[0],c=A[1];return n!=null&&n.statusRender&&v.name?(0,P.jsx)(f,{name:v.name,statusRender:n==null?void 0:n.statusRender,popoverProps:n==null?void 0:n.popoverProps,strengthText:n==null?void 0:n.strengthText,open:F,onOpenChange:c,children:(0,P.jsx)("div",{children:(0,P.jsx)(y.Z,(0,u.Z)({valueType:"password",fieldProps:(0,u.Z)((0,u.Z)({},(0,E.Z)(n,["statusRender","popoverProps","strengthText"])),{},{onBlur:function(L){var m;n==null||(m=n.onBlur)===null||m===void 0||m.call(n,L),c(!1)},onClick:function(L){var m;n==null||(m=n.onClick)===null||m===void 0||m.call(n,L),c(!0)}}),proFieldProps:C,filedConfig:{valueType:O}},v))})}):(0,P.jsx)(y.Z,(0,u.Z)({valueType:"password",fieldProps:n,proFieldProps:C,filedConfig:{valueType:O}},v))},B=x;B.Password=s,B.displayName="ProFormComponent",w.Z=B},38326:function(le,w,t){t.r(w),t.d(w,{default:function(){return ve}});var S=t(5574),u=t.n(S),i=t(62435),Z=t(59530),K=t(28459),z=t(15009),E=t.n(z),k=t(99289),y=t.n(k),P=t(95338),U=t(42075),D=t(14726),O=t(17788),x=t(68872),f=t(86738),s=t(39680),B=t(55375),e=t(86074),o=function(h){var j=h.dispatch,$=h.openModel,N=h.getId,g=(0,i.useRef)(),G=(0,i.useState)([]),b=u()(G,2),V=b[0],Q=b[1],Y=(0,i.useState)(0),X=u()(Y,2),_=X[0],ue=X[1],q=(0,i.useState)(1),ee=u()(q,2),H=ee[0],ae=ee[1],ie=(0,i.useState)(10),te=u()(ie,2),J=te[0],oe=te[1],de=(0,i.useState)([]),ne=u()(de,2),re=ne[0],ce=ne[1],pe=function(r){N(r)};return(0,i.useEffect)(function(){if(!$.openModal){var d;(d=g.current)===null||d===void 0||d.reload()}},[$.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(K.ZP,{theme:{token:{colorPrimary:"#4FBE70",colorLink:"#4FBE70"}},children:(0,e.jsx)(P.Z,{scroll:{y:480,x:"auto"},bordered:!0,actionRef:g,dataSource:V,search:{span:6,labelWidth:"auto"},tableAlertRender:function(r){var a=r.selectedRowKeys,p=r.selectedRows,l=r.onCleanSelected;return ce(p),(0,e.jsx)(U.Z,{size:24,children:(0,e.jsxs)("span",{children:["\u5DF2\u9009 ",p.length," \u9879",(0,e.jsx)("a",{style:{marginInlineStart:8},onClick:l,children:"\u53D6\u6D88\u9009\u62E9"})]})})},tableAlertOptionRender:function(){return(0,e.jsxs)(U.Z,{children:[(0,e.jsx)(D.ZP,{danger:!0,type:"primary",onClick:function(){O.Z.confirm({title:"\u6279\u91CF\u5220\u9664",content:"\u786E\u5B9A\u8981\u5220\u9664\u6240\u9009\u7684\u6570\u636E\u5417",onOk:function(){var p=re.map(function(l){return(0,s.qsj)({id:l.id})});Promise.all(p).then(function(){var l,T;x.ZP.success("\u6279\u91CF\u5220\u9664\u6210\u529F"),(l=g.current)===null||l===void 0||l.clearSelected(),(T=g.current)===null||T===void 0||T.reload()}).catch(function(l){console.error("\u6279\u91CF\u5220\u9664\u6210\u529F:",l),x.ZP.error("\u6279\u91CF\u5220\u9664\u6210\u529F")})},onCancel:function(){console.log("Cancel")},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",centered:!0})},children:"\u6279\u91CF\u5220\u9664"}),","]})},rowSelection:{type:"checkbox"},columns:[{title:"ID",dataIndex:"id",width:200,search:!1},{title:"\u5730\u5740",dataIndex:"address",width:200,search:!1},{title:"\u5730\u5740\u5206\u7C7B",dataIndex:"cate",valueType:"select",width:200,valueEnum:{\u83CA\u57CE\u4EBA\u624D:{text:"\u83CA\u57CE\u4EBA\u624D"},\u79FB\u52A8:{text:"\u79FB\u52A8"},\u6751\u9547\u94F6\u884C:{text:"\u6751\u9547\u94F6\u884C"},\u7535\u4FE1:{text:"\u7535\u4FE1"},\u8054\u901A:{text:"\u8054\u901A"}}},{title:"\u5BA1\u6838\u8D26\u53F7",dataIndex:"audit_mobile",ellipsis:!0,width:200,search:!1},{title:"\u5BA1\u6838\u4EBA",dataIndex:"contact_person",width:200,search:!1},{title:"\u64CD\u4F5C",key:"option",valueType:"option",render:function(r,a,p){return[(0,e.jsx)(D.ZP,{type:"link",onClick:function(){pe(a.id),j({type:"openModel/getOpenModal",payload:!0})},children:"\u7F16\u8F91"},"1"),(0,e.jsx)(f.Z,{title:"\u662F\u5426\u5220\u9664",onConfirm:function(T){(0,s.qsj)({id:a.id}).then(function(M){var se;x.ZP.success("\u5220\u9664\u6210\u529F"),(se=g.current)===null||se===void 0||se.reload()})},okText:"\u5220\u9664",cancelText:"\u53D6\u6D88",children:(0,e.jsx)(D.ZP,{danger:!0,type:"link",children:"\u5220\u9664"})})]}}],rowKey:"id",pagination:{current:H,pageSize:J,showSizeChanger:!0,total:_,pageSizeOptions:[9,18,27,99],onChange:function(r,a){ae(r),oe(a)},onShowSizeChange:function(r,a){ae(r),oe(a)}},request:y()(E()().mark(function d(){var r,a=arguments;return E()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return r=a.length>0&&a[0]!==void 0?a[0]:{},l.abrupt("return",(0,s.P$W)({page:H,pagesize:J,sort:"id",sortby:"desc",keyword:r.name,cate:r.cate}).then(function(T){Q(T.data.addresss),ue(T.data.total)}));case 2:case"end":return l.stop()}},d)})),headerTitle:"\u6D3B\u52A8\u95E8\u5E97",toolBarRender:function(){return[(0,e.jsx)(D.ZP,{type:"primary",onClick:function(){x.ZP.info("\u6570\u636E\u5BFC\u51FA\u9700\u8981\u65F6\u95F4\uFF0C\u8BF7\u8010\u5FC3\u7B49\u5F85"),(0,s.gTc)().then(function(a){var p=B.VO+a.data.excel_url;window.open(p),x.ZP.info("\u6570\u636E\u5BFC\u51FA\u5B8C\u6BD5")})},children:"\u5BFC\u51FA\u6570\u636E"}),(0,e.jsx)(D.ZP,{type:"primary",onClick:function(){j({type:"openModel/getOpenModal",payload:!0})},children:"\u6DFB\u52A0\u6D3B\u52A8\u95E8\u5E97"})]}})})})},n=(0,Z.connect)(function(W){var h=W.openModel;return{openModel:h}})(o),C=t(97269),v=t(5966),R=t(64317),A=t(86250),F=t(71230),c=t(15746),I=function(h){var j=h.dispatch,$=h.dictModel,N=h.openModel,g=h.id,G=(0,i.useRef)(),b=(0,i.useState)(!1),V=u()(b,2),Q=V[0],Y=V[1],X=(0,i.useState)(null),_=u()(X,2),ue=_[0],q=_[1],ee=(0,i.useState)(!1),H=u()(ee,2),ae=H[0],ie=H[1],te=(0,i.useState)(""),J=u()(te,2),oe=J[0],de=J[1],ne=(0,i.useState)(""),re=u()(ne,2),ce=re[0],pe=re[1];return(0,i.useEffect)(function(){Y(N.openModal)},[N.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(K.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:(0,e.jsx)(O.Z,{open:Q,title:g?"\u7F16\u8F91\u6D3B\u52A8\u5730\u5740":"\u6DFB\u52A0\u6D3B\u52A8\u5730\u5740",centered:!0,maskClosable:!1,footer:null,destroyOnClose:!0,width:1e3,onCancel:function(){j({type:"openModel/getOpenModal",payload:!1})},children:(0,e.jsx)(C.A,{formRef:G,request:y()(E()().mark(function d(){var r;return E()().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(!g){p.next=8;break}return p.next=3,(0,s.S34)({id:g});case 3:return r=p.sent,q(r.data),p.abrupt("return",r.data);case 8:return p.abrupt("return",{address:"",store_name:"",lat:"",lng:"",contact_person:"",mobile:"",audit_mobile:"",communal:"",cate:""});case 9:case"end":return p.stop()}},d)})),submitter:{searchConfig:{resetText:"\u53D6\u6D88",submitText:"\u4FDD\u5B58"},render:function(r,a){return(0,e.jsxs)(A.Z,{justify:"flex-end",children:[" ",(0,e.jsx)(U.Z,{children:a})]})},onReset:function(){q(null),j({type:"openModel/getOpenModal",payload:!1})}},onFinish:function(){var d=y()(E()().mark(function r(a){var p,l;return E()().wrap(function(M){for(;;)switch(M.prev=M.next){case 0:if(console.log(a),!g){M.next=10;break}return a.id=g,M.next=5,(0,s.Zz2)(a);case 5:p=M.sent,x.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1}),M.next=15;break;case 10:return M.next=12,(0,s.Y8k)(a);case 12:l=M.sent,x.ZP.success("\u63D0\u4EA4\u6210\u529F"),j({type:"openModel/getOpenModal",payload:!1});case 15:case"end":return M.stop()}},r)}));return function(r){return d.apply(this,arguments)}}(),children:(0,e.jsxs)(F.Z,{gutter:[16,16],children:[(0,e.jsx)(c.Z,{span:24,children:(0,e.jsx)(F.Z,{gutter:[16,16],children:(0,e.jsx)(c.Z,{span:8,children:(0,e.jsx)(v.Z,{label:"\u95E8\u5E97\u5730\u5740",name:"address",placeholder:"\u8BF7\u5728\u5730\u56FE\u4E0A\u9009\u62E9\u6216\u8F93\u5165\u95E8\u5E97\u5730\u5740",rules:[{required:!0,message:"\u8BF7\u5728\u5730\u56FE\u4E0A\u9009\u62E9\u6216\u8F93\u5165\u95E8\u5E97\u5730\u5740"}]})})})}),(0,e.jsx)(c.Z,{span:24,children:(0,e.jsx)(v.Z,{label:"\u95E8\u5E97\u540D",name:"store_name",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D"}]})}),(0,e.jsx)(c.Z,{span:12,children:(0,e.jsx)(v.Z,{label:"\u8054\u7CFB\u4EBA",name:"store_name",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA"}]})}),(0,e.jsx)(c.Z,{span:12,children:(0,e.jsx)(v.Z,{label:"\u8054\u7CFB\u7535\u8BDD",name:"mobile",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"}]})}),(0,e.jsx)(c.Z,{span:12,children:(0,e.jsx)(v.Z,{label:"\u5BA1\u6838\u7535\u8BDD",name:"audit_mobile",placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u7535\u8BDD",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5BA1\u6838\u7535\u8BDD"}]})}),(0,e.jsx)(c.Z,{span:12,children:(0,e.jsx)(v.Z,{label:"\u6240\u5C5E\u793E\u533A",name:"communal",placeholder:"\u8BF7\u8F93\u5165\u6240\u5C5E\u793E\u533A",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6240\u5C5E\u793E\u533A"}]})}),(0,e.jsx)(c.Z,{span:12,children:(0,e.jsx)(R.Z,{label:"\u5730\u5740\u5206\u7C7B",name:"cate",request:function(){var d=y()(E()().mark(function r(a){return E()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.abrupt("return",(0,s.m9q)({page:1,pagesize:100,keyword:a.keyWords}).then(function(T){return T.data.activity_address_cate.map(function(M){return{label:M,value:M}})}));case 1:case"end":return l.stop()}},r)}));return function(r){return d.apply(this,arguments)}}(),placeholder:"\u8BF7\u641C\u7D22\u9009\u62E9\u5730\u5740\u5206\u7C7B"})})]})})})})})},L=(0,Z.connect)(function(W){var h=W.dictModel,j=W.openModel;return{dictModel:h,openModel:j}})(I),m=function(h){var j=h.dispatch,$=h.openModel,N=(0,i.useState)(0),g=u()(N,2),G=g[0],b=g[1],V=function(Y){b(Y)};return(0,i.useEffect)(function(){$.openModal||b(0)},[$.openModal]),(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)(K.ZP,{theme:{token:{colorPrimary:"#4FBE70"}},children:[(0,e.jsx)(n,{getId:V}),(0,e.jsx)(L,{id:G})]})})},ve=(0,Z.connect)(function(W){var h=W.openModel;return{openModel:h}})(m)}}]);
|