2 lines
15 KiB
JavaScript
2 lines
15 KiB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[377],{72226:function(ne,K,e){var n=e(88351),E=e(87841),c=e(93236),C=e(8263),j=e(62086),g=["fieldProps","min","proFieldProps","max"],R=function(S,L){var N=S.fieldProps,r=S.min,m=S.proFieldProps,P=S.max,l=(0,E.Z)(S,g);return(0,j.jsx)(C.Z,(0,n.Z)({valueType:"digit",fieldProps:(0,n.Z)({min:r,max:P},N),ref:L,filedConfig:{defaultProps:{width:"100%"}},proFieldProps:m},l))},W=c.forwardRef(R);K.Z=W},83199:function(ne,K,e){var n=e(88351),E=e(87841),c=e(993),C=e(93236),j=e(75986),g=e(8263),R=e(62086),W=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","showSearch","options"],X=["fieldProps","children","params","proFieldProps","mode","valueEnum","request","options"],S=function(l,x){var G=l.fieldProps,i=l.children,t=l.params,M=l.proFieldProps,A=l.mode,B=l.valueEnum,Z=l.request,_=l.showSearch,a=l.options,v=(0,E.Z)(l,W),o=(0,C.useContext)(j.Z);return(0,R.jsx)(g.Z,(0,n.Z)((0,n.Z)({valueEnum:(0,c.h)(B),request:Z,params:t,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,n.Z)({options:a,mode:A,showSearch:_,getPopupContainer:o.getPopupContainer},G),ref:x,proFieldProps:M},v),{},{children:i}))},L=C.forwardRef(function(P,l){var x=P.fieldProps,G=P.children,i=P.params,t=P.proFieldProps,M=P.mode,A=P.valueEnum,B=P.request,Z=P.options,_=(0,E.Z)(P,X),a=(0,n.Z)({options:Z,mode:M||"multiple",labelInValue:!0,showSearch:!0,showArrow:!1,autoClearSearchValue:!0,optionLabelProp:"label"},x),v=(0,C.useContext)(j.Z);return(0,R.jsx)(g.Z,(0,n.Z)((0,n.Z)({valueEnum:(0,c.h)(A),request:B,params:i,valueType:"select",filedConfig:{customLightMode:!0},fieldProps:(0,n.Z)({getPopupContainer:v.getPopupContainer},a),ref:l,proFieldProps:t},_),{},{children:G}))}),N=C.forwardRef(S),r=L,m=N;m.SearchSelect=r,m.displayName="ProFormComponent",K.Z=m},61786:function(ne,K,e){var n=e(88351),E=e(87841),c=e(93236),C=e(8263),j=e(62086),g=["fieldProps","proFieldProps"],R=["fieldProps","proFieldProps"],W="text",X=function(r){var m=r.fieldProps,P=r.proFieldProps,l=(0,E.Z)(r,g);return(0,j.jsx)(C.Z,(0,n.Z)({valueType:W,fieldProps:m,filedConfig:{valueType:W},proFieldProps:P},l))},S=function(r){var m=r.fieldProps,P=r.proFieldProps,l=(0,E.Z)(r,R);return(0,j.jsx)(C.Z,(0,n.Z)({valueType:"password",fieldProps:m,proFieldProps:P,filedConfig:{valueType:W}},l))},L=X;L.Password=S,L.displayName="ProFormComponent",K.Z=L},28931:function(ne,K,e){e.d(K,{Y:function(){return G}});var n=e(99177),E=e(42700),c=e(88351),C=e(67654),j=e(87841),g=e(29320),R=e(50126),W=e(92750),X=e(72266),S=e.n(X),L=e(71639),N=e(24599),r=e(93236),m=e(19103),P=e(96630),l=e(62086),x=["children","trigger","onVisibleChange","onOpenChange","modalProps","onFinish","submitTimeout","title","width","visible","open"];function G(i){var t,M,A,B,Z=i.children,_=i.trigger,a=i.onVisibleChange,v=i.onOpenChange,o=i.modalProps,p=i.onFinish,F=i.submitTimeout,k=i.title,ee=i.width,O=i.visible,y=i.open,u=(0,j.Z)(i,x);(0,N.ET)(!u.footer||!(o!=null&&o.footer),"ModalForm \u662F\u4E00\u4E2A ProForm \u7684\u7279\u6B8A\u5E03\u5C40\uFF0C\u5982\u679C\u60F3\u81EA\u5B9A\u4E49\u6309\u94AE\uFF0C\u8BF7\u4F7F\u7528 submit.render \u81EA\u5B9A\u4E49\u3002");var T=(0,r.useContext)(R.ZP.ConfigContext),$=(0,r.useState)([]),V=(0,C.Z)($,2),b=V[1],z=(0,r.useState)(!1),le=(0,C.Z)(z,2),te=le[0],ae=le[1],ue=(0,L.Z)(!!O,{value:y||O,onChange:v||a}),Y=(0,C.Z)(ue,2),w=Y[0],H=Y[1],re=(0,r.useRef)(null),de=(0,r.useCallback)(function(d){re.current===null&&d&&b([]),re.current=d},[]),J=(0,r.useRef)(),me=(0,r.useCallback)(function(){var d,s,h,f=(d=(s=u.form)!==null&&s!==void 0?s:(h=u.formRef)===null||h===void 0?void 0:h.current)!==null&&d!==void 0?d:J.current;f&&o!==null&&o!==void 0&&o.destroyOnClose&&f.resetFields()},[o==null?void 0:o.destroyOnClose,u.form,u.formRef]);(0,r.useImperativeHandle)(u.formRef,function(){return J.current},[J.current]),(0,r.useEffect)(function(){w&&(y||O)&&(v==null||v(!0),a==null||a(!0))},[O,y,w]);var _e=(0,r.useMemo)(function(){return _?r.cloneElement(_,(0,c.Z)((0,c.Z)({key:"trigger"},_.props),{},{onClick:function(){var d=(0,E.Z)((0,n.Z)().mark(function h(f){var U,D;return(0,n.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:H(!w),(U=_.props)===null||U===void 0||(D=U.onClick)===null||D===void 0||D.call(U,f);case 2:case"end":return I.stop()}},h)}));function s(h){return d.apply(this,arguments)}return s}()})):null},[H,_,w]),fe=(0,r.useMemo)(function(){var d,s,h,f,U,D,q,I;return u.submitter===!1?!1:S()({searchConfig:{submitText:(d=(s=o==null?void 0:o.okText)!==null&&s!==void 0?s:(h=T.locale)===null||h===void 0||(f=h.Modal)===null||f===void 0?void 0:f.okText)!==null&&d!==void 0?d:"\u786E\u8BA4",resetText:(U=(D=o==null?void 0:o.cancelText)!==null&&D!==void 0?D:(q=T.locale)===null||q===void 0||(I=q.Modal)===null||I===void 0?void 0:I.cancelText)!==null&&U!==void 0?U:"\u53D6\u6D88"},resetButtonProps:{preventDefault:!0,disabled:F?te:void 0,onClick:function(pe){var se;H(!1),o==null||(se=o.onCancel)===null||se===void 0||se.call(o,pe)}}},u.submitter)},[(t=T.locale)===null||t===void 0||(M=t.Modal)===null||M===void 0?void 0:M.cancelText,(A=T.locale)===null||A===void 0||(B=A.Modal)===null||B===void 0?void 0:B.okText,o,u.submitter,H,te,F]),ce=(0,r.useCallback)(function(d,s){return(0,l.jsxs)(l.Fragment,{children:[d,re.current&&s?(0,l.jsx)(r.Fragment,{children:(0,m.createPortal)(s,re.current)},"submitter"):s]})},[]),Pe=(0,r.useCallback)(function(){var d=(0,E.Z)((0,n.Z)().mark(function s(h){var f,U,D;return(0,n.Z)().wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return f=p==null?void 0:p(h),F&&f instanceof Promise&&(ae(!0),U=setTimeout(function(){return ae(!1)},F),f.finally(function(){clearTimeout(U),ae(!1)})),I.next=4,f;case 4:return D=I.sent,D&&H(!1),I.abrupt("return",D);case 7:case"end":return I.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),[p,H,F]),ve=(0,g.X)(w);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(W.Z,(0,c.Z)((0,c.Z)((0,c.Z)({title:k,width:ee||800},o),ve),{},{onCancel:function(s){var h;F&&te||(H(!1),o==null||(h=o.onCancel)===null||h===void 0||h.call(o,s))},afterClose:function(){var s;me(),H(!1),o==null||(s=o.afterClose)===null||s===void 0||s.call(o)},footer:u.submitter!==!1?(0,l.jsx)("div",{ref:de,style:{display:"flex",justifyContent:"flex-end"}}):null,children:(0,l.jsx)(P.I,(0,c.Z)((0,c.Z)({formComponentType:"ModalForm",layout:"vertical"},u),{},{onInit:function(s,h){var f;u.formRef&&(u.formRef.current=h),u==null||(f=u.onInit)===null||f===void 0||f.call(u,s,h),J.current=h},formRef:J,submitter:fe,onFinish:function(){var d=(0,E.Z)((0,n.Z)().mark(function s(h){var f;return(0,n.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,Pe(h);case 2:return f=D.sent,D.abrupt("return",f);case 4:case"end":return D.stop()}},s)}));return function(s){return d.apply(this,arguments)}}(),contentRender:ce,children:Z}))})),_e]})}},40882:function(ne,K,e){e.d(K,{A:function(){return Z}});var n=e(88351),E=e(84974),c=e(93236),C=e(96630),j=e(5424),g=e(40749),R=e(67654),W=e(67817),X=e(71639),S=e(80128),L=e(50126),N=e(61385),r=e(84875),m=e.n(r),P=e(75986),l=e(16216),x=e(21983),G=function(a){var v;return(0,g.Z)({},a.componentCls,{"&-title":{marginBlockEnd:a.marginXL,fontWeight:"bold"},"&-container":(0,g.Z)({flexWrap:"wrap",maxWidth:"100%"},"> div".concat(a.antCls,"-space-item"),{maxWidth:"100%"}),"&-twoLine":(v={display:"block",width:"100%"},(0,g.Z)(v,"".concat(a.componentCls,"-title"),{width:"100%",margin:"8px 0"}),(0,g.Z)(v,"".concat(a.componentCls,"-container"),{paddingInlineStart:16}),(0,g.Z)(v,"".concat(a.antCls,"-space-item,").concat(a.antCls,"-form-item"),{width:"100%"}),(0,g.Z)(v,"".concat(a.antCls,"-form-item"),{"&-control":{display:"flex",alignItems:"center",justifyContent:"flex-end","&-input":{alignItems:"center",justifyContent:"flex-end","&-content":{flex:"none"}}}}),v)})};function i(_){return(0,x.Xj)("ProFormGroup",function(a){var v=(0,n.Z)((0,n.Z)({},a),{},{componentCls:".".concat(_)});return[G(v)]})}var t=e(62086),M=c.forwardRef(function(_,a){var v=c.useContext(P.Z),o=v.groupProps,p=(0,n.Z)((0,n.Z)({},o),_),F=p.children,k=p.collapsible,ee=p.defaultCollapsed,O=p.style,y=p.labelLayout,u=p.title,T=u===void 0?_.label:u,$=p.tooltip,V=p.align,b=V===void 0?"start":V,z=p.direction,le=p.size,te=le===void 0?32:le,ae=p.titleStyle,ue=p.titleRender,Y=p.spaceProps,w=p.extra,H=p.autoFocus,re=(0,X.Z)(function(){return ee||!1},{value:_.collapsed,onChange:_.onCollapse}),de=(0,R.Z)(re,2),J=de[0],me=de[1],_e=(0,c.useContext)(L.ZP.ConfigContext),fe=_e.getPrefixCls,ce=(0,l.zx)(_),Pe=ce.ColWrapper,ve=ce.RowWrapper,d=fe("pro-form-group"),s=i(d),h=s.wrapSSR,f=s.hashId,U=k&&(0,t.jsx)(W.Z,{style:{marginInlineEnd:8},rotate:J?void 0:90}),D=(0,t.jsx)(S.G,{label:U?(0,t.jsxs)("div",{children:[U,T]}):T,tooltip:$}),q=(0,c.useCallback)(function(oe){var ie=oe.children;return(0,t.jsx)(N.Z,(0,n.Z)((0,n.Z)({},Y),{},{className:m()("".concat(d,"-container ").concat(f),Y==null?void 0:Y.className),size:te,align:b,direction:z,style:(0,n.Z)({rowGap:0},Y==null?void 0:Y.style),children:ie}))},[b,d,z,f,te,Y]),I=ue?ue(D,_):D,Ee=(0,c.useMemo)(function(){var oe=[],ie=c.Children.toArray(F).map(function(Q,Me){var he;return c.isValidElement(Q)&&Q!==null&&Q!==void 0&&(he=Q.props)!==null&&he!==void 0&&he.hidden?(oe.push(Q),null):Me===0&&c.isValidElement(Q)&&H?c.cloneElement(Q,(0,n.Z)((0,n.Z)({},Q.props),{},{autoFocus:H})):Q});return[(0,t.jsx)(ve,{Wrapper:q,children:ie},"children"),oe.length>0?(0,t.jsx)("div",{style:{display:"none"},children:oe}):null]},[F,ve,q,H]),pe=(0,R.Z)(Ee,2),se=pe[0],Ce=pe[1];return h((0,t.jsx)(Pe,{children:(0,t.jsxs)("div",{className:m()(d,f,(0,g.Z)({},"".concat(d,"-twoLine"),y==="twoLine")),style:O,ref:a,children:[Ce,(T||$||w)&&(0,t.jsx)("div",{className:"".concat(d,"-title ").concat(f).trim(),style:ae,onClick:function(){me(!J)},children:w?(0,t.jsxs)("div",{style:{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between"},children:[I,(0,t.jsx)("span",{onClick:function(ie){return ie.stopPropagation()},children:w})]}):I}),(0,t.jsx)("div",{style:{display:k&&J?"none":void 0},children:se})]})}))});M.displayName="ProForm-Group";var A=M,B=e(9664);function Z(_){return(0,t.jsx)(C.I,(0,n.Z)({layout:"vertical",submitter:{render:function(v,o){return o.reverse()}},contentRender:function(v,o){return(0,t.jsxs)(t.Fragment,{children:[v,o]})}},_))}Z.Group=A,Z.useForm=E.Z.useForm,Z.Item=B.Z,Z.useWatch=E.Z.useWatch,Z.ErrorList=E.Z.ErrorList,Z.Provider=E.Z.Provider,Z.useFormInstance=E.Z.useFormInstance,Z.EditOrReadOnlyContext=j.A},80128:function(ne,K,e){e.d(K,{G:function(){return G}});var n=e(88351),E=e(40749),c=e(52319),C=e(93236),j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},g=j,R=e(85651),W=function(t,M){return C.createElement(R.Z,(0,c.Z)({},t,{ref:M,icon:g}))},X=C.forwardRef(W),S=e(50126),L=e(87087),N=e(84875),r=e.n(N),m=e(21983),P=function(t){return(0,E.Z)({},t.componentCls,{display:"inline-flex",alignItems:"center",maxWidth:"100%","&-icon":{display:"block",marginInlineStart:"4px",cursor:"pointer","&:hover":{color:t.colorPrimary}},"&-title":{display:"inline-flex",flex:"1"},"&-subtitle ":{marginInlineStart:8,color:t.colorTextSecondary,fontWeight:"normal",fontSize:t.fontSize,whiteSpace:"nowrap"},"&-title-ellipsis":{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",wordBreak:"keep-all"}})};function l(i){return(0,m.Xj)("LabelIconTip",function(t){var M=(0,n.Z)((0,n.Z)({},t),{},{componentCls:".".concat(i)});return[P(M)]})}var x=e(62086),G=C.memo(function(i){var t=i.label,M=i.tooltip,A=i.ellipsis,B=i.subTitle,Z=(0,C.useContext)(S.ZP.ConfigContext),_=Z.getPrefixCls,a=_("pro-core-label-tip"),v=l(a),o=v.wrapSSR,p=v.hashId;if(!M&&!B)return(0,x.jsx)(x.Fragment,{children:t});var F=typeof M=="string"||C.isValidElement(M)?{title:M}:M,k=(F==null?void 0:F.icon)||(0,x.jsx)(X,{});return o((0,x.jsxs)("div",{className:r()(a,p),onMouseDown:function(O){return O.stopPropagation()},onMouseLeave:function(O){return O.stopPropagation()},onMouseMove:function(O){return O.stopPropagation()},children:[(0,x.jsx)("div",{className:r()("".concat(a,"-title"),p,(0,E.Z)({},"".concat(a,"-title-ellipsis"),A)),children:t}),B&&(0,x.jsx)("div",{className:"".concat(a,"-subtitle ").concat(p).trim(),children:B}),M&&(0,x.jsx)(L.Z,(0,n.Z)((0,n.Z)({},F),{},{children:(0,x.jsx)("span",{className:"".concat(a,"-icon ").concat(p).trim(),children:k})}))]}))})},28723:function(ne,K,e){e.r(K);var n=e(25359),E=e.n(n),c=e(49811),C=e.n(c),j=e(54306),g=e.n(j),R=e(93236),W=e(28931),X=e(61786),S=e(83199),L=e(72226),N=e(40882),r=e(90627),m=e(62086),P=r.Z.DeviceStoreController.deviceStoreItems,l=r.Z.ShopController.shopItems;K.default=function(x){var G=x.values,i=x.modalOpenState,t=x.onModalOpenState,M=x.onSubmit,A=(0,R.useRef)(),B=(0,R.useState)([]),Z=g()(B,2),_=Z[0],a=Z[1],v=(0,R.useState)([]),o=g()(v,2),p=o[0],F=o[1];(0,R.useEffect)(function(){var O;(O=A.current)===null||O===void 0||O.setFieldsValue(G)},[G]);var k=function(y){P({keyword:y}).then(function(u){var T,$=u.data,V=[];$==null||(T=$.items)===null||T===void 0||T.map(function(b){b.label="".concat(b.name," ").concat(b.addr),V.push(b)}),a(V)})},ee=function(y){l({username:y}).then(function(u){var T,$=u.data,V=[];$==null||(T=$.items)===null||T===void 0||T.map(function(b){b.label="".concat(b.nickname," ").concat(b.mobile),V.push(b)}),F(V)})};return(0,m.jsx)(m.Fragment,{children:(0,m.jsxs)(W.Y,{title:"\u5145\u7535\u6869-\u6279\u91CF\u751F\u6210",formRef:A,submitter:{searchConfig:{resetText:"\u91CD\u7F6E"},resetButtonProps:{onClick:function(){var y;(y=A.current)===null||y===void 0||y.resetFields()}}},initialValues:G,onFinish:M,open:i,onOpenChange:t,children:[(0,m.jsx)(X.Z,{hidden:!0,width:"md",name:"id"}),(0,m.jsx)(S.Z,{name:"shop_id",label:"\u6240\u5C5E\u5E97\u94FA",showSearch:!0,fieldProps:{fieldNames:{label:"username",value:"id"}},request:function(){var O=C()(E()().mark(function y(u){var T,$,V;return E()().wrap(function(z){for(;;)switch(z.prev=z.next){case 0:if(!(u.keyWords!=null&&u.keyWords.length<6)){z.next=2;break}return z.abrupt("return");case 2:return z.next=4,l({username:u.keyWords});case 4:return T=z.sent,$=T.success,V=T.data,z.abrupt("return",V.data);case 8:case"end":return z.stop()}},y)}));return function(y){return O.apply(this,arguments)}}(),placeholder:"\u8BF7\u9009\u62E9"}),(0,m.jsx)(L.Z,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],label:"\u751F\u6210\u6570\u91CF",name:"num",min:1,max:200}),(0,m.jsx)(N.A.Item,{rules:[{required:!0,message:"\u8BF7\u8F93\u5165"}],label:"\u95E8\u5E97\u5730\u5740",name:"store_id",placeholder:"\u8BF7\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u6216\u5730\u5740",children:(0,m.jsx)(S.Z,{showSearch:!0,style:{width:"100%"},filterOption:!1,onSearch:function(y){y&&k(y)},fieldNames:{label:"label",value:"id"},options:_})})]})})}}}]);
|