保存工作区合并前的本地开发现场 ledger-route-sizes-389952f
This commit is contained in:
1 parent
389952f31c
commit
9952128ba4
45 files changed
+356
-321
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import{n as e}from"./rolldown-runtime-Dl_DZoUm.js";import{i as t,t as n}from"./react-1o5M9n0k.js";import{A as r,C as i,D as a,E as o,F as s,I as c,L as l,M as u,N as d,O as f,P as p,R as m,S as h,T as g,_,a as v,b as y,c as b,g as x,h as S,i as C,j as w,k as T,l as E,n as D,o as O,s as k,v as A,w as j,y as ee,z as M}from"./index-D-ox0wtk.js";import{$ as te,A as ne,B as re,Cn as N,Dn as ie,En as P,Ft as ae,G as oe,H as se,J as ce,M as le,N as ue,Nt as de,O as fe,P as pe,St as F,T as me,Tn as he,Tt as ge,V as _e,Z as ve,Zt as ye,_ as be,at as xe,bn as Se,bt as Ce,dn as we,ht as Te,i as Ee,k as De,lt as I,mt as Oe,nn as ke,nt as Ae,ot as je,pt as Me,q as Ne,qt as L,rn as Pe,tn as Fe,ut as Ie,wn as Le,x as Re,xn as R,y as z}from"./skeleton-B4Z0R3jQ.js";import{d as ze,f as Be,h as Ve,m as He,n as Ue,p as We,t as Ge,u as Ke}from"./typography-xRg_3Gco.js";import{a as qe,o as B,r as Je,s as Ye}from"./shared-DZLPF0cC.js";import{n as Xe,t as Ze}from"./useOrderForm-Boa1k5nR.js";import{a as Qe,d as $e,f as et,i as tt,n as nt,r as rt,t as it,u as at}from"./LockOutlined-BPg5cH36.js";import{n as ot,r as st,t as ct}from"./input-BnsACfRy.js";import{n as lt,t as ut}from"./ReloadOutlined-BW5sy5GM.js";var dt={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z`}}]},name:`right`,theme:`outlined`},V=e(t()),ft=V.forwardRef(function(e,t){return V.createElement(ve,P({},e,{ref:t,icon:dt}))}),H=e(ie()),pt=V.forwardRef(function(e,t){var n=e.prefixCls,r=e.forceRender,i=e.className,a=e.style,o=e.children,s=e.isActive,c=e.role,l=e.classNames,u=e.styles,d=V.useState(s||r),f=Fe(d,2),p=f[0],m=f[1];return V.useEffect(function(){(r||s)&&m(!0)},[r,s]),p?V.createElement(`div`,{ref:t,className:(0,H.default)(`${n}-content`,R(R({},`${n}-content-active`,s),`${n}-content-inactive`,!s),i),style:a,role:c},V.createElement(`div`,{className:(0,H.default)(`${n}-content-box`,l?.body),style:u?.body},o)):null});pt.displayName=`PanelContent`;var mt=[`showArrow`,`headerClass`,`isActive`,`onItemClick`,`forceRender`,`className`,`classNames`,`styles`,`prefixCls`,`collapsible`,`accordion`,`panelKey`,`extra`,`header`,`expandIcon`,`openMotion`,`destroyInactivePanel`,`children`],ht=V.forwardRef(function(e,t){var n=e.showArrow,r=n===void 0||n,i=e.headerClass,a=e.isActive,o=e.onItemClick,s=e.forceRender,c=e.className,l=e.classNames,u=l===void 0?{}:l,d=e.styles,f=d===void 0?{}:d,p=e.prefixCls,m=e.collapsible,h=e.accordion,g=e.panelKey,_=e.extra,v=e.header,y=e.expandIcon,b=e.openMotion,x=e.destroyInactivePanel,S=e.children,C=ye(e,mt),w=m===`disabled`,T=_!=null&&typeof _!=`boolean`,E=R(R(R({onClick:function(){o?.(g)},onKeyDown:function(e){(e.key===`Enter`||e.keyCode===re.ENTER||e.which===re.ENTER)&&o?.(g)},role:h?`tab`:`button`},`aria-expanded`,a),`aria-disabled`,w),`tabIndex`,w?-1:0),D=typeof y==`function`?y(e):V.createElement(`i`,{className:`arrow`}),O=D&&V.createElement(`div`,P({className:`${p}-expand-icon`},[`header`,`icon`].includes(m)?E:{}),D),k=(0,H.default)(`${p}-item`,R(R({},`${p}-item-active`,a),`${p}-item-disabled`,w),c),A=(0,H.default)(i,`${p}-header`,R({},`${p}-collapsible-${m}`,!!m),u.header),j=Se({className:A,style:f.header},[`header`,`icon`].includes(m)?{}:E);return V.createElement(`div`,P({},C,{ref:t,className:k}),V.createElement(`div`,j,r&&O,V.createElement(`span`,P({className:`${p}-header-text`},m===`header`?E:{}),v),T&&V.createElement(`div`,{className:`${p}-extra`},_)),V.createElement(te,P({visible:a,leavedClassName:`${p}-content-hidden`},b,{forceRender:s,removeOnLeave:x}),function(e,t){var n=e.className,r=e.style;return V.createElement(pt,{ref:t,prefixCls:p,className:n,classNames:u,style:r,styles:f,isActive:a,forceRender:s,role:h?`tabpanel`:void 0},S)}))}),gt=[`children`,`label`,`key`,`collapsible`,`onItemClick`,`destroyInactivePanel`],_t=function(e,t){var n=t.prefixCls,r=t.accordion,i=t.collapsible,a=t.destroyInactivePanel,o=t.onItemClick,s=t.activeKey,c=t.openMotion,l=t.expandIcon;return e.map(function(e,t){var u=e.children,d=e.label,f=e.key,p=e.collapsible,m=e.onItemClick,h=e.destroyInactivePanel,g=ye(e,gt),_=String(f??t),v=p??i,y=h??a,b=function(e){v!==`disabled`&&(o(e),m?.(e))},x=!1;return x=r?s[0]===_:s.indexOf(_)>-1,V.createElement(ht,P({},g,{prefixCls:n,key:_,panelKey:_,isActive:x,accordion:r,openMotion:c,expandIcon:l,header:d,collapsible:v,onItemClick:b,destroyInactivePanel:y}),u)})},vt=function(e,t,n){if(!e)return null;var r=n.prefixCls,i=n.accordion,a=n.collapsible,o=n.destroyInactivePanel,s=n.onItemClick,c=n.activeKey,l=n.openMotion,u=n.expandIcon,d=e.key||String(t),f=e.props,p=f.header,m=f.headerClass,h=f.destroyInactivePanel,g=f.collapsible,_=f.onItemClick,v=!1;v=i?c[0]===d:c.indexOf(d)>-1;var y=g??a,b={key:d,panelKey:d,header:p,headerClass:m,isActive:v,prefixCls:r,destroyInactivePanel:h??o,openMotion:l,accordioLine truncated
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`${L(c)} ${L(c)} 0 0`}},"&:last-child":{[`
|
||||
&,
|
||||
& > ${t}-header`]:{borderRadius:`0 0 ${L(c)} ${L(c)}`}},[`> ${t}-header`]:Object.assign(Object.assign({position:`relative`,display:`flex`,flexWrap:`nowrap`,alignItems:`flex-start`,padding:a,color:p,lineHeight:g,cursor:`pointer`,transition:`all ${S}, visibility 0s`},je(e)),{[`> ${t}-header-text`]:{flex:`auto`},[`${t}-expand-icon`]:{height:T,display:`flex`,alignItems:`center`,paddingInlineEnd:v},[`${t}-arrow`]:Object.assign(Object.assign({},Ie()),{fontSize:C,transition:`transform ${S}`,svg:{transition:`transform ${S}`}}),[`${t}-header-text`]:{marginInlineEnd:`auto`}}),[`${t}-collapsible-header`]:{cursor:`default`,[`${t}-header-text`]:{flex:`none`,cursor:`pointer`},[`${t}-expand-icon`]:{cursor:`pointer`}},[`${t}-collapsible-icon`]:{cursor:`unset`,[`${t}-expand-icon`]:{cursor:`pointer`}}},[`${t}-content`]:{color:f,backgroundColor:n,borderTop:D,[`& > ${t}-content-box`]:{padding:w},"&-hidden":{display:`none`}},"&-small":{[`> ${t}-item`]:{[`> ${t}-header`]:{padding:o,paddingInlineStart:x,[`> ${t}-expand-icon`]:{marginInlineStart:e.calc(y).sub(x).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:y}}},"&-large":{[`> ${t}-item`]:{fontSize:h,lineHeight:_,[`> ${t}-header`]:{padding:s,paddingInlineStart:r,[`> ${t}-expand-icon`]:{height:E,marginInlineStart:e.calc(b).sub(r).equal()}},[`> ${t}-content > ${t}-content-box`]:{padding:b}}},[`${t}-item:last-child`]:{borderBottom:0,[`> ${t}-content`]:{borderRadius:`0 0 ${L(c)} ${L(c)}`}},[`& ${t}-item-disabled > ${t}-header`]:{"\n &,\n & > .arrow\n ":{color:m,cursor:`not-allowed`}},[`&${t}-icon-position-end`]:{[`& > ${t}-item`]:{[`> ${t}-header`]:{[`${t}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:v}}}}})}},Tt=e=>{let{componentCls:t}=e,n=`> ${t}-item > ${t}-header ${t}-arrow`;return{[`${t}-rtl`]:{[n]:{transform:`rotate(180deg)`}}}},Et=e=>{let{componentCls:t,headerBg:n,borderlessContentPadding:r,borderlessContentBg:i,colorBorder:a}=e;return{[`${t}-borderless`]:{backgroundColor:n,border:0,[`> ${t}-item`]:{borderBottom:`1px solid ${a}`},[`
|
||||
> ${t}-item:last-child,
|
||||
> ${t}-item:last-child ${t}-header
|
||||
`]:{borderRadius:0},[`> ${t}-item:last-child`]:{borderBottom:0},[`> ${t}-item > ${t}-content`]:{backgroundColor:i,borderTop:0},[`> ${t}-item > ${t}-content > ${t}-content-box`]:{padding:r}}}},Dt=e=>{let{componentCls:t,paddingSM:n}=e;return{[`${t}-ghost`]:{backgroundColor:`transparent`,border:0,[`> ${t}-item`]:{borderBottom:0,[`> ${t}-content`]:{backgroundColor:`transparent`,border:0,[`> ${t}-content-box`]:{paddingBlock:n}}}}}},Ot=Ae(`Collapse`,e=>{let t=Oe(e,{collapseHeaderPaddingSM:`${L(e.paddingXS)} ${L(e.paddingSM)}`,collapseHeaderPaddingLG:`${L(e.padding)} ${L(e.paddingLG)}`,collapsePanelBorderRadius:e.borderRadiusLG});return[wt(t),Et(t),Dt(t),Tt(t),et(t)]},e=>({headerPadding:`${e.paddingSM}px ${e.padding}px`,headerBg:e.colorFillAlter,contentPadding:`${e.padding}px 16px`,contentBg:e.colorBgContainer,borderlessContentPadding:`${e.paddingXXS}px 16px ${e.padding}px`,borderlessContentBg:`transparent`})),kt=Object.assign(V.forwardRef((e,t)=>{let{getPrefixCls:n,direction:r,expandIcon:i,className:a,style:o}=ge(`collapse`),{prefixCls:s,className:c,rootClassName:l,style:u,bordered:d=!0,ghost:f,size:p,expandIconPosition:m=`start`,children:h,destroyInactivePanel:g,destroyOnHidden:_,expandIcon:v}=e,y=fe(e=>p??e??`middle`),b=n(`collapse`,s),x=n(),[S,C,w]=Ot(b),T=V.useMemo(()=>m===`left`?`start`:m===`right`?`end`:m,[m]),E=v??i,D=V.useCallback((e={})=>{let t=typeof E==`function`?E(e):V.createElement(ft,{rotate:e.isActive?r===`rtl`?-90:90:void 0,"aria-label":e.isActive?`expanded`:`collapsed`});return se(t,()=>({className:(0,H.default)(t.props?.className,`${b}-arrow`)}))},[E,b,r]),O=(0,H.default)(`${b}-icon-position-${T}`,{[`${b}-borderless`]:!d,[`${b}-rtl`]:r===`rtl`,[`${b}-ghost`]:!!f,[`${b}-${y}`]:y!==`middle`},a,c,l,C,w),k=V.useMemo(()=>Object.assign(Object.assign({},pe(x)),{motionAppear:!1,leavedClassName:`${b}-content-hidden`}),[x,b]),A=V.useMemo(()=>h?Le(h).map((e,t)=>{let n=e.props;if(n?.disabled){let r=e.key??String(t),i=Object.assign(Object.assign({},le(e.props,[`disabled`])),{key:r,collapsible:n.collapsible??`disabled`});return se(e,i)}return e}):null,[h]);return S(V.createElement(St,Object.assign({ref:t,openMotion:k},le(e,[`rootClassName`]),{expandIcon:D,prefixCls:b,className:O,style:Object.assign(Object.assign({},o),u),destroyInactivePanel:_??g}),A))}),{Panel:Ct}),At=e=>e?typeof e==`function`?e():e:null,jt=e=>{let{componentCls:t,popoverColor:n,titleMinWidth:r,fontWeightStrong:i,innerPadding:a,boxShadowSecondary:o,colorTextHeading:s,borderRadiusLG:c,zIndexPopup:l,titleMarginBottom:u,colorBgElevated:d,popoverBg:f,titleBorderBottom:p,innerContentPadding:m,titlePadding:h}=e;return[{[t]:Object.assign(Object.assign({},I(e)),{position:`absolute`,top:0,left:{_skip_check_:!0,value:0},zIndex:l,fontWeight:`normal`,whiteSpace:`normal`,textAlign:`start`,cursor:`auto`,userSelect:`text`,"--valid-offset-x":`var(--arrow-offset-horizontal, var(--arrow-x))`,transformOrigin:`var(--valid-offset-x, 50%) var(--arrow-y, 50%)`,"--antd-arrow-background-color":d,width:`max-content`,maxWidth:`100vw`,"&-rtl":{direction:`rtl`},"&-hidden":{display:`none`},[`${t}-content`]:{position:`relative`},[`${t}-inner`]:{backgroundColor:f,backgroundClip:`padding-box`,borderRadius:c,boxShadow:o,padding:a},[`${t}-title`]:{minWidth:r,marginBottom:u,color:s,fontWeight:i,borderBottom:p,padding:h},[`${t}-inner-content`]:{color:n,padding:m}})},Be(e,`var(--antd-arrow-background-color)`),{[`${t}-pure`]:{position:`relative`,maxWidth:`none`,margin:e.sizePopupArrow,display:`inline-block`,[`${t}-content`]:{display:`inline-block`}}}]},Mt=e=>{let{componentCls:t}=e;return{[t]:Me.map(n=>{let r=e[`${n}6`];return{[`&${t}-${n}`]:{"--antd-arrow-background-color":r,[`${t}-inner`]:{backgroundColor:r},[`${t}-arrow`]:{background:`transparent`}}}})}},Nt=Ae(`Popover`,e=>{let{colorBgElevated:t,colorText:n}=e,r=Oe(e,{popoverBg:t,popoverColor:n});return[jt(r),Mt(r),Re(r,`zoom-big`)]},e=>{let{lineWidth:t,controlHeight:n,fontHeight:r,padding:i,wireframe:a,zIndexPopupBase:o,borderRadiusLG:s,marginXS:c,lineType:l,colorSplit:u,paddingSM:d}=e,f=n-r,p=f/2,m=f/2-t,h=i;return Object.assign(Object.assign(Object.assign({titleMinWidth:177,zIndexPopup:o+30},We(e)),ze({contentRadius:s,limitVerticalRadius:!0})),{innerPadding:a?0:12,titleMarginBottom:a?0:c,titlePadding:a?`${p}px ${h}px ${m}px`:0,titleBorderBottom:a?`${t}px ${l} ${u}`:`none`,innerContentPadding:a?`${d}px ${h}px`:0})},{resetStyle:!1,deprecatedTokens:[[`width`,`titleMinWidth`],[`minWidth`,`titleMinWidth`]]}),Pt=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Ft=({title:e,content:t,prefixCls:n})=>!e&&!t?null:V.createElement(V.Fragment,null,e&&V.createElement(`div`,{className:`${n}-title`},e),t&&V.createElement(`div`,{className:`${n}-inner-content`},
Line truncated
|
||||
&:hover ${y}`]:{borderColor:r},[`${t}-input:focus-visible + ${y}`]:xe(e),[`${t}:hover::after, ${t}-wrapper:hover &::after`]:{visibility:`visible`},[`${t}-inner`]:{"&::after":{boxSizing:`border-box`,position:`absolute`,insetBlockStart:`50%`,insetInlineStart:`50%`,display:`block`,width:x,height:x,marginBlockStart:v(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:v(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:g,borderBlockStart:0,borderInlineStart:0,borderRadius:x,transform:`scale(0)`,opacity:0,transition:`all ${a} ${s}`,content:`""`},boxSizing:`border-box`,position:`relative`,insetBlockStart:0,insetInlineStart:0,display:`block`,width:x,height:x,backgroundColor:c,borderColor:l,borderStyle:`solid`,borderWidth:u,borderRadius:`50%`,transition:`all ${o}`},[`${t}-input`]:{position:`absolute`,inset:0,zIndex:1,cursor:`pointer`,opacity:0},[`${t}-checked`]:{[y]:{borderColor:r,backgroundColor:_,"&::after":{transform:`scale(${e.calc(e.dotSize).div(i).equal()})`,opacity:1,transition:`all ${a} ${s}`}}},[`${t}-disabled`]:{cursor:`not-allowed`,[y]:{backgroundColor:d,borderColor:l,cursor:`not-allowed`,"&::after":{backgroundColor:m}},[`${t}-input`]:{cursor:`not-allowed`},[`${t}-disabled + span`]:{color:f,cursor:`not-allowed`},[`&${t}-checked`]:{[y]:{"&::after":{transform:`scale(${v(b).div(i).equal()})`}}}},[`span${t} + *`]:{paddingInlineStart:p,paddingInlineEnd:p}})}},Yt=e=>{let{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:i,lineType:a,colorBorder:o,motionDurationMid:s,buttonPaddingInline:c,fontSize:l,buttonBg:u,fontSizeLG:d,controlHeightLG:f,controlHeightSM:p,paddingXS:m,borderRadius:h,borderRadiusSM:g,borderRadiusLG:_,buttonCheckedBg:v,buttonSolidCheckedColor:y,colorTextDisabled:b,colorBgContainerDisabled:x,buttonCheckedBgDisabled:S,buttonCheckedColorDisabled:C,colorPrimary:w,colorPrimaryHover:T,colorPrimaryActive:E,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:O,buttonSolidCheckedActiveBg:k,calc:A}=e;return{[`${r}-button-wrapper`]:{position:`relative`,display:`inline-block`,height:n,margin:0,paddingInline:c,paddingBlock:0,color:t,fontSize:l,lineHeight:L(A(n).sub(A(i).mul(2)).equal()),background:u,border:`${L(i)} ${a} ${o}`,borderBlockStartWidth:A(i).add(.02).equal(),borderInlineEndWidth:i,cursor:`pointer`,transition:[`color ${s}`,`background ${s}`,`box-shadow ${s}`].join(`,`),a:{color:t},[`> ${r}-button`]:{position:`absolute`,insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:`100%`,height:`100%`},"&:not(:last-child)":{marginInlineEnd:A(i).mul(-1).equal()},"&:first-child":{borderInlineStart:`${L(i)} ${a} ${o}`,borderStartStartRadius:h,borderEndStartRadius:h},"&:last-child":{borderStartEndRadius:h,borderEndEndRadius:h},"&:first-child:last-child":{borderRadius:h},[`${r}-group-large &`]:{height:f,fontSize:d,lineHeight:L(A(f).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:_,borderEndStartRadius:_},"&:last-child":{borderStartEndRadius:_,borderEndEndRadius:_}},[`${r}-group-small &`]:{height:p,paddingInline:A(m).sub(i).equal(),paddingBlock:0,lineHeight:L(A(p).sub(A(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:g,borderEndStartRadius:g},"&:last-child":{borderStartEndRadius:g,borderEndEndRadius:g}},"&:hover":{position:`relative`,color:w},"&:has(:focus-visible)":xe(e),[`${r}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:`none`},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:w,background:v,borderColor:w,"&::before":{backgroundColor:w},"&:first-child":{borderColor:w},"&:hover":{color:T,borderColor:T,"&::before":{backgroundColor:T}},"&:active":{color:E,borderColor:E,"&::before":{backgroundColor:E}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:y,background:D,borderColor:D,"&:hover":{color:y,background:O,borderColor:O},"&:active":{color:y,background:k,borderColor:k}},"&-disabled":{color:b,backgroundColor:x,borderColor:o,cursor:`not-allowed`,"&:first-child, &:hover":{color:b,backgroundColor:x,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:C,backgroundColor:S,borderColor:o,boxShadow:`none`},"&-block":{flex:1,textAlign:`center`}}}},Xt=Ae(`Radio`,e=>{let{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${L(n)} ${t}`,i=Oe(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[qt(i),Jt(i),Yt(i)]},e=>{let{wireframe:t,padding:n,marginXS:r,lineWidth:i,fontSizeLG:a,colorText:o,colorBgContainer:s,colorTextDisabled:c,controlItemBgActiveDisabled:l,colorTextLightSolid:u,colorPrimary:d,colorPrimaryHover:f,colorPrimaryActive:p,colorWhite:m}=e,h=a;return{radioSize:h,dotSize:t?h-8:h-(4+i)*2,dotColorDisabled:c,buttonSolidCheckedColor:u,buttonSolidCheckedBg:d,buttonSolidCheckedHoverBg:f,buttonSolidCheckedActiveBg:p,buttonBg:s,buttonCheckedBg:s,buttonColor:o,buttonCheckedBgDisabled:l,buttonCheckedColorDisabled:c,buttonPaddingInline:n-i,wrapperMarginInlineEnd:r,radioColor:t?d:m,radioBgColor:t?s:d}},{unitless:{radioSize:!0,dotSize:!0}}),Zt=function(e,t){var n={};for(var r in e)Obje
Line truncated
|
||||
${n}:not(${n}-disabled),
|
||||
${t}:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:`rotate(45deg) scale(1) translate(-50%,-50%)`,transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[`
|
||||
${n}-checked:not(${n}-disabled),
|
||||
${t}-checked:not(${t}-disabled)
|
||||
`]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:`transparent`}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:`50%`,insetInlineStart:`50%`,width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:`translate(-50%, -50%) scale(1)`,opacity:1,content:`""`}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${n}-disabled`]:{cursor:`not-allowed`},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:`not-allowed`,pointerEvents:`none`},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:`none`},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function on(e,t){return an(Oe(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize}))}var sn=Ae(`Checkbox`,(e,{prefixCls:t})=>[on(t,e)]),cn=V.createContext(null),ln=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},un=V.forwardRef((e,t)=>{let{prefixCls:n,className:r,rootClassName:i,children:a,indeterminate:o=!1,style:s,onMouseEnter:c,onMouseLeave:l,skipGroup:u=!1,disabled:d}=e,f=ln(e,[`prefixCls`,`className`,`rootClassName`,`children`,`indeterminate`,`style`,`onMouseEnter`,`onMouseLeave`,`skipGroup`,`disabled`]),{getPrefixCls:p,direction:m,checkbox:h}=V.useContext(F),g=V.useContext(cn),{isFormItemInput:_}=V.useContext(Ee),v=V.useContext(Ce),y=(g?.disabled||d)??v,b=V.useRef(f.value),x=V.useRef(null),S=we(t,x);V.useEffect(()=>{g?.registerValue(f.value)},[]),V.useEffect(()=>{if(!u)return f.value!==b.current&&(g?.cancelValue(b.current),g?.registerValue(f.value),b.current=f.value),()=>g?.cancelValue(f.value)},[f.value]),V.useEffect(()=>{x.current?.input&&(x.current.input.indeterminate=o)},[o]);let C=p(`checkbox`,n),w=_e(C),[T,E,D]=sn(C,w),O=Object.assign({},f);g&&!u&&(O.onChange=(...e)=>{f.onChange&&f.onChange.apply(f,e),g.toggleOption&&g.toggleOption({label:a,value:f.value})},O.name=g.name,O.checked=g.value.includes(f.value));let k=(0,H.default)(`${C}-wrapper`,{[`${C}-rtl`]:m===`rtl`,[`${C}-wrapper-checked`]:O.checked,[`${C}-wrapper-disabled`]:y,[`${C}-wrapper-in-form-item`]:_},h?.className,r,i,D,w,E),A=(0,H.default)({[`${C}-indeterminate`]:o},ne,E),[j,ee]=Kt(O.onClick);return T(V.createElement(De,{component:`Checkbox`,disabled:y},V.createElement(`label`,{className:k,style:Object.assign(Object.assign({},h?.style),s),onMouseEnter:c,onMouseLeave:l,onClick:j},V.createElement(Gt,Object.assign({},O,{onClick:ee,prefixCls:C,className:A,disabled:y,ref:S})),a!=null&&V.createElement(`span`,{className:`${C}-label`},a))))}),dn=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},fn=V.forwardRef((e,t)=>{let{defaultValue:n,children:r,options:i=[],prefixCls:a,className:o,rootClassName:s,style:c,onChange:l}=e,u=dn(e,[`defaultValue`,`children`,`options`,`prefixCls`,`className`,`rootClassName`,`style`,`onChange`]),{getPrefixCls:d,direction:f}=V.useContext(F),[p,m]=V.useState(u.value||n||[]),[h,g]=V.useState([]);V.useEffect(()=>{`value`in u&&m(u.value||[])},[u.value]);let _=V.useMemo(()=>i.map(e=>typeof e==`string`||typeof e==`number`?{label:e,value:e}:e),[i]),v=e=>{g(t=>t.filter(t=>t!==e))},y=e=>{g(t=>[].concat(Pe(t),[e]))},b=e=>{let t=p.indexOf(e.value),n=Pe(p);t===-1?n.push(e.value):n.splice(t,1),`value`in u||m(n),l?.(n.filter(e=>h.includes(e)).sort((e,t)=>_.findIndex(t=>t.value===e)-_.findIndex(e=>e.value===t)))},x=d(`checkbox`,a),S=`${x}-group`,C=_e(x),[w,T,E]=sn(x,C),D=le(u,[`value`,`disabled`]),O=i.length?_.map(e=>V.createElement(un,{prefixCls:x,key:e.value.toString(),disabled:`disabled`in e?e.disabled:u.disabled,value:e.value,checked:p.includes(e.value),onChange:e.onChange,className:(0,H.default)(`${S}-item`,e.className),style:e.style,title:e.title,id:e.id,required:e.required},e.label)):r,k=V.useMemo(()=>({toggleOption:b,value:p,disabled:u.disabled,name:u.name,registerValue:y,cancelValue:v}),[b,p,u.disabled,u.name,y,v]),A=(0,H.default)(S,{[`${S}-rtl`]:f===`rtl`},o,s,E,C,T);return w(V.createElement(`div`,Object.assign({className:A,style:c},D,{ref:t}),V.createElement(cn.Provider,{value:k},O)))}),pn=un;pn.Group=fn,pn.__ANT_CHECKBOX=!0;var mn=tt,hn={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d
Line truncated
|
||||
0.58×(822+45)+55=558
|
||||
769+558=1327`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&r.trim()&&(e.preventDefault(),s(!1))}}),(0,G.jsxs)(lt,{wrap:!0,style:{marginTop:8},children:[(0,G.jsx)(z,{type:`primary`,onClick:()=>s(!1),children:`识别并预填`}),a?.kind===`warning`&&(0,G.jsx)(z,{onClick:()=>s(!0),children:`按计算金额预填`}),r&&(0,G.jsx)(z,{onClick:()=>{i(``),o(null)},children:`清空公式`})]}),(0,G.jsx)(`p`,{className:`small muted`,children:`括号内是克工费;金价乘克重后加的是一件工费,再加的金额记为附加费。合计行只校验,不增加商品。客户、货盘及内部成本仍按实际填写。`}),a&&(0,G.jsx)(M,{role:`status`,type:a.kind===`note`?`success`:a.kind,message:a.title||(a.kind===`error`?a.lines[0]:``),description:a.kind===`error`?void 0:(0,G.jsx)(`div`,{children:a.lines.filter(Boolean).map((e,t)=>(0,G.jsx)(`p`,{children:e},t))})})]})}function cr({order:e,error:t,onRetry:n,onPreview:r,onNew:i}){let{message:a}=h.useApp(),[o,s]=(0,V.useState)(!1),c=e.total!==void 0;async function l(){if(e.paper_number)try{await navigator.clipboard.writeText(e.paper_number),s(!0),a.success(`已复制纸单号 `+e.paper_number),window.setTimeout(()=>s(!1),1800)}catch{s(!1),a.info(`请手动选择纸单号复制`)}}return(0,G.jsx)(`div`,{className:`issued-page`,children:(0,G.jsx)(ot,{className:`issued-card`,children:(0,G.jsx)(ee,{status:`success`,title:`销售单据已生成`,subTitle:c?e.materialCostPending?`收款、费用和出库已记账;料费待补,补足购料后自动核算利润。`:`收款、费用、出库和利润已记账。`:t||`正在读取已生成的销售单…`,extra:(0,G.jsxs)(lt,{direction:`vertical`,size:`large`,style:{width:`100%`},children:[c&&(0,G.jsxs)(`dl`,{className:`issued-summary`,"data-testid":`issued-summary`,children:[(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`纸单号`})}),(0,G.jsxs)(`dd`,{className:`issued-value-row`,children:[(0,G.jsx)(`span`,{className:`issued-value num`,"data-testid":`issued-paper-number`,children:e.paper_number||`未分配`}),e.paper_number&&(0,G.jsx)(Ke,{title:o?`已复制`:`复制纸单号`,children:(0,G.jsx)(z,{type:`text`,size:`small`,className:`issued-copy-btn`,"aria-label":`复制纸单号`,icon:o?(0,G.jsx)(Ve,{}):(0,G.jsx)(Ue,{}),onClick:()=>void l()})})]})]}),(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`成交合计`})}),(0,G.jsx)(`dd`,{className:`issued-value issued-total num`,"data-testid":`issued-total`,children:C(e.total??null,e.rounding_mode||`cent`)})]}),e.customer&&(0,G.jsxs)(`div`,{className:`issued-item`,children:[(0,G.jsx)(`dt`,{children:(0,G.jsx)(Ge.Text,{type:`secondary`,children:`客户`})}),(0,G.jsx)(`dd`,{className:`issued-value small`,children:e.customer})]})]}),(0,G.jsxs)(`div`,{className:`issued-actions`,children:[(0,G.jsx)(z,{type:`primary`,size:`large`,icon:(0,G.jsx)(Pn,{}),href:`/print/`+encodeURIComponent(e.id)+`?mode=full`,onClick:()=>{r().catch(e=>a.error(e.message))},target:`_blank`,rel:`noopener`,"data-action":`print-preview`,children:`打开打印预览`}),(0,G.jsx)(z,{size:`large`,icon:(0,G.jsx)(st,{}),onClick:i,"data-action":`new-order`,children:`开始新的一单`}),!c&&(0,G.jsx)(z,{size:`large`,onClick:n,children:`重新读取订单`})]}),(0,G.jsx)(z,{href:b(`orders`)+`?order=`+encodeURIComponent(e.id),onClick:t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||(t.preventDefault(),k(`orders`,{search:`?order=`+encodeURIComponent(e.id)}))},type:`link`,icon:(0,G.jsx)(gn,{}),children:`查看订单详情`})]})})})})}function lr(e){let{client:t,state:n}=e,r=E(`draft`),[i,a]=(0,V.useState)(r?null:{draft:_(window.localStorage,n.user.id),note:``});return(0,V.useEffect)(()=>{if(!r)return;let e=!0;return(async()=>{try{if(n.user.role!==`owner`)throw Error(`已有草稿由店主继续填写并开单;无单号的新开单流程照常使用。`);let i=await t.api(`/api/orders/`+encodeURIComponent(r));if(i.status!==`draft`)throw Error(`这张订单不是未开单的旧草稿,请在订单页查看。`);e&&a({draft:B.draftInputs(i),note:`正在继续填写旧草稿,生成销售单据后完成记账。`})}catch(t){e&&a({draft:_(window.localStorage,n.user.id),note:`旧草稿未能打开:`+t.message})}})(),()=>{e=!1}},[t,r,n.user.id,n.user.role]),i?(0,G.jsx)(ur,{...e,initialDraft:i.draft,initialNote:i.note}):(0,G.jsx)(`div`,{className:`page-loading`,children:(0,G.jsx)(y,{tip:`正在读取旧草稿…`,children:(0,G.jsx)(`div`,{style:{height:60}})})})}function ur({client:e,state:t,session:n,refreshState:r,onAccountChanged:i,onRecoverOther:a,initialDraft:o,initialNote:s}){let{message:c}=h.useApp();O(e);let{store:l,update:u,reset:d,ctx:f,poolError:p,loadPools:m}=Ze({client:e,state:t,session:n,initialDraft:o}),{form:g,summary:_}=l,[v,y]=(0,V.useState)(``),[C,w]=(0,V.useState)(!1),[T,E]=(0,V.useState)(null),D=T!=
Line truncated
|
||||
Reference in new issue
Block a user