fresh-mint-green.html 151 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145
  1. <!doctype html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>叁强鲜配 · 配送调度</title>
  7. <link rel="preconnect" href="https://fonts.googleapis.com" />
  8. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  9. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
  10. <style>
  11. :root {
  12. --primary: #00c98d;
  13. --primary-dark: #00a874;
  14. --primary-bg: #eafff6;
  15. --text: #000000;
  16. --text-muted: #1f2937;
  17. --border: #e5e7eb;
  18. /* 工作区:极淡绿底;卡片/面板仍为白。强调色仍只用于导航选中、主按钮、主状态标签 */
  19. --bg-page: #ffffff;
  20. --surface: #ffffff;
  21. --table-head: #ffffff;
  22. --row-alt: #ffffff;
  23. --row-hover: #f8fafc;
  24. --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  25. --radius: 10px;
  26. /* 主内容区:全宽,仅四边留白 */
  27. --content-padding: 24px;
  28. }
  29. * { box-sizing: border-box; }
  30. .sr-only {
  31. position: absolute;
  32. width: 1px;
  33. height: 1px;
  34. padding: 0;
  35. margin: -1px;
  36. overflow: hidden;
  37. clip: rect(0, 0, 0, 0);
  38. white-space: nowrap;
  39. border: 0;
  40. }
  41. body {
  42. margin: 0;
  43. min-height: 100vh;
  44. font-family: Inter, -apple-system, sans-serif;
  45. font-size: 14px;
  46. line-height: 1.5;
  47. color: var(--text);
  48. background: var(--bg-page);
  49. }
  50. .layout { display: flex; min-height: 100vh; }
  51. .sidebar {
  52. width: 220px;
  53. flex-shrink: 0;
  54. background: var(--surface);
  55. border-right: 1px solid var(--border);
  56. padding: 24px 16px;
  57. transition: width 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
  58. overflow: hidden;
  59. }
  60. .layout.is-sidebar-collapsed .sidebar {
  61. width: 0;
  62. padding-left: 0;
  63. padding-right: 0;
  64. border-right-color: transparent;
  65. }
  66. .logo {
  67. font-size: 16px;
  68. font-weight: 700;
  69. color: var(--text);
  70. padding: 0 12px 20px;
  71. margin-bottom: 8px;
  72. border-bottom: 1px solid var(--border);
  73. }
  74. .logo span { color: var(--primary); }
  75. .nav-details {
  76. border: none;
  77. margin: 0 0 4px;
  78. padding: 0;
  79. }
  80. .nav-details > summary {
  81. list-style: none;
  82. cursor: pointer;
  83. display: flex;
  84. align-items: center;
  85. justify-content: space-between;
  86. padding: 8px 12px;
  87. margin: 0;
  88. border-radius: var(--radius);
  89. font-size: 12px;
  90. font-weight: 700;
  91. color: var(--text-muted);
  92. letter-spacing: 0.02em;
  93. user-select: none;
  94. }
  95. .nav-details > summary::-webkit-details-marker { display: none; }
  96. .nav-details > summary::after {
  97. content: "";
  98. width: 6px;
  99. height: 6px;
  100. border-right: 2px solid var(--text-muted);
  101. border-bottom: 2px solid var(--text-muted);
  102. transform: rotate(-45deg);
  103. flex-shrink: 0;
  104. margin-left: 8px;
  105. opacity: 0.7;
  106. transition: transform 0.2s ease;
  107. }
  108. .nav-details[open] > summary::after {
  109. transform: rotate(45deg);
  110. margin-top: -2px;
  111. }
  112. .nav-details > summary:hover {
  113. background: var(--row-alt);
  114. color: var(--text);
  115. }
  116. .nav-sub {
  117. padding: 2px 0 6px 4px;
  118. margin-left: 4px;
  119. border-left: 2px solid var(--border);
  120. }
  121. .nav-sub .nav-sub {
  122. margin-left: 10px;
  123. padding-left: 8px;
  124. border-left-style: dashed;
  125. border-left-width: 1px;
  126. }
  127. .nav-sub .nav-details > summary {
  128. font-size: 12px;
  129. padding: 6px 10px;
  130. color: var(--text-muted);
  131. font-weight: 600;
  132. }
  133. .nav-sub .nav-details > summary:hover {
  134. color: var(--text);
  135. }
  136. .nav a {
  137. display: block;
  138. padding: 8px 12px 8px 14px;
  139. margin: 2px 0;
  140. border-radius: var(--radius);
  141. color: var(--text-muted);
  142. text-decoration: none;
  143. font-weight: 500;
  144. font-size: 13px;
  145. }
  146. .nav a:hover { background: var(--row-alt); color: var(--text); }
  147. .nav a.active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 600; }
  148. .nav-foot { margin-top: 24px; padding: 16px 12px 0; font-size: 13px; }
  149. .nav-foot a { color: var(--text-muted); text-decoration: none; }
  150. .nav-foot a:hover { color: var(--primary-dark); }
  151. .main {
  152. flex: 1;
  153. min-width: 0;
  154. display: flex;
  155. flex-direction: column;
  156. width: 100%;
  157. }
  158. .header {
  159. height: 56px;
  160. padding: 0 var(--content-padding);
  161. display: flex;
  162. align-items: center;
  163. justify-content: space-between;
  164. background: var(--surface);
  165. border-bottom: 1px solid var(--border);
  166. }
  167. .header-left {
  168. display: flex;
  169. align-items: center;
  170. gap: 8px;
  171. min-width: 0;
  172. }
  173. .header-actions {
  174. display: inline-flex;
  175. align-items: center;
  176. gap: 6px;
  177. flex-shrink: 0;
  178. }
  179. .icon-btn {
  180. width: 32px;
  181. height: 32px;
  182. padding: 0;
  183. border: none;
  184. border-radius: 8px;
  185. background: transparent;
  186. color: var(--text-muted);
  187. display: inline-flex;
  188. align-items: center;
  189. justify-content: center;
  190. cursor: pointer;
  191. }
  192. .icon-btn:hover {
  193. color: var(--text);
  194. background: var(--row-alt);
  195. }
  196. .icon-btn svg {
  197. width: 16px;
  198. height: 16px;
  199. display: block;
  200. }
  201. .crumb { font-size: 13px; color: var(--text-muted); }
  202. .crumb b { color: var(--text); font-weight: 600; }
  203. .header-right {
  204. position: relative;
  205. display: flex;
  206. align-items: center;
  207. gap: 10px;
  208. }
  209. .user-trigger {
  210. display: inline-flex;
  211. align-items: center;
  212. gap: 8px;
  213. border: none;
  214. background: transparent;
  215. border-radius: 999px;
  216. padding: 4px 8px 4px 4px;
  217. cursor: pointer;
  218. color: var(--text);
  219. font-size: 13px;
  220. font-weight: 600;
  221. }
  222. .user-trigger:hover {
  223. background: var(--row-alt);
  224. }
  225. .user-avatar {
  226. width: 24px;
  227. height: 24px;
  228. border-radius: 50%;
  229. background: linear-gradient(135deg, #34d399, #10b981);
  230. color: #fff;
  231. display: inline-flex;
  232. align-items: center;
  233. justify-content: center;
  234. font-size: 12px;
  235. font-weight: 700;
  236. }
  237. .user-menu {
  238. position: absolute;
  239. top: calc(100% + 8px);
  240. right: 0;
  241. min-width: 140px;
  242. border: 1px solid var(--border);
  243. border-radius: 10px;
  244. background: var(--surface);
  245. box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  246. padding: 6px;
  247. z-index: 20;
  248. display: none;
  249. }
  250. .user-menu.open {
  251. display: block;
  252. }
  253. .menu-item {
  254. width: 100%;
  255. border: 0;
  256. background: transparent;
  257. text-align: left;
  258. color: var(--text);
  259. padding: 8px 10px;
  260. border-radius: 8px;
  261. font-size: 13px;
  262. cursor: pointer;
  263. }
  264. .menu-item:hover {
  265. background: var(--row-alt);
  266. }
  267. .content {
  268. width: 100%;
  269. max-width: none;
  270. flex: 1;
  271. padding: var(--content-padding);
  272. box-sizing: border-box;
  273. display: flex;
  274. flex-direction: column;
  275. min-height: 0;
  276. background: #ffffff;
  277. }
  278. .top-progress-bar {
  279. position: fixed;
  280. top: 0;
  281. left: 0;
  282. right: 0;
  283. height: 3px;
  284. z-index: 9999;
  285. pointer-events: none;
  286. overflow: hidden;
  287. opacity: 0;
  288. transition: opacity 0.15s ease;
  289. }
  290. .top-progress-bar.is-active {
  291. opacity: 1;
  292. }
  293. .top-progress-bar::after {
  294. content: "";
  295. position: absolute;
  296. top: 0;
  297. left: 0;
  298. height: 100%;
  299. width: 40%;
  300. background: linear-gradient(90deg, var(--primary), #34d399);
  301. animation: top-progress-slide 0.85s ease-in-out infinite;
  302. }
  303. @keyframes top-progress-slide {
  304. 0% { transform: translateX(-100%); }
  305. 100% { transform: translateX(350%); }
  306. }
  307. .tabs-strip {
  308. display: flex;
  309. flex-wrap: wrap;
  310. align-items: flex-end;
  311. gap: 4px;
  312. margin: 0 0 16px;
  313. padding: 0 2px 10px;
  314. border-bottom: 1px solid var(--border);
  315. }
  316. .tab-chip {
  317. appearance: none;
  318. -webkit-appearance: none;
  319. border: 1px solid var(--border);
  320. background: var(--surface);
  321. color: var(--text-muted);
  322. font-size: 13px;
  323. font-weight: 600;
  324. font-family: inherit;
  325. padding: 8px 14px;
  326. border-radius: 8px 8px 0 0;
  327. cursor: pointer;
  328. margin-bottom: -11px;
  329. position: relative;
  330. z-index: 1;
  331. max-width: 220px;
  332. overflow: hidden;
  333. display: inline-flex;
  334. align-items: center;
  335. gap: 6px;
  336. }
  337. .tab-chip-label {
  338. min-width: 0;
  339. overflow: hidden;
  340. text-overflow: ellipsis;
  341. white-space: nowrap;
  342. }
  343. .tab-chip-close {
  344. flex-shrink: 0;
  345. width: 16px;
  346. height: 16px;
  347. border: none;
  348. border-radius: 4px;
  349. background: transparent;
  350. color: inherit;
  351. display: inline-flex;
  352. align-items: center;
  353. justify-content: center;
  354. cursor: pointer;
  355. opacity: 0.7;
  356. font-size: 12px;
  357. line-height: 1;
  358. padding: 0;
  359. }
  360. .tab-chip-close:hover {
  361. opacity: 1;
  362. background: rgba(100, 116, 139, 0.14);
  363. }
  364. .tab-chip:hover {
  365. color: var(--text);
  366. background: var(--row-alt);
  367. }
  368. .tab-chip.is-active {
  369. color: var(--primary-dark);
  370. background: var(--surface);
  371. border-bottom-color: var(--surface);
  372. box-shadow: 0 -2px 0 var(--primary) inset;
  373. z-index: 2;
  374. }
  375. .tab-panel-mount {
  376. flex: 1;
  377. min-height: 0;
  378. position: relative;
  379. }
  380. .tab-empty {
  381. display: none;
  382. border: 1px dashed var(--border);
  383. border-radius: var(--radius);
  384. padding: 24px;
  385. color: var(--text-muted);
  386. background: var(--surface);
  387. }
  388. .tab-empty.is-active {
  389. display: block;
  390. }
  391. .tab-panel {
  392. display: none;
  393. animation: tab-fade-in 0.2s ease;
  394. }
  395. .tab-panel.is-active {
  396. display: block;
  397. }
  398. @keyframes tab-fade-in {
  399. from { opacity: 0.85; }
  400. to { opacity: 1; }
  401. }
  402. .tab-panel.is-refreshing {
  403. position: relative;
  404. pointer-events: none;
  405. min-height: 160px;
  406. }
  407. .tab-panel.is-refreshing::before {
  408. content: "";
  409. position: absolute;
  410. inset: 0;
  411. background: rgba(255, 255, 255, 0.55);
  412. z-index: 20;
  413. border-radius: var(--radius);
  414. }
  415. .tab-panel.is-refreshing::after {
  416. content: "";
  417. position: absolute;
  418. left: 50%;
  419. top: 48px;
  420. width: 28px;
  421. height: 28px;
  422. margin-left: -14px;
  423. border: 3px solid var(--border);
  424. border-top-color: var(--primary);
  425. border-radius: 50%;
  426. animation: tab-spin 0.7s linear infinite;
  427. z-index: 21;
  428. }
  429. @keyframes tab-spin {
  430. to { transform: rotate(360deg); }
  431. }
  432. .btn.is-loading,
  433. .btn-primary.is-loading,
  434. .btn-op.is-loading,
  435. .pager-btn.is-loading,
  436. .btn-icon.is-loading,
  437. .upload-zone-btn.is-loading,
  438. .btn-block.is-loading {
  439. position: relative;
  440. pointer-events: none;
  441. cursor: not-allowed;
  442. color: #94a3b8 !important;
  443. background: #f1f5f9 !important;
  444. border-color: #cbd5e1 !important;
  445. box-shadow: none !important;
  446. opacity: 1;
  447. padding-left: 30px;
  448. }
  449. .btn-op.is-loading {
  450. padding-left: 24px;
  451. }
  452. .btn-icon.is-loading {
  453. padding-left: 22px;
  454. }
  455. /* 加载时把原有左侧图标隐藏,视觉上替换为 loading 图标 */
  456. .is-loading .ic,
  457. .is-loading .ic-sm {
  458. opacity: 0;
  459. }
  460. .btn.is-loading::before,
  461. .btn-primary.is-loading::before,
  462. .btn-op.is-loading::before,
  463. .pager-btn.is-loading::before,
  464. .btn-icon.is-loading::before,
  465. .upload-zone-btn.is-loading::before,
  466. .btn-block.is-loading::before {
  467. content: "";
  468. position: absolute;
  469. left: 10px;
  470. top: 50%;
  471. width: 14px;
  472. height: 14px;
  473. margin-top: -7px;
  474. border: 2px solid #cbd5e1;
  475. border-top-color: #64748b;
  476. border-radius: 50%;
  477. animation: tab-spin 0.65s linear infinite;
  478. }
  479. .btn-op.is-loading::before,
  480. .btn-icon.is-loading::before {
  481. left: 8px;
  482. width: 12px;
  483. height: 12px;
  484. margin-top: -6px;
  485. }
  486. .page-head {
  487. margin-bottom: 16px;
  488. }
  489. .page-head h1 {
  490. margin: 0 0 4px;
  491. font-size: 20px;
  492. font-weight: 700;
  493. letter-spacing: -0.02em;
  494. }
  495. .desc {
  496. margin: 0;
  497. color: var(--text-muted);
  498. font-size: 13px;
  499. line-height: 1.45;
  500. max-width: 560px;
  501. }
  502. .stats {
  503. display: grid;
  504. grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  505. gap: 12px;
  506. margin-bottom: 16px;
  507. }
  508. .tag-palette-demo {
  509. margin: 0 0 12px;
  510. padding: 12px 14px;
  511. border: 1px solid var(--border);
  512. border-radius: var(--radius);
  513. background: var(--surface);
  514. box-shadow: var(--shadow);
  515. }
  516. .tag-palette-demo .demo-title {
  517. margin: 0 0 10px;
  518. font-size: 12px;
  519. color: var(--text-muted);
  520. font-weight: 700;
  521. letter-spacing: 0.04em;
  522. }
  523. .tag-palette-row {
  524. display: flex;
  525. flex-wrap: wrap;
  526. gap: 8px;
  527. margin-bottom: 8px;
  528. }
  529. .tag-palette-row:last-child {
  530. margin-bottom: 0;
  531. }
  532. .tag-demo {
  533. display: inline-flex;
  534. align-items: center;
  535. padding: 3px 10px;
  536. border-radius: 999px;
  537. font-size: 12px;
  538. font-weight: 600;
  539. line-height: 1.3;
  540. border: 1px solid transparent;
  541. white-space: nowrap;
  542. }
  543. .tag-demo.b-base {
  544. background: #fff;
  545. color: #00a874;
  546. border-color: #8de5c6;
  547. }
  548. .tag-demo.b-processing {
  549. background: #fff;
  550. color: #00a874;
  551. border-color: #66d9b3;
  552. }
  553. .tag-demo.b-done {
  554. background: #fff;
  555. color: #0f766e;
  556. border-color: #5eead4;
  557. }
  558. .tag-demo.b-pending {
  559. background: #fff;
  560. color: #475569;
  561. border-color: #cbd5e1;
  562. }
  563. .tag-demo.b-warning {
  564. background: #fff;
  565. color: #d97706;
  566. border-color: #f6c453;
  567. }
  568. .tag-demo.b-error {
  569. background: #fff;
  570. color: #dc2626;
  571. border-color: #fca5a5;
  572. }
  573. .tag-demo.b-info {
  574. background: #fff;
  575. color: #2563eb;
  576. border-color: #93c5fd;
  577. }
  578. .tag-demo.b-disabled {
  579. background: #fff;
  580. color: #94a3b8;
  581. border-color: #e2e8f0;
  582. }
  583. .stat {
  584. background: var(--surface);
  585. border: 1px solid var(--border);
  586. border-radius: var(--radius);
  587. padding: 12px 14px;
  588. box-shadow: var(--shadow);
  589. display: flex;
  590. flex-direction: column;
  591. gap: 8px;
  592. min-height: 112px;
  593. }
  594. .stat-hd {
  595. display: flex;
  596. align-items: center;
  597. justify-content: flex-start;
  598. margin-bottom: 0;
  599. }
  600. .stat-ic {
  601. width: 44px;
  602. height: 44px;
  603. border-radius: 10px;
  604. display: flex;
  605. align-items: center;
  606. justify-content: center;
  607. flex-shrink: 0;
  608. background: var(--primary-bg);
  609. color: var(--primary-dark);
  610. border: 1px solid rgba(16, 185, 129, 0.12);
  611. }
  612. .stat-ic svg {
  613. width: 24px;
  614. height: 24px;
  615. display: block;
  616. }
  617. .stat-main {
  618. display: flex;
  619. align-items: flex-end;
  620. justify-content: space-between;
  621. gap: 10px;
  622. min-width: 0;
  623. flex: 1;
  624. }
  625. .stat .k {
  626. font-size: 14px;
  627. color: var(--text);
  628. margin: 0;
  629. line-height: 1.35;
  630. font-weight: 600;
  631. max-width: 52%;
  632. word-break: break-word;
  633. }
  634. .stat-side {
  635. min-width: 0;
  636. text-align: right;
  637. margin-left: auto;
  638. }
  639. .stat .v {
  640. font-size: 22px;
  641. font-weight: 700;
  642. letter-spacing: -0.02em;
  643. font-variant-numeric: tabular-nums;
  644. line-height: 1.1;
  645. }
  646. .stat .hint {
  647. font-size: 11px;
  648. color: var(--text-muted);
  649. margin-top: 4px;
  650. line-height: 1.3;
  651. white-space: nowrap;
  652. }
  653. .stat.warn .stat-ic {
  654. background: #fffbeb;
  655. border-color: rgba(217, 119, 6, 0.2);
  656. color: #d97706;
  657. }
  658. .stat.warn .v,
  659. .stat.warn .hint {
  660. color: #d97706;
  661. }
  662. /* 通用图标尺寸(按钮内、行内操作等) */
  663. .ic {
  664. width: 16px;
  665. height: 16px;
  666. flex-shrink: 0;
  667. display: block;
  668. }
  669. .ic-sm { width: 14px; height: 14px; }
  670. /* 带清除的输入框 */
  671. .input-clear-wrap {
  672. position: relative;
  673. width: 100%;
  674. display: block;
  675. }
  676. .input-clear-wrap .input {
  677. width: 100%;
  678. min-width: 0;
  679. padding-right: 34px;
  680. }
  681. .input-clear {
  682. position: absolute;
  683. right: 4px;
  684. top: 50%;
  685. transform: translateY(-50%);
  686. width: 28px;
  687. height: 28px;
  688. padding: 0;
  689. margin: 0;
  690. border: none;
  691. border-radius: 6px;
  692. background: transparent;
  693. color: var(--text-muted);
  694. cursor: pointer;
  695. display: flex;
  696. align-items: center;
  697. justify-content: center;
  698. }
  699. .input-clear:hover {
  700. background: var(--row-alt);
  701. color: var(--text);
  702. }
  703. .input-clear:focus-visible {
  704. outline: 2px solid var(--primary);
  705. outline-offset: 1px;
  706. }
  707. .input-clear[hidden] {
  708. display: none !important;
  709. }
  710. .panel {
  711. background: var(--surface);
  712. border: 1px solid var(--border);
  713. border-radius: var(--radius);
  714. box-shadow: var(--shadow);
  715. overflow: hidden;
  716. }
  717. .panel-top {
  718. padding: 10px 16px;
  719. border-bottom: 1px solid var(--border);
  720. background: var(--surface);
  721. display: flex;
  722. flex-wrap: wrap;
  723. align-items: center;
  724. justify-content: space-between;
  725. gap: 8px;
  726. }
  727. .panel-top h2 {
  728. margin: 0;
  729. font-size: 14px;
  730. font-weight: 600;
  731. display: flex;
  732. align-items: center;
  733. gap: 8px;
  734. }
  735. .panel-top h2 .panel-ic {
  736. width: 18px;
  737. height: 18px;
  738. color: var(--primary-dark);
  739. flex-shrink: 0;
  740. }
  741. .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  742. /* 列表上方:多条件检索 */
  743. .filter-block {
  744. padding: 12px 16px 10px;
  745. border-bottom: 1px solid var(--border);
  746. background: var(--surface);
  747. }
  748. .filter-form { margin: 0; }
  749. .filter-grid {
  750. display: grid;
  751. grid-template-columns: repeat(4, 1fr);
  752. gap: 10px 14px;
  753. margin-bottom: 10px;
  754. }
  755. @media (max-width: 1100px) {
  756. .filter-grid { grid-template-columns: repeat(2, 1fr); }
  757. }
  758. @media (max-width: 560px) {
  759. .filter-grid { grid-template-columns: 1fr; }
  760. }
  761. .filter-field label {
  762. display: block;
  763. font-size: 11px;
  764. font-weight: 500;
  765. color: var(--text-muted);
  766. margin-bottom: 4px;
  767. }
  768. .filter-field .input,
  769. .filter-field .select {
  770. width: 100%;
  771. min-width: 0;
  772. }
  773. .select {
  774. height: 36px;
  775. padding: 0 12px;
  776. border: 1px solid var(--border);
  777. border-radius: 8px;
  778. font-size: 14px;
  779. font-family: inherit;
  780. color: var(--text);
  781. background: var(--surface);
  782. cursor: pointer;
  783. appearance: none;
  784. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  785. background-repeat: no-repeat;
  786. background-position: right 12px center;
  787. padding-right: 32px;
  788. }
  789. .select:focus {
  790. outline: none;
  791. border-color: var(--primary);
  792. box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  793. }
  794. .filter-extra {
  795. padding-top: 10px;
  796. margin-top: 2px;
  797. border-top: 1px dashed var(--border);
  798. }
  799. .filter-extra[hidden] {
  800. display: none !important;
  801. }
  802. .filter-hint {
  803. margin: 0 0 8px;
  804. font-size: 11px;
  805. color: var(--text-muted);
  806. }
  807. .filter-actions {
  808. display: flex;
  809. flex-wrap: wrap;
  810. align-items: center;
  811. justify-content: space-between;
  812. gap: 10px;
  813. border-top: 1px dashed var(--border);
  814. padding-top: 10px;
  815. }
  816. .filter-actions-end {
  817. display: flex;
  818. flex-wrap: wrap;
  819. gap: 8px;
  820. align-items: center;
  821. }
  822. .btn-link {
  823. border: none;
  824. background: transparent;
  825. color: var(--primary-dark);
  826. font-weight: 600;
  827. padding: 0 8px;
  828. height: 36px;
  829. }
  830. .btn-link:hover {
  831. background: var(--primary-bg);
  832. border-radius: 8px;
  833. }
  834. .input {
  835. height: 36px;
  836. padding: 0 12px;
  837. border: 1px solid var(--border);
  838. border-radius: 8px;
  839. font-size: 14px;
  840. font-family: inherit;
  841. color: var(--text);
  842. min-width: 200px;
  843. background: var(--surface);
  844. }
  845. .input:focus {
  846. outline: none;
  847. border-color: var(--primary);
  848. background: var(--surface);
  849. box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  850. }
  851. .btn {
  852. height: 36px;
  853. padding: 0 14px;
  854. border-radius: 8px;
  855. font-size: 14px;
  856. font-weight: 600;
  857. font-family: inherit;
  858. cursor: pointer;
  859. border: 1px solid var(--border);
  860. background: var(--surface);
  861. color: var(--text);
  862. display: inline-flex;
  863. align-items: center;
  864. justify-content: center;
  865. gap: 6px;
  866. }
  867. .btn:hover { background: var(--row-alt); }
  868. .btn-primary {
  869. background: var(--primary);
  870. border-color: var(--primary);
  871. color: #fff;
  872. }
  873. .btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
  874. table {
  875. width: 100%;
  876. border-collapse: collapse;
  877. font-size: 14px;
  878. }
  879. th, td { padding: 12px 20px; text-align: left; border-bottom: 1px solid var(--border); }
  880. th {
  881. font-size: 12px;
  882. font-weight: 600;
  883. color: var(--text-muted);
  884. background: var(--table-head);
  885. }
  886. tbody tr:nth-child(even) td { background: var(--row-alt); }
  887. tbody tr:hover td { background: var(--row-hover); }
  888. tbody tr:last-child td { border-bottom: none; }
  889. .data-table tbody tr:last-child td { border-bottom: 1px solid var(--border); }
  890. /* 列表区:上方工具栏(单行)+ 表格(末列操作 sticky固定在右侧) */
  891. .list-body {
  892. border-top: 1px solid var(--border);
  893. }
  894. .list-toolbar {
  895. padding: 0;
  896. background: var(--table-head);
  897. border-bottom: 1px solid var(--border);
  898. }
  899. .list-toolbar-row {
  900. display: flex;
  901. flex-wrap: wrap;
  902. align-items: center;
  903. justify-content: flex-start;
  904. gap: 8px;
  905. padding: 8px 16px;
  906. }
  907. .list-toolbar-selected {
  908. font-size: 12px;
  909. font-weight: 600;
  910. color: var(--text-muted);
  911. white-space: nowrap;
  912. padding: 0 10px 0 0;
  913. margin-right: 4px;
  914. border-right: 1px solid var(--border);
  915. line-height: 36px;
  916. min-height: 36px;
  917. display: inline-flex;
  918. align-items: center;
  919. }
  920. .list-toolbar-selected .sel-num {
  921. color: var(--primary-dark);
  922. font-weight: 700;
  923. margin: 0 2px;
  924. }
  925. .list-pager {
  926. display: flex;
  927. flex-wrap: wrap;
  928. align-items: center;
  929. justify-content: space-between;
  930. gap: 10px 12px;
  931. padding: 8px 16px;
  932. background: var(--surface);
  933. border-top: 1px solid var(--border);
  934. }
  935. .pager-meta {
  936. font-size: 13px;
  937. color: var(--text-muted);
  938. }
  939. .pager-controls {
  940. display: flex;
  941. flex-wrap: wrap;
  942. align-items: center;
  943. gap: 8px;
  944. }
  945. .pager-size-label {
  946. font-size: 13px;
  947. color: var(--text-muted);
  948. margin: 0;
  949. }
  950. .pager-select {
  951. width: auto;
  952. min-width: 72px;
  953. height: 36px;
  954. }
  955. .pager-size-suffix {
  956. font-size: 13px;
  957. color: var(--text-muted);
  958. margin-right: 4px;
  959. }
  960. .pager-btn:disabled {
  961. opacity: 0.45;
  962. cursor: not-allowed;
  963. }
  964. .pager-nums {
  965. display: inline-flex;
  966. flex-wrap: wrap;
  967. align-items: center;
  968. gap: 4px;
  969. }
  970. .pager-num {
  971. min-width: 36px;
  972. padding: 0 10px;
  973. height: 32px;
  974. font-size: 13px;
  975. }
  976. .pager-num.is-current {
  977. background: var(--primary);
  978. border-color: var(--primary);
  979. color: #fff;
  980. cursor: default;
  981. }
  982. .pager-num.is-current:hover {
  983. background: var(--primary-dark);
  984. border-color: var(--primary-dark);
  985. color: #fff;
  986. }
  987. .pager-gap {
  988. padding: 0 4px;
  989. color: var(--text-muted);
  990. font-size: 13px;
  991. user-select: none;
  992. }
  993. .data-table tbody tr.is-hidden {
  994. display: none !important;
  995. }
  996. .btn-block {
  997. width: 100%;
  998. height: auto;
  999. min-height: 34px;
  1000. padding: 8px 8px;
  1001. font-size: 12px;
  1002. line-height: 1.3;
  1003. justify-content: center;
  1004. }
  1005. .table-scroll {
  1006. overflow-x: auto;
  1007. overflow-y: auto;
  1008. max-height: min(520px, calc(100vh - 300px));
  1009. -webkit-overflow-scrolling: touch;
  1010. }
  1011. .data-table { min-width: 1320px; }
  1012. /* 图文列:左对齐,文案单行省略;可叠副标题 */
  1013. .data-table .td-cell-media {
  1014. text-align: left;
  1015. max-width: 240px;
  1016. vertical-align: middle;
  1017. }
  1018. .cell-media {
  1019. display: flex;
  1020. align-items: center;
  1021. gap: 10px;
  1022. min-width: 0;
  1023. }
  1024. .cell-media-img {
  1025. width: 40px;
  1026. height: 40px;
  1027. border-radius: 8px;
  1028. object-fit: cover;
  1029. flex-shrink: 0;
  1030. border: 1px solid var(--border);
  1031. background: var(--row-alt);
  1032. }
  1033. .cell-media-stack {
  1034. min-width: 0;
  1035. flex: 1;
  1036. display: flex;
  1037. flex-direction: column;
  1038. gap: 2px;
  1039. }
  1040. .cell-media-text {
  1041. font-size: 13px;
  1042. font-weight: 500;
  1043. color: var(--text);
  1044. overflow: hidden;
  1045. text-overflow: ellipsis;
  1046. white-space: nowrap;
  1047. }
  1048. .cell-media-sub {
  1049. font-size: 12px;
  1050. color: var(--text-muted);
  1051. overflow: hidden;
  1052. text-overflow: ellipsis;
  1053. white-space: nowrap;
  1054. }
  1055. /* 表头居中;表体默认居中,长文本列用 .td-left */
  1056. .data-table tbody td {
  1057. text-align: center;
  1058. vertical-align: middle;
  1059. }
  1060. .data-table .td-left {
  1061. text-align: left;
  1062. }
  1063. .data-table .col-qty,
  1064. .data-table .col-amt {
  1065. font-variant-numeric: tabular-nums;
  1066. white-space: nowrap;
  1067. }
  1068. /* 列表金额列:统一颜色,便于阅读 */
  1069. .data-table tbody td.col-amt,
  1070. .data-table tfoot .total-row td.col-amt {
  1071. color: var(--primary-dark);
  1072. font-weight: 600;
  1073. }
  1074. .view-subtable td.money-val {
  1075. font-variant-numeric: tabular-nums;
  1076. }
  1077. .data-table tfoot .total-row td {
  1078. text-align: center;
  1079. font-weight: 600;
  1080. color: var(--text);
  1081. background: var(--primary-bg);
  1082. border-top: 2px solid var(--primary);
  1083. border-bottom: none;
  1084. padding-top: 14px;
  1085. padding-bottom: 14px;
  1086. }
  1087. .data-table tfoot .total-row .td-total-label {
  1088. text-align: center;
  1089. letter-spacing: 0.12em;
  1090. }
  1091. .data-table tfoot .total-row .td-check,
  1092. .data-table tfoot .total-row .td-op {
  1093. background: var(--primary-bg);
  1094. }
  1095. /* 表头:居中 + 纵向滚动时吸顶 */
  1096. .data-table thead th {
  1097. text-align: center;
  1098. position: sticky;
  1099. top: 0;
  1100. z-index: 3;
  1101. background: var(--table-head);
  1102. box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  1103. }
  1104. .data-table thead th.th-check {
  1105. z-index: 6;
  1106. box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(0, 0, 0, 0.06);
  1107. }
  1108. .data-table thead th.th-op {
  1109. z-index: 5;
  1110. box-shadow: -6px 0 10px -6px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(0, 0, 0, 0.06);
  1111. }
  1112. /* 首列多选:固定在左侧,横向滚动时仍可选 */
  1113. th.th-check,
  1114. td.td-check {
  1115. position: sticky;
  1116. left: 0;
  1117. z-index: 2;
  1118. width: 52px;
  1119. min-width: 52px;
  1120. max-width: 52px;
  1121. padding: 12px 10px;
  1122. text-align: center;
  1123. vertical-align: middle;
  1124. box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.1);
  1125. background: var(--surface);
  1126. }
  1127. tbody tr:nth-child(even) td.td-check { background: var(--row-alt); }
  1128. tbody tr:hover td.td-check { background: var(--row-hover); }
  1129. .th-check-inner {
  1130. display: flex;
  1131. align-items: center;
  1132. justify-content: center;
  1133. }
  1134. .row-check {
  1135. appearance: none;
  1136. -webkit-appearance: none;
  1137. width: 16px;
  1138. height: 16px;
  1139. margin: 0;
  1140. cursor: pointer;
  1141. flex-shrink: 0;
  1142. border: 1px solid var(--border);
  1143. border-radius: 4px;
  1144. background: var(--surface);
  1145. vertical-align: middle;
  1146. position: relative;
  1147. box-sizing: border-box;
  1148. }
  1149. .row-check:hover {
  1150. border-color: var(--primary);
  1151. }
  1152. .row-check:focus-visible {
  1153. outline: 2px solid var(--primary);
  1154. outline-offset: 2px;
  1155. }
  1156. .row-check:checked {
  1157. background: var(--primary);
  1158. border-color: var(--primary);
  1159. }
  1160. .row-check:checked::after {
  1161. content: "";
  1162. position: absolute;
  1163. left: 5px;
  1164. top: 2px;
  1165. width: 3px;
  1166. height: 6px;
  1167. border: solid #fff;
  1168. border-width: 0 2px 2px 0;
  1169. transform: rotate(45deg);
  1170. box-sizing: border-box;
  1171. }
  1172. .row-check:indeterminate {
  1173. background: var(--primary);
  1174. border-color: var(--primary);
  1175. }
  1176. .row-check:indeterminate::after {
  1177. content: "";
  1178. position: absolute;
  1179. left: 3px;
  1180. top: 6px;
  1181. width: 10px;
  1182. height: 2px;
  1183. background: #fff;
  1184. border-radius: 1px;
  1185. transform: none;
  1186. border: none;
  1187. }
  1188. th.th-op,
  1189. td.td-op {
  1190. position: sticky;
  1191. right: 0;
  1192. left: auto;
  1193. z-index: 2;
  1194. width: auto;
  1195. min-width: 196px;
  1196. max-width: 220px;
  1197. box-shadow: -6px 0 10px -6px rgba(0, 0, 0, 0.1);
  1198. background: var(--surface);
  1199. vertical-align: middle;
  1200. text-align: center;
  1201. }
  1202. tbody tr:nth-child(even) td.td-op { background: var(--row-alt); }
  1203. tbody tr:hover td.td-op { background: var(--row-hover); }
  1204. .cell-ops {
  1205. display: flex;
  1206. flex-direction: row;
  1207. flex-wrap: nowrap;
  1208. align-items: center;
  1209. gap: 6px;
  1210. justify-content: center;
  1211. }
  1212. .btn-op {
  1213. height: 28px;
  1214. padding: 0 8px;
  1215. flex-shrink: 0;
  1216. white-space: nowrap;
  1217. font-size: 12px;
  1218. font-weight: 600;
  1219. border-radius: 6px;
  1220. border: 1px solid var(--border);
  1221. background: var(--surface);
  1222. cursor: pointer;
  1223. font-family: inherit;
  1224. color: var(--text);
  1225. display: inline-flex;
  1226. align-items: center;
  1227. gap: 4px;
  1228. }
  1229. .btn-op:hover { background: var(--primary-bg); border-color: var(--primary); color: var(--primary-dark); }
  1230. .btn-op.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
  1231. .btn-op.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
  1232. /* 方案B:白底描边状态标签体系 */
  1233. .tag {
  1234. display: inline-block;
  1235. padding: 3px 10px;
  1236. border-radius: 999px;
  1237. font-size: 12px;
  1238. font-weight: 600;
  1239. background: #fff;
  1240. border: 1px solid #8de5c6;
  1241. color: #00a874;
  1242. }
  1243. .tag--pending {
  1244. border-color: #cbd5e1;
  1245. color: #475569;
  1246. }
  1247. .tag--processing {
  1248. border-color: #66d9b3;
  1249. color: #00a874;
  1250. }
  1251. .tag--done {
  1252. border-color: #5eead4;
  1253. color: #0f766e;
  1254. }
  1255. .tag--warning {
  1256. border-color: #f6c453;
  1257. color: #d97706;
  1258. }
  1259. .tag--error {
  1260. border-color: #fca5a5;
  1261. color: #dc2626;
  1262. }
  1263. .tag--info {
  1264. border-color: #93c5fd;
  1265. color: #2563eb;
  1266. }
  1267. .tag--disabled {
  1268. border-color: #e2e8f0;
  1269. color: #94a3b8;
  1270. }
  1271. /* 树形列表:父表与子表列定义完全分离,子表为内嵌独立表格 */
  1272. .tree-panel-note {
  1273. margin: 0 0 12px;
  1274. padding: 10px 14px;
  1275. font-size: 13px;
  1276. color: var(--text-muted);
  1277. background: var(--primary-bg);
  1278. border-radius: 8px;
  1279. border: 1px solid rgba(16, 185, 129, 0.2);
  1280. line-height: 1.5;
  1281. }
  1282. .tree-parent-grid {
  1283. min-width: 920px;
  1284. table-layout: fixed;
  1285. }
  1286. table.data-table.tree-parent-grid {
  1287. min-width: 920px;
  1288. }
  1289. .tree-child-table .th-op,
  1290. .tree-child-table td.td-op {
  1291. position: static;
  1292. left: auto;
  1293. right: auto;
  1294. box-shadow: none;
  1295. min-width: 0;
  1296. max-width: none;
  1297. }
  1298. .tree-parent-grid thead th {
  1299. text-align: center;
  1300. font-size: 12px;
  1301. color: var(--text-muted);
  1302. }
  1303. .tree-parent-grid thead th.th-tree-parent-left {
  1304. text-align: left;
  1305. }
  1306. .tree-parent-grid tbody tr.tree-row-parent td {
  1307. vertical-align: middle;
  1308. background: var(--surface);
  1309. font-weight: 500;
  1310. }
  1311. .tree-parent-grid tbody tr.tree-row-parent:hover td {
  1312. background: var(--primary-bg);
  1313. }
  1314. .tree-row-children-wrap td.td-tree-nested {
  1315. padding: 0 !important;
  1316. border-bottom: 1px solid var(--border);
  1317. vertical-align: top;
  1318. background: #f8fafc;
  1319. }
  1320. .tree-nested-inner {
  1321. padding: 12px 12px 14px 16px;
  1322. border-left: 3px solid var(--primary);
  1323. margin: 0;
  1324. }
  1325. .tree-nested-label {
  1326. font-size: 12px;
  1327. font-weight: 700;
  1328. color: var(--text-muted);
  1329. margin: 0 0 8px;
  1330. letter-spacing: 0.02em;
  1331. }
  1332. .tree-child-table {
  1333. width: 100%;
  1334. border-collapse: collapse;
  1335. font-size: 13px;
  1336. background: var(--surface);
  1337. border: 1px solid var(--border);
  1338. border-radius: 8px;
  1339. overflow: hidden;
  1340. }
  1341. .tree-child-table thead th {
  1342. padding: 8px 10px;
  1343. text-align: center;
  1344. font-size: 11px;
  1345. font-weight: 600;
  1346. color: var(--text-muted);
  1347. background: #e2e8f0;
  1348. border-bottom: 1px solid var(--border);
  1349. }
  1350. .tree-child-table thead th.th-child-left {
  1351. text-align: left;
  1352. }
  1353. .tree-child-table tbody td {
  1354. padding: 8px 10px;
  1355. text-align: center;
  1356. border-bottom: 1px solid var(--border);
  1357. vertical-align: middle;
  1358. background: var(--surface);
  1359. }
  1360. .tree-child-table tbody tr:last-child td {
  1361. border-bottom: none;
  1362. }
  1363. .tree-child-table tbody tr:hover td {
  1364. background: #f1f5f9;
  1365. }
  1366. .tree-child-table tbody td.td-child-left {
  1367. text-align: left;
  1368. }
  1369. .tree-child-table .col-amt {
  1370. font-variant-numeric: tabular-nums;
  1371. color: var(--primary-dark);
  1372. font-weight: 600;
  1373. }
  1374. .tree-row-children-wrap.is-hidden {
  1375. display: none !important;
  1376. }
  1377. /* 孙列表:再嵌套一层独立表格,列与父表、子表均不同 */
  1378. .tree-nested-deep {
  1379. margin-top: 4px;
  1380. padding-left: 14px !important;
  1381. border-left: 3px solid #f59e0b;
  1382. background: linear-gradient(90deg, rgba(254, 243, 199, 0.35) 0%, transparent 12px);
  1383. }
  1384. .tree-nested-deep .tree-nested-label {
  1385. color: #b45309;
  1386. }
  1387. .td-tree-nested-l2 {
  1388. padding: 0 !important;
  1389. border-bottom: none !important;
  1390. background: #fffbeb !important;
  1391. vertical-align: top;
  1392. }
  1393. .tree-l2-wrap.is-hidden {
  1394. display: none !important;
  1395. }
  1396. .tree-grandchild-table {
  1397. width: 100%;
  1398. border-collapse: collapse;
  1399. font-size: 12px;
  1400. background: var(--surface);
  1401. border: 1px solid #fcd34d;
  1402. border-radius: 8px;
  1403. overflow: hidden;
  1404. }
  1405. .tree-grandchild-table thead th {
  1406. padding: 6px 8px;
  1407. text-align: center;
  1408. font-size: 10px;
  1409. font-weight: 600;
  1410. color: #92400e;
  1411. background: #fef3c7;
  1412. border-bottom: 1px solid #fcd34d;
  1413. }
  1414. .tree-grandchild-table thead th.th-gc-left {
  1415. text-align: left;
  1416. }
  1417. .tree-grandchild-table tbody td {
  1418. padding: 6px 8px;
  1419. text-align: center;
  1420. border-bottom: 1px solid #fef3c7;
  1421. vertical-align: middle;
  1422. background: #fff;
  1423. }
  1424. .tree-grandchild-table tbody tr:last-child td {
  1425. border-bottom: none;
  1426. }
  1427. .tree-grandchild-table tbody tr:hover td {
  1428. background: #fffbeb;
  1429. }
  1430. .tree-grandchild-table .td-gc-left {
  1431. text-align: left;
  1432. }
  1433. .tree-grandchild-table .col-amt {
  1434. font-variant-numeric: tabular-nums;
  1435. color: #b45309;
  1436. font-weight: 600;
  1437. }
  1438. .tree-grandchild-table .th-op,
  1439. .tree-grandchild-table td.td-op {
  1440. position: static;
  1441. box-shadow: none;
  1442. min-width: 0;
  1443. }
  1444. .tree-grandchild-table .td-tree-lead {
  1445. min-width: 80px;
  1446. width: auto;
  1447. padding: 6px 8px !important;
  1448. text-align: left !important;
  1449. }
  1450. .tree-grandchild-table .td-tree-lead .td-tree-lead-inner {
  1451. justify-content: flex-start;
  1452. }
  1453. .tree-expand-nested {
  1454. width: 24px;
  1455. height: 24px;
  1456. }
  1457. /* 无下级时占位,与展开按钮同宽,保证勾选对齐 */
  1458. .tree-expand-spacer {
  1459. display: inline-block;
  1460. width: 24px;
  1461. height: 24px;
  1462. flex-shrink: 0;
  1463. }
  1464. .tree-child-table .td-tree-lead {
  1465. min-width: 108px;
  1466. width: auto;
  1467. }
  1468. .tree-cb-grandchild {
  1469. appearance: none;
  1470. -webkit-appearance: none;
  1471. width: 14px;
  1472. height: 14px;
  1473. margin: 0;
  1474. cursor: pointer;
  1475. flex-shrink: 0;
  1476. border: 1px dashed #d97706;
  1477. border-radius: 3px;
  1478. background: #fffbeb;
  1479. vertical-align: middle;
  1480. position: relative;
  1481. box-sizing: border-box;
  1482. }
  1483. .tree-cb-grandchild:hover {
  1484. border-style: solid;
  1485. border-color: #f59e0b;
  1486. }
  1487. .tree-cb-grandchild:checked {
  1488. background: #f59e0b;
  1489. border-color: #f59e0b;
  1490. border-style: solid;
  1491. }
  1492. .tree-cb-grandchild:checked::after {
  1493. content: "";
  1494. position: absolute;
  1495. left: 3px;
  1496. top: 0px;
  1497. width: 3px;
  1498. height: 6px;
  1499. border: solid #fff;
  1500. border-width: 0 2px 2px 0;
  1501. transform: rotate(45deg);
  1502. }
  1503. .td-tree-lead {
  1504. width: 120px;
  1505. min-width: 120px;
  1506. padding: 10px 12px !important;
  1507. text-align: left !important;
  1508. }
  1509. .td-tree-lead-inner {
  1510. display: flex;
  1511. align-items: center;
  1512. gap: 8px;
  1513. }
  1514. .tree-expand {
  1515. flex-shrink: 0;
  1516. width: 28px;
  1517. height: 28px;
  1518. padding: 0;
  1519. border: 1px solid var(--border);
  1520. border-radius: 6px;
  1521. background: var(--surface);
  1522. cursor: pointer;
  1523. display: inline-flex;
  1524. align-items: center;
  1525. justify-content: center;
  1526. color: var(--text-muted);
  1527. transition: transform 0.2s ease, background 0.15s;
  1528. }
  1529. .tree-expand:hover {
  1530. border-color: var(--primary);
  1531. color: var(--primary-dark);
  1532. background: var(--primary-bg);
  1533. }
  1534. .tree-expand[aria-expanded="false"] .tree-expand-ic {
  1535. transform: rotate(-90deg);
  1536. }
  1537. .tree-expand-ic {
  1538. display: block;
  1539. transition: transform 0.2s ease;
  1540. }
  1541. /* 父行专用勾选:尺寸与主色描边,与平面列表的 .row-check 区分 */
  1542. .tree-cb-parent {
  1543. appearance: none;
  1544. -webkit-appearance: none;
  1545. width: 18px;
  1546. height: 18px;
  1547. margin: 0;
  1548. cursor: pointer;
  1549. flex-shrink: 0;
  1550. border: 2px solid var(--primary);
  1551. border-radius: 5px;
  1552. background: var(--surface);
  1553. vertical-align: middle;
  1554. position: relative;
  1555. box-sizing: border-box;
  1556. }
  1557. .tree-cb-parent:checked {
  1558. background: var(--primary);
  1559. border-color: var(--primary);
  1560. }
  1561. .tree-cb-parent:checked::after {
  1562. content: "";
  1563. position: absolute;
  1564. left: 5px;
  1565. top: 2px;
  1566. width: 4px;
  1567. height: 8px;
  1568. border: solid #fff;
  1569. border-width: 0 2px 2px 0;
  1570. transform: rotate(45deg);
  1571. }
  1572. .tree-cb-child {
  1573. appearance: none;
  1574. -webkit-appearance: none;
  1575. width: 15px;
  1576. height: 15px;
  1577. margin: 0;
  1578. cursor: pointer;
  1579. flex-shrink: 0;
  1580. border: 1px solid #94a3b8;
  1581. border-radius: 4px;
  1582. background: #fff;
  1583. vertical-align: middle;
  1584. position: relative;
  1585. box-sizing: border-box;
  1586. }
  1587. .tree-cb-child:hover {
  1588. border-color: var(--primary);
  1589. }
  1590. .tree-cb-child:checked {
  1591. background: #64748b;
  1592. border-color: #64748b;
  1593. }
  1594. .tree-cb-child:checked::after {
  1595. content: "";
  1596. position: absolute;
  1597. left: 4px;
  1598. top: 1px;
  1599. width: 3px;
  1600. height: 6px;
  1601. border: solid #fff;
  1602. border-width: 0 2px 2px 0;
  1603. transform: rotate(45deg);
  1604. }
  1605. .tree-badge {
  1606. display: inline-block;
  1607. margin-left: 8px;
  1608. padding: 1px 6px;
  1609. font-size: 11px;
  1610. font-weight: 700;
  1611. border-radius: 4px;
  1612. vertical-align: middle;
  1613. }
  1614. .tree-badge.parent {
  1615. background: var(--primary-bg);
  1616. color: var(--primary-dark);
  1617. }
  1618. .tree-badge.child {
  1619. background: #e2e8f0;
  1620. color: #475569;
  1621. }
  1622. .backdrop {
  1623. position: fixed;
  1624. inset: 0;
  1625. background: rgba(15, 23, 42, 0.35);
  1626. display: none;
  1627. align-items: center;
  1628. justify-content: center;
  1629. z-index: 50;
  1630. padding: 16px;
  1631. }
  1632. .backdrop.open { display: flex; align-items: flex-start; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
  1633. .dialog {
  1634. width: 100%;
  1635. max-width: 400px;
  1636. background: var(--surface);
  1637. border-radius: var(--radius);
  1638. border: 1px solid var(--border);
  1639. box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
  1640. padding: 20px;
  1641. }
  1642. .dialog.dialog-lg {
  1643. max-width: 720px;
  1644. max-height: calc(100vh - 64px);
  1645. overflow: hidden;
  1646. display: flex;
  1647. flex-direction: column;
  1648. padding: 0;
  1649. }
  1650. .dialog.dialog-view-xl {
  1651. max-width: 920px;
  1652. width: 100%;
  1653. max-height: calc(100vh - 48px);
  1654. overflow: hidden;
  1655. display: flex;
  1656. flex-direction: column;
  1657. padding: 0;
  1658. }
  1659. .dialog-view-xl .dialog-scroll {
  1660. overflow-y: auto;
  1661. padding: 0;
  1662. flex: 1;
  1663. }
  1664. .view-hero {
  1665. display: flex;
  1666. flex-wrap: wrap;
  1667. align-items: flex-start;
  1668. gap: 16px;
  1669. padding: 20px 22px;
  1670. background: linear-gradient(135deg, var(--primary-bg) 0%, var(--surface) 55%);
  1671. border-bottom: 1px solid var(--border);
  1672. }
  1673. .view-hero-img {
  1674. width: 72px;
  1675. height: 72px;
  1676. border-radius: 12px;
  1677. object-fit: cover;
  1678. border: 1px solid var(--border);
  1679. flex-shrink: 0;
  1680. }
  1681. .view-hero-main { flex: 1; min-width: 200px; }
  1682. .view-hero-main h2 {
  1683. margin: 0 0 8px;
  1684. font-size: 18px;
  1685. font-weight: 700;
  1686. letter-spacing: -0.02em;
  1687. }
  1688. .view-hero-tags {
  1689. display: flex;
  1690. flex-wrap: wrap;
  1691. gap: 8px;
  1692. align-items: center;
  1693. }
  1694. .view-hero-meta {
  1695. margin: 10px 0 0;
  1696. font-size: 13px;
  1697. color: var(--text-muted);
  1698. line-height: 1.5;
  1699. }
  1700. .view-section {
  1701. padding: 18px 22px;
  1702. border-bottom: 1px solid var(--border);
  1703. }
  1704. .view-section:last-child { border-bottom: none; }
  1705. .view-section h3 {
  1706. margin: 0 0 14px;
  1707. font-size: 13px;
  1708. font-weight: 700;
  1709. color: var(--text-muted);
  1710. letter-spacing: 0.06em;
  1711. }
  1712. .view-kv-grid {
  1713. display: grid;
  1714. grid-template-columns: repeat(2, 1fr);
  1715. gap: 12px 28px;
  1716. }
  1717. @media (max-width: 640px) {
  1718. .view-kv-grid { grid-template-columns: 1fr; }
  1719. }
  1720. .view-kv {
  1721. display: grid;
  1722. grid-template-columns: 96px 1fr;
  1723. gap: 8px 12px;
  1724. font-size: 13px;
  1725. align-items: start;
  1726. }
  1727. .view-kv dt {
  1728. margin: 0;
  1729. color: var(--text-muted);
  1730. font-weight: 500;
  1731. }
  1732. .view-kv dd {
  1733. margin: 0;
  1734. color: var(--text);
  1735. word-break: break-word;
  1736. }
  1737. .view-bento {
  1738. display: grid;
  1739. grid-template-columns: 1fr 1fr;
  1740. gap: 12px;
  1741. }
  1742. @media (max-width: 640px) {
  1743. .view-bento { grid-template-columns: 1fr; }
  1744. }
  1745. .view-card {
  1746. border: 1px solid var(--border);
  1747. border-radius: var(--radius);
  1748. padding: 14px 16px;
  1749. background: var(--surface);
  1750. }
  1751. .view-card h4 {
  1752. margin: 0 0 8px;
  1753. font-size: 12px;
  1754. font-weight: 700;
  1755. color: var(--text-muted);
  1756. }
  1757. .view-card p {
  1758. margin: 0;
  1759. font-size: 13px;
  1760. color: var(--text);
  1761. line-height: 1.55;
  1762. }
  1763. .view-timeline {
  1764. position: relative;
  1765. padding-left: 18px;
  1766. border-left: 2px solid var(--border);
  1767. margin-left: 8px;
  1768. }
  1769. .view-tl-item {
  1770. position: relative;
  1771. padding-bottom: 18px;
  1772. font-size: 13px;
  1773. }
  1774. .view-tl-item:last-child { padding-bottom: 0; }
  1775. .view-tl-item::before {
  1776. content: "";
  1777. position: absolute;
  1778. left: -25px;
  1779. top: 4px;
  1780. width: 10px;
  1781. height: 10px;
  1782. border-radius: 50%;
  1783. background: var(--primary);
  1784. border: 2px solid var(--surface);
  1785. box-shadow: 0 0 0 1px var(--primary);
  1786. }
  1787. .view-tl-item.muted::before {
  1788. background: var(--border);
  1789. box-shadow: none;
  1790. }
  1791. .view-tl-time { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
  1792. .view-tl-title { font-weight: 600; color: var(--text); }
  1793. .view-tl-desc { color: var(--text-muted); margin-top: 4px; line-height: 1.45; }
  1794. .view-gallery {
  1795. display: grid;
  1796. grid-template-columns: repeat(4, 1fr);
  1797. gap: 10px;
  1798. }
  1799. @media (max-width: 640px) {
  1800. .view-gallery { grid-template-columns: repeat(2, 1fr); }
  1801. }
  1802. .view-gallery a {
  1803. display: block;
  1804. border-radius: 8px;
  1805. overflow: hidden;
  1806. border: 1px solid var(--border);
  1807. aspect-ratio: 4/3;
  1808. }
  1809. .view-gallery img {
  1810. width: 100%;
  1811. height: 100%;
  1812. object-fit: cover;
  1813. display: block;
  1814. }
  1815. .view-route-bar {
  1816. height: 120px;
  1817. border-radius: var(--radius);
  1818. background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 40%, #a7f3d0 100%);
  1819. border: 1px solid var(--border);
  1820. position: relative;
  1821. display: flex;
  1822. align-items: center;
  1823. justify-content: space-between;
  1824. padding: 0 24px;
  1825. margin-bottom: 12px;
  1826. }
  1827. .view-route-pin {
  1828. text-align: center;
  1829. font-size: 12px;
  1830. color: var(--text);
  1831. max-width: 120px;
  1832. }
  1833. .view-route-pin strong { display: block; font-size: 13px; margin-bottom: 4px; }
  1834. .view-route-line {
  1835. flex: 1;
  1836. height: 3px;
  1837. background: var(--primary);
  1838. opacity: 0.45;
  1839. margin: 0 12px;
  1840. border-radius: 2px;
  1841. }
  1842. .view-subtable-wrap {
  1843. border: 1px solid var(--border);
  1844. border-radius: 8px;
  1845. overflow: hidden;
  1846. }
  1847. .view-subtable {
  1848. width: 100%;
  1849. border-collapse: collapse;
  1850. font-size: 12px;
  1851. }
  1852. .view-subtable th,
  1853. .view-subtable td {
  1854. padding: 8px 12px;
  1855. text-align: center;
  1856. border-bottom: 1px solid var(--border);
  1857. }
  1858. .view-subtable th {
  1859. background: var(--table-head);
  1860. color: var(--text-muted);
  1861. font-weight: 600;
  1862. }
  1863. .view-subtable tr:last-child td { border-bottom: none; }
  1864. .view-subtable .ta-left { text-align: left; }
  1865. .dialog-lg .dialog-scroll {
  1866. overflow-y: auto;
  1867. padding: 20px 22px;
  1868. flex: 1;
  1869. }
  1870. .dialog-lg .dialog-head {
  1871. padding: 16px 22px;
  1872. border-bottom: 1px solid var(--border);
  1873. flex-shrink: 0;
  1874. }
  1875. .dialog-lg .dialog-foot,
  1876. .dialog-view-xl .dialog-foot {
  1877. padding: 12px 22px;
  1878. border-top: 1px solid var(--border);
  1879. display: flex;
  1880. justify-content: flex-end;
  1881. gap: 8px;
  1882. flex-shrink: 0;
  1883. background: var(--table-head);
  1884. }
  1885. .dialog h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
  1886. .dialog .note { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }
  1887. .field { margin-bottom: 12px; }
  1888. .field label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
  1889. .field .input { width: 100%; min-width: 0; }
  1890. .dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
  1891. .form-section {
  1892. margin-bottom: 20px;
  1893. padding-bottom: 16px;
  1894. border-bottom: 1px dashed var(--border);
  1895. }
  1896. .form-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  1897. .form-section h4 {
  1898. margin: 0 0 12px;
  1899. font-size: 13px;
  1900. font-weight: 700;
  1901. color: var(--text-muted);
  1902. letter-spacing: 0.04em;
  1903. }
  1904. .form-grid-2 {
  1905. display: grid;
  1906. grid-template-columns: 1fr 1fr;
  1907. gap: 12px 16px;
  1908. }
  1909. @media (max-width: 560px) {
  1910. .form-grid-2 { grid-template-columns: 1fr; }
  1911. }
  1912. .textarea {
  1913. width: 100%;
  1914. min-height: 72px;
  1915. padding: 10px 12px;
  1916. border: 1px solid var(--border);
  1917. border-radius: 8px;
  1918. font-size: 14px;
  1919. font-family: inherit;
  1920. resize: vertical;
  1921. }
  1922. .textarea:focus {
  1923. outline: none;
  1924. border-color: var(--primary);
  1925. box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  1926. }
  1927. .upload-zone {
  1928. border: 1px dashed var(--border);
  1929. border-radius: 8px;
  1930. padding: 16px;
  1931. text-align: center;
  1932. background: var(--row-alt);
  1933. cursor: pointer;
  1934. transition: border-color 0.15s, background 0.15s;
  1935. }
  1936. .upload-zone:hover { border-color: var(--primary); background: var(--primary-bg); }
  1937. .upload-zone input[type="file"] { position: absolute; width: 0; height: 0; opacity: 0; pointer-events: none; }
  1938. .upload-zone-text { font-size: 13px; color: var(--text-muted); margin: 0; }
  1939. .upload-zone-btn { margin-top: 8px; }
  1940. .upload-preview {
  1941. display: flex;
  1942. flex-wrap: wrap;
  1943. gap: 10px;
  1944. margin-top: 12px;
  1945. }
  1946. .upload-item {
  1947. position: relative;
  1948. width: 72px;
  1949. height: 72px;
  1950. border-radius: 8px;
  1951. overflow: hidden;
  1952. border: 1px solid var(--border);
  1953. background: var(--surface);
  1954. }
  1955. .upload-item img {
  1956. width: 100%;
  1957. height: 100%;
  1958. object-fit: cover;
  1959. display: block;
  1960. }
  1961. .upload-item .rm {
  1962. position: absolute;
  1963. top: 2px;
  1964. right: 2px;
  1965. width: 20px;
  1966. height: 20px;
  1967. border: none;
  1968. border-radius: 4px;
  1969. background: rgba(0, 0, 0, 0.55);
  1970. color: #fff;
  1971. font-size: 14px;
  1972. line-height: 1;
  1973. cursor: pointer;
  1974. padding: 0;
  1975. }
  1976. .mini-table-wrap {
  1977. border: 1px solid var(--border);
  1978. border-radius: 8px;
  1979. overflow: hidden;
  1980. }
  1981. .mini-table {
  1982. width: 100%;
  1983. border-collapse: collapse;
  1984. font-size: 13px;
  1985. }
  1986. .mini-table th {
  1987. background: var(--table-head);
  1988. padding: 8px 10px;
  1989. text-align: left;
  1990. font-size: 11px;
  1991. font-weight: 600;
  1992. color: var(--text-muted);
  1993. border-bottom: 1px solid var(--border);
  1994. }
  1995. .mini-table td {
  1996. padding: 6px 8px;
  1997. border-bottom: 1px solid var(--border);
  1998. vertical-align: middle;
  1999. }
  2000. .mini-table tr:last-child td { border-bottom: none; }
  2001. .mini-table .input {
  2002. min-width: 0;
  2003. width: 100%;
  2004. height: 32px;
  2005. font-size: 13px;
  2006. }
  2007. .mini-table .input-clear-wrap .input {
  2008. padding-right: 30px;
  2009. height: 32px;
  2010. }
  2011. .mini-table .input-clear {
  2012. right: 2px;
  2013. width: 26px;
  2014. height: 26px;
  2015. }
  2016. .mini-table .btn-icon {
  2017. height: 28px;
  2018. padding: 0 8px;
  2019. font-size: 12px;
  2020. }
  2021. .tab-context-menu {
  2022. position: fixed;
  2023. z-index: 100;
  2024. width: max-content;
  2025. border-radius: 10px;
  2026. border: 1px solid var(--border);
  2027. background: var(--surface);
  2028. box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
  2029. padding: 6px;
  2030. display: none;
  2031. }
  2032. .tab-context-menu.open {
  2033. display: block;
  2034. }
  2035. </style>
  2036. </head>
  2037. <body>
  2038. <div class="top-progress-bar" id="topProgressBar" aria-hidden="true"></div>
  2039. <div class="layout">
  2040. <aside class="sidebar">
  2041. <div class="logo">叁强<span>鲜配</span></div>
  2042. <nav class="nav" aria-label="主导航">
  2043. <details class="nav-details" open>
  2044. <summary class="nav-summary">工作台</summary>
  2045. <div class="nav-sub">
  2046. <a href="#" data-tab-id="overview">运营概览</a>
  2047. </div>
  2048. </details>
  2049. <details class="nav-details" open>
  2050. <summary class="nav-summary">业务管理</summary>
  2051. <div class="nav-sub">
  2052. <details class="nav-details" open>
  2053. <summary>订单中心</summary>
  2054. <div class="nav-sub">
  2055. <a href="#" data-tab-id="order-list">订单管理</a>
  2056. <a href="#" data-tab-id="order-audit">订单审核</a>
  2057. </div>
  2058. </details>
  2059. <details class="nav-details" open>
  2060. <summary>履约管理</summary>
  2061. <div class="nav-sub">
  2062. <a class="active" href="#" data-tab-id="delivery">配送调度</a>
  2063. <a href="#" data-tab-id="delivery-track">轨迹追踪</a>
  2064. </div>
  2065. </details>
  2066. <details class="nav-details" open>
  2067. <summary>商品与库存</summary>
  2068. <div class="nav-sub">
  2069. <a href="#" data-tab-id="product">商品中心</a>
  2070. <a href="#" data-tab-id="warehouse">仓储与库存</a>
  2071. </div>
  2072. </details>
  2073. </div>
  2074. </details>
  2075. <details class="nav-details" open>
  2076. <summary class="nav-summary">数据中心</summary>
  2077. <div class="nav-sub">
  2078. <a href="#" data-tab-id="report">报表中心</a>
  2079. <a href="#" data-tab-id="analysis">经营分析</a>
  2080. </div>
  2081. </details>
  2082. <details class="nav-details" open>
  2083. <summary class="nav-summary">系统设置</summary>
  2084. <div class="nav-sub">
  2085. <a href="#" data-tab-id="user">用户与权限</a>
  2086. <a href="#" data-tab-id="dict">参数与字典</a>
  2087. <a href="#" data-tab-id="log">操作日志</a>
  2088. </div>
  2089. </details>
  2090. </nav>
  2091. <div class="nav-foot"><a href="./index.html">返回配色入口</a></div>
  2092. </aside>
  2093. <div class="main">
  2094. <header class="header">
  2095. <div class="header-left">
  2096. <div class="header-actions">
  2097. <button type="button" class="icon-btn" id="btnToggleSidebar" aria-label="收起左侧菜单">
  2098. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
  2099. <path d="M3 5h18M3 12h18M3 19h18"></path>
  2100. </svg>
  2101. </button>
  2102. <button type="button" class="icon-btn" id="btnRefreshTab" aria-label="刷新当前页签">
  2103. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
  2104. <path d="M21 2v6h-6"></path>
  2105. <path d="M3 12a9 9 0 0115-6l3 2"></path>
  2106. <path d="M3 22v-6h6"></path>
  2107. <path d="M21 12a9 9 0 01-15 6l-3-2"></path>
  2108. </svg>
  2109. </button>
  2110. </div>
  2111. <div class="crumb"><span id="crumbPrefix">业务管理</span> / <b id="crumbCurrent">配送调度</b></div>
  2112. </div>
  2113. <div class="header-right">
  2114. <button type="button" class="user-trigger" id="userMenuTrigger" aria-haspopup="menu" aria-expanded="false">
  2115. <span class="user-avatar" aria-hidden="true">管</span>
  2116. <span>管理员</span>
  2117. </button>
  2118. <div class="user-menu" id="userMenuPanel" role="menu" aria-label="用户菜单">
  2119. <button type="button" class="menu-item" id="btnLogout" role="menuitem">退出登录</button>
  2120. </div>
  2121. </div>
  2122. </header>
  2123. <main class="content">
  2124. <div class="tabs-strip" id="tabsStrip" role="tablist" aria-label="已打开页面"></div>
  2125. <div class="tab-panel-mount" id="tabPanelMount">
  2126. <div class="tab-panel is-active" data-tab-id="delivery" id="tabPanelDelivery">
  2127. <header class="page-head">
  2128. <h1>配送调度</h1>
  2129. <p class="desc">点击左侧菜单会在上方打开对应 Tab,并重新加载该页内容(演示)。按钮操作带有加载动效。</p>
  2130. <p class="page-refresh-meta" style="margin:8px 0 0;font-size:12px;color:var(--text-muted)">
  2131. 最近加载:<time id="deliveryRefreshedAt">—</time>
  2132. </p>
  2133. </header>
  2134. <section class="tag-palette-demo" aria-label="主题标签配色预览">
  2135. <p class="demo-title">Tag 配色方案预览(方案B:白底描边)</p>
  2136. <div class="tag-palette-row">
  2137. <span class="tag-demo b-base">默认状态</span>
  2138. <span class="tag-demo b-processing">进行中</span>
  2139. <span class="tag-demo b-done">已完成</span>
  2140. <span class="tag-demo b-pending">未开始</span>
  2141. </div>
  2142. <div class="tag-palette-row">
  2143. <span class="tag-demo b-warning">预警</span>
  2144. <span class="tag-demo b-error">异常</span>
  2145. <span class="tag-demo b-info">信息提示</span>
  2146. <span class="tag-demo b-disabled">已停用</span>
  2147. </div>
  2148. <div class="tag-palette-row">
  2149. <span class="tag-demo b-base">待确认</span>
  2150. <span class="tag-demo b-processing">调度中</span>
  2151. <span class="tag-demo b-done">已签收</span>
  2152. <span class="tag-demo b-warning">即将超时</span>
  2153. <span class="tag-demo b-error">签收失败</span>
  2154. </div>
  2155. </section>
  2156. <section class="stats" aria-label="概览">
  2157. <div class="stat">
  2158. <div class="stat-hd">
  2159. <span class="stat-ic" aria-hidden="true">
  2160. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 18V6a2 2 0 00-2-2H4a2 2 0 00-2 2v11a1 1 0 001 1h2"/><path d="M15 18h2"/><path d="M19 18h2v-3.34a1 1 0 00-.14-.51l-2.86-4.65a1 1 0 00-.86-.5H14"/><circle cx="7" cy="18" r="2"/><circle cx="17" cy="18" r="2"/></svg>
  2161. </span>
  2162. </div>
  2163. <div class="stat-main">
  2164. <div class="k">在途车辆</div>
  2165. <div class="stat-side">
  2166. <div class="v">42</div>
  2167. <div class="hint">较昨日 +3</div>
  2168. </div>
  2169. </div>
  2170. </div>
  2171. <div class="stat">
  2172. <div class="stat-hd">
  2173. <span class="stat-ic" aria-hidden="true">
  2174. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2"/><rect x="8" y="2" width="8" height="4" rx="1" ry="1"/></svg>
  2175. </span>
  2176. </div>
  2177. <div class="stat-main">
  2178. <div class="k">待分配</div>
  2179. <div class="stat-side">
  2180. <div class="v">18</div>
  2181. <div class="hint">30 分钟内处理</div>
  2182. </div>
  2183. </div>
  2184. </div>
  2185. <div class="stat">
  2186. <div class="stat-hd">
  2187. <span class="stat-ic" aria-hidden="true">
  2188. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 12h-4l-3 9L9 3l-3 9H2"/></svg>
  2189. </span>
  2190. </div>
  2191. <div class="stat-main">
  2192. <div class="k">准时送达</div>
  2193. <div class="stat-side">
  2194. <div class="v">97%</div>
  2195. <div class="hint">目标 ≥ 96%</div>
  2196. </div>
  2197. </div>
  2198. </div>
  2199. <div class="stat warn">
  2200. <div class="stat-hd">
  2201. <span class="stat-ic" aria-hidden="true">
  2202. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>
  2203. </span>
  2204. </div>
  2205. <div class="stat-main">
  2206. <div class="k">异常告警</div>
  2207. <div class="stat-side">
  2208. <div class="v">4</div>
  2209. <div class="hint">待处理</div>
  2210. </div>
  2211. </div>
  2212. </div>
  2213. <div class="stat">
  2214. <div class="stat-hd">
  2215. <span class="stat-ic" aria-hidden="true">
  2216. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 17l6-6 4 4 8-8"/><path d="M21 10V4h-6"/></svg>
  2217. </span>
  2218. </div>
  2219. <div class="stat-main">
  2220. <div class="k">平均履约时长</div>
  2221. <div class="stat-side">
  2222. <div class="v">42m</div>
  2223. <div class="hint">环比 -5.1%</div>
  2224. </div>
  2225. </div>
  2226. </div>
  2227. <div class="stat">
  2228. <div class="stat-hd">
  2229. <span class="stat-ic" aria-hidden="true">
  2230. <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="7" width="18" height="13" rx="2"/><path d="M16 3v4M8 3v4"/><path d="M3 12h18"/></svg>
  2231. </span>
  2232. </div>
  2233. <div class="stat-main">
  2234. <div class="k">今日交易额</div>
  2235. <div class="stat-side">
  2236. <div class="v">¥128k</div>
  2237. <div class="hint">较昨日 +6.2%</div>
  2238. </div>
  2239. </div>
  2240. </div>
  2241. </section>
  2242. <section class="panel">
  2243. <div class="panel-top">
  2244. <h2 style="margin:0">
  2245. <svg class="panel-ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 6h13"/><path d="M8 12h13"/><path d="M8 18h13"/><path d="M3 6h.01"/><path d="M3 12h.01"/><path d="M3 18h.01"/></svg>
  2246. 任务列表
  2247. </h2>
  2248. </div>
  2249. <div class="filter-block">
  2250. <form class="filter-form" action="#" method="get" onsubmit="return false;">
  2251. <p class="filter-hint">默认展示常用条件;特殊场景可展开全部。</p>
  2252. <div class="filter-grid">
  2253. <div class="filter-field">
  2254. <label for="f-no">任务号</label>
  2255. <div class="input-clear-wrap">
  2256. <input id="f-no" type="text" class="input" placeholder="精确或模糊" autocomplete="off" />
  2257. <button type="button" class="input-clear" aria-label="清除任务号" title="清除">
  2258. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2259. </button>
  2260. </div>
  2261. </div>
  2262. <div class="filter-field">
  2263. <label for="f-route">线路 / 站点</label>
  2264. <div class="input-clear-wrap">
  2265. <input id="f-route" type="text" class="input" placeholder="关键词" autocomplete="off" />
  2266. <button type="button" class="input-clear" aria-label="清除线路关键词" title="清除">
  2267. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2268. </button>
  2269. </div>
  2270. </div>
  2271. <div class="filter-field">
  2272. <label for="f-status">任务状态</label>
  2273. <select id="f-status" class="select" aria-label="任务状态">
  2274. <option value="">全部</option>
  2275. <option value="1">待分配</option>
  2276. <option value="2">执行中</option>
  2277. <option value="3">待装车</option>
  2278. <option value="4">已完成</option>
  2279. <option value="5">已取消</option>
  2280. </select>
  2281. </div>
  2282. <div class="filter-field">
  2283. <label for="f-driver">司机</label>
  2284. <select id="f-driver" class="select" aria-label="司机">
  2285. <option value="">全部</option>
  2286. <option value="wq">王强</option>
  2287. <option value="lm">李敏</option>
  2288. <option value="zs">张三</option>
  2289. </select>
  2290. </div>
  2291. </div>
  2292. <div id="filter-extra" class="filter-extra" hidden>
  2293. <div class="filter-grid">
  2294. <div class="filter-field">
  2295. <label for="f-region">所属区域</label>
  2296. <select id="f-region" class="select" aria-label="所属区域">
  2297. <option value="">全部</option>
  2298. <option value="hd">华东</option>
  2299. <option value="hn">华南</option>
  2300. <option value="hb">华北</option>
  2301. </select>
  2302. </div>
  2303. <div class="filter-field">
  2304. <label for="f-priority">优先级</label>
  2305. <select id="f-priority" class="select" aria-label="优先级">
  2306. <option value="">全部</option>
  2307. <option value="high">高</option>
  2308. <option value="mid">中</option>
  2309. <option value="low">低</option>
  2310. </select>
  2311. </div>
  2312. <div class="filter-field">
  2313. <label for="f-date-from">计划日期从</label>
  2314. <input id="f-date-from" type="date" class="input" />
  2315. </div>
  2316. <div class="filter-field">
  2317. <label for="f-date-to">计划日期至</label>
  2318. <input id="f-date-to" type="date" class="input" />
  2319. </div>
  2320. </div>
  2321. </div>
  2322. <div class="filter-actions">
  2323. <button
  2324. type="button"
  2325. class="btn btn-link"
  2326. id="toggleFilter"
  2327. aria-expanded="false"
  2328. aria-controls="filter-extra"
  2329. >
  2330. 展开更多条件
  2331. </button>
  2332. <div class="filter-actions-end">
  2333. <button type="reset" class="btn">
  2334. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 109-9 9.75 9.75 0 00-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
  2335. 重置条件
  2336. </button>
  2337. <button type="submit" class="btn btn-primary">
  2338. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="M21 21l-4.35-4.35"/></svg>
  2339. 查询
  2340. </button>
  2341. </div>
  2342. </div>
  2343. </form>
  2344. </div>
  2345. <div class="list-body">
  2346. <div class="list-toolbar">
  2347. <div class="list-toolbar-row" role="toolbar" aria-label="列表操作">
  2348. <span class="list-toolbar-selected" id="selectedCountBadge" aria-live="polite">已选<span class="sel-num" id="selectedCountNum">0</span>条</span>
  2349. <button type="button" class="btn btn-primary" id="btnNew">
  2350. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
  2351. 新增任务
  2352. </button>
  2353. <button type="button" class="btn" id="btnBatchDelete">
  2354. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
  2355. 批量删除
  2356. </button>
  2357. <button type="button" class="btn" id="btnImport">
  2358. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
  2359. 导入
  2360. </button>
  2361. <input type="file" id="importFileInput" accept=".xlsx,.xls,.csv" style="display:none" aria-hidden="true" />
  2362. <button type="button" class="btn" id="btnExportList">
  2363. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
  2364. 导出
  2365. </button>
  2366. <button type="button" class="btn">
  2367. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/><circle cx="8.5" cy="7" r="4"/><line x1="20" y1="8" x2="20" y2="14"/><line x1="23" y1="11" x2="17" y2="11"/></svg>
  2368. 分配司机
  2369. </button>
  2370. <button type="button" class="btn">
  2371. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
  2372. 标记完成
  2373. </button>
  2374. <button type="button" class="btn">
  2375. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
  2376. 导出所选
  2377. </button>
  2378. </div>
  2379. </div>
  2380. <div class="table-scroll">
  2381. <table class="data-table">
  2382. <thead>
  2383. <tr>
  2384. <th class="th-check" scope="col">
  2385. <div class="th-check-inner">
  2386. <input type="checkbox" class="row-check" id="tableCheckAll" aria-label="全选当前页" title="全选" />
  2387. </div>
  2388. </th>
  2389. <th>任务号</th>
  2390. <th>线路</th>
  2391. <th>站点 / 货品</th>
  2392. <th>状态</th>
  2393. <th>司机</th>
  2394. <th>计划时间</th>
  2395. <th>备注</th>
  2396. <th>创建时间</th>
  2397. <th>数量</th>
  2398. <th>金额(元)</th>
  2399. <th class="th-op">操作</th>
  2400. </tr>
  2401. </thead>
  2402. <tbody>
  2403. <tr>
  2404. <td class="td-check">
  2405. <div class="th-check-inner">
  2406. <input type="checkbox" class="row-check" name="taskRow" value="TK2026041501" aria-label="选择 TK2026041501" />
  2407. </div>
  2408. </td>
  2409. <td>TK2026041501</td>
  2410. <td class="td-left">华东仓 → 城配点 A</td>
  2411. <td class="td-cell-media td-left">
  2412. <div class="cell-media">
  2413. <img class="cell-media-img" src="https://picsum.photos/seed/sqxp-a/80/80" width="40" height="40" alt="" />
  2414. <div class="cell-media-stack">
  2415. <div class="cell-media-text">虹桥集散 · 厢式 3 号</div>
  2416. <div class="cell-media-sub">精品蔬菜箱 · 温控启用 · 需轻放易损品超长说明用于列表省略号演示……</div>
  2417. </div>
  2418. </div>
  2419. </td>
  2420. <td><span class="tag tag--processing">执行中</span></td>
  2421. <td>王强</td>
  2422. <td style="color:var(--text-muted)">14:00 – 16:00</td>
  2423. <td class="td-left" style="color:var(--text-muted)">—</td>
  2424. <td style="color:var(--text-muted)">2026-04-15 09:12</td>
  2425. <td class="col-qty" data-qty="128">128</td>
  2426. <td class="col-amt" data-amt="15880">¥15,880.00</td>
  2427. <td class="td-op">
  2428. <div class="cell-ops">
  2429. <button type="button" class="btn-op primary js-btn-view">
  2430. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
  2431. 查看
  2432. </button>
  2433. <button type="button" class="btn-op">
  2434. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
  2435. 编辑
  2436. </button>
  2437. </div>
  2438. </td>
  2439. </tr>
  2440. <tr>
  2441. <td class="td-check">
  2442. <div class="th-check-inner">
  2443. <input type="checkbox" class="row-check" name="taskRow" value="TK2026041502" aria-label="选择 TK2026041502" />
  2444. </div>
  2445. </td>
  2446. <td>TK2026041502</td>
  2447. <td class="td-left">冷链 → 门店 B</td>
  2448. <td class="td-cell-media td-left">
  2449. <div class="cell-media">
  2450. <img class="cell-media-img" src="https://picsum.photos/seed/sqxp-b/80/80" width="40" height="40" alt="" />
  2451. <div class="cell-media-stack">
  2452. <div class="cell-media-text">浦东冷库 · 冷藏车 2 号</div>
  2453. <div class="cell-media-sub">冷冻水产 · 温控 -18℃ · 到点需扫码交接超长字段演示……</div>
  2454. </div>
  2455. </div>
  2456. </td>
  2457. <td><span class="tag tag--pending">待装车</span></td>
  2458. <td>李敏</td>
  2459. <td style="color:var(--text-muted)">16:30 前</td>
  2460. <td class="td-left" style="color:var(--text-muted)">需保温</td>
  2461. <td style="color:var(--text-muted)">2026-04-15 08:40</td>
  2462. <td class="col-qty" data-qty="86">86</td>
  2463. <td class="col-amt" data-amt="9320.5">¥9,320.50</td>
  2464. <td class="td-op">
  2465. <div class="cell-ops">
  2466. <button type="button" class="btn-op primary js-btn-view">
  2467. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
  2468. 查看
  2469. </button>
  2470. <button type="button" class="btn-op">
  2471. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg>
  2472. 编辑
  2473. </button>
  2474. </div>
  2475. </td>
  2476. </tr>
  2477. </tbody>
  2478. <tfoot>
  2479. <tr class="total-row">
  2480. <td class="td-check" aria-hidden="true"></td>
  2481. <td class="td-total-label" colspan="8">本页合计</td>
  2482. <td class="col-qty" id="totalQty">0</td>
  2483. <td class="col-amt" id="totalAmt">¥0.00</td>
  2484. <td class="td-op" aria-hidden="true"></td>
  2485. </tr>
  2486. </tfoot>
  2487. </table>
  2488. </div>
  2489. <nav class="list-pager" aria-label="列表分页">
  2490. <div class="pager-meta">
  2491. <span id="pagerRange">第 0–0 条,共 0 条</span>
  2492. </div>
  2493. <div class="pager-controls">
  2494. <label class="pager-size-label" for="pageSizeSel">每页</label>
  2495. <select id="pageSizeSel" class="select pager-select" aria-label="每页条数">
  2496. <option value="10" selected>10</option>
  2497. <option value="20">20</option>
  2498. <option value="50">50</option>
  2499. </select>
  2500. <span class="pager-size-suffix">条</span>
  2501. <button type="button" class="btn pager-btn" id="pagerPrev">上一页</button>
  2502. <div class="pager-nums" id="pagerNums" aria-label="页码"></div>
  2503. <button type="button" class="btn pager-btn" id="pagerNext">下一页</button>
  2504. </div>
  2505. </nav>
  2506. </div>
  2507. </section>
  2508. <section class="panel" aria-labelledby="tree-panel-title">
  2509. <div class="panel-top">
  2510. <h2 id="tree-panel-title" style="margin:0">
  2511. <svg class="panel-ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3v18"/><path d="M3 12h18"/><path d="M7 7h.01"/><path d="M17 7h.01"/><path d="M7 17h.01"/><path d="M17 17h.01"/></svg>
  2512. 树形列表示例
  2513. </h2>
  2514. </div>
  2515. <p class="tree-panel-note">
  2516. 共三层:<strong>父列表</strong>(汇总单维度)→ <strong>子列表</strong>(配送任务维度)→ <strong>孙列表</strong>(拣货批次维度,可选展开)。<strong>每一层都是独立表格、列字段互不共用</strong>;<strong>各级展开/收起均在首列</strong>(与勾选同一列,无下级列)。勾选分别为 <code>tree-cb-parent</code> / <code>tree-cb-child</code> / <code>tree-cb-grandchild</code>。
  2517. </p>
  2518. <div class="table-scroll">
  2519. <table class="data-table tree-parent-grid">
  2520. <thead>
  2521. <tr>
  2522. <th class="td-tree-lead" scope="col">展开 / 选择</th>
  2523. <th class="th-tree-parent-left" scope="col" style="min-width:160px">汇总单号</th>
  2524. <th class="th-tree-parent-left" scope="col" style="min-width:200px">计划线路 / 区域</th>
  2525. <th scope="col" style="width:88px">含子单数</th>
  2526. <th scope="col" style="min-width:120px">汇总金额</th>
  2527. <th scope="col" style="min-width:100px">对账状态</th>
  2528. <th class="th-op" scope="col" style="min-width:120px">父级操作</th>
  2529. </tr>
  2530. </thead>
  2531. <tbody>
  2532. <tr class="tree-row-parent" data-tree-id="g1">
  2533. <td class="td-tree-lead">
  2534. <div class="td-tree-lead-inner">
  2535. <button type="button" class="tree-expand tree-expand-root" aria-expanded="true" title="展开或收起子列表">
  2536. <svg class="tree-expand-ic" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
  2537. </button>
  2538. <input type="checkbox" class="tree-cb-parent" name="treeParent" value="g1" aria-label="选择汇总单 H2026041501" />
  2539. </div>
  2540. </td>
  2541. <td class="td-left">H2026041501 <span class="tree-badge parent">父</span></td>
  2542. <td class="td-left">华东仓 → 城配早班(多站)</td>
  2543. <td>3</td>
  2544. <td class="col-amt">¥42,360.00</td>
  2545. <td><span class="tag tag--pending">待对账</span></td>
  2546. <td class="td-op">
  2547. <button type="button" class="btn-op primary">拆单复核</button>
  2548. </td>
  2549. </tr>
  2550. <tr class="tree-row-children-wrap" data-tree-parent="g1">
  2551. <td class="td-tree-nested" colspan="7">
  2552. <div class="tree-nested-inner">
  2553. <div class="tree-nested-label">子列表 · 配送任务(列与父表独立;可再展开孙)</div>
  2554. <table class="tree-child-table">
  2555. <thead>
  2556. <tr>
  2557. <th class="td-tree-lead" scope="col">展开 / 选择</th>
  2558. <th class="th-child-left" scope="col" style="min-width:128px">配送任务号</th>
  2559. <th class="th-child-left" scope="col" style="min-width:120px">目的站点</th>
  2560. <th scope="col" style="width:64px">温区</th>
  2561. <th scope="col" style="width:56px">件数</th>
  2562. <th scope="col" style="min-width:92px">任务金额</th>
  2563. <th class="th-child-left" scope="col" style="min-width:64px">司机</th>
  2564. <th class="th-op" scope="col" style="min-width:88px">任务操作</th>
  2565. </tr>
  2566. </thead>
  2567. <tbody>
  2568. <tr class="tree-l1-row">
  2569. <td class="td-tree-lead">
  2570. <div class="td-tree-lead-inner">
  2571. <button type="button" class="tree-expand tree-expand-nested" aria-expanded="false" data-expand-target="g1-l2-t1" title="展开或收起孙列表(拣货批次)">
  2572. <svg class="tree-expand-ic" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
  2573. </button>
  2574. <input type="checkbox" class="tree-cb-child" name="treeChild" value="g1-c1" aria-label="选择任务 TK2026041501" />
  2575. </div>
  2576. </td>
  2577. <td class="td-child-left">TK2026041501</td>
  2578. <td class="td-child-left">虹桥门店</td>
  2579. <td>冷藏</td>
  2580. <td>62</td>
  2581. <td class="col-amt">¥14,200.00</td>
  2582. <td class="td-child-left">王强</td>
  2583. <td class="td-op">
  2584. <button type="button" class="btn-op">改派</button>
  2585. </td>
  2586. </tr>
  2587. <tr class="tree-l2-wrap is-hidden" data-expand-for="g1-l2-t1">
  2588. <td class="td-tree-nested-l2" colspan="8">
  2589. <div class="tree-nested-inner tree-nested-deep">
  2590. <div class="tree-nested-label">孙列表 · 拣货批次明细(列与父表、子表均不同)</div>
  2591. <table class="tree-grandchild-table">
  2592. <thead>
  2593. <tr>
  2594. <th class="td-tree-lead" scope="col" style="width:56px">展开 / 选择</th>
  2595. <th class="th-gc-left" scope="col" style="min-width:120px">拣货批次号</th>
  2596. <th class="th-gc-left" scope="col" style="min-width:100px">SKU</th>
  2597. <th class="th-gc-left" scope="col" style="min-width:120px">品名</th>
  2598. <th scope="col" style="width:72px">规格</th>
  2599. <th scope="col" style="width:52px">件数</th>
  2600. <th scope="col" style="width:52px">重量(kg)</th>
  2601. <th scope="col" style="min-width:88px">批次小计</th>
  2602. <th class="th-op" scope="col" style="min-width:80px">批次操作</th>
  2603. </tr>
  2604. </thead>
  2605. <tbody>
  2606. <tr>
  2607. <td class="td-tree-lead">
  2608. <div class="td-tree-lead-inner">
  2609. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2610. <input type="checkbox" class="tree-cb-grandchild" name="treeGc" value="g1-gc1" aria-label="选择批次 B2026041501" />
  2611. </div>
  2612. </td>
  2613. <td class="td-gc-left">B2026041501-A</td>
  2614. <td class="td-gc-left">VG-10086</td>
  2615. <td class="td-gc-left">精品黄瓜</td>
  2616. <td>5kg/箱</td>
  2617. <td>20</td>
  2618. <td>100</td>
  2619. <td class="col-amt">¥360.00</td>
  2620. <td class="td-op">
  2621. <button type="button" class="btn-op">复核</button>
  2622. </td>
  2623. </tr>
  2624. <tr>
  2625. <td class="td-tree-lead">
  2626. <div class="td-tree-lead-inner">
  2627. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2628. <input type="checkbox" class="tree-cb-grandchild" name="treeGc" value="g1-gc2" aria-label="选择批次 B2026041501" />
  2629. </div>
  2630. </td>
  2631. <td class="td-gc-left">B2026041501-B</td>
  2632. <td class="td-gc-left">TM-22031</td>
  2633. <td class="td-gc-left">番茄礼盒</td>
  2634. <td>3kg/箱</td>
  2635. <td>12</td>
  2636. <td>36</td>
  2637. <td class="col-amt">¥390.00</td>
  2638. <td class="td-op">
  2639. <button type="button" class="btn-op">复核</button>
  2640. </td>
  2641. </tr>
  2642. </tbody>
  2643. </table>
  2644. </div>
  2645. </td>
  2646. </tr>
  2647. <tr class="tree-l1-row">
  2648. <td class="td-tree-lead">
  2649. <div class="td-tree-lead-inner">
  2650. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2651. <input type="checkbox" class="tree-cb-child" name="treeChild" value="g1-c2" aria-label="选择任务 TK2026041502" />
  2652. </div>
  2653. </td>
  2654. <td class="td-child-left">TK2026041502</td>
  2655. <td class="td-child-left">浦东门店</td>
  2656. <td>冷冻</td>
  2657. <td>78</td>
  2658. <td class="col-amt">¥18,960.00</td>
  2659. <td class="td-child-left">李敏</td>
  2660. <td class="td-op">
  2661. <button type="button" class="btn-op">改派</button>
  2662. </td>
  2663. </tr>
  2664. <tr class="tree-l1-row">
  2665. <td class="td-tree-lead">
  2666. <div class="td-tree-lead-inner">
  2667. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2668. <input type="checkbox" class="tree-cb-child" name="treeChild" value="g1-c3" aria-label="选择任务 TK2026041503" />
  2669. </div>
  2670. </td>
  2671. <td class="td-child-left">TK2026041503</td>
  2672. <td class="td-child-left">嘉定门店</td>
  2673. <td>常温</td>
  2674. <td>46</td>
  2675. <td class="col-amt">¥9,200.00</td>
  2676. <td class="td-child-left">张三</td>
  2677. <td class="td-op">
  2678. <button type="button" class="btn-op">改派</button>
  2679. </td>
  2680. </tr>
  2681. </tbody>
  2682. </table>
  2683. </div>
  2684. </td>
  2685. </tr>
  2686. <tr class="tree-row-parent" data-tree-id="g2">
  2687. <td class="td-tree-lead">
  2688. <div class="td-tree-lead-inner">
  2689. <button type="button" class="tree-expand tree-expand-root" aria-expanded="false" title="展开或收起子列表">
  2690. <svg class="tree-expand-ic" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
  2691. </button>
  2692. <input type="checkbox" class="tree-cb-parent" name="treeParent" value="g2" aria-label="选择汇总单 H2026041502" />
  2693. </div>
  2694. </td>
  2695. <td class="td-left">H2026041502 <span class="tree-badge parent">父</span></td>
  2696. <td class="td-left">冷链仓 → 午后波次</td>
  2697. <td>2</td>
  2698. <td class="col-amt">¥28,100.00</td>
  2699. <td><span class="tag tag--processing">对账中</span></td>
  2700. <td class="td-op">
  2701. <button type="button" class="btn-op primary">拆单复核</button>
  2702. </td>
  2703. </tr>
  2704. <tr class="tree-row-children-wrap is-hidden" data-tree-parent="g2">
  2705. <td class="td-tree-nested" colspan="7">
  2706. <div class="tree-nested-inner">
  2707. <div class="tree-nested-label">子列表 · 配送任务(列与父表独立;可再展开孙)</div>
  2708. <table class="tree-child-table">
  2709. <thead>
  2710. <tr>
  2711. <th class="td-tree-lead" scope="col">展开 / 选择</th>
  2712. <th class="th-child-left" scope="col" style="min-width:128px">配送任务号</th>
  2713. <th class="th-child-left" scope="col" style="min-width:120px">目的站点</th>
  2714. <th scope="col" style="width:64px">温区</th>
  2715. <th scope="col" style="width:56px">件数</th>
  2716. <th scope="col" style="min-width:92px">任务金额</th>
  2717. <th class="th-child-left" scope="col" style="min-width:64px">司机</th>
  2718. <th class="th-op" scope="col" style="min-width:88px">任务操作</th>
  2719. </tr>
  2720. </thead>
  2721. <tbody>
  2722. <tr class="tree-l1-row">
  2723. <td class="td-tree-lead">
  2724. <div class="td-tree-lead-inner">
  2725. <button type="button" class="tree-expand tree-expand-nested" aria-expanded="false" data-expand-target="g2-l2-t1" title="展开或收起孙列表(拣货批次)">
  2726. <svg class="tree-expand-ic" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>
  2727. </button>
  2728. <input type="checkbox" class="tree-cb-child" name="treeChild" value="g2-c1" aria-label="选择任务 TK2026041504" />
  2729. </div>
  2730. </td>
  2731. <td class="td-child-left">TK2026041504</td>
  2732. <td class="td-child-left">宝山前置仓</td>
  2733. <td>冷冻</td>
  2734. <td>40</td>
  2735. <td class="col-amt">¥11,200.00</td>
  2736. <td class="td-child-left">赵磊</td>
  2737. <td class="td-op">
  2738. <button type="button" class="btn-op">改派</button>
  2739. </td>
  2740. </tr>
  2741. <tr class="tree-l2-wrap is-hidden" data-expand-for="g2-l2-t1">
  2742. <td class="td-tree-nested-l2" colspan="8">
  2743. <div class="tree-nested-inner tree-nested-deep">
  2744. <div class="tree-nested-label">孙列表 · 拣货批次明细(列与父表、子表均不同)</div>
  2745. <table class="tree-grandchild-table">
  2746. <thead>
  2747. <tr>
  2748. <th class="td-tree-lead" scope="col" style="width:56px">展开 / 选择</th>
  2749. <th class="th-gc-left" scope="col" style="min-width:120px">拣货批次号</th>
  2750. <th class="th-gc-left" scope="col" style="min-width:100px">SKU</th>
  2751. <th class="th-gc-left" scope="col" style="min-width:120px">品名</th>
  2752. <th scope="col" style="width:72px">规格</th>
  2753. <th scope="col" style="width:52px">件数</th>
  2754. <th scope="col" style="width:52px">重量(kg)</th>
  2755. <th scope="col" style="min-width:88px">批次小计</th>
  2756. <th class="th-op" scope="col" style="min-width:80px">批次操作</th>
  2757. </tr>
  2758. </thead>
  2759. <tbody>
  2760. <tr>
  2761. <td class="td-tree-lead">
  2762. <div class="td-tree-lead-inner">
  2763. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2764. <input type="checkbox" class="tree-cb-grandchild" name="treeGc" value="g2-gc1" aria-label="选择批次 B2026041504" />
  2765. </div>
  2766. </td>
  2767. <td class="td-gc-left">B2026041504-X</td>
  2768. <td class="td-gc-left">FS-88302</td>
  2769. <td class="td-gc-left">冷冻水产拼箱</td>
  2770. <td>混箱</td>
  2771. <td>18</td>
  2772. <td>42</td>
  2773. <td class="col-amt">¥5,600.00</td>
  2774. <td class="td-op">
  2775. <button type="button" class="btn-op">复核</button>
  2776. </td>
  2777. </tr>
  2778. </tbody>
  2779. </table>
  2780. </div>
  2781. </td>
  2782. </tr>
  2783. <tr class="tree-l1-row">
  2784. <td class="td-tree-lead">
  2785. <div class="td-tree-lead-inner">
  2786. <span class="tree-expand-spacer" aria-hidden="true"></span>
  2787. <input type="checkbox" class="tree-cb-child" name="treeChild" value="g2-c2" aria-label="选择任务 TK2026041505" />
  2788. </div>
  2789. </td>
  2790. <td class="td-child-left">TK2026041505</td>
  2791. <td class="td-child-left">闵行门店</td>
  2792. <td>冷藏</td>
  2793. <td>54</td>
  2794. <td class="col-amt">¥16,900.00</td>
  2795. <td class="td-child-left">孙洁</td>
  2796. <td class="td-op">
  2797. <button type="button" class="btn-op">改派</button>
  2798. </td>
  2799. </tr>
  2800. </tbody>
  2801. </table>
  2802. </div>
  2803. </td>
  2804. </tr>
  2805. </tbody>
  2806. </table>
  2807. </div>
  2808. </section>
  2809. </div>
  2810. <section class="tab-empty" id="tabEmptyState">暂无打开页面,请从左侧菜单选择一个功能。</section>
  2811. </div>
  2812. </main>
  2813. </div>
  2814. </div>
  2815. <div class="tab-context-menu" id="tabContextMenu" role="menu" aria-label="页签右键菜单">
  2816. <button type="button" class="menu-item" data-tab-action="close-left" role="menuitem">关闭左侧页签</button>
  2817. <button type="button" class="menu-item" data-tab-action="close-right" role="menuitem">关闭右侧页签</button>
  2818. <button type="button" class="menu-item" data-tab-action="close-all" role="menuitem">关闭全部页签</button>
  2819. </div>
  2820. <div class="backdrop" id="backdrop" role="dialog" aria-modal="true" aria-labelledby="dlgTitle">
  2821. <div class="dialog dialog-lg" id="dlgNewTask">
  2822. <div class="dialog-head">
  2823. <h3 id="dlgTitle" style="margin:0">新建配送任务</h3>
  2824. <p class="note" style="margin:6px 0 0">复杂表单示意:基础信息、图片凭证、装车明细与备注。</p>
  2825. </div>
  2826. <div class="dialog-scroll">
  2827. <div class="form-section">
  2828. <h4>基础信息</h4>
  2829. <div class="form-grid-2">
  2830. <div class="field" style="margin:0">
  2831. <label for="dlgTaskName">任务名称</label>
  2832. <div class="input-clear-wrap">
  2833. <input id="dlgTaskName" type="text" class="input" placeholder="如:城配 A 线早班" autocomplete="off" />
  2834. <button type="button" class="input-clear" aria-label="清除任务名称" title="清除">
  2835. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2836. </button>
  2837. </div>
  2838. </div>
  2839. <div class="field" style="margin:0">
  2840. <label for="dlgCarrier">承运商</label>
  2841. <select id="dlgCarrier" class="select" style="width:100%;min-width:0">
  2842. <option value="">请选择</option>
  2843. <option value="1">叁强物流</option>
  2844. <option value="2">合作车队 A</option>
  2845. </select>
  2846. </div>
  2847. <div class="field" style="margin:0">
  2848. <label for="dlgPhone">调度电话</label>
  2849. <div class="input-clear-wrap">
  2850. <input id="dlgPhone" type="tel" class="input" placeholder="11 位手机号" autocomplete="off" />
  2851. <button type="button" class="input-clear" aria-label="清除电话" title="清除">
  2852. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2853. </button>
  2854. </div>
  2855. </div>
  2856. <div class="field" style="margin:0">
  2857. <label for="dlgEta">要求到达</label>
  2858. <div class="input-clear-wrap">
  2859. <input id="dlgEta" type="datetime-local" class="input" />
  2860. <button type="button" class="input-clear" aria-label="清除到达时间" title="清除">
  2861. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2862. </button>
  2863. </div>
  2864. </div>
  2865. </div>
  2866. </div>
  2867. <div class="form-section">
  2868. <h4>现场凭证(图片上传)</h4>
  2869. <div class="upload-zone" id="uploadZone" role="button" tabindex="0">
  2870. <p class="upload-zone-text">支持多张,示意:装车单、封签、车况等</p>
  2871. <button type="button" class="btn btn-block upload-zone-btn" id="btnPickFiles">
  2872. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
  2873. 选择图片
  2874. </button>
  2875. <input id="dlgUpload" type="file" accept="image/*" multiple style="display:none" />
  2876. </div>
  2877. <div class="upload-preview" id="uploadPreview" aria-live="polite"></div>
  2878. </div>
  2879. <div class="form-section">
  2880. <h4>装车明细</h4>
  2881. <div class="mini-table-wrap">
  2882. <table class="mini-table">
  2883. <thead>
  2884. <tr>
  2885. <th style="width:48px">#</th>
  2886. <th>商品名称</th>
  2887. <th style="width:100px">数量</th>
  2888. <th style="width:80px">单位</th>
  2889. <th style="width:72px">操作</th>
  2890. </tr>
  2891. </thead>
  2892. <tbody id="dlgLinesBody">
  2893. <tr>
  2894. <td>1</td>
  2895. <td>
  2896. <div class="input-clear-wrap">
  2897. <input type="text" class="input" name="lineName[]" placeholder="如:精品黄瓜" autocomplete="off" />
  2898. <button type="button" class="input-clear" aria-label="清除商品名称" title="清除">
  2899. <svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2900. </button>
  2901. </div>
  2902. </td>
  2903. <td><input type="number" class="input" name="lineQty[]" placeholder="0" min="0" step="1" /></td>
  2904. <td>
  2905. <select class="select" name="lineUnit[]" style="width:100%;min-width:0">
  2906. <option>件</option>
  2907. <option>箱</option>
  2908. <option>kg</option>
  2909. </select>
  2910. </td>
  2911. <td><button type="button" class="btn btn-icon js-remove-line">删除</button></td>
  2912. </tr>
  2913. </tbody>
  2914. </table>
  2915. </div>
  2916. <button type="button" class="btn" id="btnAddLine" style="margin-top:10px">
  2917. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>
  2918. 添加一行
  2919. </button>
  2920. </div>
  2921. <div class="form-section">
  2922. <h4>备注说明</h4>
  2923. <label for="dlgRemark" class="sr-only">备注</label>
  2924. <textarea id="dlgRemark" class="textarea" placeholder="特殊要求、限行说明、客户交接注意事项等"></textarea>
  2925. </div>
  2926. </div>
  2927. <div class="dialog-foot">
  2928. <button type="button" class="btn" id="btnCancel">
  2929. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  2930. 取消
  2931. </button>
  2932. <button type="button" class="btn btn-primary" id="btnSaveDemo">
  2933. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
  2934. 保存
  2935. </button>
  2936. </div>
  2937. </div>
  2938. </div>
  2939. <div class="backdrop" id="backdropView" role="dialog" aria-modal="true" aria-labelledby="viewTitleTaskNo">
  2940. <div class="dialog dialog-view-xl" id="dlgView">
  2941. <div class="dialog-head" style="padding:0;border:none">
  2942. <div class="view-hero">
  2943. <img id="viewHeroImg" class="view-hero-img" src="https://picsum.photos/seed/view-hero/144/144" width="72" height="72" alt="" />
  2944. <div class="view-hero-main">
  2945. <h2 id="viewTitleTaskNo">任务详情</h2>
  2946. <div class="view-hero-tags">
  2947. <span class="tag tag--processing" id="viewStatusTag">执行中</span>
  2948. <span class="tag tag--pending" id="viewPriorityTag">优先级 · 中</span>
  2949. <span class="tag tag--info">区域 · 华东</span>
  2950. </div>
  2951. <p class="view-hero-meta" id="viewHeroMeta">
  2952. 线路:<span id="viewRouteLine">—</span> · 司机 <span id="viewDriverName">—</span> · 计划 <span id="viewPlanBrief">—</span>
  2953. </p>
  2954. </div>
  2955. </div>
  2956. </div>
  2957. <div class="dialog-scroll">
  2958. <div class="view-section">
  2959. <h3>基础信息</h3>
  2960. <dl class="view-kv-grid">
  2961. <div class="view-kv"><dt>任务号</dt><dd id="viewTaskNo">—</dd></div>
  2962. <div class="view-kv"><dt>创建时间</dt><dd id="viewCreatedAt">—</dd></div>
  2963. <div class="view-kv"><dt>线路</dt><dd id="viewRouteFull">—</dd></div>
  2964. <div class="view-kv"><dt>计划时间</dt><dd id="viewPlanTime">—</dd></div>
  2965. <div class="view-kv"><dt>站点 / 货品</dt><dd id="viewStationBrief">—</dd></div>
  2966. <div class="view-kv"><dt>备注</dt><dd id="viewRemarkFull">—</dd></div>
  2967. </dl>
  2968. </div>
  2969. <div class="view-section">
  2970. <h3>费用与件量</h3>
  2971. <div class="view-bento">
  2972. <div class="view-card">
  2973. <h4>本单数量(件)</h4>
  2974. <p id="viewQtyBig" style="font-size:22px;font-weight:700;color:var(--primary-dark)">0</p>
  2975. </div>
  2976. <div class="view-card">
  2977. <h4>本单金额(元)</h4>
  2978. <p id="viewAmtBig" style="font-size:22px;font-weight:700;color:var(--primary-dark)">¥0.00</p>
  2979. </div>
  2980. <div class="view-card" style="grid-column:1/-1">
  2981. <h4>费用说明</h4>
  2982. <p>含装卸、路桥及温控附加费;实际结算以回单签收后财务对账为准。以下为系统根据当前线路与货品类型估算的分摊明细。</p>
  2983. </div>
  2984. </div>
  2985. </div>
  2986. <div class="view-section">
  2987. <h3>路由示意</h3>
  2988. <div class="view-route-bar">
  2989. <div class="view-route-pin"><strong>始发仓</strong>华东中心仓</div>
  2990. <div class="view-route-line" aria-hidden="true"></div>
  2991. <div class="view-route-pin"><strong>经停</strong><span id="viewRouteMid">城配集散</span></div>
  2992. <div class="view-route-line" aria-hidden="true"></div>
  2993. <div class="view-route-pin"><strong>目的地</strong><span id="viewRouteEnd">门店/站点</span></div>
  2994. </div>
  2995. <p style="margin:0;font-size:12px;color:var(--text-muted)">示意图仅供调度参考,导航以司机端实时路径为准。</p>
  2996. </div>
  2997. <div class="view-section">
  2998. <h3>执行轨迹</h3>
  2999. <div class="view-timeline">
  3000. <div class="view-tl-item">
  3001. <div class="view-tl-time">2026-04-15 08:20</div>
  3002. <div class="view-tl-title">任务创建 · 调度已排班</div>
  3003. <div class="view-tl-desc">系统自动生成运单,已推送至承运商接口。</div>
  3004. </div>
  3005. <div class="view-tl-item">
  3006. <div class="view-tl-time" id="viewTlTime1">2026-04-15 09:00</div>
  3007. <div class="view-tl-title">司机接单 · 前往提货点</div>
  3008. <div class="view-tl-desc" id="viewTlDesc1">车辆已出库,预计途中耗时以实时路况为准。</div>
  3009. </div>
  3010. <div class="view-tl-item muted">
  3011. <div class="view-tl-time">待发生</div>
  3012. <div class="view-tl-title">到站卸货 · 签收确认</div>
  3013. <div class="view-tl-desc">完成后将同步回单照片与电子签名。</div>
  3014. </div>
  3015. </div>
  3016. </div>
  3017. <div class="view-section">
  3018. <h3>现场影像</h3>
  3019. <div class="view-gallery">
  3020. <a href="https://picsum.photos/seed/v1/800/600" target="_blank" rel="noopener noreferrer"><img src="https://picsum.photos/seed/v1/400/300" width="400" height="300" alt="装车" loading="lazy" /></a>
  3021. <a href="https://picsum.photos/seed/v2/800/600" target="_blank" rel="noopener noreferrer"><img src="https://picsum.photos/seed/v2/400/300" width="400" height="300" alt="封签" loading="lazy" /></a>
  3022. <a href="https://picsum.photos/seed/v3/800/600" target="_blank" rel="noopener noreferrer"><img src="https://picsum.photos/seed/v3/400/300" width="400" height="300" alt="车况" loading="lazy" /></a>
  3023. <a href="https://picsum.photos/seed/v4/800/600" target="_blank" rel="noopener noreferrer"><img src="https://picsum.photos/seed/v4/400/300" width="400" height="300" alt="回单" loading="lazy" /></a>
  3024. </div>
  3025. </div>
  3026. <div class="view-section">
  3027. <h3>装车明细(示意)</h3>
  3028. <div class="view-subtable-wrap">
  3029. <table class="view-subtable">
  3030. <thead>
  3031. <tr>
  3032. <th class="ta-left">品名</th>
  3033. <th>规格</th>
  3034. <th>数量</th>
  3035. <th>单价</th>
  3036. <th>小计</th>
  3037. </tr>
  3038. </thead>
  3039. <tbody>
  3040. <tr>
  3041. <td class="ta-left">精品黄瓜</td>
  3042. <td>5kg/箱</td>
  3043. <td>20</td>
  3044. <td class="money-val">¥18.00</td>
  3045. <td class="money-val">¥360.00</td>
  3046. </tr>
  3047. <tr>
  3048. <td class="ta-left">番茄(礼盒)</td>
  3049. <td>3kg/箱</td>
  3050. <td>12</td>
  3051. <td class="money-val">¥32.50</td>
  3052. <td class="money-val">¥390.00</td>
  3053. </tr>
  3054. <tr>
  3055. <td class="ta-left">叶菜组合</td>
  3056. <td>2kg/袋</td>
  3057. <td>30</td>
  3058. <td class="money-val">¥9.80</td>
  3059. <td class="money-val">¥294.00</td>
  3060. </tr>
  3061. </tbody>
  3062. </table>
  3063. </div>
  3064. </div>
  3065. </div>
  3066. <div class="dialog-foot">
  3067. <button type="button" class="btn" id="btnViewClose">
  3068. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>
  3069. 关闭
  3070. </button>
  3071. <button type="button" class="btn btn-primary" id="btnViewPrintDemo">
  3072. <svg class="ic" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 6 2 18 2 18 9"/><path d="M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2"/><rect x="6" y="14" width="12" height="8"/></svg>
  3073. 打印预览(演示)
  3074. </button>
  3075. </div>
  3076. </div>
  3077. </div>
  3078. <script>
  3079. (function () {
  3080. var el = document.getElementById("backdrop");
  3081. var dlgNew = document.getElementById("dlgNewTask");
  3082. var backdropView = document.getElementById("backdropView");
  3083. var dlgView = document.getElementById("dlgView");
  3084. var uploadInput = document.getElementById("dlgUpload");
  3085. var uploadPreview = document.getElementById("uploadPreview");
  3086. var uploadZone = document.getElementById("uploadZone");
  3087. var btnPickFiles = document.getElementById("btnPickFiles");
  3088. function syncInputClearButtons(container) {
  3089. (container || document).querySelectorAll(".input-clear-wrap").forEach(function (wrap) {
  3090. var input = wrap.querySelector("input");
  3091. var btn = wrap.querySelector(".input-clear");
  3092. if (input && btn) btn.hidden = !input.value;
  3093. });
  3094. }
  3095. document.addEventListener("input", function (e) {
  3096. var wrap = e.target.closest(".input-clear-wrap");
  3097. if (!wrap || !e.target.matches("input")) return;
  3098. var btn = wrap.querySelector(".input-clear");
  3099. if (btn) btn.hidden = !e.target.value;
  3100. });
  3101. document.addEventListener("click", function (e) {
  3102. var btn = e.target.closest(".input-clear");
  3103. if (!btn) return;
  3104. var wrap = btn.closest(".input-clear-wrap");
  3105. if (!wrap) return;
  3106. var input = wrap.querySelector("input");
  3107. if (!input) return;
  3108. e.preventDefault();
  3109. input.value = "";
  3110. input.dispatchEvent(new Event("input", { bubbles: true }));
  3111. input.focus();
  3112. btn.hidden = true;
  3113. });
  3114. syncInputClearButtons();
  3115. var taskTableTbody = document.querySelector(".data-table tbody");
  3116. function getVisibleRowChecks() {
  3117. var out = [];
  3118. if (!taskTableTbody) return out;
  3119. [].forEach.call(taskTableTbody.querySelectorAll("tr"), function (tr) {
  3120. if (tr.classList.contains("is-hidden")) return;
  3121. var cb = tr.querySelector(".row-check");
  3122. if (cb) out.push(cb);
  3123. });
  3124. return out;
  3125. }
  3126. function syncSelectedCountBadge() {
  3127. var numEl = document.getElementById("selectedCountNum");
  3128. if (!numEl || !taskTableTbody) return;
  3129. var n = 0;
  3130. taskTableTbody.querySelectorAll(".row-check").forEach(function (cb) {
  3131. if (cb.checked) n++;
  3132. });
  3133. numEl.textContent = String(n);
  3134. }
  3135. function syncTableCheckAllUI() {
  3136. var all = document.getElementById("tableCheckAll");
  3137. if (!all) return;
  3138. var list = getVisibleRowChecks();
  3139. var n = 0;
  3140. list.forEach(function (cb) {
  3141. if (cb.checked) n++;
  3142. });
  3143. all.checked = n === list.length && list.length > 0;
  3144. all.indeterminate = n > 0 && n < list.length;
  3145. syncSelectedCountBadge();
  3146. }
  3147. (function initTaskTableSelectAll() {
  3148. var all = document.getElementById("tableCheckAll");
  3149. if (!all || !taskTableTbody) return;
  3150. all.addEventListener("change", function () {
  3151. getVisibleRowChecks().forEach(function (cb) {
  3152. cb.checked = all.checked;
  3153. });
  3154. all.indeterminate = false;
  3155. syncSelectedCountBadge();
  3156. });
  3157. taskTableTbody.addEventListener("change", function (e) {
  3158. if (!e.target.classList.contains("row-check")) return;
  3159. syncTableCheckAllUI();
  3160. });
  3161. })();
  3162. (function seedDemoTableRows() {
  3163. var tb = document.querySelector(".data-table tbody");
  3164. if (!tb || !tb.rows.length) return;
  3165. var templateRow = tb.rows[0];
  3166. var drivers = ["王强", "李敏", "张三", "赵磊", "孙洁", "周洋"];
  3167. for (var i = 0; i < 16; i++) {
  3168. var n = 3 + i;
  3169. var tr = templateRow.cloneNode(true);
  3170. var id = "TK20260415" + (n < 10 ? "0" : "") + n;
  3171. if (tr.cells[1]) tr.cells[1].textContent = id;
  3172. var cb = tr.querySelector(".row-check");
  3173. if (cb) {
  3174. cb.value = id;
  3175. cb.setAttribute("aria-label", "选择 " + id);
  3176. cb.checked = false;
  3177. }
  3178. if (tr.cells[2]) {
  3179. var code = String.fromCharCode(65 + (i % 26));
  3180. tr.cells[2].textContent =
  3181. "区域 " + code + " → 城配站 #" + (i + 1) + "(列多时横向滚动)";
  3182. tr.cells[2].classList.add("td-left");
  3183. }
  3184. if (tr.cells[3]) {
  3185. var wrap = tr.cells[3].querySelector(".cell-media");
  3186. if (wrap) {
  3187. var img = wrap.querySelector(".cell-media-img");
  3188. var t1 = wrap.querySelector(".cell-media-text");
  3189. var t2 = wrap.querySelector(".cell-media-sub");
  3190. if (img) img.src = "https://picsum.photos/seed/" + encodeURIComponent(id) + "/80/80";
  3191. if (t1) t1.textContent = "城配集散 · 厢式 " + ((i % 9) + 1) + " 号";
  3192. if (t2) {
  3193. t2.textContent =
  3194. "混装配载 · 批次 " +
  3195. (i + 1) +
  3196. " · 超长说明用于测试列表格内省略号与左对齐图文混排……";
  3197. }
  3198. }
  3199. tr.cells[3].classList.add("td-cell-media", "td-left");
  3200. }
  3201. if (tr.cells[5]) tr.cells[5].textContent = drivers[i % drivers.length];
  3202. if (tr.cells[6]) {
  3203. tr.cells[6].textContent = 9 + (i % 6) + ":00 – " + (11 + (i % 6)) + ":00";
  3204. }
  3205. if (tr.cells[7]) {
  3206. tr.cells[7].textContent =
  3207. i % 4 === 0 ? "优先卸货" : i % 4 === 1 ? "" : "—";
  3208. tr.cells[7].classList.add("td-left");
  3209. }
  3210. if (tr.cells[8]) {
  3211. var hh = 8 + (i % 9);
  3212. var mm = (i * 7) % 60;
  3213. tr.cells[8].textContent =
  3214. "2026-04-15 " + (hh < 10 ? "0" : "") + hh + ":" + (mm < 10 ? "0" : "") + mm;
  3215. }
  3216. if (tr.cells[9]) {
  3217. var q = 5 + ((i * 3) % 42);
  3218. tr.cells[9].textContent = String(q);
  3219. tr.cells[9].setAttribute("data-qty", String(q));
  3220. tr.cells[9].className = "col-qty";
  3221. }
  3222. if (tr.cells[10]) {
  3223. var amt = Math.round((320 + i * 217.35) * 100) / 100;
  3224. tr.cells[10].setAttribute("data-amt", String(amt));
  3225. tr.cells[10].textContent =
  3226. "¥" +
  3227. amt.toLocaleString("zh-CN", {
  3228. minimumFractionDigits: 2,
  3229. maximumFractionDigits: 2
  3230. });
  3231. tr.cells[10].className = "col-amt";
  3232. }
  3233. tb.appendChild(tr);
  3234. }
  3235. })();
  3236. function refreshTaskTableTotals() {
  3237. var tb = taskTableTbody;
  3238. var qtyEl = document.getElementById("totalQty");
  3239. var amtEl = document.getElementById("totalAmt");
  3240. if (!tb || !qtyEl || !amtEl) return;
  3241. var qtySum = 0;
  3242. var amtSum = 0;
  3243. tb.querySelectorAll("tr").forEach(function (tr) {
  3244. if (tr.classList.contains("is-hidden")) return;
  3245. var qCell = tr.querySelector(".col-qty");
  3246. var aCell = tr.querySelector(".col-amt");
  3247. if (qCell) {
  3248. var qRaw = qCell.getAttribute("data-qty") || qCell.textContent.replace(/,/g, "");
  3249. var qv = parseFloat(qRaw, 10);
  3250. if (!isNaN(qv)) qtySum += qv;
  3251. }
  3252. if (aCell) {
  3253. var aRaw =
  3254. aCell.getAttribute("data-amt") ||
  3255. aCell.textContent.replace(/[¥¥,\s]/g, "").trim();
  3256. var av = parseFloat(aRaw, 10);
  3257. if (!isNaN(av)) amtSum += av;
  3258. }
  3259. });
  3260. qtyEl.textContent = String(Math.round(qtySum));
  3261. var amtRounded = Math.round(amtSum * 100) / 100;
  3262. amtEl.textContent =
  3263. "¥" +
  3264. amtRounded.toLocaleString("zh-CN", {
  3265. minimumFractionDigits: 2,
  3266. maximumFractionDigits: 2
  3267. });
  3268. amtEl.setAttribute("data-amt", String(amtRounded));
  3269. }
  3270. (function initTaskTablePager() {
  3271. var tb = taskTableTbody;
  3272. var prev = document.getElementById("pagerPrev");
  3273. var next = document.getElementById("pagerNext");
  3274. var nums = document.getElementById("pagerNums");
  3275. var rangeEl = document.getElementById("pagerRange");
  3276. var sizeSel = document.getElementById("pageSizeSel");
  3277. if (!tb || !prev || !next || !nums || !rangeEl || !sizeSel) return;
  3278. var state = { page: 1 };
  3279. function rowList() {
  3280. return [].slice.call(tb.querySelectorAll("tr"));
  3281. }
  3282. function pageCount() {
  3283. var total = rowList().length;
  3284. var size = parseInt(sizeSel.value, 10) || 10;
  3285. return Math.max(1, Math.ceil(total / size) || 1);
  3286. }
  3287. function render() {
  3288. var rows = rowList();
  3289. var total = rows.length;
  3290. var size = parseInt(sizeSel.value, 10) || 10;
  3291. var pages = Math.max(1, Math.ceil(total / size) || 1);
  3292. if (state.page > pages) state.page = pages;
  3293. if (state.page < 1) state.page = 1;
  3294. var start = (state.page - 1) * size;
  3295. var end = Math.min(start + size, total);
  3296. rows.forEach(function (tr, i) {
  3297. if (i >= start && i < end) tr.classList.remove("is-hidden");
  3298. else tr.classList.add("is-hidden");
  3299. });
  3300. if (total === 0) {
  3301. rangeEl.textContent = "共 0 条";
  3302. } else {
  3303. rangeEl.textContent =
  3304. "第 " + (start + 1) + "–" + end + " 条,共 " + total + " 条";
  3305. }
  3306. prev.disabled = state.page <= 1;
  3307. next.disabled = state.page >= pages;
  3308. nums.innerHTML = "";
  3309. var cur = state.page;
  3310. function addNumBtn(p, isCur) {
  3311. var b = document.createElement("button");
  3312. b.type = "button";
  3313. b.className = "btn pager-num" + (isCur ? " is-current" : "");
  3314. b.textContent = String(p);
  3315. b.setAttribute("aria-label", "第 " + p + " 页");
  3316. if (isCur) {
  3317. b.setAttribute("aria-current", "page");
  3318. b.disabled = true;
  3319. } else {
  3320. b.addEventListener("click", function () {
  3321. state.page = p;
  3322. render();
  3323. });
  3324. }
  3325. nums.appendChild(b);
  3326. }
  3327. if (pages <= 7) {
  3328. for (var p = 1; p <= pages; p++) addNumBtn(p, p === cur);
  3329. } else {
  3330. var marks = {};
  3331. [1, pages, cur - 1, cur, cur + 1].forEach(function (x) {
  3332. if (x >= 1 && x <= pages) marks[x] = true;
  3333. });
  3334. var order = Object.keys(marks)
  3335. .map(function (k) {
  3336. return parseInt(k, 10);
  3337. })
  3338. .sort(function (a, b) {
  3339. return a - b;
  3340. });
  3341. var last = 0;
  3342. order.forEach(function (p) {
  3343. if (p - last > 1) {
  3344. var gap = document.createElement("span");
  3345. gap.className = "pager-gap";
  3346. gap.textContent = "…";
  3347. nums.appendChild(gap);
  3348. }
  3349. addNumBtn(p, p === cur);
  3350. last = p;
  3351. });
  3352. }
  3353. refreshTaskTableTotals();
  3354. syncTableCheckAllUI();
  3355. }
  3356. prev.addEventListener("click", function () {
  3357. state.page--;
  3358. render();
  3359. });
  3360. next.addEventListener("click", function () {
  3361. state.page++;
  3362. render();
  3363. });
  3364. sizeSel.addEventListener("change", function () {
  3365. state.page = 1;
  3366. render();
  3367. });
  3368. render();
  3369. })();
  3370. function openTaskView(tr) {
  3371. if (!tr || !backdropView) return;
  3372. function cell(i) {
  3373. return tr.cells[i] || null;
  3374. }
  3375. var taskNo = cell(1) ? cell(1).textContent.trim() : "—";
  3376. var elTask = document.getElementById("viewTaskNo");
  3377. var elTitle = document.getElementById("viewTitleTaskNo");
  3378. if (elTask) elTask.textContent = taskNo;
  3379. if (elTitle) elTitle.textContent = "任务 · " + taskNo;
  3380. var route = cell(2) ? cell(2).textContent.trim() : "—";
  3381. if (document.getElementById("viewRouteFull")) {
  3382. document.getElementById("viewRouteFull").textContent = route;
  3383. }
  3384. if (document.getElementById("viewRouteLine")) {
  3385. document.getElementById("viewRouteLine").textContent = route;
  3386. }
  3387. var mText = "";
  3388. var mSub = "";
  3389. var imgSrc = "https://picsum.photos/seed/view-hero/144/144";
  3390. var c3 = cell(3);
  3391. if (c3) {
  3392. var t1 = c3.querySelector(".cell-media-text");
  3393. var t2 = c3.querySelector(".cell-media-sub");
  3394. var img = c3.querySelector(".cell-media-img");
  3395. if (t1) mText = t1.textContent.trim();
  3396. if (t2) mSub = t2.textContent.trim();
  3397. if (img) {
  3398. var src = img.getAttribute("src") || "";
  3399. if (src) imgSrc = src.replace(/\/\d+\/\d+(\?.*)?$/, "/144/144");
  3400. }
  3401. var elSB = document.getElementById("viewStationBrief");
  3402. if (elSB) elSB.textContent = mText + (mSub ? " · " + mSub : "");
  3403. }
  3404. var heroImg = document.getElementById("viewHeroImg");
  3405. if (heroImg) heroImg.src = imgSrc;
  3406. var st = cell(4);
  3407. var tagEl = document.getElementById("viewStatusTag");
  3408. if (st && tagEl) {
  3409. var span = st.querySelector(".tag");
  3410. tagEl.textContent = span ? span.textContent.trim() : st.textContent.trim();
  3411. tagEl.className = span ? span.className : "tag";
  3412. }
  3413. var driver = cell(5) ? cell(5).textContent.trim() : "—";
  3414. if (document.getElementById("viewDriverName")) {
  3415. document.getElementById("viewDriverName").textContent = driver;
  3416. }
  3417. var plan = cell(6) ? cell(6).textContent.trim() : "—";
  3418. if (document.getElementById("viewPlanTime")) {
  3419. document.getElementById("viewPlanTime").textContent = plan;
  3420. }
  3421. if (document.getElementById("viewPlanBrief")) {
  3422. document.getElementById("viewPlanBrief").textContent = plan;
  3423. }
  3424. var remark = cell(7) ? cell(7).textContent.trim() : "";
  3425. if (document.getElementById("viewRemarkFull")) {
  3426. document.getElementById("viewRemarkFull").textContent = remark || "—";
  3427. }
  3428. var created = cell(8) ? cell(8).textContent.trim() : "—";
  3429. if (document.getElementById("viewCreatedAt")) {
  3430. document.getElementById("viewCreatedAt").textContent = created;
  3431. }
  3432. var qty = cell(9) ? cell(9).textContent.trim() : "0";
  3433. var amt = cell(10) ? cell(10).textContent.trim() : "¥0.00";
  3434. if (document.getElementById("viewQtyBig")) {
  3435. document.getElementById("viewQtyBig").textContent = qty;
  3436. }
  3437. if (document.getElementById("viewAmtBig")) {
  3438. document.getElementById("viewAmtBig").textContent = amt;
  3439. }
  3440. var parts = route.split("→");
  3441. if (document.getElementById("viewRouteMid")) {
  3442. document.getElementById("viewRouteMid").textContent =
  3443. parts.length > 1 ? parts[0].trim().slice(0, 14) : "经停点";
  3444. }
  3445. if (document.getElementById("viewRouteEnd")) {
  3446. document.getElementById("viewRouteEnd").textContent =
  3447. parts.length > 1 ? parts[parts.length - 1].trim() : route.slice(0, 18);
  3448. }
  3449. if (document.getElementById("viewTlTime1")) {
  3450. document.getElementById("viewTlTime1").textContent = created || "—";
  3451. }
  3452. if (document.getElementById("viewTlDesc1")) {
  3453. document.getElementById("viewTlDesc1").textContent =
  3454. "司机「" + driver + "」执行本单,线路:" + route + "。";
  3455. }
  3456. backdropView.classList.add("open");
  3457. var sc = dlgView && dlgView.querySelector(".dialog-scroll");
  3458. if (sc) sc.scrollTop = 0;
  3459. }
  3460. function closeTaskView() {
  3461. if (backdropView) backdropView.classList.remove("open");
  3462. }
  3463. if (taskTableTbody) {
  3464. taskTableTbody.addEventListener("click", function (e) {
  3465. if (!e.target.closest(".js-btn-view")) return;
  3466. var tr = e.target.closest("tr");
  3467. if (tr) openTaskView(tr);
  3468. });
  3469. }
  3470. var btnViewClose = document.getElementById("btnViewClose");
  3471. var btnViewPrintDemo = document.getElementById("btnViewPrintDemo");
  3472. if (btnViewClose) btnViewClose.onclick = closeTaskView;
  3473. if (btnViewPrintDemo) {
  3474. btnViewPrintDemo.onclick = function () {
  3475. alert("演示:可在此调用 window.print() 或对接导出 PDF。");
  3476. };
  3477. }
  3478. if (backdropView) {
  3479. backdropView.onclick = function (e) {
  3480. if (e.target === backdropView) closeTaskView();
  3481. };
  3482. }
  3483. if (dlgView) {
  3484. dlgView.addEventListener("click", function (e) {
  3485. e.stopPropagation();
  3486. });
  3487. }
  3488. function clearUploadPreview() {
  3489. if (!uploadPreview) return;
  3490. uploadPreview.querySelectorAll(".upload-item").forEach(function (item) {
  3491. var u = item.dataset.url;
  3492. if (u) URL.revokeObjectURL(u);
  3493. item.remove();
  3494. });
  3495. }
  3496. function openDialog() {
  3497. el.classList.add("open");
  3498. document.getElementById("dlgTaskName").focus();
  3499. }
  3500. function closeDialog() {
  3501. el.classList.remove("open");
  3502. clearUploadPreview();
  3503. }
  3504. document.getElementById("btnNew").onclick = openDialog;
  3505. var importFileInput = document.getElementById("importFileInput");
  3506. var btnBatchDelete = document.getElementById("btnBatchDelete");
  3507. var btnImport = document.getElementById("btnImport");
  3508. var btnExportList = document.getElementById("btnExportList");
  3509. if (btnBatchDelete) {
  3510. btnBatchDelete.onclick = function () {
  3511. alert("演示:将删除当前勾选的记录,接入接口后在此提交批量删除。");
  3512. };
  3513. }
  3514. if (btnImport && importFileInput) {
  3515. btnImport.onclick = function () {
  3516. importFileInput.click();
  3517. };
  3518. importFileInput.addEventListener("change", function () {
  3519. if (importFileInput.files && importFileInput.files.length) {
  3520. alert("演示:已选择文件「" + importFileInput.files[0].name + "」,可在此解析并上传。");
  3521. }
  3522. importFileInput.value = "";
  3523. });
  3524. }
  3525. if (btnExportList) {
  3526. btnExportList.onclick = function () {
  3527. alert("演示:导出当前列表(可按筛选条件导出结果集)。");
  3528. };
  3529. }
  3530. document.getElementById("btnCancel").onclick = closeDialog;
  3531. el.onclick = function (e) {
  3532. if (e.target === el) closeDialog();
  3533. };
  3534. document.addEventListener("keydown", function (e) {
  3535. if (e.key !== "Escape") return;
  3536. if (backdropView && backdropView.classList.contains("open")) {
  3537. closeTaskView();
  3538. return;
  3539. }
  3540. if (el.classList.contains("open")) closeDialog();
  3541. });
  3542. if (dlgNew) {
  3543. dlgNew.addEventListener("click", function (e) {
  3544. e.stopPropagation();
  3545. });
  3546. }
  3547. function addPreviewFile(file) {
  3548. if (!file.type.startsWith("image/")) return;
  3549. var url = URL.createObjectURL(file);
  3550. var wrap = document.createElement("div");
  3551. wrap.className = "upload-item";
  3552. wrap.dataset.url = url;
  3553. var img = document.createElement("img");
  3554. img.src = url;
  3555. img.alt = "预览";
  3556. var rm = document.createElement("button");
  3557. rm.type = "button";
  3558. rm.className = "rm";
  3559. rm.setAttribute("aria-label", "移除");
  3560. rm.textContent = "×";
  3561. rm.onclick = function () {
  3562. URL.revokeObjectURL(url);
  3563. wrap.remove();
  3564. };
  3565. wrap.appendChild(img);
  3566. wrap.appendChild(rm);
  3567. uploadPreview.appendChild(wrap);
  3568. }
  3569. function onFilesSelected(files) {
  3570. for (var i = 0; i < files.length; i++) {
  3571. addPreviewFile(files[i]);
  3572. }
  3573. uploadInput.value = "";
  3574. }
  3575. if (uploadInput && uploadPreview) {
  3576. uploadInput.addEventListener("change", function () {
  3577. if (uploadInput.files && uploadInput.files.length) {
  3578. onFilesSelected(uploadInput.files);
  3579. }
  3580. });
  3581. }
  3582. if (btnPickFiles && uploadInput) {
  3583. btnPickFiles.addEventListener("click", function (e) {
  3584. e.preventDefault();
  3585. e.stopPropagation();
  3586. uploadInput.click();
  3587. });
  3588. }
  3589. if (uploadZone && uploadInput) {
  3590. uploadZone.addEventListener("click", function (e) {
  3591. if (e.target === uploadZone || (e.target.classList && e.target.classList.contains("upload-zone-text"))) {
  3592. uploadInput.click();
  3593. }
  3594. });
  3595. uploadZone.addEventListener("keydown", function (e) {
  3596. if (e.key === "Enter" || e.key === " ") {
  3597. e.preventDefault();
  3598. uploadInput.click();
  3599. }
  3600. });
  3601. }
  3602. var dlgLinesBody = document.getElementById("dlgLinesBody");
  3603. function renumberLines() {
  3604. if (!dlgLinesBody) return;
  3605. var rows = dlgLinesBody.querySelectorAll("tr");
  3606. for (var i = 0; i < rows.length; i++) {
  3607. rows[i].querySelector("td:first-child").textContent = String(i + 1);
  3608. }
  3609. }
  3610. function bindRemove(btn) {
  3611. btn.addEventListener("click", function () {
  3612. var tr = btn.closest("tr");
  3613. if (tr && dlgLinesBody.querySelectorAll("tr").length > 1) {
  3614. tr.remove();
  3615. renumberLines();
  3616. }
  3617. });
  3618. }
  3619. if (dlgLinesBody) {
  3620. dlgLinesBody.querySelectorAll(".js-remove-line").forEach(function (b) {
  3621. bindRemove(b);
  3622. });
  3623. }
  3624. var btnAddLine = document.getElementById("btnAddLine");
  3625. if (btnAddLine && dlgLinesBody) {
  3626. btnAddLine.addEventListener("click", function () {
  3627. var tr = document.createElement("tr");
  3628. tr.innerHTML =
  3629. '<td></td>' +
  3630. '<td><div class="input-clear-wrap">' +
  3631. '<input type="text" class="input" name="lineName[]" placeholder="如:精品黄瓜" autocomplete="off" />' +
  3632. '<button type="button" class="input-clear" aria-label="清除商品名称" title="清除">' +
  3633. '<svg class="ic-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><path d="M18 6L6 18M6 6l12 12"/></svg>' +
  3634. '</button></div></td>' +
  3635. '<td><input type="number" class="input" name="lineQty[]" placeholder="0" min="0" step="1" /></td>' +
  3636. '<td><select class="select" name="lineUnit[]" style="width:100%;min-width:0"><option>件</option><option>箱</option><option>kg</option></select></td>' +
  3637. '<td><button type="button" class="btn btn-icon js-remove-line">删除</button></td>';
  3638. bindRemove(tr.querySelector(".js-remove-line"));
  3639. dlgLinesBody.appendChild(tr);
  3640. renumberLines();
  3641. });
  3642. }
  3643. var btnSaveDemo = document.getElementById("btnSaveDemo");
  3644. if (btnSaveDemo) {
  3645. btnSaveDemo.addEventListener("click", function () {
  3646. alert("演示页:此处可提交表单或调接口。");
  3647. });
  3648. }
  3649. var toggleFilter = document.getElementById("toggleFilter");
  3650. var filterExtra = document.getElementById("filter-extra");
  3651. if (toggleFilter && filterExtra) {
  3652. toggleFilter.addEventListener("click", function () {
  3653. if (filterExtra.hasAttribute("hidden")) {
  3654. filterExtra.removeAttribute("hidden");
  3655. toggleFilter.setAttribute("aria-expanded", "true");
  3656. toggleFilter.textContent = "收起更多条件";
  3657. } else {
  3658. filterExtra.setAttribute("hidden", "");
  3659. toggleFilter.setAttribute("aria-expanded", "false");
  3660. toggleFilter.textContent = "展开更多条件";
  3661. }
  3662. });
  3663. var filterForm = document.querySelector(".filter-form");
  3664. if (filterForm) {
  3665. filterForm.addEventListener("reset", function () {
  3666. filterExtra.setAttribute("hidden", "");
  3667. toggleFilter.setAttribute("aria-expanded", "false");
  3668. toggleFilter.textContent = "展开更多条件";
  3669. setTimeout(function () {
  3670. syncInputClearButtons(filterForm);
  3671. }, 0);
  3672. });
  3673. }
  3674. }
  3675. (function initTreeTableExpand() {
  3676. document.querySelectorAll(".tree-expand-root").forEach(function (btn) {
  3677. btn.addEventListener("click", function () {
  3678. var parentTr = btn.closest("tr.tree-row-parent");
  3679. if (!parentTr) return;
  3680. var pid = parentTr.getAttribute("data-tree-id");
  3681. if (!pid) return;
  3682. var expanded = btn.getAttribute("aria-expanded") === "true";
  3683. var wrap = document.querySelector('tr.tree-row-children-wrap[data-tree-parent="' + pid + '"]');
  3684. if (wrap) wrap.classList.toggle("is-hidden", expanded);
  3685. btn.setAttribute("aria-expanded", expanded ? "false" : "true");
  3686. });
  3687. });
  3688. document.querySelectorAll(".tree-expand-nested").forEach(function (btn) {
  3689. btn.addEventListener("click", function () {
  3690. var tid = btn.getAttribute("data-expand-target");
  3691. if (!tid) return;
  3692. var expanded = btn.getAttribute("aria-expanded") === "true";
  3693. var wrap = document.querySelector('tr.tree-l2-wrap[data-expand-for="' + tid + '"]');
  3694. if (wrap) wrap.classList.toggle("is-hidden", expanded);
  3695. btn.setAttribute("aria-expanded", expanded ? "false" : "true");
  3696. });
  3697. });
  3698. })();
  3699. function setTopProgress(on) {
  3700. var bar = document.getElementById("topProgressBar");
  3701. if (!bar) return;
  3702. bar.classList.toggle("is-active", !!on);
  3703. }
  3704. function demoDelay(ms) {
  3705. return new Promise(function (resolve) {
  3706. setTimeout(resolve, ms);
  3707. });
  3708. }
  3709. function buildPlaceholderPanel(title) {
  3710. return (
  3711. '<header class="page-head">' +
  3712. "<h1>" +
  3713. title +
  3714. "</h1>" +
  3715. '<p class="desc">演示占位页:真实项目中为对应路由页面。从左侧菜单进入时会先显示加载,再刷新本页数据。</p>' +
  3716. '<p class="page-refresh-meta" style="margin:8px 0 0;font-size:12px;color:var(--text-muted)">最近加载:<time class="placeholder-refreshed-at">—</time></p>' +
  3717. "</header>" +
  3718. '<section class="panel" style="padding:24px">' +
  3719. '<p style="margin:0;color:var(--text-muted);line-height:1.6">「' +
  3720. title +
  3721. "」模块内容区。可对接 Vue Router、KeepAlive 或 qiankun 子应用。</p>" +
  3722. "</section>"
  3723. );
  3724. }
  3725. function ensurePlaceholderTabPanel(tabId, title) {
  3726. var mount = document.getElementById("tabPanelMount");
  3727. if (!mount) return null;
  3728. var panel = mount.querySelector('.tab-panel[data-tab-id="' + tabId + '"]');
  3729. if (!panel) {
  3730. panel = document.createElement("div");
  3731. panel.className = "tab-panel";
  3732. panel.setAttribute("data-tab-id", tabId);
  3733. panel.id = "tabPanel_" + tabId;
  3734. panel.innerHTML = buildPlaceholderPanel(title);
  3735. mount.appendChild(panel);
  3736. }
  3737. return panel;
  3738. }
  3739. var activeTabId = "delivery";
  3740. function updateTabEmptyState() {
  3741. var empty = document.getElementById("tabEmptyState");
  3742. var strip = document.getElementById("tabsStrip");
  3743. if (!empty || !strip) return;
  3744. var hasAnyTab = !!strip.querySelector(".tab-chip");
  3745. empty.classList.toggle("is-active", !hasAnyTab);
  3746. }
  3747. function activateTabStrip(tabId) {
  3748. activeTabId = tabId || "";
  3749. var strip = document.getElementById("tabsStrip");
  3750. if (strip) {
  3751. strip.querySelectorAll(".tab-chip").forEach(function (chip) {
  3752. var on = chip.getAttribute("data-tab-id") === tabId;
  3753. chip.classList.toggle("is-active", on);
  3754. chip.setAttribute("aria-selected", on ? "true" : "false");
  3755. });
  3756. }
  3757. var mount = document.getElementById("tabPanelMount");
  3758. if (mount) {
  3759. mount.querySelectorAll(".tab-panel").forEach(function (p) {
  3760. p.classList.toggle("is-active", p.getAttribute("data-tab-id") === tabId);
  3761. });
  3762. }
  3763. updateTabEmptyState();
  3764. }
  3765. function ensureTabChip(tabId, title) {
  3766. var strip = document.getElementById("tabsStrip");
  3767. if (!strip) return null;
  3768. var chip = strip.querySelector('.tab-chip[data-tab-id="' + tabId + '"]');
  3769. if (!chip) {
  3770. chip = document.createElement("button");
  3771. chip.type = "button";
  3772. chip.className = "tab-chip";
  3773. chip.setAttribute("data-tab-id", tabId);
  3774. chip.setAttribute("role", "tab");
  3775. chip.setAttribute("aria-selected", "false");
  3776. chip.innerHTML =
  3777. '<span class="tab-chip-label"></span>' +
  3778. '<button type="button" class="tab-chip-close" aria-label="关闭页签" title="关闭">×</button>';
  3779. var label = chip.querySelector(".tab-chip-label");
  3780. if (label) label.textContent = title;
  3781. var closeBtn = chip.querySelector(".tab-chip-close");
  3782. if (closeBtn) {
  3783. closeBtn.addEventListener("click", function (e) {
  3784. e.stopPropagation();
  3785. closeTabById(tabId);
  3786. });
  3787. }
  3788. chip.addEventListener("click", function () {
  3789. activateTabStrip(tabId);
  3790. var crumb = document.getElementById("crumbCurrent");
  3791. if (crumb && label) crumb.textContent = label.textContent;
  3792. document.querySelectorAll(".nav a[data-tab-id]").forEach(function (a) {
  3793. a.classList.toggle("active", a.getAttribute("data-tab-id") === tabId);
  3794. });
  3795. updateBreadcrumbByTab(tabId);
  3796. });
  3797. chip.addEventListener("contextmenu", function (e) {
  3798. e.preventDefault();
  3799. showTabContextMenu(e.clientX, e.clientY, tabId);
  3800. });
  3801. strip.appendChild(chip);
  3802. } else {
  3803. var oldLabel = chip.querySelector(".tab-chip-label");
  3804. if (oldLabel) oldLabel.textContent = title;
  3805. }
  3806. return chip;
  3807. }
  3808. function getTabIdsFromStrip() {
  3809. var strip = document.getElementById("tabsStrip");
  3810. if (!strip) return [];
  3811. return [].map.call(strip.querySelectorAll(".tab-chip"), function (chip) {
  3812. return chip.getAttribute("data-tab-id");
  3813. });
  3814. }
  3815. function closeTabById(tabId) {
  3816. if (!tabId) return;
  3817. var strip = document.getElementById("tabsStrip");
  3818. if (!strip) return;
  3819. var chips = strip.querySelectorAll(".tab-chip");
  3820. if (chips.length <= 1) {
  3821. var fallback = document.querySelector('.nav a[data-tab-id="delivery"]');
  3822. if (fallback) {
  3823. openTabFromMenu("delivery", fallback.textContent.trim());
  3824. }
  3825. return;
  3826. }
  3827. var chip = strip.querySelector('.tab-chip[data-tab-id="' + tabId + '"]');
  3828. if (chip) chip.remove();
  3829. var panel = document.getElementById("tabPanel_" + tabId);
  3830. if (panel) panel.remove();
  3831. var link = document.querySelector('.nav a[data-tab-id="' + tabId + '"]');
  3832. if (link) link.classList.remove("active");
  3833. var ids = getTabIdsFromStrip();
  3834. if (!ids.length) return;
  3835. var nextId = activeTabId === tabId ? ids[Math.max(0, ids.length - 1)] : activeTabId;
  3836. var nextChip = strip.querySelector('.tab-chip[data-tab-id="' + nextId + '"] .tab-chip-label');
  3837. activateTabStrip(nextId);
  3838. var crumb = document.getElementById("crumbCurrent");
  3839. if (crumb && nextChip) crumb.textContent = nextChip.textContent;
  3840. updateBreadcrumbByTab(nextId);
  3841. }
  3842. function getMenuAnchorByTab(tabId) {
  3843. return document.querySelector('.nav a[data-tab-id="' + tabId + '"]');
  3844. }
  3845. function updateBreadcrumbByTab(tabId) {
  3846. var anchor = getMenuAnchorByTab(tabId);
  3847. if (!anchor) return;
  3848. var names = [];
  3849. var details = anchor.closest("details");
  3850. while (details) {
  3851. var summary = details.querySelector(":scope > summary");
  3852. if (summary) names.unshift(summary.textContent.trim());
  3853. details = details.parentElement ? details.parentElement.closest("details") : null;
  3854. }
  3855. var prefix = document.getElementById("crumbPrefix");
  3856. if (prefix) prefix.textContent = names.slice(0, -1).join(" / ") || "业务管理";
  3857. }
  3858. function showTabContextMenu(x, y, tabId) {
  3859. var menu = document.getElementById("tabContextMenu");
  3860. if (!menu) return;
  3861. menu.style.left = x + "px";
  3862. menu.style.top = y + "px";
  3863. menu.setAttribute("data-target-tab-id", tabId);
  3864. menu.classList.add("open");
  3865. }
  3866. function hideTabContextMenu() {
  3867. var menu = document.getElementById("tabContextMenu");
  3868. if (menu) menu.classList.remove("open");
  3869. }
  3870. function refreshTabContent(tabId, title) {
  3871. var panel =
  3872. tabId === "delivery"
  3873. ? document.getElementById("tabPanelDelivery")
  3874. : ensurePlaceholderTabPanel(tabId, title);
  3875. if (!panel) return Promise.resolve();
  3876. panel.classList.add("is-refreshing");
  3877. setTopProgress(true);
  3878. return demoDelay(380 + Math.random() * 220).then(function () {
  3879. panel.classList.remove("is-refreshing");
  3880. setTopProgress(false);
  3881. if (tabId === "delivery") {
  3882. var t = document.getElementById("deliveryRefreshedAt");
  3883. if (t) {
  3884. t.textContent = new Date().toLocaleString("zh-CN", { hour12: false });
  3885. }
  3886. refreshTaskTableTotals();
  3887. } else {
  3888. var pt = panel.querySelector(".placeholder-refreshed-at");
  3889. if (pt) {
  3890. pt.textContent = new Date().toLocaleString("zh-CN", { hour12: false });
  3891. }
  3892. }
  3893. });
  3894. }
  3895. function openTabFromMenu(tabId, title) {
  3896. if (tabId !== "delivery") {
  3897. ensurePlaceholderTabPanel(tabId, title);
  3898. }
  3899. ensureTabChip(tabId, title);
  3900. activateTabStrip(tabId);
  3901. var crumb = document.getElementById("crumbCurrent");
  3902. if (crumb) crumb.textContent = title;
  3903. updateBreadcrumbByTab(tabId);
  3904. document.querySelectorAll(".nav a[data-tab-id]").forEach(function (a) {
  3905. a.classList.toggle("active", a.getAttribute("data-tab-id") === tabId);
  3906. });
  3907. return refreshTabContent(tabId, title);
  3908. }
  3909. (function initMainTabs() {
  3910. var nav = document.querySelector(".nav");
  3911. if (nav) {
  3912. nav.querySelectorAll("a[data-tab-id]").forEach(function (a) {
  3913. a.addEventListener("click", function (e) {
  3914. e.preventDefault();
  3915. var id = a.getAttribute("data-tab-id");
  3916. var title = a.textContent.trim();
  3917. if (id) openTabFromMenu(id, title);
  3918. });
  3919. });
  3920. }
  3921. ensureTabChip("delivery", "配送调度");
  3922. activateTabStrip("delivery");
  3923. updateBreadcrumbByTab("delivery");
  3924. var t0 = document.getElementById("deliveryRefreshedAt");
  3925. if (t0) {
  3926. t0.textContent = new Date().toLocaleString("zh-CN", { hour12: false });
  3927. }
  3928. })();
  3929. (function initHeaderActions() {
  3930. var layout = document.querySelector(".layout");
  3931. var btnToggleSidebar = document.getElementById("btnToggleSidebar");
  3932. var btnRefreshTab = document.getElementById("btnRefreshTab");
  3933. var userMenuTrigger = document.getElementById("userMenuTrigger");
  3934. var userMenuPanel = document.getElementById("userMenuPanel");
  3935. var btnLogout = document.getElementById("btnLogout");
  3936. if (btnToggleSidebar && layout) {
  3937. btnToggleSidebar.addEventListener("click", function () {
  3938. var collapsed = layout.classList.toggle("is-sidebar-collapsed");
  3939. btnToggleSidebar.setAttribute("aria-label", collapsed ? "展开左侧菜单" : "收起左侧菜单");
  3940. });
  3941. }
  3942. if (btnRefreshTab) {
  3943. btnRefreshTab.addEventListener("click", function () {
  3944. var strip = document.getElementById("tabsStrip");
  3945. if (!strip || !activeTabId) return;
  3946. var labelEl = strip.querySelector(
  3947. '.tab-chip[data-tab-id="' + activeTabId + '"] .tab-chip-label'
  3948. );
  3949. var title = labelEl ? labelEl.textContent : "当前页面";
  3950. refreshTabContent(activeTabId, title);
  3951. });
  3952. }
  3953. if (userMenuTrigger && userMenuPanel) {
  3954. userMenuTrigger.addEventListener("click", function (e) {
  3955. e.stopPropagation();
  3956. var open = userMenuPanel.classList.toggle("open");
  3957. userMenuTrigger.setAttribute("aria-expanded", open ? "true" : "false");
  3958. });
  3959. }
  3960. if (btnLogout) {
  3961. btnLogout.addEventListener("click", function () {
  3962. alert("演示:已执行退出登录。接入项目后可在这里清理 token 并跳转登录页。");
  3963. if (userMenuPanel) userMenuPanel.classList.remove("open");
  3964. });
  3965. }
  3966. })();
  3967. (function initTabContextMenuActions() {
  3968. var menu = document.getElementById("tabContextMenu");
  3969. if (!menu) return;
  3970. menu.addEventListener("click", function (e) {
  3971. var actionBtn = e.target.closest("[data-tab-action]");
  3972. if (!actionBtn) return;
  3973. var targetId = menu.getAttribute("data-target-tab-id");
  3974. var ids = getTabIdsFromStrip();
  3975. var idx = ids.indexOf(targetId);
  3976. if (idx < 0) return hideTabContextMenu();
  3977. if (actionBtn.getAttribute("data-tab-action") === "close-left") {
  3978. ids.slice(0, idx).forEach(closeTabById);
  3979. }
  3980. if (actionBtn.getAttribute("data-tab-action") === "close-right") {
  3981. ids.slice(idx + 1).forEach(closeTabById);
  3982. }
  3983. if (actionBtn.getAttribute("data-tab-action") === "close-all") {
  3984. ids.forEach(closeTabById);
  3985. }
  3986. hideTabContextMenu();
  3987. });
  3988. document.addEventListener("click", function () {
  3989. hideTabContextMenu();
  3990. var userMenuPanel = document.getElementById("userMenuPanel");
  3991. var userMenuTrigger = document.getElementById("userMenuTrigger");
  3992. if (userMenuPanel && userMenuPanel.classList.contains("open")) {
  3993. userMenuPanel.classList.remove("open");
  3994. if (userMenuTrigger) userMenuTrigger.setAttribute("aria-expanded", "false");
  3995. }
  3996. });
  3997. })();
  3998. document.addEventListener(
  3999. "click",
  4000. function (e) {
  4001. var btn = e.target.closest("button");
  4002. if (!btn || btn.disabled) return;
  4003. if (btn.classList.contains("input-clear")) return;
  4004. if (btn.classList.contains("tree-expand")) return;
  4005. if (btn.classList.contains("tab-chip")) return;
  4006. if (btn.classList.contains("btn-link")) return;
  4007. if (btn.classList.contains("pager-num") && btn.classList.contains("is-current")) return;
  4008. if (btn.closest(".th-check-inner") && btn.type === "button") return;
  4009. if (
  4010. btn.matches(
  4011. ".btn, .btn-primary, .btn-op, .pager-btn, .btn-icon, .upload-zone-btn, .btn-block"
  4012. )
  4013. ) {
  4014. var wasDisabled = btn.disabled;
  4015. btn.classList.add("is-loading");
  4016. if (!wasDisabled) btn.disabled = true;
  4017. window.clearTimeout(btn._demoLoadT);
  4018. btn._demoLoadT = window.setTimeout(function () {
  4019. btn.classList.remove("is-loading");
  4020. if (!wasDisabled) btn.disabled = false;
  4021. }, 550);
  4022. }
  4023. },
  4024. true
  4025. );
  4026. })();
  4027. </script>
  4028. </body>
  4029. </html>