| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <meta name="theme-color" content="#7C3AED">
- <title>灵活用工 - 智能用工助手</title>
- <link href="https://cdn.jsdelivr.net/npm/remixicon@3.5.0/fonts/remixicon.css" rel="stylesheet">
- <style>
- @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
- :root {
- --primary: #7C3AED;
- --primary-light: #A78BFA;
- --primary-dark: #5B21B6;
- --primary-bg: #F5F3FF;
- --primary-100: #EDE9FE;
- --secondary: #6366F1;
- --accent: #EC4899;
- --success: #10B981;
- --success-light: #D1FAE5;
- --warning: #F59E0B;
- --warning-light: #FEF3C7;
- --danger: #EF4444;
- --danger-light: #FEE2E2;
- --info: #3B82F6;
- --info-light: #DBEAFE;
- --bg: #FAF5FF;
- --surface: #FFFFFF;
- --foreground: #0F172A;
- --gray-50: #F9FAFB;
- --gray-100: #F3F4F6;
- --gray-200: #E5E7EB;
- --gray-300: #D1D5DB;
- --gray-400: #9CA3AF;
- --gray-500: #6B7280;
- --gray-600: #4B5563;
- --gray-700: #374151;
- --gray-800: #1F2937;
- --gray-900: #111827;
- --muted: #64748B;
- --muted-light: #94A3B8;
- --border: #E2E8F0;
- --border-light: #F1F5F9;
- --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
- --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
- --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
- --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.06);
- --radius-sm: 6px;
- --radius-md: 10px;
- --radius-lg: 14px;
- --radius-xl: 20px;
- --radius-full: 9999px;
- --safe-top: env(safe-area-inset-top, 0px);
- --safe-bottom: env(safe-area-inset-bottom, 0px);
- --nav-h: 56px;
- }
- * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
- body {
- font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
- background: var(--bg);
- color: var(--foreground);
- overflow: hidden;
- height: 100dvh;
- width: 100%;
- position: fixed;
- top: 0; left: 0;
- }
- /* ===== APP SHELL ===== */
- .app {
- position: relative;
- width: 100%;
- height: 100dvh;
- max-width: 480px;
- margin: 0 auto;
- background: var(--bg);
- overflow: hidden;
- }
- /* ===== PAGES ===== */
- .page {
- position: absolute;
- top: 0; left: 0; right: 0; bottom: 0;
- display: none;
- flex-direction: column;
- }
- .page.active { display: flex; }
- /* ===== LOGIN PAGE ===== */
- .login-page {
- background: var(--surface);
- padding: 0 24px;
- justify-content: center;
- overflow-y: auto;
- }
- .login-visual {
- background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
- border-radius: var(--radius-xl);
- padding: 32px 24px;
- color: white;
- margin-bottom: 32px;
- position: relative;
- overflow: hidden;
- }
- .login-visual::before {
- content: '';
- position: absolute;
- top: -50%; right: -50%;
- width: 100%; height: 100%;
- background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
- }
- .login-visual h1 {
- font-size: 24px;
- font-weight: 800;
- margin-bottom: 8px;
- position: relative;
- }
- .login-visual p {
- font-size: 15px;
- opacity: 0.9;
- position: relative;
- }
- .login-visual .features {
- margin-top: 20px;
- position: relative;
- }
- .login-visual .feature-item {
- display: flex;
- align-items: center;
- gap: 10px;
- margin-bottom: 10px;
- font-size: 14px;
- }
- .login-visual .feature-item i {
- color: var(--success);
- font-size: 18px;
- }
- .login-card h2 {
- font-size: 22px;
- font-weight: 700;
- margin-bottom: 6px;
- }
- .login-card .subtitle {
- color: var(--gray-500);
- margin-bottom: 24px;
- font-size: 14px;
- }
- .form-group {
- margin-bottom: 16px;
- }
- .form-label {
- display: block;
- font-weight: 600;
- font-size: 13px;
- color: var(--gray-700);
- margin-bottom: 6px;
- }
- .form-input {
- width: 100%;
- height: 48px;
- padding: 0 16px;
- border: 1px solid var(--gray-300);
- border-radius: var(--radius-md);
- font-size: 15px;
- font-family: inherit;
- transition: all 0.15s;
- background: var(--surface);
- color: var(--foreground);
- }
- .form-input:focus {
- outline: none;
- border-color: var(--primary);
- box-shadow: 0 0 0 3px var(--primary-100);
- }
- .form-input::placeholder { color: var(--gray-400); }
- .login-divider {
- display: flex;
- align-items: center;
- gap: 12px;
- margin: 20px 0;
- color: var(--gray-400);
- font-size: 13px;
- }
- .login-divider::before, .login-divider::after {
- content: ''; flex: 1; height: 1px; background: var(--gray-200);
- }
- .wechat-btn {
- width: 100%;
- height: 48px;
- background: #07C160;
- color: white;
- border-radius: var(--radius-md);
- font-size: 15px;
- font-weight: 600;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- cursor: pointer;
- border: none;
- font-family: inherit;
- transition: background 0.15s;
- }
- .wechat-btn:active { background: #06AE56; }
- .btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- padding: 12px 20px;
- border-radius: var(--radius-md);
- font-weight: 600;
- font-size: 14px;
- cursor: pointer;
- transition: all 0.15s;
- border: none;
- font-family: inherit;
- }
- .btn:active { transform: scale(0.97); }
- .btn-primary { background: var(--primary); color: white; }
- .btn-primary:active { background: var(--primary-dark); }
- .btn-secondary { background: var(--surface); color: var(--gray-700); border: 1px solid var(--gray-300); }
- .btn-success { background: var(--success); color: white; }
- .btn-ghost { background: transparent; color: var(--gray-600); }
- .btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }
- .btn-sm { height: 32px; padding: 0 12px; font-size: 12px; }
- .btn-full { width: 100%; }
- /* ===== CHAT PAGE ===== */
- .chat-page {
- flex-direction: column;
- }
- .chat-layout {
- display: flex;
- flex: 1;
- overflow: hidden;
- margin-top: calc(var(--nav-h) + var(--safe-top));
- }
- .chat-sidebar {
- width: 0;
- overflow: hidden;
- background: var(--gray-50);
- border-right: 1px solid var(--border-light);
- transition: width 0.3s cubic-bezier(0.32,0.72,0,1);
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- }
- .chat-sidebar.open {
- width: 240px;
- }
- .sidebar-header {
- padding: 14px 14px 10px;
- border-bottom: 1px solid var(--border-light);
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .sidebar-header h3 {
- font-size: 15px;
- font-weight: 700;
- }
- .new-chat-btn {
- width: 32px; height: 32px;
- border-radius: var(--radius-sm);
- background: var(--primary);
- color: white;
- border: none;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 16px;
- }
- .chat-list {
- flex: 1;
- overflow-y: auto;
- padding: 8px;
- }
- .chat-item {
- padding: 10px 12px;
- border-radius: var(--radius-sm);
- cursor: pointer;
- margin-bottom: 2px;
- transition: background 0.15s;
- }
- .chat-item:active { background: var(--gray-100); }
- .chat-item.active { background: var(--primary-bg); border: 1px solid var(--primary-100); }
- .chat-item-title { font-weight: 600; font-size: 13px; color: var(--gray-800); margin-bottom: 2px; }
- .chat-item-time { font-size: 11px; color: var(--gray-400); }
- .chat-main {
- flex: 1;
- display: flex;
- flex-direction: column;
- min-width: 0;
- overflow: hidden;
- padding-bottom: 68px;
- }
- /* ===== TOP NAV ===== */
- .top-nav {
- position: fixed;
- top: 0; left: 50%;
- transform: translateX(-50%);
- width: 100%; max-width: 480px;
- height: calc(var(--nav-h) + var(--safe-top));
- padding-top: var(--safe-top);
- background: rgba(255,255,255,0.88);
- backdrop-filter: blur(20px);
- -webkit-backdrop-filter: blur(20px);
- border-bottom: 1px solid var(--border-light);
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding-left: 14px; padding-right: 14px;
- z-index: 100;
- }
- .top-nav-title {
- display: flex;
- align-items: center;
- gap: 8px;
- font-weight: 700;
- font-size: 17px;
- }
- .top-nav-title i { font-size: 22px; color: var(--primary); }
- .top-nav-actions { display: flex; align-items: center; gap: 2px; }
- .nav-btn {
- width: 40px; height: 40px;
- border-radius: var(--radius-full);
- border: none;
- background: transparent;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- position: relative;
- font-size: 20px;
- color: var(--gray-500);
- transition: background 0.15s;
- }
- .nav-btn:active { background: var(--primary-bg); }
- .nav-badge {
- position: absolute; top: 4px; right: 4px;
- min-width: 16px; height: 16px;
- background: var(--danger);
- color: white;
- font-size: 10px;
- font-weight: 700;
- border-radius: var(--radius-full);
- display: flex;
- align-items: center;
- justify-content: center;
- border: 2px solid white;
- padding: 0 3px;
- }
- .nav-avatar {
- width: 32px; height: 32px;
- border-radius: var(--radius-full);
- background: linear-gradient(135deg, var(--primary), var(--secondary));
- display: flex;
- align-items: center;
- justify-content: center;
- color: white;
- font-weight: 700;
- font-size: 13px;
- cursor: pointer;
- }
- /* ===== CHAT AREA ===== */
- .chat-area {
- flex: 1;
- overflow-y: auto;
- padding: 16px;
- scroll-behavior: smooth;
- -webkit-overflow-scrolling: touch;
- }
- .chat-msg {
- display: flex;
- gap: 10px;
- margin-bottom: 16px;
- animation: msgIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
- }
- .chat-msg.user { flex-direction: row-reverse; }
- .chat-avatar {
- width: 34px; height: 34px;
- border-radius: var(--radius-full);
- flex-shrink: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 14px;
- }
- .chat-avatar.ai {
- background: linear-gradient(135deg, var(--primary), var(--secondary));
- color: white;
- }
- .chat-avatar.user {
- background: var(--primary-bg);
- color: var(--primary);
- font-weight: 700;
- }
- .chat-bubble {
- max-width: 80%;
- padding: 12px 16px;
- border-radius: var(--radius-lg);
- font-size: 14px;
- line-height: 1.6;
- }
- .chat-msg.ai .chat-bubble {
- background: var(--surface);
- border: 1px solid var(--border-light);
- border-bottom-left-radius: 4px;
- box-shadow: var(--shadow-sm);
- }
- .chat-msg.user .chat-bubble {
- background: var(--primary);
- color: white;
- border-bottom-right-radius: 4px;
- }
- /* ===== BIZ CARDS ===== */
- .biz-card {
- background: var(--surface);
- border: 1px solid var(--border);
- border-radius: var(--radius-md);
- padding: 14px;
- margin-top: 8px;
- box-shadow: var(--shadow-sm);
- cursor: pointer;
- transition: transform 0.15s, box-shadow 0.15s;
- }
- .biz-card:active { transform: scale(0.98); }
- .biz-card-header {
- display: flex; align-items: center; gap: 6px;
- font-weight: 700; font-size: 14px; margin-bottom: 10px;
- }
- .biz-card-header i { font-size: 18px; }
- .biz-card-row {
- display: flex; align-items: center; justify-content: space-between;
- padding: 5px 0; font-size: 13px; color: var(--muted);
- }
- .biz-card-row .val { font-weight: 600; color: var(--foreground); }
- .biz-card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
- .biz-btn {
- display: inline-flex; align-items: center; gap: 4px;
- padding: 7px 12px; border-radius: var(--radius-full);
- border: 1px solid var(--border); background: var(--surface);
- font-size: 12px; font-weight: 600; color: var(--foreground);
- cursor: pointer; transition: all 0.15s; white-space: nowrap;
- font-family: inherit;
- }
- .biz-btn:active { background: var(--primary-bg); border-color: var(--primary-light); }
- .biz-btn i { font-size: 14px; }
- .biz-btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
- .biz-btn.primary:active { background: var(--primary-dark); }
- .report-card { border-left: 3px solid var(--primary); }
- .draft-card { border-left: 3px solid var(--warning); }
- .draft-price {
- font-size: 20px; font-weight: 800; color: var(--primary); margin-top: 6px;
- }
- .draft-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
- /* ===== QUICK ACTIONS ===== */
- .quick-actions {
- display: grid; grid-template-columns: repeat(4,1fr); gap: 8px;
- margin-top: 10px; padding: 10px;
- background: var(--surface); border-radius: var(--radius-md);
- border: 1px solid var(--border-light);
- }
- .quick-action {
- display: flex; flex-direction: column; align-items: center; gap: 4px;
- padding: 8px 4px; border-radius: var(--radius-sm);
- border: none; background: transparent; cursor: pointer;
- transition: background 0.15s;
- }
- .quick-action:active { background: var(--primary-bg); }
- .quick-action-icon {
- width: 36px; height: 36px; border-radius: var(--radius-sm);
- display: flex; align-items: center; justify-content: center;
- font-size: 18px;
- }
- .quick-action-label { font-size: 11px; font-weight: 600; color: var(--muted); text-align: center; }
- /* ===== SUMMARY BUBBLE ===== */
- .summary-bubble {
- display: flex; align-items: center; gap: 8px;
- padding: 10px 14px; background: var(--surface);
- border: 1px solid var(--border-light); border-radius: var(--radius-md);
- margin-bottom: 12px; font-size: 13px; color: var(--muted);
- cursor: pointer; transition: background 0.15s;
- animation: msgIn 0.3s ease both;
- }
- .summary-bubble:active { background: var(--primary-bg); }
- .summary-bubble i { color: var(--success); font-size: 16px; flex-shrink: 0; }
- .summary-bubble .text { font-weight: 600; color: var(--foreground); }
- /* ===== THINKING ===== */
- .thinking {
- display: flex; gap: 10px; margin-bottom: 16px;
- animation: msgIn 0.3s ease both;
- }
- .thinking-dots {
- display: flex; align-items: center; gap: 4px;
- padding: 14px 18px; background: var(--surface);
- border: 1px solid var(--border-light); border-radius: var(--radius-lg);
- border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm);
- }
- .thinking-dots span {
- width: 7px; height: 7px; border-radius: 50%;
- background: var(--primary-light);
- animation: dotPulse 1.4s ease-in-out infinite;
- }
- .thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
- .thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
- @keyframes dotPulse {
- 0%,60%,100% { opacity: 0.3; transform: scale(0.8); }
- 30% { opacity: 1; transform: scale(1.1); }
- }
- /* ===== INPUT BAR ===== */
- .input-bar {
- position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
- width: 100%; max-width: 480px;
- background: rgba(255,255,255,0.92);
- backdrop-filter: blur(20px);
- border-top: 1px solid var(--border-light);
- padding: 10px 12px calc(10px + var(--safe-bottom));
- display: flex; align-items: center; gap: 8px; z-index: 100;
- }
- .input-field {
- flex: 1; height: 44px; padding: 0 16px;
- border-radius: var(--radius-full);
- border: 1px solid var(--border);
- background: var(--surface);
- font-size: 15px; font-family: inherit;
- color: var(--foreground); outline: none;
- transition: border-color 0.15s;
- }
- .input-field:focus { border-color: var(--primary-light); }
- .input-field::placeholder { color: var(--muted-light); }
- .icon-btn {
- width: 44px; height: 44px;
- border-radius: var(--radius-full); border: none;
- display: flex; align-items: center; justify-content: center;
- cursor: pointer; transition: all 0.15s; flex-shrink: 0;
- font-size: 22px;
- }
- .voice-btn { background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
- .voice-btn:active { background: var(--primary-bg); }
- .send-btn { background: var(--primary); color: white; opacity: 0.4; pointer-events: none; }
- .send-btn.active { opacity: 1; pointer-events: auto; }
- .send-btn:active { background: var(--primary-dark); }
- .send-btn i { font-size: 18px; }
- .confirm-btn {
- background: var(--success); color: white; opacity: 0.4; pointer-events: none;
- }
- .confirm-btn.active { opacity: 1; pointer-events: auto; }
- .confirm-btn:active { background: #059669; }
- .confirm-btn i { font-size: 18px; }
- /* ===== OVERLAY & BOTTOM SHEET ===== */
- .overlay {
- position: fixed; top: 0; left: 0; right: 0; bottom: 0;
- background: rgba(0,0,0,0.45); z-index: 200;
- opacity: 0; pointer-events: none; transition: opacity 0.3s;
- }
- .overlay.active { opacity: 1; pointer-events: auto; }
- .bottom-sheet {
- position: fixed; bottom: 0; left: 50%;
- transform: translateX(-50%) translateY(100%);
- width: 100%; max-width: 480px; max-height: 85dvh;
- background: var(--surface);
- border-radius: var(--radius-xl) var(--radius-xl) 0 0;
- z-index: 210;
- transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
- overflow: hidden; display: flex; flex-direction: column;
- }
- .bottom-sheet.active { transform: translateX(-50%) translateY(0); }
- .sheet-handle {
- display: flex; justify-content: center; padding: 10px 0 6px; cursor: grab;
- }
- .sheet-handle::after {
- content: ''; width: 36px; height: 4px; border-radius: 2px; background: var(--border);
- }
- .sheet-header {
- display: flex; align-items: center; justify-content: space-between;
- padding: 4px 20px 12px; border-bottom: 1px solid var(--border-light);
- }
- .sheet-title {
- font-size: 17px; font-weight: 700;
- display: flex; align-items: center; gap: 8px;
- }
- .sheet-title i { font-size: 20px; }
- .sheet-badge {
- font-size: 11px; font-weight: 600; padding: 2px 8px;
- border-radius: var(--radius-full); background: var(--warning); color: white;
- }
- .sheet-source {
- font-size: 12px; color: var(--muted); padding: 6px 20px 10px;
- display: flex; align-items: center; gap: 4px;
- }
- .sheet-source i { font-size: 14px; }
- .sheet-body {
- flex: 1; overflow-y: auto; padding: 0 20px 20px;
- -webkit-overflow-scrolling: touch;
- }
- .sheet-footer {
- padding: 12px 20px calc(12px + var(--safe-bottom));
- border-top: 1px solid var(--border-light);
- display: flex; gap: 10px;
- }
- /* ===== FORM IN SHEET ===== */
- .form-section {
- background: var(--gray-50); border-radius: var(--radius-md);
- padding: 14px; margin-bottom: 14px; border: 1px solid var(--border-light);
- }
- .form-section-title {
- display: flex; align-items: center; justify-content: space-between;
- font-size: 14px; font-weight: 700; margin-bottom: 10px;
- }
- .form-section-title .edit-btn {
- font-size: 12px; color: var(--primary); cursor: pointer;
- font-weight: 600; background: none; border: none; padding: 2px 6px;
- font-family: inherit;
- }
- .form-row {
- display: flex; justify-content: space-between; align-items: center;
- padding: 6px 0; font-size: 14px;
- }
- .form-row .label { color: var(--muted); }
- .form-row .value { font-weight: 600; }
- .form-row .value.highlight { color: var(--primary); font-size: 16px; }
- /* ===== NL INPUT IN SHEET ===== */
- .nl-input-section {
- margin: 12px 0; padding: 12px;
- background: var(--primary-bg); border-radius: var(--radius-md);
- border: 1px dashed var(--primary-light);
- }
- .nl-input-label {
- font-size: 13px; color: var(--primary); font-weight: 600;
- margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
- }
- .nl-input {
- width: 100%; min-height: 44px; padding: 10px 14px;
- border: 1px solid var(--primary-light); border-radius: var(--radius-sm);
- font-size: 14px; font-family: inherit; color: var(--foreground);
- background: white; outline: none; resize: none;
- }
- .nl-input::placeholder { color: var(--muted-light); }
- .nl-input-actions {
- display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end;
- }
- /* ===== COST CARD ===== */
- .cost-card {
- background: var(--gray-50); border: 1px solid var(--border-light);
- border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px;
- position: relative;
- }
- .cost-card.recommended {
- border: 2px solid var(--primary); background: var(--primary-bg);
- }
- .cost-card.recommended::before {
- content: '推荐'; position: absolute; top: -1px; right: 12px;
- background: var(--primary); color: white; font-size: 11px; font-weight: 700;
- padding: 2px 10px; border-radius: 0 0 8px 8px;
- }
- .cost-card-title {
- font-size: 15px; font-weight: 700; margin-bottom: 12px;
- display: flex; align-items: center; gap: 6px;
- }
- .cost-total { font-size: 28px; font-weight: 800; color: var(--primary); margin-bottom: 4px; }
- .cost-row {
- display: flex; justify-content: space-between; padding: 5px 0;
- font-size: 13px; color: var(--muted);
- }
- .cost-row .val { font-weight: 600; color: var(--foreground); }
- /* ===== COMPLIANCE ===== */
- .compliance {
- display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
- padding-top: 12px; border-top: 1px solid var(--border-light);
- }
- .compliance-badge {
- display: inline-flex; align-items: center; gap: 4px;
- padding: 4px 10px; border-radius: var(--radius-full);
- background: var(--success-light); font-size: 12px;
- font-weight: 600; color: #065F46;
- }
- .compliance-badge i { font-size: 14px; }
- /* ===== PROGRESS ===== */
- .progress-bar-wrap { margin: 10px 0; }
- .progress-label {
- display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px;
- }
- .progress-label .text { color: var(--muted); }
- .progress-label .count { font-weight: 700; color: var(--primary); }
- .progress-track {
- height: 8px; background: var(--border-light); border-radius: 4px; overflow: hidden;
- }
- .progress-fill {
- height: 100%; background: linear-gradient(90deg, var(--primary), var(--secondary));
- border-radius: 4px; transition: width 0.6s cubic-bezier(0.34,1.56,0.64,1);
- }
- /* ===== TIMELINE ===== */
- .timeline { padding: 0; list-style: none; }
- .timeline-item {
- display: flex; gap: 12px; padding: 8px 0; position: relative;
- }
- .timeline-item:not(:last-child)::after {
- content: ''; position: absolute; left: 11px; top: 28px; bottom: -4px;
- width: 2px; background: var(--border-light);
- }
- .timeline-dot {
- width: 24px; height: 24px; border-radius: 50%;
- display: flex; align-items: center; justify-content: center;
- flex-shrink: 0; background: var(--border-light); font-size: 12px;
- }
- .timeline-dot.done { background: var(--success-light); color: var(--success); }
- .timeline-dot.active { background: var(--warning-light); color: var(--warning); }
- .timeline-content { flex: 1; font-size: 13px; }
- .timeline-content .title { font-weight: 600; }
- .timeline-content .time { color: var(--muted-light); font-size: 12px; }
- /* ===== PERSON LIST ===== */
- .person-item {
- display: flex; align-items: center; gap: 10px;
- padding: 10px 0; border-bottom: 1px solid var(--border-light);
- }
- .person-item:last-child { border-bottom: none; }
- .person-avatar {
- width: 36px; height: 36px; border-radius: 50%;
- background: var(--primary-bg); display: flex; align-items: center;
- justify-content: center; font-size: 14px; font-weight: 700;
- color: var(--primary); flex-shrink: 0;
- }
- .person-info { flex: 1; }
- .person-name { font-size: 14px; font-weight: 600; }
- .person-detail { font-size: 12px; color: var(--muted); }
- .person-status {
- font-size: 12px; font-weight: 600; padding: 3px 10px;
- border-radius: var(--radius-full); white-space: nowrap;
- }
- .person-status.done { background: var(--success-light); color: #065F46; }
- .person-status.pending { background: var(--warning-light); color: #92400E; }
- .person-status.fail { background: var(--danger-light); color: #991B1B; }
- .person-status.review { background: var(--info-light); color: #1E40AF; }
- /* ===== MODAL ===== */
- .modal-overlay {
- position: fixed; top: 0; left: 0; right: 0; bottom: 0;
- background: rgba(0,0,0,0.45); z-index: 300;
- opacity: 0; pointer-events: none; transition: opacity 0.3s;
- }
- .modal-overlay.active { opacity: 1; pointer-events: auto; }
- .modal {
- position: fixed; top: 50%; left: 50%;
- transform: translate(-50%,-50%) scale(0.9);
- width: calc(100% - 48px); max-width: 360px;
- background: var(--surface); border-radius: var(--radius-lg);
- z-index: 310; opacity: 0; pointer-events: none;
- transition: all 0.25s cubic-bezier(0.34,1.56,0.64,1);
- box-shadow: var(--shadow-xl); overflow: hidden;
- }
- .modal.active {
- opacity: 1; pointer-events: auto;
- transform: translate(-50%,-50%) scale(1);
- }
- .modal-body { padding: 24px 20px; text-align: center; }
- .modal-icon {
- width: 56px; height: 56px; border-radius: 50%;
- margin: 0 auto 14px; display: flex; align-items: center;
- justify-content: center; font-size: 28px;
- }
- .modal-icon.success { background: var(--success-light); color: var(--success); }
- .modal-icon.warning { background: var(--warning-light); color: var(--warning); }
- .modal-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
- .modal-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
- .modal-footer {
- display: flex; gap: 10px; padding: 0 20px 20px;
- }
- .modal-btn {
- flex: 1; height: 44px; border-radius: var(--radius-sm); border: none;
- font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
- transition: all 0.15s;
- }
- .modal-btn.cancel { background: var(--gray-100); color: var(--foreground); }
- .modal-btn.confirm { background: var(--primary); color: white; }
- .modal-btn:active { opacity: 0.85; }
- /* ===== QR MODAL ===== */
- .qr-area {
- width: 180px; height: 180px; margin: 16px auto;
- background: white; border: 2px solid var(--border);
- border-radius: var(--radius-md); display: flex;
- align-items: center; justify-content: center;
- }
- .qr-area svg { width: 140px; height: 140px; color: var(--foreground); }
- .qr-actions {
- display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px;
- }
- .qr-action {
- display: flex; align-items: center; justify-content: center; gap: 6px;
- padding: 10px; border-radius: var(--radius-sm);
- border: 1px solid var(--border); background: var(--surface);
- font-size: 13px; font-weight: 600; color: var(--foreground);
- cursor: pointer; transition: all 0.15s; font-family: inherit;
- }
- .qr-action:active { background: var(--primary-bg); }
- .qr-action i { font-size: 16px; }
- /* ===== SIDE DRAWER ===== */
- .side-drawer {
- position: fixed; top: 0; right: 0;
- width: 82%; max-width: 360px; height: 100dvh;
- background: var(--surface); z-index: 215;
- transform: translateX(100%);
- transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
- display: flex; flex-direction: column;
- box-shadow: -10px 0 30px rgba(0,0,0,0.1);
- }
- .side-drawer.active { transform: translateX(0); }
- .drawer-header {
- padding: 20px 20px 16px; border-bottom: 1px solid var(--border-light);
- }
- .drawer-title {
- font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px;
- }
- .drawer-title i { font-size: 20px; }
- .drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
- .drawer-section-title {
- font-size: 12px; font-weight: 700; color: var(--muted);
- text-transform: uppercase; letter-spacing: 0.5px;
- margin-bottom: 10px; margin-top: 16px;
- }
- .drawer-section-title:first-child { margin-top: 0; }
- .msg-item {
- padding: 12px; border-radius: var(--radius-sm);
- border: 1px solid var(--border-light); margin-bottom: 8px;
- cursor: pointer; transition: background 0.15s;
- }
- .msg-item:active { background: var(--primary-bg); }
- .msg-item-header {
- display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px;
- }
- .msg-type {
- font-size: 11px; font-weight: 700; padding: 2px 8px;
- border-radius: var(--radius-full);
- }
- .msg-type.pending { background: var(--warning-light); color: #92400E; }
- .msg-type.error { background: var(--danger-light); color: #991B1B; }
- .msg-type.info { background: var(--info-light); color: #1E40AF; }
- .msg-time { font-size: 11px; color: var(--muted-light); }
- .msg-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
- .msg-desc { font-size: 13px; color: var(--muted); }
- .msg-action {
- margin-top: 8px; display: inline-flex; align-items: center; gap: 4px;
- font-size: 13px; font-weight: 600; color: var(--primary);
- background: none; border: none; cursor: pointer; padding: 0;
- font-family: inherit;
- }
- .msg-action i { font-size: 14px; }
- /* ===== PROFILE ===== */
- .profile-card {
- background: var(--primary-bg); border-radius: var(--radius-md);
- padding: 16px; margin-bottom: 16px; text-align: center;
- }
- .profile-avatar-lg {
- width: 60px; height: 60px; border-radius: 50%;
- background: linear-gradient(135deg, var(--primary), var(--secondary));
- margin: 0 auto 10px; display: flex; align-items: center;
- justify-content: center; color: white; font-size: 22px; font-weight: 800;
- }
- .profile-name { font-size: 16px; font-weight: 700; }
- .profile-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
- .profile-status-badge {
- display: inline-flex; align-items: center; gap: 4px;
- padding: 3px 10px; border-radius: var(--radius-full);
- background: var(--success-light); color: #065F46;
- font-size: 12px; font-weight: 600; margin-top: 8px;
- }
- .profile-menu-item {
- display: flex; align-items: center; gap: 12px;
- padding: 14px; border-radius: var(--radius-sm);
- cursor: pointer; transition: background 0.15s;
- }
- .profile-menu-item:active { background: var(--primary-bg); }
- .profile-menu-icon {
- width: 36px; height: 36px; border-radius: var(--radius-sm);
- display: flex; align-items: center; justify-content: center;
- flex-shrink: 0; font-size: 18px;
- }
- .profile-menu-text { flex: 1; }
- .profile-menu-title { font-size: 14px; font-weight: 600; }
- .profile-menu-desc { font-size: 12px; color: var(--muted); }
- .profile-menu-arrow { color: var(--muted-light); font-size: 18px; }
- .profile-divider { height: 1px; background: var(--border-light); margin: 8px 0; }
- /* ===== WORKER REG ===== */
- .worker-step-indicator {
- display: flex; align-items: center; gap: 6px; padding: 0 20px 14px;
- }
- .worker-step {
- flex: 1; height: 4px; border-radius: 2px; background: var(--border-light);
- }
- .worker-step.active { background: var(--primary); }
- .worker-step.done { background: var(--success); }
- /* ===== SETTLEMENT ===== */
- .settlement-row {
- display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px;
- }
- .settlement-row.total {
- border-top: 2px solid var(--border); margin-top: 6px;
- padding-top: 10px; font-weight: 700; font-size: 16px;
- }
- .settlement-row .label { color: var(--muted); }
- .settlement-row .val { font-weight: 600; }
- .settlement-row.total .val { color: var(--primary); }
- /* ===== ATTENDANCE ===== */
- .attendance-row {
- display: flex; align-items: center; gap: 10px;
- padding: 10px; border-bottom: 1px solid var(--border-light);
- }
- .attendance-avatar {
- width: 32px; height: 32px; border-radius: 50%;
- background: var(--primary-bg); display: flex; align-items: center;
- justify-content: center; font-size: 12px; font-weight: 700;
- color: var(--primary); flex-shrink: 0;
- }
- .attendance-info { flex: 1; }
- .attendance-name { font-size: 14px; font-weight: 600; }
- .attendance-role { font-size: 12px; color: var(--muted); }
- .attendance-stat { text-align: right; }
- .attendance-stat .hours { font-size: 16px; font-weight: 700; }
- .attendance-stat .label { font-size: 11px; color: var(--muted); }
- .attendance-stat .overtime { color: var(--warning); }
- .attendance-stat .leave { color: var(--danger); }
- /* ===== SWIPE INDICATOR ===== */
- .swipe-indicator {
- display: flex; align-items: center; justify-content: center;
- gap: 8px; padding: 6px 0; font-size: 12px; color: var(--muted-light);
- }
- .dot-indicator {
- display: flex; gap: 6px; justify-content: center; padding: 8px 0;
- }
- .dot-indicator span {
- width: 6px; height: 6px; border-radius: 50%; background: var(--border);
- }
- .dot-indicator span.active {
- background: var(--primary); width: 18px; border-radius: 3px;
- }
- /* ===== TOAST ===== */
- #toast {
- position: fixed; top: 80px; left: 50%;
- transform: translateX(-50%) translateY(-20px);
- background: var(--foreground); color: white;
- padding: 10px 20px; border-radius: var(--radius-full);
- font-size: 14px; font-weight: 600; z-index: 999;
- opacity: 0; pointer-events: none; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
- white-space: nowrap; box-shadow: var(--shadow-lg);
- }
- /* ===== CONFIG DIALOG (OVERLAY ON PROFILE) ===== */
- .config-overlay {
- position: fixed; top: 0; left: 0; right: 0; bottom: 0;
- background: rgba(0,0,0,0.45); z-index: 400;
- opacity: 0; pointer-events: none; transition: opacity 0.3s;
- }
- .config-overlay.active { opacity: 1; pointer-events: auto; }
- .config-sheet {
- position: fixed; bottom: 0; left: 50%;
- transform: translateX(-50%) translateY(100%);
- width: 100%; max-width: 480px; max-height: 75dvh;
- background: var(--surface);
- border-radius: var(--radius-xl) var(--radius-xl) 0 0;
- z-index: 410;
- transition: transform 0.35s cubic-bezier(0.32,0.72,0,1);
- overflow: hidden; display: flex; flex-direction: column;
- }
- .config-sheet.active { transform: translateX(-50%) translateY(0); }
- /* ===== WORKER WALLET ===== */
- .wallet-header {
- background: linear-gradient(135deg, var(--primary), var(--primary-dark));
- border-radius: var(--radius-xl); padding: 24px 20px; color: white;
- margin-bottom: 16px; position: relative; overflow: hidden;
- }
- .wallet-header::before {
- content: ''; position: absolute; top: -30%; right: -20%;
- width: 60%; height: 80%; border-radius: 50%;
- background: rgba(255,255,255,0.08);
- }
- .wallet-header::after {
- content: ''; position: absolute; bottom: -40%; left: -10%;
- width: 50%; height: 70%; border-radius: 50%;
- background: rgba(255,255,255,0.05);
- }
- .wallet-name { font-size: 18px; font-weight: 700; position: relative; }
- .wallet-phone { font-size: 13px; opacity: 0.8; margin-top: 2px; position: relative; }
- .wallet-status {
- display: inline-flex; align-items: center; gap: 4px;
- padding: 3px 10px; border-radius: var(--radius-full);
- background: rgba(255,255,255,0.2); font-size: 12px; font-weight: 600;
- margin-top: 8px; position: relative;
- }
- .wallet-balance {
- margin-top: 16px; position: relative;
- }
- .wallet-balance-label { font-size: 13px; opacity: 0.8; margin-bottom: 4px; }
- .wallet-balance-amount {
- font-size: 32px; font-weight: 800; letter-spacing: -1px;
- font-variant-numeric: tabular-nums;
- }
- .wallet-section {
- background: white; border-radius: var(--radius-lg);
- padding: 4px 0; margin-bottom: 12px;
- box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
- }
- .wallet-section-title {
- font-size: 14px; font-weight: 700; padding: 14px 16px 8px;
- display: flex; align-items: center; gap: 8px;
- }
- .wallet-section-title i { font-size: 18px; }
- .wallet-menu-item {
- display: flex; align-items: center; gap: 12px;
- padding: 14px 16px; cursor: pointer; transition: background 0.15s;
- }
- .wallet-menu-item:active { background: var(--gray-50); }
- .wallet-menu-icon {
- width: 38px; height: 38px; border-radius: var(--radius-sm);
- display: flex; align-items: center; justify-content: center;
- flex-shrink: 0; font-size: 18px;
- }
- .wallet-menu-text { flex: 1; }
- .wallet-menu-title { font-size: 14px; font-weight: 600; }
- .wallet-menu-desc { font-size: 12px; color: var(--muted); margin-top: 1px; }
- .wallet-menu-badge {
- font-size: 11px; font-weight: 700; padding: 2px 8px;
- border-radius: var(--radius-full); background: var(--primary-bg);
- color: var(--primary);
- }
- .wallet-menu-arrow { color: var(--muted-light); font-size: 18px; }
- .wallet-record {
- display: flex; align-items: center; gap: 12px;
- padding: 12px 16px; border-bottom: 1px solid var(--border-light);
- }
- .wallet-record:last-child { border-bottom: none; }
- .wallet-record-icon {
- width: 32px; height: 32px; border-radius: 50%;
- background: var(--success-light); display: flex;
- align-items: center; justify-content: center;
- font-size: 14px; color: var(--success); flex-shrink: 0;
- }
- .wallet-record-info { flex: 1; }
- .wallet-record-title { font-size: 14px; font-weight: 600; }
- .wallet-record-meta { font-size: 12px; color: var(--muted); }
- .wallet-record-amount { font-size: 15px; font-weight: 700; color: var(--success); }
- .wallet-help-card {
- background: var(--warning-light); border-radius: var(--radius-lg);
- padding: 16px; margin-bottom: 16px; border: 1px solid rgba(245,158,11,0.2);
- }
- .wallet-help-title {
- font-size: 14px; font-weight: 700; margin-bottom: 4px;
- display: flex; align-items: center; gap: 6px;
- }
- /* ===== ANIMATIONS ===== */
- @keyframes msgIn {
- from { opacity: 0; transform: translateY(12px); }
- to { opacity: 1; transform: translateY(0); }
- }
- @keyframes progressGrow { from { width: 0; } }
- @keyframes countUp {
- from { opacity: 0; transform: translateY(8px); }
- to { opacity: 1; transform: translateY(0); }
- }
- /* ===== BOTTOM NAV ===== */
- .bottom-nav {
- position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
- width: 100%; max-width: 480px;
- background: rgba(255,255,255,0.92);
- backdrop-filter: blur(20px);
- border-top: 1px solid var(--border-light);
- display: flex; padding: 6px 0 calc(6px + var(--safe-bottom));
- z-index: 100;
- }
- .bottom-nav-item {
- flex: 1; display: flex; flex-direction: column; align-items: center;
- gap: 2px; padding: 6px 0; border: none; background: transparent;
- cursor: pointer; font-family: inherit; transition: color 0.15s;
- color: var(--gray-400);
- }
- .bottom-nav-item.active { color: var(--primary); }
- .bottom-nav-item i { font-size: 22px; }
- .bottom-nav-item span { font-size: 11px; font-weight: 600; }
- @media (min-width: 481px) {
- .app { border-left: 1px solid var(--border-light); border-right: 1px solid var(--border-light); }
- }
- </style>
- </head>
- <body>
- <div class="app" id="app">
- <!-- ===== LOGIN PAGE ===== -->
- <div class="page login-page active" id="pageLogin">
- <div class="login-visual">
- <h1>智能用工,轻松管理</h1>
- <p>AI驱动的企业灵活用工一站式解决方案</p>
- <div class="features">
- <div class="feature-item"><i class="ri-check-line"></i><span>对话式操作,无需复杂表单</span></div>
- <div class="feature-item"><i class="ri-check-line"></i><span>智能草稿生成,一键确认</span></div>
- <div class="feature-item"><i class="ri-check-line"></i><span>成本透明对比,精打细算</span></div>
- <div class="feature-item"><i class="ri-check-line"></i><span>全流程合规,安全可追溯</span></div>
- </div>
- </div>
- <div class="login-card">
- <h2>欢迎回来</h2>
- <p class="subtitle">请选择您的身份登录</p>
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px;">
- <button class="btn btn-lg btn-full" id="loginTabEnterprise" onclick="switchLoginTab('enterprise')" style="background:var(--primary);color:white;border:2px solid var(--primary);">
- <i class="ri-building-line"></i> 企业登录
- </button>
- <button class="btn btn-lg btn-full" id="loginTabWorker" onclick="switchLoginTab('worker')" style="background:var(--surface);color:var(--gray-600);border:2px solid var(--border);">
- <i class="ri-user-line"></i> 临时工登录
- </button>
- </div>
- <!-- Enterprise Login Form -->
- <div id="loginFormEnterprise">
- <div class="form-group">
- <label class="form-label">企业名称</label>
- <input class="form-input" type="text" placeholder="请输入企业名称或统一社会信用代码">
- </div>
- <div class="form-group">
- <label class="form-label">登录手机号</label>
- <input class="form-input" type="tel" placeholder="请输入手机号">
- </div>
- <div class="form-group">
- <label class="form-label">验证码</label>
- <div style="display:flex;gap:10px;">
- <input class="form-input" type="text" placeholder="请输入验证码" style="flex:1;">
- <button class="btn btn-secondary" style="white-space:nowrap;">获取验证码</button>
- </div>
- </div>
- <button class="btn btn-primary btn-lg btn-full" style="margin-top:12px;" onclick="goTo('chat')">
- <i class="ri-login-box-line"></i> 登录并绑定企业
- </button>
- <div class="login-divider">或</div>
- <button class="wechat-btn" onclick="goTo('chat')">
- <i class="ri-wechat-line"></i> 微信快捷登录
- </button>
- </div>
- <!-- Worker Login Form -->
- <div id="loginFormWorker" style="display:none;">
- <div class="form-group">
- <label class="form-label">手机号</label>
- <input class="form-input" type="tel" placeholder="请输入手机号">
- </div>
- <div class="form-group">
- <label class="form-label">验证码</label>
- <div style="display:flex;gap:10px;">
- <input class="form-input" type="text" placeholder="请输入验证码" style="flex:1;">
- <button class="btn btn-secondary" style="white-space:nowrap;">获取验证码</button>
- </div>
- </div>
- <button class="btn btn-primary btn-lg btn-full" style="margin-top:12px;" onclick="goTo('worker')">
- <i class="ri-user-add-line"></i> 登记并扫码入场
- </button>
- <p style="text-align:center;margin-top:16px;font-size:13px;color:var(--gray-500);">
- 首次登录将自动创建临时工档案
- </p>
- </div>
- <p style="text-align:center;margin-top:16px;font-size:13px;color:var(--gray-500);">
- 登录即同意 <a href="#" style="color:var(--primary);">服务协议</a> 和 <a href="#" style="color:var(--primary);">隐私政策</a>
- </p>
- </div>
- </div>
- <!-- ===== CHAT PAGE ===== -->
- <div class="page chat-page" id="pageChat">
- <div class="top-nav">
- <div class="top-nav-title">
- <button class="nav-btn" onclick="toggleSidebar()" style="width:36px;height:36px;font-size:20px;">
- <i class="ri-menu-line"></i>
- </button>
- 智能用工助手
- </div>
- <div class="top-nav-actions">
- <button class="nav-btn" onclick="startNewChat()" aria-label="新对话">
- <i class="ri-add-line"></i>
- </button>
- <button class="nav-btn" onclick="toggleDrawer('message')" aria-label="消息">
- <i class="ri-notification-3-line"></i>
- <span class="nav-badge">2</span>
- </button>
- <div class="nav-avatar" onclick="toggleDrawer('profile')">张</div>
- </div>
- </div>
- <div class="chat-layout">
- <div class="chat-sidebar" id="chatSidebar">
- <div class="sidebar-header">
- <h3>对话列表</h3>
- <button class="new-chat-btn" onclick="startNewChat()"><i class="ri-add-line"></i></button>
- </div>
- <div class="chat-list" id="chatList">
- <div class="chat-item active" onclick="switchChat(this,'employment')">
- <div class="chat-item-title">用工需求咨询</div>
- <div class="chat-item-time">今天 14:30</div>
- </div>
- <div class="chat-item" onclick="switchChat(this,'knowledge')">
- <div class="chat-item-title">用工知识咨询</div>
- <div class="chat-item-time">今天 10:15</div>
- </div>
- <div class="chat-item" onclick="switchChat(this,'order')">
- <div class="chat-item-title">用工订单管理</div>
- <div class="chat-item-time">昨天 16:20</div>
- </div>
- <div class="chat-item" onclick="switchChat(this,'cost')">
- <div class="chat-item-title">成本测算</div>
- <div class="chat-item-time">3天前</div>
- </div>
- <div class="chat-item" onclick="switchChat(this,'attendance')">
- <div class="chat-item-title">现场考勤记录</div>
- <div class="chat-item-time">3天前</div>
- </div>
- <div class="chat-item" onclick="switchChat(this,'emergency')">
- <div class="chat-item-title">紧急事件处理</div>
- <div class="chat-item-time">1周前</div>
- </div>
- </div>
- </div>
- <div class="chat-main">
- <div class="chat-area" id="chatArea"></div>
- </div>
- </div>
- <div class="input-bar">
- <button class="icon-btn voice-btn" onclick="showToast('按住说话...')"><i class="ri-mic-line"></i></button>
- <input class="input-field" id="chatInput" type="text" placeholder="输入需求或按住说话..." oninput="toggleSendBtn()" onkeydown="if(event.key==='Enter')sendMsg()">
- <button class="icon-btn send-btn" id="sendBtn" onclick="sendMsg()"><i class="ri-send-plane-fill"></i></button>
- </div>
- </div>
- <!-- ===== WORKER REG PAGE ===== -->
- <div class="page" id="pageWorker" style="background:var(--gray-50);overflow-y:auto;">
- <div class="top-nav">
- <div class="top-nav-title">
- <button class="nav-btn" onclick="goTo('chat')" style="width:36px;height:36px;font-size:20px;">
- <i class="ri-arrow-left-line"></i>
- </button>
- 临时工登记
- </div>
- <div class="top-nav-actions"></div>
- </div>
- <div style="padding:calc(var(--nav-h) + var(--safe-top) + 16px) 20px 20px;">
- <div style="background:white;border-radius:var(--radius-xl);padding:24px;box-shadow:var(--shadow-lg);margin-bottom:16px;">
- <div style="text-align:center;margin-bottom:24px;">
- <div style="width:64px;height:64px;border-radius:50%;background:var(--primary-bg);margin:0 auto 12px;display:flex;align-items:center;justify-content:center;font-size:28px;color:var(--primary);">
- <i class="ri-user-add-line"></i>
- </div>
- <h2 style="font-size:20px;font-weight:700;">临时工登记</h2>
- <p style="font-size:14px;color:var(--muted);">请填写您的个人信息完成登记</p>
- </div>
- <div class="form-group">
- <label class="form-label">真实姓名 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入身份证上的姓名">
- </div>
- <div class="form-group">
- <label class="form-label">身份证号 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入18位身份证号码">
- </div>
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;">
- <div class="form-group">
- <label class="form-label">手机号 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入手机号">
- </div>
- <div class="form-group">
- <label class="form-label">验证码 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入验证码">
- </div>
- </div>
- <div class="form-group">
- <label class="form-label">银行卡号 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入银行卡号">
- </div>
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;">
- <div class="form-group">
- <label class="form-label">开户银行 <span style="color:var(--danger);">*</span></label>
- <input class="form-input" placeholder="请输入开户银行">
- </div>
- <div class="form-group">
- <label class="form-label">支行名称</label>
- <input class="form-input" placeholder="请输入支行名称">
- </div>
- </div>
- <label style="display:flex;align-items:flex-start;gap:8px;cursor:pointer;margin-bottom:16px;">
- <input type="checkbox" style="margin-top:4px;">
- <span style="font-size:13px;color:var(--gray-600);">
- 我已阅读并同意 <a href="#" style="color:var(--primary);">《电子劳动合同》</a> 和 <a href="#" style="color:var(--primary);">《隐私政策》</a>
- </span>
- </label>
- <button class="btn btn-primary btn-lg btn-full" onclick="showToast('登记成功!');goTo('wallet')">
- <i class="ri-check-line"></i> 提交登记
- </button>
- <p style="text-align:center;margin-top:12px;font-size:12px;color:var(--gray-400);">
- 您的信息将被加密存储,仅用于本次用工服务
- </p>
- </div>
- </div>
- </div>
- <!-- ===== WALLET PAGE (临时工端) ===== -->
- <div class="page" id="pageWallet" style="background:var(--gray-50);overflow-y:auto;">
- <div class="top-nav">
- <div class="top-nav-title">
- <button class="nav-btn" onclick="goTo('worker')" style="width:36px;height:36px;font-size:20px;">
- <i class="ri-arrow-left-line"></i>
- </button>
- 我的钱包
- </div>
- <div class="top-nav-actions">
- <button class="nav-btn" onclick="showToast('已刷新')"><i class="ri-refresh-line"></i></button>
- </div>
- </div>
- <div style="padding:calc(var(--nav-h) + var(--safe-top) + 16px) 16px 40px;">
- <div class="wallet-header">
- <div class="wallet-name">王五</div>
- <div class="wallet-phone">137****9012</div>
- <div class="wallet-status"><i class="ri-check-line"></i> 已实名核验</div>
- <div class="wallet-balance">
- <div class="wallet-balance-label">累计薪资(元)</div>
- <div class="wallet-balance-amount" id="salaryAmount">¥0</div>
- </div>
- </div>
- <div class="wallet-section">
- <div class="wallet-section-title"><i class="ri-wallet-3-line" style="color:var(--primary);"></i> 我的钱包</div>
- <div class="wallet-menu-item" onclick="showToast('电子合同详情')">
- <div class="wallet-menu-icon" style="background:var(--info-light);"><i class="ri-file-text-line" style="color:var(--info);"></i></div>
- <div class="wallet-menu-text">
- <div class="wallet-menu-title">电子合同</div>
- <div class="wallet-menu-desc">2份已签署</div>
- </div>
- <div class="wallet-menu-badge">2份</div>
- <div class="wallet-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="wallet-menu-item" onclick="showToast('薪资明细详情')">
- <div class="wallet-menu-icon" style="background:var(--success-light);"><i class="ri-money-cny-circle-line" style="color:var(--success);"></i></div>
- <div class="wallet-menu-text">
- <div class="wallet-menu-title">薪资明细</div>
- <div class="wallet-menu-desc">累计 ¥3,500</div>
- </div>
- <div class="wallet-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="wallet-menu-item" onclick="showToast('完税证明下载')">
- <div class="wallet-menu-icon" style="background:var(--warning-light);"><i class="ri-file-list-2-line" style="color:var(--warning);"></i></div>
- <div class="wallet-menu-text">
- <div class="wallet-menu-title">完税证明</div>
- <div class="wallet-menu-desc">2024年度</div>
- </div>
- <div class="wallet-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- </div>
- <div class="wallet-section">
- <div class="wallet-section-title"><i class="ri-file-list-line" style="color:var(--primary);"></i> 我的做工记录</div>
- <div class="wallet-record">
- <div class="wallet-record-icon"><i class="ri-checkbox-circle-line"></i></div>
- <div class="wallet-record-info">
- <div class="wallet-record-title">浦东仓库搬运</div>
- <div class="wallet-record-meta">01-20 · 已完成</div>
- </div>
- <div class="wallet-record-amount">¥1,000</div>
- </div>
- <div class="wallet-record">
- <div class="wallet-record-icon"><i class="ri-checkbox-circle-line"></i></div>
- <div class="wallet-record-info">
- <div class="wallet-record-title">虹桥活动执行</div>
- <div class="wallet-record-meta">01-15 · 已完成</div>
- </div>
- <div class="wallet-record-amount">¥800</div>
- </div>
- </div>
- <div class="wallet-help-card">
- <div class="wallet-help-title"><i class="ri-lightbulb-line" style="color:var(--warning);"></i> 有劳资纠纷或疑问?</div>
- <button class="btn btn-primary btn-sm" onclick="showToast('已转接平台客服')" style="margin-top:8px;">
- <i class="ri-customer-service-2-line"></i> 联系平台客服
- </button>
- </div>
- </div>
- </div>
- <!-- ===== PROFILE PAGE ===== -->
- <div class="page" id="pageProfile" style="background:var(--gray-50);overflow-y:auto;">
- <div class="top-nav">
- <div class="top-nav-title">企业管理中枢</div>
- <div class="top-nav-actions">
- <button class="nav-btn" onclick="toggleDrawer('message')"><i class="ri-notification-3-line"></i><span class="nav-badge">2</span></button>
- </div>
- </div>
- <div style="padding:calc(var(--nav-h) + var(--safe-top) + 16px) 16px 100px;">
- <div class="profile-card">
- <div class="profile-avatar-lg">张</div>
- <div class="profile-name">某某科技有限公司</div>
- <div class="profile-meta">91310000...</div>
- <div class="profile-status-badge"><i class="ri-check-line"></i> 已认证</div>
- </div>
- <div class="drawer-section-title">消息与待办中心</div>
- <div class="profile-menu-item" onclick="toggleDrawer('message')">
- <div class="profile-menu-icon" style="background:var(--warning-light);"><i class="ri-notification-3-line" style="color:var(--warning);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">消息与待办中心</div><div class="profile-menu-desc">待确认 2 条</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">智能偏好设置</div>
- <div class="profile-menu-item" onclick="openConfig('workType')">
- <div class="profile-menu-icon" style="background:var(--info-light);"><i class="ri-tools-line" style="color:var(--info);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">常用工种与薪资基准</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item" onclick="openConfig('insurance')">
- <div class="profile-menu-icon" style="background:var(--success-light);"><i class="ri-shield-check-line" style="color:var(--success);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">默认保险方案偏好</div><div class="profile-menu-desc">已配置</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item" onclick="openConfig('payment')">
- <div class="profile-menu-icon" style="background:var(--warning-light);"><i class="ri-calendar-check-line" style="color:var(--warning);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">常规发薪日与结算周期</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">财务与账户</div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--danger-light);"><i class="ri-bank-card-line" style="color:var(--danger);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">对公账户与打款通道</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--primary-bg);"><i class="ri-file-list-2-line" style="color:var(--primary);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">企业开票抬头与税控</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--gray-100);"><i class="ri-wallet-3-line" style="color:var(--gray-600);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">平台余额与充值管理</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">合规与安全审计</div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--primary-bg);"><i class="ri-file-paper-2-line" style="color:var(--primary);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">历史合同与电子签章归档</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--info-light);"><i class="ri-search-eye-line" style="color:var(--info);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">操作日志与合规证据链导出</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--success-light);"><i class="ri-notification-3-line" style="color:var(--success);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">关键节点消息通知设置</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">系统设置与帮助</div>
- <div style="display:flex;gap:8px;flex-wrap:wrap;">
- <button class="btn btn-secondary btn-sm"><i class="ri-information-line"></i> 关于我们</button>
- <button class="btn btn-secondary btn-sm"><i class="ri-question-line"></i> 常见问题</button>
- <button class="btn btn-secondary btn-sm"><i class="ri-customer-service-2-line"></i> 联系客服</button>
- </div>
- <div style="margin-top:24px;padding-top:16px;border-top:1px solid var(--border-light);">
- <button class="btn btn-secondary btn-lg btn-full" onclick="goTo('login')" style="color:var(--danger);">
- <i class="ri-logout-box-r-line"></i> 退出账号
- </button>
- </div>
- </div>
- </div>
- <!-- ===== BOTTOM NAV ===== -->
- <div class="bottom-nav" id="bottomNav">
- <button class="bottom-nav-item active" onclick="goTo('chat')" data-page="chat">
- <i class="ri-chat-3-line"></i>
- <span>对话</span>
- </button>
- <button class="bottom-nav-item" onclick="goTo('worker')" data-page="worker">
- <i class="ri-user-add-line"></i>
- <span>临时工端</span>
- </button>
- <button class="bottom-nav-item" onclick="goTo('profile')" data-page="profile">
- <i class="ri-user-3-line"></i>
- <span>我的</span>
- </button>
- </div>
- <!-- ===== PROFILE PAGE (inline in drawer) ===== -->
- <!-- We'll handle profile as a drawer that can be triggered -->
- <!-- ===== OVERLAY ===== -->
- <div class="overlay" id="overlay" onclick="closeAll()"></div>
- <!-- ===== BOTTOM SHEET: DRAFT ===== -->
- <div class="bottom-sheet" id="sheetDraft">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title">
- <i class="ri-file-text-line" style="color:var(--warning);"></i>
- 用工草稿
- <span class="sheet-badge">待确认</span>
- </div>
- </div>
- <div class="sheet-source"><i class="ri-links-line"></i> 来源:AI对话 · 浦东仓库需求</div>
- <div class="sheet-body">
- <div class="form-section">
- <div class="form-section-title">
- 基础信息
- <button class="edit-btn" onclick="showToast('编辑模式已开启')">编辑</button>
- </div>
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:12px;">
- <div class="form-row"><span class="label">用工人数</span><span class="value">10 人</span></div>
- <div class="form-row"><span class="label">工作天数</span><span class="value">2 天</span></div>
- <div class="form-row"><span class="label">岗位类型</span><span class="value">搬运工</span></div>
- <div class="form-row"><span class="label">工作地点</span><span class="value">浦东新区</span></div>
- </div>
- </div>
- <div class="form-section">
- <div class="form-section-title">
- 岗位要求
- <button class="edit-btn" onclick="showToast('编辑模式已开启')">编辑</button>
- </div>
- <div style="font-size:13px;color:var(--muted);line-height:1.6;">
- <div>• 年龄18-45岁,身体健康</div>
- <div>• 有搬运经验优先</div>
- </div>
- </div>
- <div class="nl-input-section">
- <div class="nl-input-label"><i class="ri-chat-3-line"></i> 或直接告诉我要改什么:</div>
- <textarea class="nl-input" rows="2" placeholder="例如:人数改成8个,加个叉车工" id="draftNlInput" oninput="toggleDraftConfirm()"></textarea>
- <div class="nl-input-actions">
- <button class="biz-btn" onclick="showToast('已发送修改')"><i class="ri-send-plane-fill"></i> 发送</button>
- <button class="biz-btn primary" id="draftConfirmBtn" onclick="confirmNlEdit()" style="display:none;"><i class="ri-check-line"></i> 确认修改</button>
- </div>
- </div>
- <div class="form-section" style="background:var(--primary-bg);border-color:var(--primary-light);">
- <div class="form-section-title" style="margin-bottom:6px;">预估成本 <span style="font-size:12px;color:var(--muted);font-weight:400;">实时联动</span></div>
- <div style="display:grid;grid-template-columns:1fr 1fr;gap:8px;">
- <div class="form-row"><span class="label">总支出</span><span class="value highlight">¥12,800</span></div>
- <div class="form-row"><span class="label">人均</span><span class="value">¥640/天</span></div>
- </div>
- </div>
- </div>
- <div class="sheet-footer">
- <button class="btn btn-secondary btn-lg" style="flex:1;" onclick="showToast('已重新生成草稿')">重新生成</button>
- <button class="btn btn-primary btn-lg" style="flex:1;" onclick="confirmDraft()">确认此方案</button>
- </div>
- </div>
- <!-- ===== BOTTOM SHEET: COST ===== -->
- <div class="bottom-sheet" id="sheetCost">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title"><i class="ri-money-cny-circle-line" style="color:var(--primary);"></i> 成本对比</div>
- <div class="swipe-indicator"><i class="ri-arrow-left-s-line"></i> 滑动 <i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="sheet-source"><i class="ri-links-line"></i> 浦东仓库搬运 · 10人×2天</div>
- <div class="sheet-body">
- <div class="cost-card recommended">
- <div class="cost-card-title"><i class="ri-star-line" style="color:var(--primary);"></i> 合规优先 (A)</div>
- <div class="cost-total">¥12,800</div>
- <div class="cost-row"><span>人均成本</span><span class="val">¥640/天</span></div>
- <div class="cost-row"><span>到手金额</span><span class="val">¥500/天</span></div>
- <div style="border-top:1px solid var(--border-light);margin-top:8px;padding-top:8px;">
- <div class="cost-row"><span>劳务费</span><span class="val">¥10,000</span></div>
- <div class="cost-row"><span>服务费(8%)</span><span class="val">¥800</span></div>
- <div class="cost-row"><span>保险(高档)</span><span class="val">¥200</span></div>
- <div class="cost-row"><span>税费代征</span><span class="val">¥1,800</span></div>
- </div>
- <div class="compliance">
- <span class="compliance-badge"><i class="ri-check-line"></i> 业务真实</span>
- <span class="compliance-badge"><i class="ri-check-line"></i> 资金合规</span>
- <span class="compliance-badge"><i class="ri-check-line"></i> 个税申报</span>
- </div>
- </div>
- <div class="cost-card" style="opacity:0.6;">
- <div class="cost-card-title"><i class="ri-information-line" style="color:var(--muted);"></i> 传统用工 (B)</div>
- <div class="cost-total" style="color:var(--muted);">¥15,200</div>
- <div class="cost-row"><span>人均成本</span><span class="val">¥760/天</span></div>
- </div>
- <div class="dot-indicator"><span class="active"></span><span></span><span></span></div>
- </div>
- <div class="sheet-footer">
- <button class="btn btn-secondary btn-lg" style="flex:1;" onclick="showToast('已导出对比报告')">对比传统</button>
- <button class="btn btn-primary btn-lg" style="flex:1;" onclick="confirmCost()">确认此方案</button>
- </div>
- </div>
- <!-- ===== BOTTOM SHEET: PROGRESS ===== -->
- <div class="bottom-sheet" id="sheetProgress">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title"><i class="ri-line-chart-line" style="color:var(--primary);"></i> 进度管理</div>
- </div>
- <div class="sheet-source"><i class="ri-links-line"></i> 浦东仓库搬运 BATCH-001</div>
- <div class="sheet-body">
- <div style="display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:16px;">
- <div style="text-align:center;padding:10px 4px;background:var(--gray-50);border-radius:var(--radius-sm);">
- <div style="font-size:22px;font-weight:800;color:var(--warning);">3</div>
- <div style="font-size:11px;color:var(--muted);">待登记</div>
- </div>
- <div style="text-align:center;padding:10px 4px;background:var(--gray-50);border-radius:var(--radius-sm);">
- <div style="font-size:22px;font-weight:800;color:var(--secondary);">4</div>
- <div style="font-size:11px;color:var(--muted);">登记中</div>
- </div>
- <div style="text-align:center;padding:10px 4px;background:var(--gray-50);border-radius:var(--radius-sm);">
- <div style="font-size:22px;font-weight:800;color:var(--success);">3</div>
- <div style="font-size:11px;color:var(--muted);">已完成</div>
- </div>
- <div style="text-align:center;padding:10px 4px;background:var(--primary-bg);border-radius:var(--radius-sm);">
- <div style="font-size:22px;font-weight:800;color:var(--primary);">10</div>
- <div style="font-size:11px;color:var(--muted);">总计</div>
- </div>
- </div>
- <div class="progress-bar-wrap">
- <div class="progress-label"><span class="text">登记进度</span><span class="count">7/10</span></div>
- <div class="progress-track"><div class="progress-fill" style="width:70%;animation:progressGrow 1s ease both;"></div></div>
- </div>
- <div style="margin-top:16px;">
- <div style="font-size:14px;font-weight:700;margin-bottom:10px;">办理流程</div>
- <ul class="timeline">
- <li class="timeline-item"><div class="timeline-dot done"><i class="ri-check-line"></i></div><div class="timeline-content"><div class="title">草稿创建</div><div class="time">01-15 14:30</div></div></li>
- <li class="timeline-item"><div class="timeline-dot done"><i class="ri-check-line"></i></div><div class="timeline-content"><div class="title">方案确认</div><div class="time">01-15 14:35</div></div></li>
- <li class="timeline-item"><div class="timeline-dot active"><i class="ri-time-line"></i></div><div class="timeline-content"><div class="title">扫码登记 <span style="color:var(--primary);">进行中 7/10</span></div></div></li>
- <li class="timeline-item"><div class="timeline-dot"></div><div class="timeline-content"><div class="title" style="color:var(--muted-light);">企业审核</div></div></li>
- <li class="timeline-item"><div class="timeline-dot"></div><div class="timeline-content"><div class="title" style="color:var(--muted-light);">合同签署</div></div></li>
- <li class="timeline-item"><div class="timeline-dot"></div><div class="timeline-content"><div class="title" style="color:var(--muted-light);">开始用工</div></div></li>
- </ul>
- </div>
- <div style="margin-top:16px;">
- <div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;">
- <div style="font-size:14px;font-weight:700;">人员列表</div>
- <button class="biz-btn" onclick="showToast('已刷新')" style="font-size:11px;padding:4px 8px;"><i class="ri-refresh-line"></i> 刷新</button>
- </div>
- <div class="person-item"><div class="person-avatar">张</div><div class="person-info"><div class="person-name">张三</div><div class="person-detail">138****1234</div></div><span class="person-status done">已完成</span></div>
- <div class="person-item"><div class="person-avatar">李</div><div class="person-info"><div class="person-name">李四</div><div class="person-detail">139****5678</div></div><span class="person-status done">已完成</span></div>
- <div class="person-item"><div class="person-avatar">王</div><div class="person-info"><div class="person-name">王五</div><div class="person-detail">137****9012</div></div><span class="person-status fail">核验失败</span></div>
- <div class="person-item"><div class="person-avatar">赵</div><div class="person-info"><div class="person-name">赵六</div><div class="person-detail">136****3456</div></div><span class="person-status pending">待登记</span></div>
- <div class="person-item"><div class="person-avatar">钱</div><div class="person-info"><div class="person-name">钱七</div><div class="person-detail">135****7890</div></div><span class="person-status review">审核中</span></div>
- </div>
- </div>
- <div class="sheet-footer">
- <button class="btn btn-secondary btn-lg" style="flex:1;" onclick="showToast('已查看全部')">查看全部</button>
- <button class="btn btn-primary btn-lg" style="flex:1;" onclick="showToast('已发送催办')">催办未登记</button>
- </div>
- </div>
- <!-- ===== BOTTOM SHEET: SETTLEMENT ===== -->
- <div class="bottom-sheet" id="sheetSettlement">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title"><i class="ri-bank-card-line" style="color:var(--primary);"></i> 结算确认单 <span class="sheet-badge" style="background:var(--danger);">待支付</span></div>
- </div>
- <div class="sheet-source"><i class="ri-links-line"></i> 浦东仓库搬运 BATCH-001</div>
- <div class="sheet-body">
- <div style="display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px;">
- <div style="text-align:center;padding:10px;background:var(--gray-50);border-radius:var(--radius-sm);">
- <div style="font-size:18px;font-weight:800;color:var(--primary);">¥50,400</div>
- <div style="font-size:11px;color:var(--muted);">实发总额</div>
- </div>
- <div style="text-align:center;padding:10px;background:var(--danger-light);border-radius:var(--radius-sm);">
- <div style="font-size:18px;font-weight:800;color:var(--danger);">-¥2,400</div>
- <div style="font-size:11px;color:var(--muted);">扣款/个税</div>
- </div>
- <div style="text-align:center;padding:10px;background:var(--gray-50);border-radius:var(--radius-sm);">
- <div style="font-size:18px;font-weight:800;color:var(--primary);">¥52,800</div>
- <div style="font-size:11px;color:var(--muted);">应发总额</div>
- </div>
- </div>
- <div class="form-section">
- <div class="form-section-title">资金总览</div>
- <div class="settlement-row"><span class="label">实发总额(共10人)</span><span class="val">¥50,400</span></div>
- <div class="settlement-row"><span class="label">平台服务费(8%)</span><span class="val">¥4,032</span></div>
- <div class="settlement-row"><span class="label">预计开票额</span><span class="val">¥54,432</span></div>
- <div class="settlement-row total"><span class="label">总支出</span><span class="val">¥54,432</span></div>
- </div>
- <div class="compliance">
- <span class="compliance-badge"><i class="ri-check-line"></i> 业务真实</span>
- <span class="compliance-badge"><i class="ri-check-line"></i> 资金合规</span>
- <span class="compliance-badge"><i class="ri-check-line"></i> 个税已申报</span>
- </div>
- <div style="font-size:12px;color:var(--muted);margin-top:8px;text-align:center;">本单据符合五流合一,可全额税前扣除</div>
- </div>
- <div class="sheet-footer">
- <button class="btn btn-secondary btn-lg" style="flex:1;" onclick="showToast('已导出Excel')"><i class="ri-download-line"></i> 导出</button>
- <button class="btn btn-primary btn-lg" style="flex:1;" onclick="showPayment()">确认并支付</button>
- </div>
- </div>
- <!-- ===== BOTTOM SHEET: ATTENDANCE ===== -->
- <div class="bottom-sheet" id="sheetAttendant">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title"><i class="ri-group-line" style="color:var(--primary);"></i> 今日考勤核对 <span style="font-size:12px;font-weight:400;color:var(--muted);">2024-01-20</span></div>
- </div>
- <div class="sheet-source">批次:浦东仓库搬运 (BATCH-2024-001)</div>
- <div class="sheet-body">
- <div style="display:flex;gap:8px;margin-bottom:16px;">
- <div style="flex:1;text-align:center;padding:8px;background:var(--primary-bg);border-radius:var(--radius-sm);"><div style="font-size:18px;font-weight:800;color:var(--primary);">10</div><div style="font-size:11px;color:var(--muted);">总人数</div></div>
- <div style="flex:1;text-align:center;padding:8px;background:var(--success-light);border-radius:var(--radius-sm);"><div style="font-size:18px;font-weight:800;color:var(--success);">8</div><div style="font-size:11px;color:var(--muted);">正常</div></div>
- <div style="flex:1;text-align:center;padding:8px;background:var(--warning-light);border-radius:var(--radius-sm);"><div style="font-size:18px;font-weight:800;color:var(--warning);">1</div><div style="font-size:11px;color:var(--muted);">加班</div></div>
- <div style="flex:1;text-align:center;padding:8px;background:var(--danger-light);border-radius:var(--radius-sm);"><div style="font-size:18px;font-weight:800;color:var(--danger);">1</div><div style="font-size:11px;color:var(--muted);">请假</div></div>
- </div>
- <div style="background:var(--gray-50);border-radius:var(--radius-md);overflow:hidden;border:1px solid var(--border-light);">
- <div class="attendance-row"><div class="attendance-avatar">张</div><div class="attendance-info"><div class="attendance-name">张三</div><div class="attendance-role">搬运</div></div><div class="attendance-stat"><div class="hours leave">请假</div></div></div>
- <div class="attendance-row"><div class="attendance-avatar">李</div><div class="attendance-info"><div class="attendance-name">李四</div><div class="attendance-role">搬运</div></div><div class="attendance-stat"><div class="hours overtime">10h</div><div class="label">原8h+加班2h</div></div></div>
- <div class="attendance-row"><div class="attendance-avatar">王</div><div class="attendance-info"><div class="attendance-name">王五</div><div class="attendance-role">包装</div></div><div class="attendance-stat"><div class="hours">500件</div><div class="label">计件</div></div></div>
- <div class="attendance-row"><div class="attendance-avatar">赵</div><div class="attendance-info"><div class="attendance-name">赵六</div><div class="attendance-role">搬运</div></div><div class="attendance-stat"><div class="hours">8h</div><div class="label">正常</div></div></div>
- </div>
- <div class="form-section" style="margin-top:16px;background:var(--primary-bg);border-color:var(--primary-light);">
- <div style="font-size:14px;font-weight:700;margin-bottom:8px;">今日汇总</div>
- <div class="form-row"><span class="label">总工时</span><span class="value">78h</span></div>
- <div class="form-row"><span class="label">总件数</span><span class="value">500件</span></div>
- <div class="form-row"><span class="label">预估费用</span><span class="value highlight">¥8,580</span></div>
- </div>
- </div>
- <div class="sheet-footer">
- <button class="btn btn-secondary btn-lg" style="flex:1;" onclick="showToast('语音录入模式')"><i class="ri-mic-line"></i> 语音录入</button>
- <button class="btn btn-primary btn-lg" style="flex:1;" onclick="showToast('考勤已归档');closeAll();">确认归档</button>
- </div>
- </div>
- <!-- ===== SIDE DRAWER: MESSAGES ===== -->
- <div class="side-drawer" id="drawerMessage">
- <div class="drawer-header"><div class="drawer-title"><i class="ri-notification-3-line" style="color:var(--primary);"></i> 消息与待办</div></div>
- <div class="drawer-body">
- <div class="drawer-section-title">待处理</div>
- <div class="msg-item" onclick="closeAll();setTimeout(()=>openSheet('settlement'),350);">
- <div class="msg-item-header"><span class="msg-type pending">待确认</span><span class="msg-time">2小时前</span></div>
- <div class="msg-title">12月浦东仓库结算单</div>
- <div class="msg-desc">¥50,400 · 共10人</div>
- <button class="msg-action">去处理 <i class="ri-arrow-right-s-line"></i></button>
- </div>
- <div class="msg-item" onclick="closeAll();setTimeout(()=>openSheet('progress'),350);">
- <div class="msg-item-header"><span class="msg-type error">异常</span><span class="msg-time">5小时前</span></div>
- <div class="msg-title">王五实名核验失败</div>
- <div class="msg-desc">光线不足导致人脸比对失败</div>
- <button class="msg-action">查看原因 <i class="ri-arrow-right-s-line"></i></button>
- </div>
- <div class="msg-item">
- <div class="msg-item-header"><span class="msg-type info">通知</span><span class="msg-time">1天前</span></div>
- <div class="msg-title">批次 BATCH-001 登记进度更新</div>
- <div class="msg-desc">7/10 人已完成登记</div>
- </div>
- <div class="drawer-section-title">已处理</div>
- <div class="msg-item" style="opacity:0.6;">
- <div class="msg-item-header"><span style="font-size:12px;font-weight:600;color:var(--success);">已确认</span><span class="msg-time">3天前</span></div>
- <div class="msg-title">批次 BATCH-001 方案确认</div>
- </div>
- </div>
- </div>
- <!-- ===== SIDE DRAWER: PROFILE ===== -->
- <div class="side-drawer" id="drawerProfile">
- <div class="drawer-header" style="padding-bottom:0;border:none;"></div>
- <div class="drawer-body">
- <div class="profile-card">
- <div class="profile-avatar-lg">张</div>
- <div class="profile-name">某某科技有限公司</div>
- <div class="profile-meta">91310000...</div>
- <div class="profile-status-badge"><i class="ri-check-line"></i> 已认证</div>
- </div>
- <div class="drawer-section-title">消息与待办中心</div>
- <div class="profile-menu-item" onclick="closeAll();setTimeout(()=>toggleDrawer('message'),350);">
- <div class="profile-menu-icon" style="background:var(--warning-light);"><i class="ri-notification-3-line" style="color:var(--warning);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">消息与待办中心</div><div class="profile-menu-desc">待确认 2 条</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">智能偏好设置</div>
- <div class="profile-menu-item" onclick="openConfig('workType')">
- <div class="profile-menu-icon" style="background:var(--info-light);"><i class="ri-tools-line" style="color:var(--info);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">常用工种与薪资基准</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item" onclick="openConfig('insurance')">
- <div class="profile-menu-icon" style="background:var(--success-light);"><i class="ri-shield-check-line" style="color:var(--success);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">默认保险方案偏好</div><div class="profile-menu-desc">已配置</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item" onclick="openConfig('payment')">
- <div class="profile-menu-icon" style="background:var(--warning-light);"><i class="ri-calendar-check-line" style="color:var(--warning);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">常规发薪日与结算周期</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">财务与账户</div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--danger-light);"><i class="ri-bank-card-line" style="color:var(--danger);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">对公账户与打款通道</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--primary-bg);"><i class="ri-file-list-2-line" style="color:var(--primary);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">企业开票抬头与税控</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--gray-100);"><i class="ri-wallet-3-line" style="color:var(--gray-600);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">平台余额与充值管理</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">合规与安全审计</div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--primary-bg);"><i class="ri-file-paper-2-line" style="color:var(--primary);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">历史合同与电子签章归档</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--info-light);"><i class="ri-search-eye-line" style="color:var(--info);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">操作日志与合规证据链导出</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-menu-item">
- <div class="profile-menu-icon" style="background:var(--success-light);"><i class="ri-notification-3-line" style="color:var(--success);"></i></div>
- <div class="profile-menu-text"><div class="profile-menu-title">关键节点消息通知设置</div></div>
- <div class="profile-menu-arrow"><i class="ri-arrow-right-s-line"></i></div>
- </div>
- <div class="profile-divider"></div>
- <div class="drawer-section-title">系统设置与帮助</div>
- <div style="display:flex;gap:8px;flex-wrap:wrap;">
- <button class="btn btn-secondary btn-sm"><i class="ri-information-line"></i> 关于我们</button>
- <button class="btn btn-secondary btn-sm"><i class="ri-question-line"></i> 常见问题</button>
- <button class="btn btn-secondary btn-sm"><i class="ri-customer-service-2-line"></i> 联系客服</button>
- </div>
- <div style="margin-top:20px;padding-top:14px;border-top:1px solid var(--border-light);">
- <button class="btn btn-secondary btn-lg btn-full" onclick="closeAll();setTimeout(()=>goTo('login'),350);" style="color:var(--danger);">
- <i class="ri-logout-box-r-line"></i> 退出账号
- </button>
- </div>
- </div>
- </div>
- <!-- ===== MODAL: CONFIRM ===== -->
- <div class="modal-overlay" id="modalOverlay" onclick="closeModal()"></div>
- <div class="modal" id="modalConfirm">
- <div class="modal-body">
- <div class="modal-icon success"><i class="ri-check-line"></i></div>
- <div class="modal-title" id="modalTitle">确认选择方案A?</div>
- <div class="modal-desc" id="modalDesc">合规优先 · 总支出 ¥12,800<br>确认后将生成批次二维码</div>
- </div>
- <div class="modal-footer">
- <button class="modal-btn cancel" onclick="closeModal()">取消</button>
- <button class="modal-btn confirm" id="modalConfirmBtn" onclick="confirmAction()">确认生成</button>
- </div>
- </div>
- <!-- ===== MODAL: QR ===== -->
- <div class="modal" id="modalQR" style="max-width:380px;">
- <div class="modal-body" style="padding:20px;">
- <div class="modal-title" style="margin-bottom:4px;">方案已确认</div>
- <div style="font-size:13px;color:var(--muted);margin-bottom:12px;">浦东仓库搬运 BATCH-001</div>
- <div class="qr-area">
- <svg viewBox="0 0 100 100" fill="currentColor">
- <rect x="5" y="5" width="25" height="25" rx="2"/>
- <rect x="70" y="5" width="25" height="25" rx="2"/>
- <rect x="5" y="70" width="25" height="25" rx="2"/>
- <rect x="10" y="10" width="15" height="15" rx="1" fill="white"/>
- <rect x="75" y="10" width="15" height="15" rx="1" fill="white"/>
- <rect x="10" y="75" width="15" height="15" rx="1" fill="white"/>
- <rect x="14" y="14" width="7" height="7" rx="0.5"/>
- <rect x="79" y="14" width="7" height="7" rx="0.5"/>
- <rect x="14" y="79" width="7" height="7" rx="0.5"/>
- <rect x="35" y="5" width="8" height="8"/><rect x="48" y="5" width="8" height="8"/>
- <rect x="35" y="18" width="8" height="8"/><rect x="60" y="35" width="8" height="8"/>
- <rect x="35" y="48" width="8" height="8"/><rect x="48" y="35" width="8" height="8"/>
- <rect x="35" y="60" width="8" height="8"/><rect x="60" y="60" width="8" height="8"/>
- <rect x="75" y="48" width="8" height="8"/><rect x="87" y="48" width="8" height="8"/>
- <rect x="75" y="70" width="8" height="8"/><rect x="87" y="70" width="8" height="8"/>
- <rect x="75" y="87" width="8" height="8"/>
- </svg>
- </div>
- <div style="font-size:13px;color:var(--muted);margin-bottom:12px;">分享给临时工扫码即可登记</div>
- <div class="progress-bar-wrap" style="margin-bottom:12px;">
- <div class="progress-label"><span class="text">登记进度</span><span class="count">7/10</span></div>
- <div class="progress-track"><div class="progress-fill" style="width:70%;"></div></div>
- </div>
- <div class="qr-actions">
- <button class="qr-action" onclick="showToast('已保存到相册')"><i class="ri-image-line"></i> 保存相册</button>
- <button class="qr-action" onclick="showToast('已分享')"><i class="ri-share-line"></i> 分享好友</button>
- <button class="qr-action" onclick="showToast('已复制链接')"><i class="ri-links-line"></i> 复制链接</button>
- <button class="qr-action" onclick="closeModal();setTimeout(()=>openSheet('progress'),300);"><i class="ri-line-chart-line"></i> 查看进度</button>
- </div>
- </div>
- </div>
- <!-- ===== MODAL: PAYMENT ===== -->
- <div class="modal" id="modalPayment" style="max-width:340px;">
- <div class="modal-body">
- <div class="modal-icon warning"><i class="ri-lock-line"></i></div>
- <div class="modal-title">资金安全确认</div>
- <div class="modal-desc">您即将向 10 位临时工<br>支付 <strong>¥50,400</strong><br><br>请验证身份以完成打款</div>
- </div>
- <div class="modal-footer" style="flex-direction:column;">
- <button class="modal-btn confirm" onclick="showPaySuccess()" style="width:100%;">微信支付密码验证</button>
- <button class="modal-btn cancel" onclick="closeModal()" style="width:100%;">取消</button>
- </div>
- </div>
- <!-- ===== MODAL: PAY SUCCESS ===== -->
- <div class="modal" id="modalPaySuccess" style="max-width:340px;">
- <div class="modal-body">
- <div class="modal-icon success" style="animation:countUp 0.4s ease both;"><i class="ri-check-double-line"></i></div>
- <div class="modal-title">支付成功!</div>
- <div class="modal-desc">¥50,400 已发起打款<br>预计2小时内到账</div>
- </div>
- <div class="modal-footer">
- <button class="modal-btn cancel" onclick="closeModal();closeAll();" style="flex:1;">关闭</button>
- <button class="modal-btn confirm" onclick="showToast('已下载凭证');closeModal();closeAll();" style="flex:1;">下载凭证</button>
- </div>
- </div>
- <!-- ===== CONFIG OVERLAY + SHEET ===== -->
- <div class="config-overlay" id="configOverlay" onclick="closeConfig()"></div>
- <div class="config-sheet" id="configSheet">
- <div class="sheet-handle"></div>
- <div class="sheet-header">
- <div class="sheet-title" id="configTitle"><i class="ri-shield-check-line" style="color:var(--primary);"></i> 保险方案偏好</div>
- <button class="btn btn-ghost btn-sm" onclick="closeConfig()" style="font-size:20px;"><i class="ri-close-line"></i></button>
- </div>
- <div class="sheet-source" id="configSource"><i class="ri-links-line"></i> 来自:企业管理中枢</div>
- <div class="sheet-body" id="configBody">
- <div id="configMessages"></div>
- </div>
- <div class="sheet-footer" style="border-top:1px solid var(--border-light);">
- <div style="display:flex;gap:8px;width:100%;">
- <input class="input-field" id="configInput" type="text" placeholder="描述您的配置需求..." style="flex:1;" onkeydown="if(event.key==='Enter')sendConfigMsg()">
- <button class="icon-btn send-btn active" onclick="sendConfigMsg()" style="width:44px;height:44px;"><i class="ri-send-plane-fill"></i></button>
- </div>
- </div>
- </div>
- <!-- ===== TOAST ===== -->
- <div id="toast"></div>
- </div>
- <script>
- // ===== STATE =====
- let currentSheet = null;
- let confirmCallback = null;
- // ===== PAGES =====
- function goTo(page) {
- document.querySelectorAll('.page').forEach(p => p.classList.remove('active'));
- const navItems = document.querySelectorAll('.bottom-nav-item');
- navItems.forEach(n => n.classList.remove('active'));
- const pageMap = { login:'pageLogin', chat:'pageChat', worker:'pageWorker', wallet:'pageWallet', profile:'pageProfile' };
- const el = document.getElementById(pageMap[page]);
- if (el) el.classList.add('active');
- navItems.forEach(n => { if(n.dataset.page === page) n.classList.add('active'); });
- const bn = document.getElementById('bottomNav');
- if (page === 'login' || page === 'chat') { bn.style.display = 'none'; }
- else { bn.style.display = 'flex'; }
- if (page === 'chat') initChat();
- if (page === 'wallet') animateSalary();
- closeAll();
- }
- function animateSalary() {
- const el = document.getElementById('salaryAmount');
- if (!el) return;
- const target = 3500;
- const duration = 1200;
- const start = performance.now();
- el.textContent = '¥0';
- function step(ts) {
- const progress = Math.min((ts - start) / duration, 1);
- const eased = 1 - Math.pow(1 - progress, 3);
- const current = Math.round(eased * target);
- el.textContent = '¥' + current.toLocaleString();
- if (progress < 1) requestAnimationFrame(step);
- }
- requestAnimationFrame(step);
- }
- // ===== CHAT SIDEBAR =====
- function toggleSidebar() {
- document.getElementById('chatSidebar').classList.toggle('open');
- }
- function switchChat(el, type) {
- document.querySelectorAll('.chat-item').forEach(i => i.classList.remove('active'));
- el.classList.add('active');
- document.getElementById('chatSidebar').classList.remove('open');
- loadChatHistory(type);
- }
- const chatData = {
- employment: [
- { role:'ai', text:'greeting' },
- { role:'ai', text:'report' },
- { role:'ai', text:'draft' },
- { role:'user', text:'招10个搬运工,浦东仓库,2天' },
- { role:'ai', text:'summary1' },
- { role:'ai', text:'summary2' },
- ],
- knowledge: [
- { role:'ai', text:'我可以为您解答灵活用工政策法规、税务处理、合同管理、社保保险、用工风险等方面的问题。请告诉我您想了解哪方面的内容?' },
- { role:'ai', text:'knowledge_actions' },
- ],
- order: [
- { role:'ai', text:'当前订单状态:' },
- { role:'ai', text:'orders' },
- ],
- cost: [
- { role:'ai', text:'请告诉我用工人数、工作天数和日薪标准,我来帮您精准测算成本。例如:"10个人,工作2天,日薪500元"' },
- ],
- attendance: [
- { role:'ai', text:'请用自然语言描述今天的考勤情况,例如:"今天张三请假,李四加班了2小时,王五计件做了500个"。我会自动匹配当前批次并生成考勤卡片。' },
- ],
- emergency: [
- { role:'ai', text:'当发生紧急事件时,请描述事件情况,我会生成处理指南并帮您一键生成保险报案草稿。例如:"有工人搬东西砸到脚了,现在去医院"' },
- ],
- };
- let currentChatType = 'employment';
- function initChat() {
- loadChatHistory(currentChatType);
- }
- function loadChatHistory(type) {
- currentChatType = type;
- const area = document.getElementById('chatArea');
- area.innerHTML = '';
- const msgs = chatData[type] || [];
- msgs.forEach(m => addChatMsg(m.role, m.text));
- area.scrollTop = area.scrollHeight;
- }
- function addChatMsg(role, text) {
- const area = document.getElementById('chatArea');
- const div = document.createElement('div');
- div.className = `chat-msg ${role}`;
- if (role === 'ai') {
- let content = '';
- if (text === 'greeting') {
- content = `<p>老板早上好!为您汇报昨日进度:</p>`;
- } else if (text === 'report') {
- content = `<div class="biz-card report-card" onclick="openSheet('progress')">
- <div class="biz-card-header"><i class="ri-bar-chart-line" style="color:var(--primary);"></i> 今日汇报</div>
- <div class="biz-card-row"><span>1. 浦东仓库</span><span class="val">8/10 人已登记</span></div>
- <div class="biz-card-row"><span>2. 王五实名失败</span><span class="val" style="color:var(--danger);">已自动提醒</span></div>
- <div class="biz-card-row"><span>3. 结算单待确认</span><span class="val">¥12,800</span></div>
- <div class="biz-card-actions">
- <button class="biz-btn" onclick="event.stopPropagation();showToast('已发送催办')"><i class="ri-notification-3-line"></i> 一键催办</button>
- <button class="biz-btn" onclick="event.stopPropagation();openSheet('progress')"><i class="ri-line-chart-line"></i> 查看进度</button>
- </div>
- </div>
- <div class="quick-actions" style="margin-top:10px;">
- <button class="quick-action" onclick="triggerAI('发布需求')"><div class="quick-action-icon" style="background:var(--warning-light);"><i class="ri-add-line" style="color:var(--warning);"></i></div><span class="quick-action-label">发布需求</span></button>
- <button class="quick-action" onclick="openSheet('cost')"><div class="quick-action-icon" style="background:var(--success-light);"><i class="ri-money-cny-circle-line" style="color:var(--success);"></i></div><span class="quick-action-label">成本测算</span></button>
- <button class="quick-action" onclick="openSheet('progress')"><div class="quick-action-icon" style="background:var(--info-light);"><i class="ri-line-chart-line" style="color:var(--info);"></i></div><span class="quick-action-label">进度总览</span></button>
- <button class="quick-action" onclick="openSheet('settlement')"><div class="quick-action-icon" style="background:var(--danger-light);"><i class="ri-bank-card-line" style="color:var(--danger);"></i></div><span class="quick-action-label">历史订单</span></button>
- </div>`;
- } else if (text === 'draft') {
- content = `<div class="biz-card draft-card" onclick="openSheet('draft')">
- <div class="biz-card-header"><i class="ri-file-text-line" style="color:var(--warning);"></i> 用工草稿</div>
- <div class="biz-card-row"><span>岗位类型</span><span class="val">搬运工</span></div>
- <div class="biz-card-row"><span>工作地点</span><span class="val">浦东新区</span></div>
- <div class="biz-card-row"><span>用工人数</span><span class="val">10人 × 2天</span></div>
- <div class="draft-price">¥12,800 <small>预估总价</small></div>
- <div class="biz-card-actions">
- <button class="biz-btn primary" onclick="event.stopPropagation();openSheet('draft')"><i class="ri-eye-line"></i> 查看详情/修改</button>
- </div>
- </div>`;
- } else if (text === 'orders') {
- content = `<div class="biz-card" style="margin-bottom:8px;">
- <div class="biz-card-header"><i class="ri-file-list-line" style="color:var(--primary);"></i> 订单 #2024-001 · 活动执行</div>
- <div class="biz-card-row"><span>状态</span><span class="val" style="color:var(--success);">进行中</span></div>
- <div class="biz-card-row"><span>人数/时间</span><span class="val">10人 · 01-20至21</span></div>
- <div class="biz-card-row"><span>已登记</span><span class="val">7/10人</span></div>
- </div>
- <div class="biz-card" style="margin-bottom:8px;">
- <div class="biz-card-header"><i class="ri-file-list-line" style="color:var(--warning);"></i> 订单 #2024-002 · 促销推广</div>
- <div class="biz-card-row"><span>状态</span><span class="val" style="color:var(--warning);">待确认</span></div>
- <div class="biz-card-row"><span>人数/时间</span><span class="val">5人 · 01-25至26</span></div>
- </div>`;
- } else if (text === 'summary1') {
- content = `<div class="summary-bubble" onclick="openSheet('draft')"><i class="ri-check-line"></i><span><span class="text">方案A已确认</span> · 合规优先 · ¥12,800</span></div>`;
- div.innerHTML = `<div class="chat-avatar ai" style="visibility:hidden;"></div><div class="chat-bubble">${content}</div>`;
- area.appendChild(div);
- return;
- } else if (text === 'summary2') {
- content = `<div class="summary-bubble" onclick="openSheet('settlement')"><i class="ri-check-line"></i><span><span class="text">结算已支付</span> · ¥50,400 · BATCH-001</span></div>`;
- div.innerHTML = `<div class="chat-avatar ai" style="visibility:hidden;"></div><div class="chat-bubble">${content}</div>`;
- area.appendChild(div);
- return;
- } else if (text === 'knowledge_actions') {
- content = `<div class="quick-actions" style="margin-top:10px;">
- <button class="quick-action" onclick="triggerAI('政策法规')"><div class="quick-action-icon" style="background:var(--info-light);"><i class="ri-government-line" style="color:var(--info);"></i></div><span class="quick-action-label">政策法规</span></button>
- <button class="quick-action" onclick="triggerAI('税务处理')"><div class="quick-action-icon" style="background:var(--warning-light);"><i class="ri-money-cny-circle-line" style="color:var(--warning);"></i></div><span class="quick-action-label">税务处理</span></button>
- <button class="quick-action" onclick="triggerAI('合同管理')"><div class="quick-action-icon" style="background:var(--success-light);"><i class="ri-file-text-line" style="color:var(--success);"></i></div><span class="quick-action-label">合同管理</span></button>
- <button class="quick-action" onclick="triggerAI('社保保险')"><div class="quick-action-icon" style="background:var(--danger-light);"><i class="ri-shield-check-line" style="color:var(--danger);"></i></div><span class="quick-action-label">社保保险</span></button>
- </div>`;
- } else {
- content = `<p>${text}</p>`;
- }
- div.innerHTML = `<div class="chat-avatar ai"><i class="ri-robot-2-line"></i></div><div class="chat-bubble">${content}</div>`;
- } else {
- div.innerHTML = `<div class="chat-avatar user">张</div><div class="chat-bubble">${text}</div>`;
- }
- area.appendChild(div);
- }
- function startNewChat() {
- document.getElementById('chatSidebar').classList.remove('open');
- loadChatHistory('employment');
- showToast('已开启新对话');
- }
- // ===== INPUT =====
- function toggleSendBtn() {
- const v = document.getElementById('chatInput').value.trim();
- document.getElementById('sendBtn').classList.toggle('active', v.length > 0);
- }
- function sendMsg() {
- const input = document.getElementById('chatInput');
- const text = input.value.trim();
- if (!text) return;
- addChatMsg('user', text);
- input.value = '';
- toggleSendBtn();
- const area = document.getElementById('chatArea');
- const thinking = document.createElement('div');
- thinking.className = 'thinking';
- thinking.innerHTML = `<div class="chat-avatar ai"><i class="ri-robot-2-line"></i></div><div class="thinking-dots"><span></span><span></span><span></span></div>`;
- area.appendChild(thinking);
- area.scrollTop = area.scrollHeight;
- setTimeout(() => {
- thinking.remove();
- if (text.includes('招') || text.includes('搬运') || text.includes('临时工')) {
- addChatMsg('ai', '好的,已为您分析需求。正在生成用工草稿...');
- setTimeout(() => {
- addChatMsg('ai', 'draft');
- area.scrollTop = area.scrollHeight;
- }, 600);
- } else {
- addChatMsg('ai', '我理解您的问题,我可以帮您:发布用工需求、测算成本、查看进度、管理订单。请告诉我您具体想做什么?');
- }
- area.scrollTop = area.scrollHeight;
- }, 1200);
- }
- function triggerAI(msg) {
- document.getElementById('chatInput').value = msg;
- sendMsg();
- }
- // ===== BOTTOM SHEETS =====
- function openSheet(name) {
- closeAll();
- const map = { draft:'sheetDraft', cost:'sheetCost', progress:'sheetProgress', settlement:'sheetSettlement', attendant:'sheetAttendant' };
- const el = document.getElementById(map[name]);
- if (el) {
- setTimeout(() => {
- document.getElementById('overlay').classList.add('active');
- el.classList.add('active');
- currentSheet = el;
- }, 50);
- }
- }
- // ===== SIDE DRAWERS =====
- function toggleDrawer(name) {
- closeAll();
- const map = { message:'drawerMessage', profile:'drawerProfile' };
- const el = document.getElementById(map[name]);
- if (el) {
- setTimeout(() => {
- document.getElementById('overlay').classList.add('active');
- el.classList.add('active');
- }, 50);
- }
- }
- function closeAll() {
- document.getElementById('overlay').classList.remove('active');
- document.querySelectorAll('.bottom-sheet, .side-drawer').forEach(el => el.classList.remove('active'));
- currentSheet = null;
- }
- // ===== MODALS =====
- function openModal(id) {
- document.getElementById('modalOverlay').classList.add('active');
- document.getElementById(id).classList.add('active');
- }
- function closeModal() {
- document.getElementById('modalOverlay').classList.remove('active');
- document.querySelectorAll('.modal').forEach(el => el.classList.remove('active'));
- }
- // ===== DRAFT CONFIRM =====
- function confirmDraft() {
- closeAll();
- setTimeout(() => {
- document.getElementById('modalTitle').textContent = '确认选择方案A?';
- document.getElementById('modalDesc').innerHTML = '合规优先 · 总支出 ¥12,800<br>确认后将生成批次二维码';
- confirmCallback = () => { closeModal(); setTimeout(()=>{document.getElementById('modalOverlay').classList.add('active');document.getElementById('modalQR').classList.add('active');},300); };
- openModal('modalConfirm');
- }, 400);
- }
- function confirmCost() {
- closeAll();
- setTimeout(() => {
- document.getElementById('modalTitle').textContent = '确认选择方案A?';
- document.getElementById('modalDesc').innerHTML = '合规优先 · 总支出 ¥12,800<br>确认后将生成批次二维码';
- confirmCallback = () => { closeModal(); setTimeout(()=>{document.getElementById('modalOverlay').classList.add('active');document.getElementById('modalQR').classList.add('active');},300); };
- openModal('modalConfirm');
- }, 400);
- }
- function confirmAction() { if(confirmCallback) confirmCallback(); }
- function showPayment() { closeModal(); setTimeout(()=>{document.getElementById('modalOverlay').classList.add('active');document.getElementById('modalPayment').classList.add('active');},300); }
- function showPaySuccess() { closeModal(); setTimeout(()=>{document.getElementById('modalOverlay').classList.add('active');document.getElementById('modalPaySuccess').classList.add('active');},300); }
- // ===== DRAFT NL EDIT =====
- function toggleDraftConfirm() {
- const v = document.getElementById('draftNlInput').value.trim();
- document.getElementById('draftConfirmBtn').style.display = v ? 'inline-flex' : 'none';
- }
- function confirmNlEdit() {
- showToast('修改已确认');
- document.getElementById('draftNlInput').value = '';
- toggleDraftConfirm();
- }
- // ===== CONFIG DIALOG =====
- const configData = {
- workType: { title:'常用工种与薪资基准', welcome:'请告诉我您常用的工种和薪资基准,例如:"活动执行类日薪500-600元,搬运工400-500元"' },
- insurance: { title:'默认保险方案偏好', welcome:'请告诉我您的保险偏好,例如:"高空作业买高档雇主险,普通搬运买基础意外险"' },
- payment: { title:'常规发薪日与结算周期', welcome:'请告诉我您的发薪日和结算周期,例如:"每月15号发薪,用工结束后3个工作日内结算"' },
- };
- function openConfig(type) {
- // Keep profile drawer open behind the config sheet
- const cfg = configData[type];
- document.getElementById('configTitle').innerHTML = `<i class="ri-shield-check-line" style="color:var(--primary);"></i> ${cfg.title}`;
- document.getElementById('configSource').innerHTML = `<i class="ri-links-line"></i> 来自:企业管理中枢`;
- const msgs = document.getElementById('configMessages');
- msgs.innerHTML = '';
- addConfigMsg('ai', cfg.welcome);
- document.getElementById('configOverlay').classList.add('active');
- document.getElementById('configSheet').classList.add('active');
- document.getElementById('configInput').value = '';
- }
- function closeConfig() {
- document.getElementById('configOverlay').classList.remove('active');
- document.getElementById('configSheet').classList.remove('active');
- }
- function sendConfigMsg() {
- const input = document.getElementById('configInput');
- const text = input.value.trim();
- if (!text) return;
- addConfigMsg('user', text);
- input.value = '';
- setTimeout(() => {
- addConfigMsg('ai', `已解析您的配置需求。以下是识别到的规则:\n\n"${text}"\n\n请确认此配置,确认后将应用于后续所有用工草稿。`);
- }, 800);
- }
- function addConfigMsg(role, text) {
- const msgs = document.getElementById('configMessages');
- const div = document.createElement('div');
- div.className = `chat-msg ${role}`;
- if (role === 'ai') {
- div.innerHTML = `<div class="chat-avatar ai" style="width:28px;height:28px;"><i class="ri-robot-2-line" style="font-size:14px;"></i></div><div class="chat-bubble" style="font-size:14px;padding:10px 14px;white-space:pre-line;">${text}</div>`;
- } else {
- div.innerHTML = `<div class="chat-avatar user" style="width:28px;height:28px;font-size:11px;">张</div><div class="chat-bubble" style="font-size:14px;padding:10px 14px;">${text}</div>`;
- }
- msgs.appendChild(div);
- document.getElementById('configBody').scrollTop = document.getElementById('configBody').scrollHeight;
- }
- // ===== TOAST =====
- function showToast(msg) {
- const t = document.getElementById('toast');
- t.textContent = msg;
- t.style.opacity = '1';
- t.style.transform = 'translateX(-50%) translateY(0)';
- setTimeout(() => { t.style.opacity = '0'; t.style.transform = 'translateX(-50%) translateY(-20px)'; }, 2000);
- }
- // ===== SWIPE TO CLOSE =====
- let touchStartY = 0;
- document.querySelectorAll('.sheet-handle').forEach(h => {
- h.addEventListener('touchstart', e => { touchStartY = e.touches[0].clientY; }, {passive:true});
- h.addEventListener('touchmove', e => {
- if (e.touches[0].clientY - touchStartY > 60) closeAll();
- }, {passive:true});
- });
- // ===== OVERLAY CLICK =====
- document.getElementById('overlay').addEventListener('click', closeAll);
- // ===== INIT =====
- goTo('login');
- // ===== LOGIN TAB SWITCH =====
- function switchLoginTab(tab) {
- const entBtn = document.getElementById('loginTabEnterprise');
- const workerBtn = document.getElementById('loginTabWorker');
- const entForm = document.getElementById('loginFormEnterprise');
- const workerForm = document.getElementById('loginFormWorker');
- if (tab === 'enterprise') {
- entBtn.style.background = 'var(--primary)';
- entBtn.style.color = 'white';
- entBtn.style.borderColor = 'var(--primary)';
- workerBtn.style.background = 'var(--surface)';
- workerBtn.style.color = 'var(--gray-600)';
- workerBtn.style.borderColor = 'var(--border)';
- entForm.style.display = 'block';
- workerForm.style.display = 'none';
- } else {
- workerBtn.style.background = 'var(--primary)';
- workerBtn.style.color = 'white';
- workerBtn.style.borderColor = 'var(--primary)';
- entBtn.style.background = 'var(--surface)';
- entBtn.style.color = 'var(--gray-600)';
- entBtn.style.borderColor = 'var(--border)';
- workerForm.style.display = 'block';
- entForm.style.display = 'none';
- }
- }
- </script>
- </body>
- </html>
|