ProtocolViewDialog.vue 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551
  1. <!-- 采集协议单 — 只读查看(字段与新增/编辑弹窗一致) -->
  2. <template>
  3. <el-dialog
  4. :model-value="modelValue"
  5. :title="dialogTitle"
  6. width="1600px"
  7. class="dialog-form-layout protocol-view-dialog"
  8. align-center
  9. append-to-body
  10. modal-class="protocol-dialog-mask"
  11. destroy-on-close
  12. :close-on-click-modal="false"
  13. @update:model-value="emit('update:modelValue', $event)"
  14. @closed="handleClosed"
  15. >
  16. <div
  17. class="protocol-view-body"
  18. :class="{ 'is-detail-loading': detailLoading && !bundle }"
  19. v-loading="detailLoading && !bundle"
  20. element-loading-text="加载中…"
  21. >
  22. <div class="detail-tabs">
  23. <div
  24. v-for="tab in formTabs"
  25. :key="tab.key"
  26. class="detail-tab"
  27. :class="{ active: activeTab === tab.key, 'is-disabled': detailLoading && !bundle }"
  28. @click="scrollToSection(tab.key)"
  29. >
  30. {{ tab.label }}
  31. </div>
  32. </div>
  33. <template v-if="bundle">
  34. <div>
  35. <!-- 基本信息 -->
  36. <div id="view-section-basic" class="section-card section-card--white">
  37. <div class="section-title section-title--banner"><h3>基本信息</h3></div>
  38. <div class="data-grid data-grid--4">
  39. <div class="data-item"
  40. ><div class="data-label">协议状态</div
  41. ><div class="data-value"
  42. ><el-tag
  43. :type="protocolStatusTagType(String(protocol?.protocolStatus || ''))"
  44. size="small"
  45. >{{
  46. protocolStatusDisplayLabel(
  47. String(protocol?.protocolStatus || ''),
  48. String(protocol?.voidType || '')
  49. )
  50. }}</el-tag
  51. ></div
  52. ></div
  53. >
  54. <div class="data-item"
  55. ><div class="data-label">登记日期</div
  56. ><div class="data-value">{{ formatYmd(protocol?.registerDate) }}</div></div
  57. >
  58. <div class="data-item"
  59. ><div class="data-label">采集专员</div
  60. ><div class="data-value">{{ collectorDisplay }}</div></div
  61. >
  62. <div class="data-item"
  63. ><div class="data-label">创建时间</div
  64. ><div class="data-value">{{ dash(protocol?.createTime) }}</div></div
  65. >
  66. </div>
  67. <div v-if="protocol?.remark && String(protocol.remark).trim()" class="remark-row">
  68. <div class="data-item data-item--full">
  69. <div class="data-label">备注</div>
  70. <div class="data-value data-value--muted">{{ dash(protocol?.remark) }}</div>
  71. </div>
  72. </div>
  73. </div>
  74. <!-- 采集信息 -->
  75. <div id="view-section-collection" class="section-card section-card--white">
  76. <div class="section-title section-title--banner"><h3>采集信息</h3></div>
  77. <div class="data-grid data-grid--7 data-grid--collection-row">
  78. <div class="data-item"
  79. ><div class="data-label">采集地区</div
  80. ><div class="data-value">{{ regionDisplay }}</div></div
  81. >
  82. <div class="data-item"
  83. ><div class="data-label">采集医院</div
  84. ><div class="data-value">{{ hospitalDisplay }}</div></div
  85. >
  86. <div class="data-item"
  87. ><div class="data-label">采集医护</div
  88. ><div class="data-value">{{ dash(collectionInfo?.medicalStaff) }}</div></div
  89. >
  90. <div class="data-item"
  91. ><div class="data-label">市场专员</div
  92. ><div class="data-value">{{ salesDisplay }}</div></div
  93. >
  94. <div class="data-item"
  95. ><div class="data-label">地区经理</div
  96. ><div class="data-value">{{ regionManagerDisplay }}</div></div
  97. >
  98. <div class="data-item"
  99. ><div class="data-label">样本采集时间</div
  100. ><div class="data-value">{{ dash(collectionInfo?.sampleCollectTime) }}</div></div
  101. >
  102. <div class="data-item"
  103. ><div class="data-label">母血采集时间</div
  104. ><div class="data-value">{{
  105. dash(collectionInfo?.maternalBloodCollectTime)
  106. }}</div></div
  107. >
  108. </div>
  109. </div>
  110. <!-- 样本及运输(字典异步补齐,不阻塞整弹窗) -->
  111. <div
  112. id="view-section-sample"
  113. v-loading="lookupLoading"
  114. class="section-card section-card--white"
  115. >
  116. <div class="section-title section-title--banner"><h3>样本及运输信息</h3></div>
  117. <div v-if="samples.length" class="sample-cards">
  118. <div
  119. v-for="(row, sIdx) in samples"
  120. :key="row.id || sIdx"
  121. class="sample-card"
  122. :class="{
  123. 'is-highlight':
  124. !!highlightSampleCode && String(row.sampleCode || '') === highlightSampleCode
  125. }"
  126. :id="row.sampleCode ? `view-sample-${row.sampleCode}` : undefined"
  127. >
  128. <div class="sample-card__header">
  129. <div class="sample-card__title">
  130. <span class="sample-card__seq">{{ sIdx + 1 }}</span>
  131. {{ sampleTypeName(row.sampleTypeId) }}
  132. </div>
  133. <el-tag :type="sampleStatusTagType(String(row.sampleStatus || ''))" size="small">
  134. {{ sampleStatusLabel(String(row.sampleStatus || '')) }}
  135. </el-tag>
  136. </div>
  137. <div class="sample-card__body">
  138. <div class="sample-card__section">
  139. <div class="sample-card__section-label">样本信息</div>
  140. <div class="data-grid data-grid--4">
  141. <div class="data-item">
  142. <div class="data-label">样本编码</div>
  143. <div class="data-value data-value--code">
  144. <SampleCodeWithSpecialDisplay
  145. :sample-code="row.sampleCode"
  146. :is-special="!!row.isSpecial"
  147. :special-remark="row.specialRemark"
  148. monospace
  149. />
  150. </div>
  151. </div>
  152. <div class="data-item">
  153. <div class="data-label">原价格(元)</div>
  154. <div class="data-value data-value--price">{{
  155. row.originalPrice ? `¥${row.originalPrice}` : '—'
  156. }}</div>
  157. </div>
  158. <div class="data-item">
  159. <div class="data-label">优惠价格(元)</div>
  160. <div class="data-value data-value--price">{{
  161. row.price ? `¥${row.price}` : '—'
  162. }}</div>
  163. </div>
  164. <div class="data-item">
  165. <div class="data-label">存储年限(年)</div>
  166. <div class="data-value">{{ dash(row.storageYears) }}</div>
  167. </div>
  168. <div v-if="row.remark" class="data-item data-item--full">
  169. <div class="data-label">备注</div>
  170. <div class="data-value data-value--muted">{{ dash(row.remark) }}</div>
  171. </div>
  172. </div>
  173. </div>
  174. <div
  175. v-if="
  176. row.freight?.id ||
  177. row.freight?.transportMode ||
  178. row.transport?.etaTime
  179. "
  180. class="sample-card__section sample-card__section--transport"
  181. >
  182. <div class="sample-card__section-label">运输与运费</div>
  183. <div class="data-grid data-grid--4">
  184. <div class="data-item">
  185. <div class="data-label">运输方式</div>
  186. <div class="data-value">{{
  187. dash(row.freight?.transportModeLabel || row.freight?.transportMode)
  188. }}</div>
  189. </div>
  190. <div class="data-item">
  191. <div class="data-label">运费(元)</div>
  192. <div class="data-value"
  193. >{{
  194. row.freight?.freightAmount != null
  195. ? '¥' + formatMoneyDisplay(row.freight.freightAmount)
  196. : '—'
  197. }}{{
  198. Number(row.freight?.linkedSampleCount || 0) > 1 ? '(共用)' : ''
  199. }}</div
  200. >
  201. </div>
  202. <div class="data-item">
  203. <div class="data-label">预计到达</div>
  204. <div class="data-value">{{ dash(row.transport?.etaTime) }}</div>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="sample-card__section sample-card__section--reception">
  209. <SampleReceptionDualReadonlyPanel
  210. :qc-reception="row.sampleReception"
  211. :production-reception="
  212. row.productionReception || row.sampleReception?.productionReception
  213. "
  214. source-type="cell_storage"
  215. :sample-type-name="row.sampleTypeName"
  216. />
  217. <div
  218. v-if="
  219. row.sampleReception &&
  220. sampleReceptionAttachmentFiles(row.sampleReception).length
  221. "
  222. class="attachment-row sample-card__attachments"
  223. >
  224. <div class="data-label">接收附件</div>
  225. <ProtocolAttachmentReadonly
  226. :files="sampleReceptionAttachmentFiles(row.sampleReception)"
  227. @preview="openPreview"
  228. @download="downloadFile"
  229. />
  230. </div>
  231. </div>
  232. <SampleQcInfoGroupedPanel
  233. :gate-qc-info="row.qcInfo"
  234. :process-qc-info-list="row.processQcInfoList"
  235. :sample-reception="row.sampleReception"
  236. :show-section-label="false"
  237. />
  238. <SampleProductionInfoCards :production-info="row.productionInfo" />
  239. <SampleStorageReleaseInfo :storage-release-info="row.storageReleaseInfo" />
  240. </div>
  241. </div>
  242. </div>
  243. <el-empty v-else description="暂无样本" :image-size="48" />
  244. </div>
  245. <div
  246. v-if="showHandlePanels"
  247. id="view-section-storage-cert-handle"
  248. class="section-card section-card--white"
  249. >
  250. <div class="section-title section-title--banner"><h3>储存证办理</h3></div>
  251. <ProtocolHandlePanel
  252. v-if="protocolId"
  253. mode="storage-cert"
  254. :protocol-id="protocolId"
  255. :sample-code="highlightSampleCode || undefined"
  256. :initial="storageCertInfo"
  257. @saved="loadDetail"
  258. />
  259. </div>
  260. <div
  261. v-if="showHandlePanels"
  262. id="view-section-insurance-handle"
  263. class="section-card section-card--white"
  264. >
  265. <div class="section-title section-title--banner"><h3>保险办理</h3></div>
  266. <ProtocolHandlePanel
  267. v-if="protocolId"
  268. mode="insurance"
  269. :protocol-id="protocolId"
  270. :sample-code="highlightSampleCode || undefined"
  271. :initial="fullmoonInsuranceInfo"
  272. @saved="loadDetail"
  273. />
  274. </div>
  275. <!-- 客户信息 -->
  276. <div id="view-section-party" class="section-card section-card--green">
  277. <div class="section-title section-title--banner"><h3>客户信息</h3></div>
  278. <div class="client-sub-cards">
  279. <!-- 母亲信息 -->
  280. <div class="client-sub-card">
  281. <div class="sub-card-header"
  282. ><span class="sub-card-icon">🤱</span><h4>母亲信息</h4></div
  283. >
  284. <div class="data-grid data-grid--4">
  285. <div class="data-item"
  286. ><div class="data-label">关联客户</div
  287. ><div class="data-value">{{
  288. partyCustomer?.customerId ? dash(partyCustomer?.motherName) : '—'
  289. }}</div></div
  290. >
  291. <div class="data-item"
  292. ><div class="data-label">母亲姓名</div
  293. ><div class="data-value">{{ dash(partyCustomer?.motherName) }}</div></div
  294. >
  295. <div class="data-item"
  296. ><div class="data-label">母亲联系电话</div
  297. ><div class="data-value">{{ dash(partyCustomer?.motherPhone) }}</div></div
  298. >
  299. <div class="data-item"
  300. ><div class="data-label">母亲身份证号</div
  301. ><div class="data-value">{{ dash(partyCustomer?.motherIdCard) }}</div></div
  302. >
  303. <div class="data-item"
  304. ><div class="data-label">母亲出生年月</div
  305. ><div class="data-value">{{ formatYm(partyCustomer?.motherBirthYm) }}</div></div
  306. >
  307. <div class="data-item"
  308. ><div class="data-label">母亲民族</div
  309. ><div class="data-value">{{ dash(partyCustomer?.motherEthnic) }}</div></div
  310. >
  311. <div class="data-item"
  312. ><div class="data-label">母亲邮箱</div
  313. ><div class="data-value">{{ dash(partyCustomer?.motherEmail) }}</div></div
  314. >
  315. </div>
  316. <div class="sub-card-full-row"
  317. ><div class="data-label">母亲家庭住址</div
  318. ><div class="data-value data-value--muted">{{
  319. dash(partyCustomer?.motherAddress)
  320. }}</div></div
  321. >
  322. </div>
  323. <!-- 父亲信息 -->
  324. <div class="client-sub-card">
  325. <div class="sub-card-header"
  326. ><span class="sub-card-icon">👨</span><h4>父亲信息</h4></div
  327. >
  328. <div class="data-grid data-grid--4">
  329. <div class="data-item"
  330. ><div class="data-label">父亲姓名</div
  331. ><div class="data-value">{{ dash(partyCustomer?.fatherName) }}</div></div
  332. >
  333. <div class="data-item"
  334. ><div class="data-label">父亲电话</div
  335. ><div class="data-value">{{ dash(partyCustomer?.fatherPhone) }}</div></div
  336. >
  337. <div class="data-item data-item--full"
  338. ><div class="data-label">父亲身份证号</div
  339. ><div class="data-value">{{ dash(partyCustomer?.fatherIdCard) }}</div></div
  340. >
  341. </div>
  342. </div>
  343. <!-- 新生儿信息 -->
  344. <div class="client-sub-card">
  345. <div class="sub-card-header"
  346. ><span class="sub-card-icon">👶</span><h4>新生儿信息</h4></div
  347. >
  348. <div class="data-grid data-grid--4">
  349. <div class="data-item"
  350. ><div class="data-label">新生儿姓名</div
  351. ><div class="data-value">{{ dash(partyCustomer?.newbornName) }}</div></div
  352. >
  353. <div class="data-item"
  354. ><div class="data-label">新生儿身份证</div
  355. ><div class="data-value">{{ dash(partyCustomer?.newbornIdCard) }}</div></div
  356. >
  357. <div class="data-item"
  358. ><div class="data-label">预产期</div
  359. ><div class="data-value">{{
  360. dash(partyCustomer?.expectedDeliveryDate)
  361. }}</div></div
  362. >
  363. <div class="data-item"
  364. ><div class="data-label">新生儿分娩时间</div
  365. ><div class="data-value">{{
  366. dash(partyCustomer?.newbornDeliveryTime)
  367. }}</div></div
  368. >
  369. <div class="data-item"
  370. ><div class="data-label">新生儿性别</div
  371. ><div class="data-value">{{
  372. newbornSexLabel(String(partyCustomer?.newbornSex || ''))
  373. }}</div></div
  374. >
  375. <div class="data-item"
  376. ><div class="data-label">分娩方式</div
  377. ><div class="data-value">{{
  378. deliveryModeLabel(String(partyCustomer?.deliveryMode || ''))
  379. }}</div></div
  380. >
  381. <div class="data-item"
  382. ><div class="data-label">胎次</div
  383. ><div class="data-value">{{ dash(partyCustomer?.birthOrder) }}</div></div
  384. >
  385. <div class="data-item"
  386. ><div class="data-label">新生儿体重(克)</div
  387. ><div class="data-value">{{ dash(partyCustomer?.newbornWeightGram) }}</div></div
  388. >
  389. <div class="data-item"
  390. ><div class="data-label">新生儿评分</div
  391. ><div class="data-value">{{ dash(partyCustomer?.apgar1min) }}</div></div
  392. >
  393. </div>
  394. </div>
  395. </div>
  396. </div>
  397. <!-- 储存证与新生儿保险(只读,字段对齐样本信息管理录入项) -->
  398. <div
  399. v-if="showHandleSummary"
  400. id="view-section-storage-insurance"
  401. class="section-card section-card--white"
  402. >
  403. <div class="section-title section-title--banner"><h3>储存证与新生儿保险</h3></div>
  404. <div class="handle-summary-cards">
  405. <div v-if="showStorageCert" class="handle-summary-card">
  406. <div class="sub-card-header"><h4>储存证</h4></div>
  407. <div class="data-grid data-grid--2">
  408. <div class="data-item">
  409. <div class="data-label">办理时间</div>
  410. <div class="data-value">{{ dash(storageCertInfo?.handleTime) }}</div>
  411. </div>
  412. <div class="data-item">
  413. <div class="data-label">办理人员</div>
  414. <div class="data-value">{{ dash(storageCertInfo?.handlerUserName) }}</div>
  415. </div>
  416. </div>
  417. <div class="attachment-row">
  418. <div class="data-label">储存证附件</div>
  419. <ProtocolAttachmentReadonly
  420. :files="storageCertAttachments"
  421. @preview="openPreview"
  422. @download="downloadFile"
  423. />
  424. </div>
  425. <div class="remark-row">
  426. <div class="data-item data-item--full">
  427. <div class="data-label">备注</div>
  428. <div class="data-value data-value--muted">{{
  429. dash(storageCertInfo?.remark)
  430. }}</div>
  431. </div>
  432. </div>
  433. </div>
  434. <div v-if="showFullmoonInsurance" class="handle-summary-card">
  435. <div class="sub-card-header"><h4>新生儿保险</h4></div>
  436. <div class="data-grid data-grid--2">
  437. <div class="data-item">
  438. <div class="data-label">办理时间</div>
  439. <div class="data-value">{{ dash(fullmoonInsuranceInfo?.handleTime) }}</div>
  440. </div>
  441. <div class="data-item">
  442. <div class="data-label">办理人员</div>
  443. <div class="data-value">{{ dash(fullmoonInsuranceInfo?.handlerUserName) }}</div>
  444. </div>
  445. </div>
  446. <div class="attachment-row">
  447. <div class="data-label">保险附件</div>
  448. <ProtocolAttachmentReadonly
  449. :files="fullmoonInsuranceAttachments"
  450. @preview="openPreview"
  451. @download="downloadFile"
  452. />
  453. </div>
  454. <div class="remark-row">
  455. <div class="data-item data-item--full">
  456. <div class="data-label">备注</div>
  457. <div class="data-value data-value--muted">{{
  458. dash(fullmoonInsuranceInfo?.handleRemark)
  459. }}</div>
  460. </div>
  461. </div>
  462. </div>
  463. </div>
  464. </div>
  465. <!-- 缴费信息 -->
  466. <div id="view-section-payment" class="section-card section-card--white">
  467. <div class="section-title section-title--banner"><h3>缴费信息</h3></div>
  468. <!-- v2: 按样本缴费只读(对齐新增/编辑弹窗) -->
  469. <template v-if="paymentModelVersion >= 2">
  470. <el-alert
  471. v-if="presignDepositHint"
  472. type="info"
  473. :closable="false"
  474. show-icon
  475. style="margin-bottom: 12px"
  476. :title="presignDepositHintText"
  477. />
  478. <div
  479. v-if="depositTransfers.length"
  480. class="sample-pay-readonly__batch-title"
  481. style="margin-bottom: 8px"
  482. >
  483. 意向金转账(关联预签约订单)
  484. </div>
  485. <el-table
  486. v-if="depositTransfers.length"
  487. :data="depositTransfers"
  488. class="list-table inner-table"
  489. stripe
  490. style="margin-bottom: 16px"
  491. >
  492. <el-table-column type="index" label="#" min-width="50" align="center" />
  493. <el-table-column label="转账方式" min-width="120" align="center">
  494. <template #default="{ row }">
  495. {{ transferTypeLabel(String(row.transferType || '')) || '—' }}
  496. </template>
  497. </el-table-column>
  498. <el-table-column label="转账金额(元)" min-width="130" align="center">
  499. <template #default="{ row }">{{ fmtMoney(row.transferAmount) }}</template>
  500. </el-table-column>
  501. <el-table-column label="转账时间" min-width="170" align="center">
  502. <template #default="{ row }">
  503. {{ formatDisplayOrDash(row.transferTime) }}
  504. </template>
  505. </el-table-column>
  506. <el-table-column label="转账凭证" min-width="220" align="left">
  507. <template #default="{ row }">
  508. <ProtocolAttachmentReadonly
  509. v-if="(row.attachments || []).length"
  510. :files="row.attachments || []"
  511. size="compact"
  512. @preview="openPreview"
  513. @download="downloadFile"
  514. />
  515. <span v-else class="muted-dash">—</span>
  516. </template>
  517. </el-table-column>
  518. <el-table-column
  519. label="备注"
  520. min-width="140"
  521. align="center"
  522. show-overflow-tooltip
  523. >
  524. <template #default="{ row }">{{ row.remark || '—' }}</template>
  525. </el-table-column>
  526. <el-table-column
  527. label="财务备注"
  528. min-width="140"
  529. align="center"
  530. show-overflow-tooltip
  531. >
  532. <template #default="{ row }">{{ row.financeRemark || '—' }}</template>
  533. </el-table-column>
  534. <el-table-column label="状态" min-width="110" align="center">
  535. <template #default="{ row }">
  536. <el-tag :type="payStatusTagType(String(row.payStatus || ''))" size="small">
  537. {{ payStatusLabel(String(row.payStatus || '')) }}
  538. </el-tag>
  539. </template>
  540. </el-table-column>
  541. </el-table>
  542. <div class="payment-summary payment-summary--3">
  543. <div class="payment-metric">
  544. <div class="pm-label">协议总金额(元)</div>
  545. <div class="pm-value pm-value--amount">{{
  546. fmtMoney(protocol?.protocolTotalAmount)
  547. }}</div>
  548. </div>
  549. <div class="payment-metric">
  550. <div class="pm-label">样本合同合计(元)</div>
  551. <div class="pm-value pm-value--amount">{{ fmtMoney(sampleContractSum) }}</div>
  552. </div>
  553. <div class="payment-metric">
  554. <div class="pm-label">已确认收款(元)</div>
  555. <div class="pm-value pm-value--amount pm-value--received">{{
  556. fmtMoney(v2ReceivedAmount)
  557. }}</div>
  558. </div>
  559. </div>
  560. <div v-if="samplePayments.length" class="sample-pay-readonly">
  561. <div
  562. v-for="(sp, sIdx) in samplePayments"
  563. :key="sp.id || sIdx"
  564. class="sample-pay-readonly__card"
  565. >
  566. <div class="sample-pay-readonly__head">
  567. <div class="sample-pay-readonly__title">
  568. <span>{{ samplePayTitle(sp) }}</span>
  569. <el-tag v-if="sp.sampleCode" size="small" type="info">{{
  570. sp.sampleCode
  571. }}</el-tag>
  572. <el-tag
  573. :type="String(sp.payMode) === 'fq' ? 'warning' : 'success'"
  574. size="small"
  575. >
  576. {{ payModeLabel(String(sp.payMode || '')) }}
  577. </el-tag>
  578. </div>
  579. <span class="sample-pay-readonly__amt">{{ fmtMoney(sp.contractAmount) }}</span>
  580. </div>
  581. <div
  582. class="data-grid"
  583. :class="
  584. String(sp.payMode) === 'fq' ? 'data-grid--6' : 'data-grid--3'
  585. "
  586. >
  587. <div class="data-item">
  588. <div class="data-label">缴费模式</div>
  589. <div class="data-value">{{ payModeLabel(String(sp.payMode || '')) }}</div>
  590. </div>
  591. <div class="data-item">
  592. <div class="data-label">合同金额(元)</div>
  593. <div class="data-value data-value--price">{{
  594. fmtMoney(sp.contractAmount)
  595. }}</div>
  596. </div>
  597. <template v-if="String(sp.payMode) === 'dj'">
  598. <div class="data-item">
  599. <div class="data-label">趸交截止时间</div>
  600. <div class="data-value">{{ formatYmd(sp.lumpSumDeadline) }}</div>
  601. </div>
  602. </template>
  603. <template v-else>
  604. <div class="data-item">
  605. <div class="data-label">分期期数</div>
  606. <div class="data-value">{{ dash(sp.installmentCount) }}</div>
  607. </div>
  608. <div class="data-item">
  609. <div class="data-label">每期间隔(月)</div>
  610. <div class="data-value">{{ dash(sp.installmentIntervalMonths) }}</div>
  611. </div>
  612. <div class="data-item">
  613. <div class="data-label">分期开始时间</div>
  614. <div class="data-value">{{ formatYmd(sp.installmentStartDate) }}</div>
  615. </div>
  616. <div class="data-item">
  617. <div class="data-label">提前催缴预警(天)</div>
  618. <div class="data-value">{{ dash(sp.installmentAdvanceDays ?? 30) }}</div>
  619. </div>
  620. </template>
  621. </div>
  622. <div class="sample-pay-readonly__batch-title">缴费明细</div>
  623. <div v-if="!(sp.schedules || []).length" class="sample-pay-readonly__empty">
  624. 暂无缴费明细
  625. </div>
  626. <div
  627. v-for="(sch, schIdx) in sp.schedules || []"
  628. :key="sch.id || schIdx"
  629. class="sample-pay-readonly__sch"
  630. >
  631. <div class="sample-pay-readonly__sch-title">
  632. 第 {{ sch.scheduleNo || schIdx + 1 }} 期
  633. </div>
  634. <div class="data-grid data-grid--3">
  635. <div class="data-item">
  636. <div class="data-label">应缴费金额(元)</div>
  637. <div class="data-value data-value--price">{{
  638. fmtMoney(sch.dueAmount)
  639. }}</div>
  640. </div>
  641. <div class="data-item">
  642. <div class="data-label">应缴费时间</div>
  643. <div class="data-value">{{ formatYmd(sch.dueDate) }}</div>
  644. </div>
  645. <div class="data-item">
  646. <div class="data-label">已缴费金额(元)</div>
  647. <div class="data-value data-value--price">{{
  648. fmtMoney(sch.paidAmount)
  649. }}</div>
  650. </div>
  651. </div>
  652. <div class="sample-pay-readonly__tr-title">
  653. 转账记录
  654. <span v-if="(sch.transfers || []).length" class="sample-pay-readonly__tr-count"
  655. >({{ (sch.transfers || []).length }} 笔)</span
  656. >
  657. </div>
  658. <div class="list-body list-wrap view-inner-table-wrap">
  659. <el-table
  660. :data="sch.transfers || []"
  661. class="list-table inner-table"
  662. stripe
  663. empty-text="暂无转账记录"
  664. >
  665. <el-table-column
  666. type="index"
  667. label="序号"
  668. min-width="68"
  669. align="center"
  670. header-align="center"
  671. />
  672. <el-table-column
  673. label="转账方式"
  674. min-width="140"
  675. align="center"
  676. header-align="center"
  677. >
  678. <template #default="{ row }">
  679. {{ transferTypeLabel(String(row.transferType || '')) || '—' }}
  680. </template>
  681. </el-table-column>
  682. <el-table-column
  683. label="转账金额(元)"
  684. min-width="140"
  685. align="center"
  686. header-align="center"
  687. >
  688. <template #default="{ row }">{{ fmtMoney(row.transferAmount) }}</template>
  689. </el-table-column>
  690. <el-table-column
  691. label="转账时间"
  692. min-width="190"
  693. align="center"
  694. header-align="center"
  695. >
  696. <template #default="{ row }">
  697. {{ formatDisplayOrDash(row.transferTime) }}
  698. </template>
  699. </el-table-column>
  700. <el-table-column
  701. label="转账凭证"
  702. min-width="280"
  703. align="left"
  704. header-align="center"
  705. >
  706. <template #default="{ row }">
  707. <ProtocolAttachmentReadonly
  708. v-if="transferAttachments(row).length"
  709. :files="transferAttachments(row)"
  710. size="compact"
  711. @preview="openPreview"
  712. @download="downloadFile"
  713. />
  714. <span v-else class="muted-dash">—</span>
  715. </template>
  716. </el-table-column>
  717. <el-table-column
  718. label="备注"
  719. min-width="140"
  720. align="center"
  721. header-align="center"
  722. show-overflow-tooltip
  723. >
  724. <template #default="{ row }">{{ row.remark || '—' }}</template>
  725. </el-table-column>
  726. <el-table-column
  727. label="财务备注"
  728. min-width="140"
  729. align="center"
  730. header-align="center"
  731. show-overflow-tooltip
  732. >
  733. <template #default="{ row }">{{ row.financeRemark || '—' }}</template>
  734. </el-table-column>
  735. <el-table-column
  736. label="状态"
  737. min-width="110"
  738. align="center"
  739. header-align="center"
  740. >
  741. <template #default="{ row }">
  742. <el-tag
  743. :type="payStatusTagType(String(row.payStatus || ''))"
  744. size="small"
  745. >
  746. {{ payStatusLabel(String(row.payStatus || '')) }}
  747. </el-tag>
  748. </template>
  749. </el-table-column>
  750. </el-table>
  751. </div>
  752. </div>
  753. </div>
  754. </div>
  755. <el-empty v-else description="暂无按样本缴费方案" :image-size="40" />
  756. <div class="sample-pay-readonly__batch-title sample-pay-readonly__batch-title--mt"
  757. >退费登记</div
  758. >
  759. <el-table
  760. v-if="refundRecords.length"
  761. :data="refundRecords"
  762. class="list-table inner-table"
  763. stripe
  764. >
  765. <el-table-column
  766. prop="refundAmount"
  767. label="退费金额"
  768. min-width="120"
  769. align="center"
  770. >
  771. <template #default="{ row }">{{ fmtMoney(row.refundAmount) }}</template>
  772. </el-table-column>
  773. <el-table-column prop="refundTime" label="退费时间" min-width="160" align="center">
  774. <template #default="{ row }">{{ formatDisplayOrDash(row.refundTime) }}</template>
  775. </el-table-column>
  776. <el-table-column
  777. prop="refundRemark"
  778. label="备注"
  779. min-width="180"
  780. align="center"
  781. show-overflow-tooltip
  782. />
  783. </el-table>
  784. <el-empty v-else description="暂无退费登记" :image-size="40" />
  785. </template>
  786. <!-- v1: 旧整单缴费只读(样式对齐 v2:期汇总 + 转账记录) -->
  787. <template v-else>
  788. <div class="payment-summary payment-summary--3">
  789. <div class="payment-metric">
  790. <div class="pm-label">合同金额(元)</div>
  791. <div class="pm-value pm-value--amount">{{
  792. fmtMoney(payment?.contractAmount)
  793. }}</div>
  794. </div>
  795. <div class="payment-metric">
  796. <div class="pm-label">已确认收款(元)</div>
  797. <div class="pm-value pm-value--amount pm-value--received">{{
  798. fmtMoney(receivedAmount)
  799. }}</div>
  800. </div>
  801. <div class="payment-metric">
  802. <div class="pm-label">缴费模式</div>
  803. <div class="pm-value">{{ payModeLabel(String(payment?.payMode || '')) }}</div>
  804. </div>
  805. </div>
  806. <div class="sample-pay-readonly">
  807. <div class="sample-pay-readonly__card">
  808. <div class="sample-pay-readonly__head">
  809. <div class="sample-pay-readonly__title">
  810. <span>协议缴费</span>
  811. <el-tag
  812. :type="
  813. isInstallmentPayMode(String(payment?.payMode || ''))
  814. ? 'warning'
  815. : 'success'
  816. "
  817. size="small"
  818. >
  819. {{ payModeLabel(String(payment?.payMode || '')) }}
  820. </el-tag>
  821. </div>
  822. <span class="sample-pay-readonly__amt">{{
  823. fmtMoney(payment?.contractAmount)
  824. }}</span>
  825. </div>
  826. <div
  827. class="data-grid"
  828. :class="
  829. isInstallmentPayMode(String(payment?.payMode || ''))
  830. ? 'data-grid--6'
  831. : 'data-grid--3'
  832. "
  833. >
  834. <div class="data-item">
  835. <div class="data-label">缴费模式</div>
  836. <div class="data-value">{{
  837. payModeLabel(String(payment?.payMode || ''))
  838. }}</div>
  839. </div>
  840. <div class="data-item">
  841. <div class="data-label">合同金额(元)</div>
  842. <div class="data-value data-value--price">{{
  843. fmtMoney(payment?.contractAmount)
  844. }}</div>
  845. </div>
  846. <template v-if="String(payment?.payMode) === 'dj'">
  847. <div class="data-item">
  848. <div class="data-label">趸交截止时间</div>
  849. <div class="data-value">{{ formatYmd(payment?.lumpSumDeadline) }}</div>
  850. </div>
  851. </template>
  852. <template v-else>
  853. <div class="data-item">
  854. <div class="data-label">分期期数</div>
  855. <div class="data-value">{{ dash(payment?.installmentCount) }}</div>
  856. </div>
  857. <div class="data-item">
  858. <div class="data-label">每期间隔(月)</div>
  859. <div class="data-value">{{
  860. dash(payment?.installmentIntervalMonths)
  861. }}</div>
  862. </div>
  863. <div class="data-item">
  864. <div class="data-label">分期开始时间</div>
  865. <div class="data-value">{{ formatYmd(payment?.installmentStartDate) }}</div>
  866. </div>
  867. <div class="data-item">
  868. <div class="data-label">提前催缴预警(天)</div>
  869. <div class="data-value">{{
  870. dash(payment?.installmentAdvanceDays ?? 30)
  871. }}</div>
  872. </div>
  873. </template>
  874. </div>
  875. <div class="sample-pay-readonly__batch-title">缴费明细</div>
  876. <div v-if="!v1PayPeriods.length" class="sample-pay-readonly__empty">
  877. 暂无缴费明细
  878. </div>
  879. <div
  880. v-for="(sch, schIdx) in v1PayPeriods"
  881. :key="sch.scheduleNo || schIdx"
  882. class="sample-pay-readonly__sch"
  883. >
  884. <div class="sample-pay-readonly__sch-title">
  885. 第 {{ sch.scheduleNo || schIdx + 1 }} 期
  886. </div>
  887. <div class="data-grid data-grid--3">
  888. <div class="data-item">
  889. <div class="data-label">应缴费金额(元)</div>
  890. <div class="data-value data-value--price">{{
  891. fmtMoney(sch.dueAmount)
  892. }}</div>
  893. </div>
  894. <div class="data-item">
  895. <div class="data-label">应缴费时间</div>
  896. <div class="data-value">{{ formatYmd(sch.dueDate) }}</div>
  897. </div>
  898. <div class="data-item">
  899. <div class="data-label">已缴费金额(元)</div>
  900. <div class="data-value data-value--price">{{
  901. fmtMoney(sch.paidAmount)
  902. }}</div>
  903. </div>
  904. </div>
  905. <div class="sample-pay-readonly__tr-title">
  906. 转账记录
  907. <span v-if="sch.transfers.length" class="sample-pay-readonly__tr-count"
  908. >({{ sch.transfers.length }} 笔)</span
  909. >
  910. </div>
  911. <div class="list-body list-wrap view-inner-table-wrap">
  912. <el-table
  913. :data="sch.transfers"
  914. class="list-table inner-table"
  915. stripe
  916. empty-text="暂无转账记录"
  917. >
  918. <el-table-column
  919. type="index"
  920. label="序号"
  921. min-width="68"
  922. align="center"
  923. header-align="center"
  924. />
  925. <el-table-column
  926. label="转账方式"
  927. min-width="140"
  928. align="center"
  929. header-align="center"
  930. >
  931. <template #default="{ row }">
  932. {{ transferTypeLabel(String(row.transferType || '')) || '—' }}
  933. </template>
  934. </el-table-column>
  935. <el-table-column
  936. label="转账金额(元)"
  937. min-width="140"
  938. align="center"
  939. header-align="center"
  940. >
  941. <template #default="{ row }">{{ fmtMoney(row.transferAmount) }}</template>
  942. </el-table-column>
  943. <el-table-column
  944. label="转账时间"
  945. min-width="190"
  946. align="center"
  947. header-align="center"
  948. >
  949. <template #default="{ row }">
  950. {{ formatDisplayOrDash(row.transferTime) }}
  951. </template>
  952. </el-table-column>
  953. <el-table-column
  954. label="转账凭证"
  955. min-width="280"
  956. align="left"
  957. header-align="center"
  958. >
  959. <template #default="{ row }">
  960. <ProtocolAttachmentReadonly
  961. v-if="detailAttachments(row).length"
  962. :files="detailAttachments(row)"
  963. size="compact"
  964. @preview="openPreview"
  965. @download="downloadFile"
  966. />
  967. <span v-else class="muted-dash">—</span>
  968. </template>
  969. </el-table-column>
  970. <el-table-column
  971. label="状态"
  972. min-width="110"
  973. align="center"
  974. header-align="center"
  975. >
  976. <template #default="{ row }">
  977. <el-tag
  978. :type="payStatusTagType(String(row.payStatus || ''))"
  979. size="small"
  980. >
  981. {{ payStatusLabel(String(row.payStatus || '')) }}
  982. </el-tag>
  983. </template>
  984. </el-table-column>
  985. </el-table>
  986. </div>
  987. </div>
  988. </div>
  989. </div>
  990. </template>
  991. </div>
  992. <!-- 审核记录 -->
  993. <div
  994. v-if="showAuditHistory"
  995. id="view-section-audit"
  996. class="section-card section-card--white"
  997. >
  998. <div class="section-title section-title--banner"><h3>审核记录</h3></div>
  999. <div class="list-body list-wrap view-inner-table-wrap">
  1000. <el-table
  1001. v-loading="auditLoading"
  1002. class="list-table inner-table"
  1003. :data="auditRecords"
  1004. stripe
  1005. empty-text="暂无审核记录"
  1006. >
  1007. <el-table-column
  1008. type="index"
  1009. label="序号"
  1010. min-width="68"
  1011. align="center"
  1012. header-align="center"
  1013. />
  1014. <el-table-column
  1015. prop="createTime"
  1016. label="审核时间"
  1017. min-width="170"
  1018. align="center"
  1019. header-align="center"
  1020. >
  1021. <template #default="{ row }">{{ formatDisplayOrDash(row.createTime) }}</template>
  1022. </el-table-column>
  1023. <el-table-column
  1024. prop="auditStatus"
  1025. label="审核状态"
  1026. min-width="120"
  1027. align="center"
  1028. header-align="center"
  1029. >
  1030. <template #default="{ row }">
  1031. <el-tag
  1032. :type="String(row.auditStatus) === 'shtg' ? 'success' : 'warning'"
  1033. size="small"
  1034. >
  1035. {{ auditStatusLabel(String(row.auditStatus || '')) }}
  1036. </el-tag>
  1037. </template>
  1038. </el-table-column>
  1039. <el-table-column
  1040. prop="auditRemark"
  1041. label="审核备注"
  1042. min-width="200"
  1043. align="center"
  1044. header-align="center"
  1045. show-overflow-tooltip
  1046. />
  1047. <el-table-column
  1048. prop="auditorUserName"
  1049. label="审核人"
  1050. min-width="120"
  1051. align="center"
  1052. header-align="center"
  1053. >
  1054. <template #default="{ row }">{{ auditorDisplay(row) }}</template>
  1055. </el-table-column>
  1056. </el-table>
  1057. </div>
  1058. </div>
  1059. <!-- 附件信息 -->
  1060. <div id="view-section-attachment" class="section-card section-card--white">
  1061. <div class="section-title section-title--banner"><h3>附件信息</h3></div>
  1062. <div class="protocol-basic-attachments-block protocol-basic-attachments-block--flush">
  1063. <div class="data-item protocol-attachments-item">
  1064. <div class="data-label">协议附件</div>
  1065. <div class="data-value protocol-attachments-value">
  1066. <ProtocolAttachmentReadonly
  1067. :files="protocolAttachments"
  1068. @preview="openPreview"
  1069. @download="downloadFile"
  1070. />
  1071. </div>
  1072. </div>
  1073. <div class="data-item protocol-attachments-item">
  1074. <div class="data-label">知情同意书</div>
  1075. <div class="data-value protocol-attachments-value">
  1076. <ProtocolAttachmentReadonly
  1077. :files="consentAttachments"
  1078. @preview="openPreview"
  1079. @download="downloadFile"
  1080. />
  1081. </div>
  1082. </div>
  1083. <div class="data-item protocol-attachments-item">
  1084. <div class="data-label">孕妇健康调查表</div>
  1085. <div class="data-value protocol-attachments-value">
  1086. <ProtocolAttachmentReadonly
  1087. :files="healthSurveyAttachments"
  1088. @preview="openPreview"
  1089. @download="downloadFile"
  1090. />
  1091. </div>
  1092. </div>
  1093. </div>
  1094. </div>
  1095. <!-- 状态变更记录(置底) -->
  1096. <div id="view-section-status-change" class="section-card section-card--white">
  1097. <div class="section-title section-title--banner"><h3>状态变更记录</h3></div>
  1098. <el-empty v-if="!hasAnyStatusChange" description="暂无状态变更记录" :image-size="64" />
  1099. <div v-else class="data-grid data-grid--4">
  1100. <template v-if="protocol?.effectiveTime">
  1101. <div class="data-item"
  1102. ><div class="data-label">协议生效时间</div
  1103. ><div class="data-value">{{ dash(protocol.effectiveTime) }}</div></div
  1104. >
  1105. <div class="data-item"
  1106. ><div class="data-label">协议生效描述</div
  1107. ><div class="data-value data-value--muted">{{
  1108. dash(protocol.effectiveDesc)
  1109. }}</div></div
  1110. >
  1111. </template>
  1112. <template v-if="protocol?.expireTime">
  1113. <div class="data-item"
  1114. ><div class="data-label">协议过期时间</div
  1115. ><div class="data-value">{{ dash(protocol.expireTime) }}</div></div
  1116. >
  1117. <div class="data-item"
  1118. ><div class="data-label">协议过期描述</div
  1119. ><div class="data-value data-value--muted">{{
  1120. dash(protocol.expireDesc)
  1121. }}</div></div
  1122. >
  1123. </template>
  1124. <template v-if="protocol?.voidTime">
  1125. <div class="data-item"
  1126. ><div class="data-label">作废类型</div
  1127. ><div class="data-value">{{
  1128. voidTypeLabel(String(protocol?.voidType || '')) || '—'
  1129. }}</div></div
  1130. >
  1131. <div class="data-item"
  1132. ><div class="data-label">协议作废时间</div
  1133. ><div class="data-value">{{ dash(protocol.voidTime) }}</div></div
  1134. >
  1135. <div class="data-item"
  1136. ><div class="data-label">协议作废描述</div
  1137. ><div class="data-value data-value--muted">{{
  1138. dash(protocol.voidDesc)
  1139. }}</div></div
  1140. >
  1141. </template>
  1142. <template v-if="protocol?.toResearchTime">
  1143. <div class="data-item"
  1144. ><div class="data-label">协议转科研时间</div
  1145. ><div class="data-value">{{ dash(protocol.toResearchTime) }}</div></div
  1146. >
  1147. <div class="data-item"
  1148. ><div class="data-label">协议转科研描述</div
  1149. ><div class="data-value data-value--muted">{{
  1150. dash(protocol.toResearchDesc)
  1151. }}</div></div
  1152. >
  1153. </template>
  1154. </div>
  1155. </div>
  1156. </div>
  1157. </template>
  1158. </div>
  1159. <template #footer>
  1160. <el-button class="btn-ghost" @click="emit('update:modelValue', false)">
  1161. <el-icon><Close /></el-icon>
  1162. 关闭
  1163. </el-button>
  1164. </template>
  1165. </el-dialog>
  1166. <el-dialog
  1167. v-model="previewVisible"
  1168. title="文件预览"
  1169. width="800px"
  1170. align-center
  1171. append-to-body
  1172. destroy-on-close
  1173. >
  1174. <div v-if="previewType === 'image'" class="preview-container">
  1175. <img
  1176. :src="previewUrl"
  1177. alt="预览"
  1178. style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
  1179. />
  1180. </div>
  1181. <div v-else class="preview-container">
  1182. <video
  1183. :src="previewUrl"
  1184. controls
  1185. style="max-width: 100%; max-height: 70vh; display: block; margin: 0 auto"
  1186. />
  1187. </div>
  1188. </el-dialog>
  1189. </template>
  1190. <script setup lang="ts">
  1191. import { formatDisplayOrDash } from '@/utils/datetime-display'
  1192. import { computed, nextTick, ref, watch } from 'vue'
  1193. import { Close } from '@element-plus/icons-vue'
  1194. import ProtocolAttachmentReadonly from './ProtocolAttachmentReadonly.vue'
  1195. import SampleQcInfoGroupedPanel from '@/components/business/sample-qc-info-grouped-panel/index.vue'
  1196. import SampleReceptionDualReadonlyPanel from '@/components/business/sample-reception-dual-readonly-panel/index.vue'
  1197. import SampleCodeWithSpecialDisplay from '@/components/business/sample-code-with-special-display/index.vue'
  1198. import SampleProductionInfoCards from '@/components/business/sample-production-info-cards/index.vue'
  1199. import SampleStorageReleaseInfo from '@/components/business/sample-storage-release-info/index.vue'
  1200. import ProtocolHandlePanel from '@/components/business/protocol-handle-panel/index.vue'
  1201. import {
  1202. fetchCollectionProtocolAuditList,
  1203. fetchCollectionProtocolDetail,
  1204. type CollectionProtocolRow
  1205. } from '@/api/collection-protocol'
  1206. import {
  1207. fetchCellSampleTypeList,
  1208. fetchItemUnitList,
  1209. fetchExpressCompanyList,
  1210. fetchSiteList,
  1211. fetchCollectionRegionList,
  1212. fetchHospitalList,
  1213. fetchUserList
  1214. } from '@/api/admin'
  1215. import { downloadAttachmentFile } from '@/utils/download-attachment'
  1216. import { formatMoneyDisplay } from '@/utils/money-format'
  1217. import {
  1218. protocolStatusDisplayLabel,
  1219. protocolStatusTagType,
  1220. auditStatusLabel,
  1221. payModeLabel,
  1222. newbornSexLabel,
  1223. deliveryModeLabel,
  1224. sampleStatusLabel,
  1225. sampleStatusTagType,
  1226. transportTypeLabel,
  1227. payStatusLabel,
  1228. payStatusTagType
  1229. } from '@/utils/status-tag-registry'
  1230. import { loadTransferTypeDict, transferTypeLabel } from '@/utils/protocol-payment-labels'
  1231. import { loadVoidTypeDict, voidTypeLabel } from '@/utils/void-type-dict'
  1232. import { formatProtocolDocSubject } from '@/utils/protocol-doc-label'
  1233. import { isInstallmentPayMode } from '@/utils/protocol-payment-presets'
  1234. import { sumSampleContractAmounts } from '@/utils/protocol-sample-payment'
  1235. const props = withDefaults(
  1236. defineProps<{
  1237. modelValue: boolean
  1238. protocolId: string | null
  1239. listRow?: CollectionProtocolRow | null
  1240. /** 展示审核记录 Tab(采集协议单审核页) */
  1241. showAuditHistory?: boolean
  1242. /** 只读摘要:展示储存证办理字段 */
  1243. showStorageCert?: boolean
  1244. /** 只读摘要:与储存证并排展示新生儿保险办理字段 */
  1245. showFullmoonInsurance?: boolean
  1246. /** 样本信息管理:储存证/保险轻量办理(可编辑,与只读摘要互斥) */
  1247. showHandlePanels?: boolean
  1248. highlightSampleCode?: string
  1249. }>(),
  1250. {
  1251. showAuditHistory: false,
  1252. showStorageCert: false,
  1253. showFullmoonInsurance: false,
  1254. showHandlePanels: false,
  1255. highlightSampleCode: ''
  1256. }
  1257. )
  1258. const emit = defineEmits<{
  1259. (e: 'update:modelValue', val: boolean): void
  1260. }>()
  1261. const baseFormTabs = [
  1262. { key: 'basic', label: '基本信息' },
  1263. { key: 'collection', label: '采集信息' },
  1264. { key: 'sample', label: '样本及运输信息' },
  1265. { key: 'party', label: '客户信息' },
  1266. { key: 'payment', label: '缴费信息' }
  1267. ] as const
  1268. /** 协议审核等页:只读展示储存证/保险(与样本信息录入字段对齐);办理编辑用 showHandlePanels */
  1269. const showHandleSummary = computed(
  1270. () => !props.showHandlePanels && (props.showStorageCert || props.showFullmoonInsurance)
  1271. )
  1272. const formTabs = computed(() => {
  1273. const tabs: Array<{ key: string; label: string }> = [...baseFormTabs]
  1274. if (props.showHandlePanels) {
  1275. const sampleIdx = tabs.findIndex((t) => t.key === 'sample')
  1276. tabs.splice(sampleIdx + 1, 0, { key: 'storage-cert-handle', label: '储存证办理' })
  1277. tabs.splice(sampleIdx + 2, 0, { key: 'insurance-handle', label: '保险办理' })
  1278. }
  1279. if (showHandleSummary.value) {
  1280. const partyIdx = tabs.findIndex((t) => t.key === 'party')
  1281. tabs.splice(partyIdx + 1, 0, { key: 'storage-insurance', label: '储存证与保险' })
  1282. }
  1283. if (props.showAuditHistory) {
  1284. tabs.push({ key: 'audit', label: '审核记录' })
  1285. }
  1286. tabs.push({ key: 'attachment', label: '附件信息' })
  1287. tabs.push({ key: 'status-change', label: '状态变更记录' })
  1288. return tabs
  1289. })
  1290. const detailLoading = ref(false)
  1291. const lookupLoading = ref(false)
  1292. const auditLoading = ref(false)
  1293. const bundle = ref<Record<string, any> | null>(null)
  1294. const auditRecords = ref<Array<Record<string, unknown>>>([])
  1295. const activeTab = ref('basic')
  1296. const sampleTypeOptions = ref<Array<{ id: string; typeName: string }>>([])
  1297. const unitOptions = ref<Array<{ id: string; unitName: string }>>([])
  1298. const siteOptions = ref<Array<{ id: string; siteName: string }>>([])
  1299. const expressCompanyOptions = ref<Array<{ id: string; expressName: string }>>([])
  1300. const regionOptions = ref<Array<{ id: string; regionName: string }>>([])
  1301. const hospitalOptions = ref<Array<{ id: string; hospitalName: string }>>([])
  1302. const collectorUserOptions = ref<Array<{ id: string; nickName: string }>>([])
  1303. const salesUserOptions = ref<Array<{ id: string; nickName: string }>>([])
  1304. const minioBaseUrl = (import.meta.env.VITE_MINIO_BASE_URL || '').replace(/\/$/, '')
  1305. const protocol = computed(() => bundle.value?.protocol as Record<string, any> | undefined)
  1306. const partyCustomer = computed(() => bundle.value?.partyCustomer as Record<string, any> | null)
  1307. const collectionInfo = computed(() => bundle.value?.collectionInfo as Record<string, any> | null)
  1308. const payment = computed(() => bundle.value?.payment as Record<string, any> | null)
  1309. const paymentModelVersion = computed(() =>
  1310. Number((bundle.value?.protocol as any)?.paymentModelVersion || 1)
  1311. )
  1312. const samplePayments = computed(
  1313. () => (bundle.value?.samplePayments as Array<Record<string, any>>) || []
  1314. )
  1315. const refundRecords = computed(
  1316. () => (bundle.value?.refundRecords as Array<Record<string, any>>) || []
  1317. )
  1318. const depositTransfers = computed(
  1319. () => (bundle.value?.depositTransfers as Array<Record<string, any>>) || []
  1320. )
  1321. const presignDepositHint = computed(
  1322. () => (bundle.value?.presignDepositHint as Record<string, any>) || null
  1323. )
  1324. const sampleContractSum = computed(() => sumSampleContractAmounts(samplePayments.value))
  1325. const presignDepositHintText = computed(() => {
  1326. const h = presignDepositHint.value
  1327. if (!h) return ''
  1328. const amt = Number(h.confirmedDepositAmount || 0)
  1329. const cnt = Number(h.confirmedTransferCount || 0)
  1330. return `来源预签约已确认意向金合计 ¥${formatMoneyDisplay(amt)}(${cnt} 笔),下方列表与预签同一数据,不自动计入样本缴费`
  1331. })
  1332. const v2ReceivedAmount = computed(() => {
  1333. let sum = 0
  1334. for (const sp of samplePayments.value) {
  1335. for (const sch of sp.schedules || []) {
  1336. for (const tr of sch.transfers || []) {
  1337. if (String(tr.payStatus || '') === 'yjf') {
  1338. sum += Number(tr.transferAmount || 0) || 0
  1339. }
  1340. }
  1341. }
  1342. }
  1343. return sum
  1344. })
  1345. const samples = computed(() => {
  1346. const rows = (bundle.value?.samples as Array<Record<string, any>>) || []
  1347. return [...rows].sort((a, b) => {
  1348. const oa = Number(a.orderNum ?? 0)
  1349. const ob = Number(b.orderNum ?? 0)
  1350. if (oa !== ob) return oa - ob
  1351. return String(a.createTime || '').localeCompare(String(b.createTime || ''))
  1352. })
  1353. })
  1354. /** 严格按接口返回的库内明细展示,不做期次补齐 */
  1355. const paymentDetails = computed(
  1356. () => (bundle.value?.paymentDetails as Array<Record<string, any>>) || []
  1357. )
  1358. /**
  1359. * v1 明细按期归组,结构对齐 v2 schedules(期汇总 + 多笔转账)
  1360. * - 趸交:整单视为第 1 期
  1361. * - 分期:按 installmentNo 归组
  1362. */
  1363. const v1PayPeriods = computed(() => {
  1364. const details = paymentDetails.value
  1365. if (!details.length) return [] as Array<{
  1366. scheduleNo: number
  1367. dueAmount: number | null
  1368. dueDate: string
  1369. paidAmount: number
  1370. transfers: Array<Record<string, any>>
  1371. }>
  1372. const paidOf = (rows: Array<Record<string, any>>) =>
  1373. rows
  1374. .filter((d) => String(d.payStatus || '') === 'yjf')
  1375. .reduce((sum, d) => sum + (Number(d.transferAmount) || 0), 0)
  1376. const isFq = isInstallmentPayMode(String(payment.value?.payMode || ''))
  1377. if (!isFq) {
  1378. return [
  1379. {
  1380. scheduleNo: 1,
  1381. dueAmount:
  1382. details[0]?.dueAmount != null
  1383. ? Number(details[0].dueAmount)
  1384. : payment.value?.contractAmount != null
  1385. ? Number(payment.value.contractAmount)
  1386. : null,
  1387. dueDate: String(
  1388. payment.value?.lumpSumDeadline || details[0]?.installmentDueDate || ''
  1389. ),
  1390. paidAmount: paidOf(details),
  1391. transfers: details
  1392. }
  1393. ]
  1394. }
  1395. const groups = new Map<number, Array<Record<string, any>>>()
  1396. for (const d of details) {
  1397. const no = Number(d.installmentNo) || 0
  1398. const list = groups.get(no) || []
  1399. list.push(d)
  1400. groups.set(no, list)
  1401. }
  1402. return [...groups.entries()]
  1403. .sort((a, b) => a[0] - b[0])
  1404. .map(([no, rows]) => ({
  1405. scheduleNo: no || 1,
  1406. dueAmount: rows[0]?.dueAmount != null ? Number(rows[0].dueAmount) : null,
  1407. dueDate: String(rows[0]?.installmentDueDate || ''),
  1408. paidAmount: paidOf(rows),
  1409. transfers: rows
  1410. }))
  1411. })
  1412. /** 已收金额 = 已缴费明细的转账金额之和(排除待缴费、退费确认中、已退费) */
  1413. const receivedAmount = computed(() => {
  1414. return paymentDetails.value
  1415. .filter((d) => {
  1416. const s = String(d.payStatus || '')
  1417. return s === 'yjf' || s === 'jfqrz'
  1418. })
  1419. .reduce((sum, d) => {
  1420. const amt = Number(d.transferAmount || 0)
  1421. return sum + (isNaN(amt) ? 0 : amt)
  1422. }, 0)
  1423. })
  1424. const protocolAttachments = computed(() => {
  1425. const list = bundle.value?.attachments
  1426. return Array.isArray(list) ? list : []
  1427. })
  1428. const consentAttachments = computed(() => {
  1429. const list = bundle.value?.consentAttachmentFiles
  1430. return Array.isArray(list) ? list : []
  1431. })
  1432. const healthSurveyAttachments = computed(() => {
  1433. const list = bundle.value?.healthSurveyAttachmentFiles
  1434. return Array.isArray(list) ? list : []
  1435. })
  1436. const storageCertInfo = computed(() => {
  1437. const sc = bundle.value?.storageCert as Record<string, any> | undefined | null
  1438. if (sc) return sc
  1439. if (!props.showStorageCert || !props.listRow) return null
  1440. const row = props.listRow as Record<string, any>
  1441. return {
  1442. makeStatus: row.makeStatus ?? '0',
  1443. certImageUrls: row.certImageUrls ?? '',
  1444. makeDate: row.makeDate ?? '',
  1445. handleTime: row.handleTime ?? '',
  1446. handlerUserId: row.handlerUserId ?? '',
  1447. handlerUserName: row.handlerUserName ?? '',
  1448. remark: row.remark ?? ''
  1449. }
  1450. })
  1451. const storageCertAttachments = computed(() => {
  1452. const urls = String(storageCertInfo.value?.certImageUrls || '').trim()
  1453. if (!urls) return []
  1454. return urls
  1455. .split(',')
  1456. .map((u) => u.trim())
  1457. .filter(Boolean)
  1458. .map((url, index) => {
  1459. const rawName = url.split('/').pop() || ''
  1460. const fileName = decodeURIComponent(rawName) || `附件${index + 1}`
  1461. return { id: `cert_${index}`, fileName, fileUrl: url, fileType: '' }
  1462. })
  1463. })
  1464. const fullmoonInsuranceInfo = computed(() => {
  1465. const fm = bundle.value?.fullmoonTodo as Record<string, any> | undefined
  1466. if (fm) return fm
  1467. if (!props.showFullmoonInsurance || !props.listRow) return null
  1468. const row = props.listRow as Record<string, any>
  1469. return {
  1470. handleTime: row.handleTime ?? '',
  1471. handlerUserId: row.handlerUserId ?? '',
  1472. handlerUserName: row.handlerUserName ?? '',
  1473. handleRemark: row.handleRemark ?? row.remark ?? '',
  1474. insuranceAttachments: row.insuranceAttachments ?? ''
  1475. }
  1476. })
  1477. const fullmoonInsuranceAttachments = computed(() => {
  1478. const urls = String(fullmoonInsuranceInfo.value?.insuranceAttachments || '').trim()
  1479. if (!urls) return []
  1480. return urls
  1481. .split(',')
  1482. .map((u) => u.trim())
  1483. .filter(Boolean)
  1484. .map((url, index) => {
  1485. const rawName = url.split('/').pop() || ''
  1486. const fileName = decodeURIComponent(rawName) || `附件${index + 1}`
  1487. return { id: `ins_${index}`, fileName, fileUrl: url, fileType: '' }
  1488. })
  1489. })
  1490. /** 金额只读展示:千分位 + ¥ 前缀,null 显示 — */
  1491. function fmtMoney(v: unknown): string {
  1492. if (v == null || v === '') return '—'
  1493. return '¥' + formatMoneyDisplay(v)
  1494. }
  1495. const dialogTitle = computed(() => {
  1496. const name =
  1497. partyCustomer.value?.motherName || props.listRow?.motherName || protocol.value?.motherName
  1498. return `查看 — ${formatProtocolDocSubject('cell_storage', { motherName: name })}`
  1499. })
  1500. const hasAnyStatusChange = computed(() => {
  1501. if (!protocol.value) return false
  1502. return !!(
  1503. protocol.value.effectiveTime ||
  1504. protocol.value.expireTime ||
  1505. protocol.value.voidTime ||
  1506. protocol.value.toResearchTime
  1507. )
  1508. })
  1509. const collectorDisplay = computed(() => {
  1510. const fromList = props.listRow?.collectorUserName
  1511. if (fromList) return String(fromList)
  1512. const fromBundle = protocol.value?.collectorUserName
  1513. if (fromBundle) return String(fromBundle)
  1514. const id = protocol.value?.collectorUserId
  1515. const u = collectorUserOptions.value.find((x) => x.id === id)
  1516. return u?.nickName || dash(id)
  1517. })
  1518. const salesDisplay = computed(() => {
  1519. const fromList = props.listRow?.salesUserName
  1520. if (fromList) return String(fromList)
  1521. const fromBundle = collectionInfo.value?.salesUserName
  1522. if (fromBundle) return String(fromBundle)
  1523. const id = collectionInfo.value?.salesUserId
  1524. const u = salesUserOptions.value.find((x) => x.id === id)
  1525. return u?.nickName || dash(id)
  1526. })
  1527. const regionManagerDisplay = computed(() => {
  1528. const fromList = (props.listRow as any)?.regionManagerUserName
  1529. if (fromList) return String(fromList)
  1530. const fromBundle = (collectionInfo.value as any)?.regionManagerUserName
  1531. if (fromBundle) return String(fromBundle)
  1532. const id = (collectionInfo.value as any)?.regionManagerUserId
  1533. return dash(id)
  1534. })
  1535. const regionDisplay = computed(() => {
  1536. const fromList = props.listRow?.regionName
  1537. if (fromList) return String(fromList)
  1538. const fromBundle = collectionInfo.value?.regionName
  1539. if (fromBundle) return String(fromBundle)
  1540. const id = collectionInfo.value?.regionId
  1541. const r = regionOptions.value.find((x) => x.id === id)
  1542. return r?.regionName || dash(id)
  1543. })
  1544. const hospitalDisplay = computed(() => {
  1545. const fromList = props.listRow?.hospitalName
  1546. if (fromList) return String(fromList)
  1547. const fromBundle = collectionInfo.value?.hospitalName
  1548. if (fromBundle) return String(fromBundle)
  1549. const id = collectionInfo.value?.hospitalId
  1550. const h = hospitalOptions.value.find((x) => x.id === id)
  1551. return h?.hospitalName || dash(id)
  1552. })
  1553. function dash(val: unknown) {
  1554. return formatDisplayOrDash(val)
  1555. }
  1556. function formatYmd(val: unknown) {
  1557. const s = String(val || '').replace(/-/g, '')
  1558. if (s.length === 8) return `${s.slice(0, 4)}-${s.slice(4, 6)}-${s.slice(6, 8)}`
  1559. return dash(val)
  1560. }
  1561. function formatInstallmentAmounts(values?: number[] | null) {
  1562. if (!values?.length) return '—'
  1563. return values.map((v) => fmtMoney(v)).join(' / ')
  1564. }
  1565. function formatYm(val: unknown) {
  1566. const s = String(val || '')
  1567. if (s.length === 6) return `${s.slice(0, 4)}-${s.slice(4, 6)}`
  1568. return dash(val)
  1569. }
  1570. function payDetailColorClass(payStatus: string): string {
  1571. const s = String(payStatus || '')
  1572. if (s === 'ytf') return 'red'
  1573. if (s === 'tfqrz') return 'amber'
  1574. return 'green'
  1575. }
  1576. /** 缴费明细是否已完成财务收款确认(jfqrz 仅已提交待财务处理) */
  1577. function isReceiptFinanceConfirmed(detail: Record<string, any>) {
  1578. const s = String(detail.payStatus || '')
  1579. return s !== 'jfqrz' && s !== 'dfj'
  1580. }
  1581. interface MiniFlowStep {
  1582. key: string
  1583. label: string
  1584. dotClass: string
  1585. dotIcon: string
  1586. labelClass: string
  1587. connectorToNext?: string
  1588. hasDetailCard?: boolean
  1589. }
  1590. function buildMiniFlowSteps(detail: Record<string, any>): MiniFlowStep[] {
  1591. const s = String(detail.payStatus || '')
  1592. if (s === 'dfj') return []
  1593. const steps: MiniFlowStep[] = []
  1594. steps.push({
  1595. key: 'pay',
  1596. label: '缴费确认信息',
  1597. dotClass: 'done',
  1598. dotIcon: '✓',
  1599. labelClass: 'done',
  1600. connectorToNext: 'done',
  1601. hasDetailCard: true
  1602. })
  1603. if (s === 'jfqrz') {
  1604. steps.push({
  1605. key: 'receipt-finance',
  1606. label: '缴费财务确认信息',
  1607. dotClass: 'current-amber',
  1608. dotIcon: '●',
  1609. labelClass: 'current-amber',
  1610. hasDetailCard: true
  1611. })
  1612. } else {
  1613. steps.push({
  1614. key: 'receipt-finance',
  1615. label: '缴费财务确认信息',
  1616. dotClass: 'done',
  1617. dotIcon: '✓',
  1618. labelClass: 'done',
  1619. connectorToNext: s === 'yjf' ? undefined : 'done',
  1620. hasDetailCard: true
  1621. })
  1622. }
  1623. if (s === 'tfqrz' || s === 'ytf') {
  1624. steps.push({
  1625. key: 'refund-apply',
  1626. label: '退费确认信息',
  1627. dotClass: s === 'tfqrz' ? 'current-amber' : 'done',
  1628. dotIcon: s === 'tfqrz' ? '●' : '✓',
  1629. labelClass: s === 'tfqrz' ? 'current-amber' : 'done',
  1630. connectorToNext: s === 'ytf' ? 'done-red' : undefined,
  1631. hasDetailCard: true
  1632. })
  1633. }
  1634. if (s === 'ytf') {
  1635. steps.push({
  1636. key: 'refund-finance',
  1637. label: '退费财务确认信息',
  1638. dotClass: 'done-red',
  1639. dotIcon: '✓',
  1640. labelClass: 'done-red',
  1641. hasDetailCard: true
  1642. })
  1643. }
  1644. if (steps.length) {
  1645. delete steps[steps.length - 1].connectorToNext
  1646. }
  1647. return steps
  1648. }
  1649. function miniFlowConnectorStyle(total: number, index: number): string {
  1650. const leftPct = ((index + 0.5) / total) * 100
  1651. const widthPct = 100 / total
  1652. return `left: calc(${leftPct}% + 12px); width: calc(${widthPct}% - 12px);`
  1653. }
  1654. interface OverviewTimelineStep {
  1655. key: string
  1656. label: string
  1657. subLabel: string
  1658. dotClass: string
  1659. dotIcon: string
  1660. labelClass: string
  1661. connectorToNext?: string
  1662. }
  1663. /** 缴费总览 — 横向时间线节点(每个缴费明细对应一个节点) */
  1664. function buildOverviewTimelineSteps(): OverviewTimelineStep[] {
  1665. const details = paymentDetails.value
  1666. if (!details.length) return []
  1667. const steps: OverviewTimelineStep[] = details.map((d, i) => {
  1668. const s = String(d.payStatus || '')
  1669. const name = isInstallmentPayMode(String(payment.value?.payMode || ''))
  1670. ? `第${d.installmentNo || i + 1}期`
  1671. : `缴费${i + 1}`
  1672. if (s === 'ytf') {
  1673. return {
  1674. key: `ov-${i}`,
  1675. label: name,
  1676. subLabel: '已退费',
  1677. dotClass: 'refund',
  1678. dotIcon: '✓',
  1679. labelClass: 'refund'
  1680. }
  1681. }
  1682. if (s === 'tfqrz') {
  1683. return {
  1684. key: `ov-${i}`,
  1685. label: name,
  1686. subLabel: '退费中',
  1687. dotClass: 'refund-current',
  1688. dotIcon: '●',
  1689. labelClass: 'refund-current',
  1690. connectorToNext: 'refund-current'
  1691. }
  1692. }
  1693. if (s === 'yjf') {
  1694. return {
  1695. key: `ov-${i}`,
  1696. label: name,
  1697. subLabel: '付款完成',
  1698. dotClass: 'done',
  1699. dotIcon: '✓',
  1700. labelClass: 'done',
  1701. connectorToNext: 'done'
  1702. }
  1703. }
  1704. if (s === 'jfqrz') {
  1705. return {
  1706. key: `ov-${i}`,
  1707. label: name,
  1708. subLabel: '确认中',
  1709. dotClass: 'current',
  1710. dotIcon: '●',
  1711. labelClass: 'done',
  1712. connectorToNext: 'current'
  1713. }
  1714. }
  1715. return {
  1716. key: `ov-${i}`,
  1717. label: name,
  1718. subLabel: '已付款',
  1719. dotClass: 'pending',
  1720. dotIcon: '○',
  1721. labelClass: ''
  1722. }
  1723. })
  1724. // 填充 connectorToNext:下一个节点的连线颜色由本节点的状态决定
  1725. for (let i = 0; i < steps.length - 1; i++) {
  1726. if (!steps[i].connectorToNext) {
  1727. steps[i].connectorToNext = steps[i].dotClass === 'pending' ? '' : 'done'
  1728. }
  1729. }
  1730. return steps
  1731. }
  1732. function timelineConnectorStyle(total: number, index: number): string {
  1733. const leftPct = ((index + 0.5) / total) * 100
  1734. const widthPct = 100 / total
  1735. return `left: calc(${leftPct}% + 14px); width: calc(${widthPct}% - 14px);`
  1736. }
  1737. function auditorDisplay(row: Record<string, unknown>) {
  1738. const name = String(row.auditorUserName || '').trim()
  1739. if (name) return name
  1740. return dash(row.auditorUserId)
  1741. }
  1742. function sampleTypeName(id: string) {
  1743. return sampleTypeOptions.value.find((x) => x.id === id)?.typeName || dash(id)
  1744. }
  1745. function samplePayTitle(sp: Record<string, any>) {
  1746. const code = String(sp.sampleCode || '').trim()
  1747. const sample = samples.value.find((s) => String(s.sampleCode || '') === code)
  1748. if (sample?.sampleTypeName) return String(sample.sampleTypeName)
  1749. if (sample?.sampleTypeId) return sampleTypeName(String(sample.sampleTypeId))
  1750. return code || '样本'
  1751. }
  1752. function ensureUnitsInOptions(samples: Array<Record<string, any>>) {
  1753. const merged = [...unitOptions.value]
  1754. for (const s of samples) {
  1755. const id = String(s.unitId || '')
  1756. if (!id) continue
  1757. const name = String(s.unitName || '').trim()
  1758. const existing = merged.find((x) => x.id === id)
  1759. if (existing) {
  1760. if (name && (!existing.unitName || existing.unitName === existing.id)) {
  1761. existing.unitName = name
  1762. }
  1763. continue
  1764. }
  1765. merged.push({ id, unitName: name || id })
  1766. }
  1767. unitOptions.value = merged
  1768. }
  1769. function siteName(id: string) {
  1770. return siteOptions.value.find((x) => x.id === id)?.siteName || dash(id)
  1771. }
  1772. function expressName(id: string) {
  1773. return expressCompanyOptions.value.find((x) => x.id === id)?.expressName || dash(id)
  1774. }
  1775. function sampleTransportExtra(transport: Record<string, any> | undefined) {
  1776. if (!transport?.transportType) return '—'
  1777. if (transport.transportType === 'kdys') {
  1778. const parts: string[] = []
  1779. const ec = expressName(String(transport.expressCompanyId || ''))
  1780. if (ec !== '—') parts.push(ec)
  1781. if (transport.waybillNo) parts.push(String(transport.waybillNo))
  1782. if (transport.expressFee != null && transport.expressFee !== '') {
  1783. parts.push(`¥${transport.expressFee}`)
  1784. }
  1785. return parts.length ? parts.join(' · ') : '—'
  1786. }
  1787. if (transport.transportType === 'ryxd') {
  1788. const parts: string[] = []
  1789. if (transport.carrierName) parts.push(String(transport.carrierName))
  1790. if (transport.carrierPhone) parts.push(String(transport.carrierPhone))
  1791. return parts.length ? parts.join(' · ') : '—'
  1792. }
  1793. return '—'
  1794. }
  1795. function sampleReceptionAttachmentFiles(reception: Record<string, any>) {
  1796. const list = reception?.receiveAttachmentFiles
  1797. if (Array.isArray(list) && list.length) return list
  1798. const urls = String(reception?.receiveAttachments || '')
  1799. if (!urls.trim()) return []
  1800. return urls
  1801. .split(',')
  1802. .map((u, i) => {
  1803. const url = u.trim()
  1804. if (!url) return null
  1805. const name = url.includes('/') ? url.split('/').pop() || `附件${i + 1}` : url
  1806. return { id: `recv_${i}`, fileUrl: url, fileName: name }
  1807. })
  1808. .filter(Boolean) as Array<Record<string, unknown>>
  1809. }
  1810. function detailAttachments(detail: Record<string, any>) {
  1811. return Array.isArray(detail.attachments) ? detail.attachments : []
  1812. }
  1813. function transferAttachments(tr: Record<string, any>) {
  1814. if (Array.isArray(tr.attachments) && tr.attachments.length) return tr.attachments
  1815. return urlsToAttachmentFiles(String(tr.transferAttachments || ''))
  1816. }
  1817. function financeConfirmAttachmentFiles(detail: Record<string, any>) {
  1818. if (Array.isArray(detail.financeConfirmAttachmentFiles)) {
  1819. return detail.financeConfirmAttachmentFiles
  1820. }
  1821. return urlsToAttachmentFiles(String(detail.financeConfirmAttachments || ''))
  1822. }
  1823. function refundAttachmentFiles(detail: Record<string, any>) {
  1824. if (Array.isArray(detail.refundAttachmentFiles)) {
  1825. return detail.refundAttachmentFiles
  1826. }
  1827. return urlsToAttachmentFiles(String(detail.refundAttachments || ''))
  1828. }
  1829. function refundFinanceConfirmAttachmentFiles(detail: Record<string, any>) {
  1830. if (Array.isArray(detail.refundFinanceConfirmAttachmentFiles)) {
  1831. return detail.refundFinanceConfirmAttachmentFiles
  1832. }
  1833. return urlsToAttachmentFiles(String(detail.refundFinanceConfirmAttachments || ''))
  1834. }
  1835. function urlsToAttachmentFiles(urls: string) {
  1836. if (!urls.trim()) return []
  1837. return urls
  1838. .split(',')
  1839. .map((u, i) => {
  1840. const url = u.trim()
  1841. if (!url) return null
  1842. const name = url.includes('/') ? url.split('/').pop() || `附件${i + 1}` : url
  1843. return { id: `url_${i}`, fileUrl: url, fileName: name, fileSize: 0 }
  1844. })
  1845. .filter(Boolean) as Array<Record<string, any>>
  1846. }
  1847. function fullFileUrl(suffix: string) {
  1848. if (!suffix) return ''
  1849. if (suffix.startsWith('http://') || suffix.startsWith('https://') || suffix.startsWith('/'))
  1850. return suffix
  1851. return `${minioBaseUrl}/${suffix}`
  1852. }
  1853. function isVideoFile(file: { fileType?: string; fileName?: string }) {
  1854. const t = (file.fileType || '').toLowerCase()
  1855. if (t.startsWith('video/')) return true
  1856. return /\.(mp4|webm|ogg|mov)$/i.test(file.fileName || '')
  1857. }
  1858. const previewVisible = ref(false)
  1859. const previewUrl = ref('')
  1860. const previewType = ref<'image' | 'video'>('image')
  1861. function openPreview(file: Record<string, any>) {
  1862. if (!file.fileUrl) return
  1863. previewUrl.value = fullFileUrl(file.fileUrl)
  1864. previewType.value = isVideoFile(file) ? 'video' : 'image'
  1865. previewVisible.value = true
  1866. }
  1867. function downloadFile(file: Record<string, any>) {
  1868. downloadAttachmentFile(file, { fullFileUrl })
  1869. }
  1870. async function loadBaseLookups() {
  1871. const [stRes, uRes, ecRes, siteRes] = await Promise.all([
  1872. fetchCellSampleTypeList({ page: 1, pageSize: 100 }),
  1873. fetchItemUnitList({ page: 1, pageSize: 100 }),
  1874. fetchExpressCompanyList({ page: 1, pageSize: 100 }),
  1875. fetchSiteList({ page: 1, pageSize: 100 })
  1876. ])
  1877. sampleTypeOptions.value = (stRes.list || []) as any
  1878. unitOptions.value = (uRes.list || []) as any
  1879. expressCompanyOptions.value = ecRes.list || []
  1880. siteOptions.value = siteRes.list || []
  1881. }
  1882. async function loadConditionalLookups(data: Record<string, any>) {
  1883. const ci = data.collectionInfo as Record<string, any> | null
  1884. const p = data.protocol as Record<string, any> | undefined
  1885. const tasks: Promise<void>[] = []
  1886. if (ci?.regionId) {
  1887. tasks.push(
  1888. fetchCollectionRegionList({ page: 1, pageSize: 100 }).then((res) => {
  1889. regionOptions.value = res.list || []
  1890. })
  1891. )
  1892. tasks.push(
  1893. fetchHospitalList(String(ci.regionId), { page: 1, pageSize: 100 }).then((res) => {
  1894. hospitalOptions.value = res.list || []
  1895. })
  1896. )
  1897. }
  1898. if (p?.collectorUserId) {
  1899. tasks.push(
  1900. fetchUserList({ page: 1, pageSize: 50, status: '1' }).then((res) => {
  1901. collectorUserOptions.value = res.list || []
  1902. })
  1903. )
  1904. }
  1905. if (ci?.salesUserId) {
  1906. tasks.push(
  1907. fetchUserList({ page: 1, pageSize: 50, status: '1' }).then((res) => {
  1908. salesUserOptions.value = res.list || []
  1909. })
  1910. )
  1911. }
  1912. if (tasks.length) {
  1913. await Promise.all(tasks)
  1914. }
  1915. }
  1916. async function finishLookups(data: Record<string, any>, baseLookupsPromise: Promise<void>) {
  1917. lookupLoading.value = true
  1918. try {
  1919. await baseLookupsPromise
  1920. ensureUnitsInOptions((data.samples as Array<Record<string, any>>) || [])
  1921. await loadConditionalLookups(data)
  1922. } finally {
  1923. lookupLoading.value = false
  1924. }
  1925. }
  1926. async function loadAuditRecords() {
  1927. if (!props.showAuditHistory || !props.protocolId) {
  1928. auditRecords.value = []
  1929. return
  1930. }
  1931. auditLoading.value = true
  1932. try {
  1933. const res = await fetchCollectionProtocolAuditList({
  1934. page: 1,
  1935. pageSize: 100,
  1936. collectionProtocolId: props.protocolId
  1937. })
  1938. auditRecords.value = res.list || []
  1939. } catch {
  1940. auditRecords.value = []
  1941. } finally {
  1942. auditLoading.value = false
  1943. }
  1944. }
  1945. async function loadDetail() {
  1946. if (!props.protocolId) return
  1947. detailLoading.value = true
  1948. lookupLoading.value = true
  1949. bundle.value = null
  1950. auditRecords.value = []
  1951. const baseLookupsPromise = loadBaseLookups().catch(() => {})
  1952. const auditPromise = props.showAuditHistory ? loadAuditRecords() : null
  1953. let data: Record<string, any> | null = null
  1954. try {
  1955. data = (await fetchCollectionProtocolDetail(props.protocolId)) as Record<string, any>
  1956. bundle.value = data
  1957. } finally {
  1958. detailLoading.value = false
  1959. }
  1960. if (!data) {
  1961. lookupLoading.value = false
  1962. return
  1963. }
  1964. void finishLookups(data, baseLookupsPromise)
  1965. void auditPromise
  1966. if (props.highlightSampleCode) {
  1967. nextTick(() => {
  1968. document
  1969. .getElementById(`view-sample-${props.highlightSampleCode}`)
  1970. ?.scrollIntoView({ behavior: 'smooth', block: 'center' })
  1971. })
  1972. }
  1973. }
  1974. function scrollToSection(key: string) {
  1975. if (detailLoading.value && !bundle.value) return
  1976. activeTab.value = key
  1977. nextTick(() => {
  1978. document
  1979. .getElementById(`view-section-${key}`)
  1980. ?.scrollIntoView({ behavior: 'smooth', block: 'start' })
  1981. })
  1982. }
  1983. function handleClosed() {
  1984. bundle.value = null
  1985. auditRecords.value = []
  1986. activeTab.value = 'basic'
  1987. detailLoading.value = false
  1988. lookupLoading.value = false
  1989. auditLoading.value = false
  1990. }
  1991. watch(
  1992. () => [props.modelValue, props.protocolId] as const,
  1993. ([visible, id]) => {
  1994. if (visible) {
  1995. void loadTransferTypeDict()
  1996. void loadVoidTypeDict()
  1997. }
  1998. if (visible && id) loadDetail()
  1999. }
  2000. )
  2001. watch(
  2002. () => [props.modelValue, props.highlightSampleCode, bundle.value] as const,
  2003. ([visible, code]) => {
  2004. if (!visible || !code || !bundle.value) return
  2005. nextTick(() => {
  2006. document.getElementById(`view-sample-${code}`)?.scrollIntoView({
  2007. behavior: 'smooth',
  2008. block: 'center'
  2009. })
  2010. })
  2011. }
  2012. )
  2013. </script>
  2014. <style scoped lang="scss">
  2015. .protocol-view-body {
  2016. overflow: visible;
  2017. &.is-detail-loading {
  2018. min-height: min(680px, calc(100vh - 220px));
  2019. }
  2020. }
  2021. /* ---- KPI 摘要条(统一薄荷绿通栏 + 图标徽章) ---- */
  2022. .kpi-strip {
  2023. display: grid;
  2024. grid-template-columns: repeat(4, 1fr);
  2025. gap: 0;
  2026. margin-bottom: 24px;
  2027. padding: 6px;
  2028. background: linear-gradient(135deg, #e8f4ee 0%, #f8fafc 52%, #e8f4ee 100%);
  2029. border: 1px solid #a8d4c4;
  2030. border-radius: 12px;
  2031. box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  2032. }
  2033. .kpi-card {
  2034. display: flex;
  2035. align-items: flex-start;
  2036. gap: 12px;
  2037. padding: 14px 18px;
  2038. background: transparent;
  2039. border-radius: 8px;
  2040. transition: background 0.2s;
  2041. &:not(:last-child) {
  2042. border-right: 1px solid rgba(168, 212, 196, 0.75);
  2043. }
  2044. &:hover {
  2045. background: rgba(255, 255, 255, 0.55);
  2046. }
  2047. }
  2048. .kpi-card__icon {
  2049. display: flex;
  2050. align-items: center;
  2051. justify-content: center;
  2052. width: 40px;
  2053. height: 40px;
  2054. flex-shrink: 0;
  2055. border-radius: 10px;
  2056. background: #fff;
  2057. border: 1px solid #a8d4c4;
  2058. color: #065f46;
  2059. font-size: 18px;
  2060. }
  2061. .kpi-card__main {
  2062. min-width: 0;
  2063. flex: 1;
  2064. }
  2065. .kpi-label {
  2066. margin-bottom: 4px;
  2067. font-size: 11px;
  2068. font-weight: 500;
  2069. color: var(--mint-text-muted, #334155);
  2070. }
  2071. .kpi-value {
  2072. font-size: 15px;
  2073. font-weight: 600;
  2074. color: #0f172a;
  2075. display: flex;
  2076. align-items: center;
  2077. gap: 6px;
  2078. &--emphasis {
  2079. font-size: 16px;
  2080. font-weight: 700;
  2081. color: #047857;
  2082. letter-spacing: 0.02em;
  2083. }
  2084. }
  2085. /* ---- Section Card ---- */
  2086. .section-card {
  2087. border-radius: 12px;
  2088. padding: 22px 24px;
  2089. margin-bottom: 20px;
  2090. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  2091. transition:
  2092. transform 0.2s,
  2093. box-shadow 0.2s;
  2094. position: relative;
  2095. &:hover {
  2096. transform: translateY(-1px);
  2097. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  2098. }
  2099. &--white {
  2100. background: #fff;
  2101. }
  2102. &--green {
  2103. background: #f0fdf4;
  2104. }
  2105. }
  2106. .section-title {
  2107. display: flex;
  2108. align-items: center;
  2109. margin-bottom: 18px;
  2110. padding-bottom: 12px;
  2111. border-bottom: 1px solid #e2e8f0;
  2112. &::before {
  2113. content: '';
  2114. width: 3px;
  2115. height: 18px;
  2116. background: #047857;
  2117. border-radius: 2px;
  2118. margin-right: 10px;
  2119. flex-shrink: 0;
  2120. }
  2121. h3 {
  2122. margin: 0;
  2123. font-size: 15px;
  2124. font-weight: 600;
  2125. color: #1e293b;
  2126. line-height: 1.4;
  2127. }
  2128. &--banner {
  2129. margin: -22px -24px 18px;
  2130. padding: 10px 24px;
  2131. border-bottom: 1px solid rgba(16, 185, 129, 0.12);
  2132. border-radius: 12px 12px 0 0;
  2133. background: var(--primary-bg, #ecfdf5);
  2134. h3 {
  2135. color: var(--primary-dark, #059669);
  2136. }
  2137. }
  2138. }
  2139. /* ---- Data Grid ---- */
  2140. .data-grid {
  2141. display: grid;
  2142. gap: 14px 20px;
  2143. &--2 {
  2144. grid-template-columns: repeat(2, minmax(0, 1fr));
  2145. }
  2146. &--3 {
  2147. grid-template-columns: repeat(3, minmax(0, 1fr));
  2148. }
  2149. &--4 {
  2150. grid-template-columns: repeat(4, minmax(0, 1fr));
  2151. }
  2152. &--6 {
  2153. grid-template-columns: repeat(6, minmax(0, 1fr));
  2154. }
  2155. &--7 {
  2156. grid-template-columns: repeat(7, minmax(0, 1fr));
  2157. }
  2158. }
  2159. .data-grid--collection-row {
  2160. gap: 12px 14px;
  2161. }
  2162. .data-item {
  2163. min-width: 0;
  2164. &--full {
  2165. grid-column: 1 / -1;
  2166. }
  2167. }
  2168. .data-label {
  2169. font-size: 12px;
  2170. color: var(--mint-text-muted, #334155);
  2171. margin-bottom: 3px;
  2172. }
  2173. .data-value {
  2174. font-size: 14px;
  2175. color: #1e293b;
  2176. font-weight: 500;
  2177. word-break: break-word;
  2178. &--muted {
  2179. color: var(--mint-text-muted, #334155);
  2180. font-weight: 400;
  2181. }
  2182. }
  2183. /* 协议附件 / 知情同意书 / 孕妇健康调查表(三行堆叠) */
  2184. .protocol-basic-attachments-block {
  2185. margin-top: 14px;
  2186. display: flex;
  2187. flex-direction: column;
  2188. gap: 14px;
  2189. &--flush {
  2190. margin-top: 0;
  2191. }
  2192. }
  2193. .handle-summary-cards {
  2194. display: grid;
  2195. grid-template-columns: repeat(2, 1fr);
  2196. gap: 16px;
  2197. }
  2198. .handle-summary-card {
  2199. background: #fff;
  2200. border-radius: 10px;
  2201. padding: 18px 20px;
  2202. border: 1px solid rgba(0, 0, 0, 0.03);
  2203. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  2204. .attachment-row,
  2205. .remark-row {
  2206. margin-top: 12px;
  2207. padding-top: 12px;
  2208. border-top: 1px dashed #e2e8f0;
  2209. }
  2210. }
  2211. .protocol-attachments-item {
  2212. .protocol-attachments-value {
  2213. font-weight: 400;
  2214. }
  2215. :deep(.protocol-attachment-empty) {
  2216. font-size: 14px;
  2217. color: var(--mint-text-muted, #334155);
  2218. }
  2219. }
  2220. /* ---- Attachment / Remark Row ---- */
  2221. .attachment-row {
  2222. margin-top: 12px;
  2223. padding-top: 12px;
  2224. border-top: 1px dashed #e2e8f0;
  2225. display: flex;
  2226. flex-direction: column;
  2227. gap: 8px;
  2228. .data-label {
  2229. font-size: 12px;
  2230. color: var(--mint-text-muted, #334155);
  2231. }
  2232. }
  2233. .remark-row {
  2234. margin-top: 12px;
  2235. padding-top: 12px;
  2236. border-top: 1px dashed #e2e8f0;
  2237. }
  2238. /* ---- Status Change Section ---- */
  2239. .status-change-section {
  2240. margin-top: 14px;
  2241. padding-top: 14px;
  2242. border-top: 1px dashed #e2e8f0;
  2243. }
  2244. .status-change-title {
  2245. font-size: 12px;
  2246. font-weight: 600;
  2247. color: var(--mint-text-muted, #334155);
  2248. margin-bottom: 12px;
  2249. }
  2250. /* ---- Client Sub Cards (🤱👨👶) ---- */
  2251. .client-sub-cards {
  2252. display: grid;
  2253. grid-template-columns: repeat(3, 1fr);
  2254. gap: 16px;
  2255. }
  2256. .client-sub-card {
  2257. background: #fff;
  2258. border-radius: 10px;
  2259. padding: 18px 20px;
  2260. box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  2261. border: 1px solid rgba(0, 0, 0, 0.03);
  2262. transition:
  2263. transform 0.2s,
  2264. box-shadow 0.2s;
  2265. &:hover {
  2266. transform: translateY(-1px);
  2267. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
  2268. }
  2269. }
  2270. .sub-card-header {
  2271. display: flex;
  2272. align-items: center;
  2273. gap: 8px;
  2274. margin-bottom: 14px;
  2275. padding-bottom: 10px;
  2276. border-bottom: 1px solid #f1f5f9;
  2277. h4 {
  2278. margin: 0;
  2279. font-size: 14px;
  2280. font-weight: 600;
  2281. color: #1e293b;
  2282. }
  2283. }
  2284. .sub-card-icon {
  2285. font-size: 22px;
  2286. line-height: 1;
  2287. }
  2288. .sub-card-full-row {
  2289. margin-top: 10px;
  2290. padding-top: 10px;
  2291. border-top: 1px dashed #e2e8f0;
  2292. display: flex;
  2293. flex-direction: column;
  2294. gap: 2px;
  2295. }
  2296. /* ---- 审核记录内嵌列表(对齐 OpenSpec 嵌套列表 14px 标准) ---- */
  2297. .view-inner-table-wrap.list-body.list-wrap {
  2298. margin-top: 4px;
  2299. border: 1px solid var(--mint-border, #e2e8f0);
  2300. border-radius: var(--mint-radius, 10px);
  2301. overflow: hidden;
  2302. background: #fff;
  2303. :deep(.el-table) {
  2304. --el-table-header-bg-color: var(--mint-table-head, #f8fafc);
  2305. --el-table-border-color: var(--mint-border, #e2e8f0);
  2306. --el-table-row-hover-bg-color: var(--mint-row-hover, #f0fdf4);
  2307. --el-table-text-color: var(--mint-text, #0f172a);
  2308. --el-table-header-text-color: var(--mint-text-muted, #64748b);
  2309. font-size: 14px;
  2310. }
  2311. :deep(.el-table th.el-table__cell) {
  2312. font-size: 12px;
  2313. font-weight: 600;
  2314. color: var(--mint-text-muted, #64748b);
  2315. }
  2316. :deep(.el-table td.el-table__cell) {
  2317. font-size: 14px;
  2318. font-weight: 500;
  2319. color: var(--mint-text, #0f172a);
  2320. }
  2321. :deep(.el-empty) {
  2322. padding: 24px 0;
  2323. }
  2324. }
  2325. /* ---- Sample Cards ---- */
  2326. .sample-cards {
  2327. display: flex;
  2328. flex-direction: column;
  2329. gap: 14px;
  2330. }
  2331. .sample-card {
  2332. background: #fff;
  2333. border-radius: 10px;
  2334. border: 1px solid rgba(0, 0, 0, 0.05);
  2335. overflow: hidden;
  2336. transition:
  2337. transform 0.2s,
  2338. box-shadow 0.2s;
  2339. &:hover {
  2340. transform: translateY(-1px);
  2341. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  2342. }
  2343. &.is-highlight {
  2344. border-color: var(--primary, #10b981);
  2345. box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.18);
  2346. }
  2347. }
  2348. .sample-card__header {
  2349. display: flex;
  2350. align-items: center;
  2351. justify-content: space-between;
  2352. padding: 12px 18px;
  2353. background: #f8fafc;
  2354. border-bottom: 1px solid #f1f5f9;
  2355. }
  2356. .sample-card__title {
  2357. display: flex;
  2358. align-items: center;
  2359. gap: 8px;
  2360. font-size: 14px;
  2361. font-weight: 600;
  2362. color: #1e293b;
  2363. }
  2364. .sample-card__seq {
  2365. display: inline-flex;
  2366. align-items: center;
  2367. justify-content: center;
  2368. width: 22px;
  2369. height: 22px;
  2370. border-radius: 6px;
  2371. background: #047857;
  2372. color: #fff;
  2373. font-size: 11px;
  2374. font-weight: 700;
  2375. flex-shrink: 0;
  2376. }
  2377. .sample-card__body {
  2378. padding: 16px 18px;
  2379. display: flex;
  2380. flex-direction: column;
  2381. gap: 14px;
  2382. }
  2383. .sample-card__section {
  2384. &--transport,
  2385. &--reception {
  2386. margin-top: 2px;
  2387. padding-top: 12px;
  2388. border-top: 1px dashed #e2e8f0;
  2389. }
  2390. }
  2391. :deep(.sample-card__section--qc) {
  2392. margin-top: 2px;
  2393. padding-top: 12px;
  2394. border-top: 1px dashed #e2e8f0;
  2395. }
  2396. .sample-reception-empty {
  2397. font-size: 13px;
  2398. color: var(--mint-text-muted, #334155);
  2399. }
  2400. .check-list {
  2401. display: flex;
  2402. flex-wrap: wrap;
  2403. gap: 12px 20px;
  2404. }
  2405. .check-list-view {
  2406. pointer-events: none;
  2407. :deep(.el-checkbox.is-disabled) {
  2408. opacity: 1;
  2409. cursor: default;
  2410. .el-checkbox__label {
  2411. color: var(--el-text-color-regular);
  2412. }
  2413. .el-checkbox__input.is-disabled {
  2414. opacity: 1;
  2415. cursor: default;
  2416. .el-checkbox__inner {
  2417. background-color: var(--el-checkbox-bg-color);
  2418. border-color: var(--el-checkbox-input-border-color);
  2419. cursor: default;
  2420. }
  2421. &.is-checked .el-checkbox__inner {
  2422. background-color: var(--el-checkbox-checked-bg-color);
  2423. border-color: var(--el-checkbox-checked-input-border-color);
  2424. &::after {
  2425. border-color: var(--el-checkbox-checked-icon-color);
  2426. }
  2427. }
  2428. }
  2429. }
  2430. }
  2431. .sample-card__attachments {
  2432. margin-top: 12px;
  2433. }
  2434. .sample-card__section-label {
  2435. margin: 0 0 10px;
  2436. padding-left: 10px;
  2437. font-size: 13px;
  2438. font-weight: 600;
  2439. line-height: 1.4;
  2440. color: #334155;
  2441. border-left: 3px solid #10b981;
  2442. }
  2443. /* 样本卡内子组件小节标题:与 sample-card__section-label 统一 */
  2444. :deep(.sample-card__section-label),
  2445. :deep(.sample-qc-grouped-panel__subtitle),
  2446. :deep(.detail-section-title) {
  2447. margin: 0 0 10px;
  2448. padding-left: 10px;
  2449. font-size: 13px;
  2450. font-weight: 600;
  2451. line-height: 1.4;
  2452. color: #334155;
  2453. border-left: 3px solid #10b981;
  2454. }
  2455. .data-value--code {
  2456. font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
  2457. font-size: 13px;
  2458. color: var(--mint-text-muted, #334155);
  2459. }
  2460. .data-value--price {
  2461. color: #065f46;
  2462. font-weight: 700;
  2463. }
  2464. /* ---- Payment Summary (Metrics) ---- */
  2465. .payment-summary {
  2466. display: grid;
  2467. grid-template-columns: repeat(4, 1fr);
  2468. gap: 12px;
  2469. margin-bottom: 18px;
  2470. &--3 {
  2471. grid-template-columns: repeat(3, 1fr);
  2472. }
  2473. }
  2474. .payment-metric {
  2475. background: #fff;
  2476. border-radius: 8px;
  2477. padding: 12px 16px;
  2478. border: 1px solid #e2e8f0;
  2479. }
  2480. .pm-label {
  2481. font-size: 11px;
  2482. color: var(--mint-text-muted, #334155);
  2483. margin-bottom: 4px;
  2484. }
  2485. .pm-value {
  2486. font-size: 16px;
  2487. font-weight: 700;
  2488. color: #1e293b;
  2489. &--amount {
  2490. color: #065f46;
  2491. }
  2492. &--received {
  2493. color: #047857;
  2494. }
  2495. }
  2496. /* ---- Payment Detail Cards ---- */
  2497. .payment-details {
  2498. display: flex;
  2499. flex-direction: column;
  2500. gap: 16px;
  2501. }
  2502. .payment-detail-card {
  2503. background: #fff;
  2504. border-radius: 8px;
  2505. padding: 14px 16px;
  2506. border: 1px solid #e2e8f0;
  2507. &--refunded {
  2508. border-left: 3px solid #dc2626;
  2509. border-color: #e2e8f0;
  2510. border-left-color: #dc2626;
  2511. }
  2512. &--refund-pending {
  2513. border-left: 3px solid #d97706;
  2514. border-color: #e2e8f0;
  2515. border-left-color: #d97706;
  2516. }
  2517. }
  2518. /* ---- PDC Header ---- */
  2519. .pdc-header {
  2520. display: flex;
  2521. align-items: center;
  2522. justify-content: space-between;
  2523. margin-bottom: 12px;
  2524. padding-bottom: 10px;
  2525. border-bottom: 1px solid #f1f5f9;
  2526. }
  2527. .pdc-header-left {
  2528. display: flex;
  2529. align-items: center;
  2530. gap: 6px;
  2531. font-size: 14px;
  2532. font-weight: 600;
  2533. color: #1e293b;
  2534. &::before {
  2535. content: '';
  2536. width: 2px;
  2537. height: 14px;
  2538. border-radius: 1px;
  2539. flex-shrink: 0;
  2540. }
  2541. &.green::before {
  2542. background: #047857;
  2543. }
  2544. &.red::before {
  2545. background: #dc2626;
  2546. }
  2547. &.amber::before {
  2548. background: #d97706;
  2549. }
  2550. }
  2551. .pdc-header-amount {
  2552. font-size: 14px;
  2553. font-weight: 700;
  2554. margin-left: 4px;
  2555. &.green {
  2556. color: #065f46;
  2557. }
  2558. &.red {
  2559. color: #dc2626;
  2560. }
  2561. &.amber {
  2562. color: #d97706;
  2563. }
  2564. }
  2565. /* ---- PDC Info Row ---- */
  2566. .pdc-info-row {
  2567. display: grid;
  2568. grid-template-columns: repeat(4, minmax(0, 1fr));
  2569. gap: 14px 20px;
  2570. margin-bottom: 12px;
  2571. }
  2572. .pdc-info-item {
  2573. display: flex;
  2574. flex-direction: column;
  2575. gap: 2px;
  2576. .info-label {
  2577. font-size: 11px;
  2578. color: var(--mint-text-muted, #334155);
  2579. }
  2580. .info-value {
  2581. font-size: 13px;
  2582. color: #1e293b;
  2583. font-weight: 500;
  2584. }
  2585. }
  2586. .pdc-attachments-row {
  2587. margin-bottom: 8px;
  2588. padding-top: 8px;
  2589. border-top: 1px dashed #e2e8f0;
  2590. display: flex;
  2591. flex-direction: column;
  2592. gap: 4px;
  2593. }
  2594. /* ---- Payment Section Subtitle ---- */
  2595. .section-subtitle {
  2596. margin: 0 0 14px;
  2597. font-size: 12px;
  2598. font-weight: 600;
  2599. color: var(--mint-text-muted, #334155);
  2600. }
  2601. .sample-pay-readonly {
  2602. display: flex;
  2603. flex-direction: column;
  2604. gap: 12px;
  2605. margin-bottom: 16px;
  2606. }
  2607. .sample-pay-readonly__card {
  2608. padding: 12px 14px;
  2609. border: 1px solid var(--mint-border, #e2e8f0);
  2610. border-radius: 10px;
  2611. background: #fff;
  2612. }
  2613. .sample-pay-readonly__head {
  2614. display: flex;
  2615. align-items: center;
  2616. justify-content: space-between;
  2617. gap: 12px;
  2618. margin-bottom: 12px;
  2619. font-size: 13px;
  2620. font-weight: 600;
  2621. }
  2622. .sample-pay-readonly__title {
  2623. display: flex;
  2624. flex-wrap: wrap;
  2625. gap: 8px;
  2626. align-items: center;
  2627. }
  2628. .sample-pay-readonly__amt {
  2629. flex-shrink: 0;
  2630. color: #047857;
  2631. }
  2632. .sample-pay-readonly__batch-title {
  2633. margin: 14px 0 8px;
  2634. padding-left: 10px;
  2635. font-size: 13px;
  2636. font-weight: 600;
  2637. line-height: 1.4;
  2638. color: #334155;
  2639. border-left: 3px solid #10b981;
  2640. &--mt {
  2641. margin-top: 20px;
  2642. }
  2643. }
  2644. .sample-pay-readonly__empty {
  2645. margin: 4px 0 8px;
  2646. font-size: 12px;
  2647. color: var(--mint-text-muted, #94a3b8);
  2648. &--sm {
  2649. margin: 0;
  2650. padding: 2px 0 0;
  2651. }
  2652. }
  2653. .sample-pay-readonly__sch {
  2654. margin-top: 10px;
  2655. padding: 12px 12px 10px;
  2656. border-radius: 8px;
  2657. background: #f8fafc;
  2658. border: 1px solid #eef2f7;
  2659. }
  2660. .sample-pay-readonly__sch-title {
  2661. margin-bottom: 10px;
  2662. font-size: 13px;
  2663. font-weight: 600;
  2664. color: #0f172a;
  2665. }
  2666. .sample-pay-readonly__tr-title {
  2667. margin: 12px 0 8px;
  2668. font-size: 12px;
  2669. font-weight: 600;
  2670. color: #475569;
  2671. }
  2672. .sample-pay-readonly__tr-count {
  2673. font-weight: 400;
  2674. color: #94a3b8;
  2675. }
  2676. .sample-pay-readonly__sch .view-inner-table-wrap {
  2677. margin-top: 0;
  2678. }
  2679. .muted-dash {
  2680. color: var(--mint-text-muted, #94a3b8);
  2681. }
  2682. /* ---- v1 缴费明细(简洁平铺) ---- */
  2683. .pay-detail-simple {
  2684. display: flex;
  2685. flex-direction: column;
  2686. gap: 12px;
  2687. margin-bottom: 16px;
  2688. }
  2689. .pay-detail-simple__card {
  2690. padding: 12px 14px;
  2691. border: 1px solid var(--mint-border, #e2e8f0);
  2692. border-radius: 10px;
  2693. background: #fff;
  2694. }
  2695. .pay-detail-simple__head {
  2696. display: flex;
  2697. gap: 12px;
  2698. align-items: center;
  2699. justify-content: space-between;
  2700. margin-bottom: 12px;
  2701. }
  2702. .pay-detail-simple__title {
  2703. display: flex;
  2704. flex-wrap: wrap;
  2705. gap: 8px;
  2706. align-items: center;
  2707. font-size: 13px;
  2708. font-weight: 600;
  2709. color: #0f172a;
  2710. }
  2711. .pay-detail-simple__amt {
  2712. flex-shrink: 0;
  2713. font-size: 14px;
  2714. font-weight: 700;
  2715. color: #047857;
  2716. }
  2717. .pay-detail-simple__attach {
  2718. display: flex;
  2719. flex-wrap: wrap;
  2720. gap: 8px;
  2721. align-items: flex-start;
  2722. margin-top: 10px;
  2723. padding-top: 10px;
  2724. border-top: 1px dashed #e2e8f0;
  2725. }
  2726. .pay-detail-simple__attach-label {
  2727. flex-shrink: 0;
  2728. margin-top: 4px;
  2729. font-size: 12px;
  2730. color: #64748b;
  2731. }
  2732. .pay-detail-simple__extra {
  2733. margin-top: 10px;
  2734. padding-top: 10px;
  2735. border-top: 1px dashed #e2e8f0;
  2736. }
  2737. /* ---- Mini Flow ---- */
  2738. .mini-flow {
  2739. display: flex;
  2740. align-items: center;
  2741. gap: 0;
  2742. margin: 12px 0;
  2743. padding: 10px 14px;
  2744. background: #f8fafc;
  2745. border-radius: 8px;
  2746. position: relative;
  2747. }
  2748. .mini-flow-step {
  2749. display: flex;
  2750. flex-direction: column;
  2751. align-items: center;
  2752. position: relative;
  2753. flex: 1;
  2754. z-index: 1;
  2755. }
  2756. .mini-flow-dot {
  2757. width: 24px;
  2758. height: 24px;
  2759. border-radius: 50%;
  2760. display: flex;
  2761. align-items: center;
  2762. justify-content: center;
  2763. font-size: 11px;
  2764. font-weight: 700;
  2765. z-index: 1;
  2766. &.done {
  2767. background: #047857;
  2768. color: #fff;
  2769. box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.15);
  2770. }
  2771. &.done-red {
  2772. background: #dc2626;
  2773. color: #fff;
  2774. box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
  2775. }
  2776. &.current-amber {
  2777. background: #fff;
  2778. border: 2px solid #d97706;
  2779. color: #d97706;
  2780. box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
  2781. animation: pulseAmber 2s ease-in-out infinite;
  2782. }
  2783. &.pending-gray {
  2784. background: #f1f5f9;
  2785. color: #94a3b8;
  2786. border: 2px solid #e2e8f0;
  2787. }
  2788. }
  2789. .mini-flow-label {
  2790. font-size: 10px;
  2791. margin-top: 6px;
  2792. text-align: center;
  2793. max-width: 96px;
  2794. line-height: 1.3;
  2795. &.done {
  2796. color: #065f46;
  2797. font-weight: 600;
  2798. }
  2799. &.done-red {
  2800. color: #dc2626;
  2801. font-weight: 600;
  2802. }
  2803. &.current-amber {
  2804. color: #d97706;
  2805. font-weight: 600;
  2806. }
  2807. &.pending-gray {
  2808. color: #94a3b8;
  2809. }
  2810. }
  2811. /* ---- Flow Section: track + detail cards ---- */
  2812. .flow-section {
  2813. margin-top: 12px;
  2814. }
  2815. .flow-detail-cards {
  2816. display: grid;
  2817. grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  2818. gap: 12px;
  2819. margin-top: 14px;
  2820. }
  2821. .flow-detail-card {
  2822. border: 1px solid #e2e8f0;
  2823. border-radius: 8px;
  2824. overflow: hidden;
  2825. &--current-amber {
  2826. border-color: #fde68a;
  2827. background: #fffbeb;
  2828. }
  2829. &--done-red {
  2830. border-left: 3px solid #dc2626;
  2831. background: #fff;
  2832. }
  2833. &--pending-gray {
  2834. border-style: dashed;
  2835. background: #f8fafc;
  2836. }
  2837. }
  2838. .flow-detail-card__header {
  2839. display: flex;
  2840. align-items: center;
  2841. gap: 8px;
  2842. padding: 10px 14px;
  2843. border-bottom: 1px solid #f1f5f9;
  2844. background: #f8fafc;
  2845. .flow-detail-card--done-red & {
  2846. background: #fef2f2;
  2847. border-bottom-color: #fecaca;
  2848. }
  2849. .flow-detail-card--current-amber & {
  2850. background: #fffbeb;
  2851. border-bottom-color: #fde68a;
  2852. }
  2853. .flow-detail-card--pending-gray & {
  2854. background: #f1f5f9;
  2855. border-bottom-color: #e2e8f0;
  2856. }
  2857. }
  2858. .flow-detail-card__dot {
  2859. width: 20px;
  2860. height: 20px;
  2861. border-radius: 50%;
  2862. display: inline-flex;
  2863. align-items: center;
  2864. justify-content: center;
  2865. font-size: 10px;
  2866. font-weight: 700;
  2867. flex-shrink: 0;
  2868. &.done {
  2869. background: #047857;
  2870. color: #fff;
  2871. }
  2872. &.done-red {
  2873. background: #dc2626;
  2874. color: #fff;
  2875. }
  2876. &.current-amber {
  2877. background: #fff;
  2878. border: 2px solid #d97706;
  2879. color: #d97706;
  2880. }
  2881. &.pending-gray {
  2882. background: #f1f5f9;
  2883. border: 2px solid #e2e8f0;
  2884. color: #94a3b8;
  2885. }
  2886. }
  2887. .flow-detail-card__title {
  2888. font-size: 13px;
  2889. font-weight: 600;
  2890. color: #1e293b;
  2891. &.done {
  2892. color: #065f46;
  2893. }
  2894. &.done-red {
  2895. color: #dc2626;
  2896. }
  2897. &.current-amber {
  2898. color: #d97706;
  2899. }
  2900. &.pending-gray {
  2901. color: #94a3b8;
  2902. }
  2903. }
  2904. .flow-detail-card__body {
  2905. padding: 12px 14px;
  2906. display: flex;
  2907. flex-direction: column;
  2908. gap: 8px;
  2909. }
  2910. .flow-detail-card__kv {
  2911. display: flex;
  2912. flex-direction: column;
  2913. gap: 2px;
  2914. }
  2915. .flow-detail-card__label {
  2916. font-size: 11px;
  2917. color: var(--mint-text-muted, #334155);
  2918. }
  2919. .flow-detail-card__value {
  2920. font-size: 13px;
  2921. color: #1e293b;
  2922. font-weight: 500;
  2923. word-break: break-word;
  2924. &.red {
  2925. color: #dc2626;
  2926. font-weight: 700;
  2927. }
  2928. &.amber {
  2929. color: #d97706;
  2930. font-weight: 700;
  2931. }
  2932. &.green {
  2933. color: #065f46;
  2934. font-weight: 700;
  2935. }
  2936. }
  2937. .flow-detail-card__empty {
  2938. font-size: 12px;
  2939. color: var(--mint-text-muted, #334155);
  2940. font-style: italic;
  2941. }
  2942. .mini-flow-connector {
  2943. position: absolute;
  2944. top: 22px;
  2945. height: 2px;
  2946. z-index: 0;
  2947. &.done {
  2948. background: #047857;
  2949. }
  2950. &.done-red {
  2951. background: #dc2626;
  2952. }
  2953. &.current-amber {
  2954. background: #d97706;
  2955. }
  2956. &.pending-gray {
  2957. background: #e2e8f0;
  2958. }
  2959. }
  2960. /* ---- Refund Area ---- */
  2961. .refund-area {
  2962. margin-top: 12px;
  2963. padding: 14px 16px;
  2964. border-radius: 8px;
  2965. display: flex;
  2966. flex-direction: column;
  2967. gap: 10px;
  2968. &.red-tint {
  2969. background: #fef2f2;
  2970. border: 1px solid #fecaca;
  2971. }
  2972. &.amber-tint {
  2973. background: #fffbeb;
  2974. border: 1px solid #fde68a;
  2975. }
  2976. }
  2977. .refund-area-title {
  2978. font-size: 12px;
  2979. font-weight: 600;
  2980. margin-bottom: 2px;
  2981. display: flex;
  2982. align-items: center;
  2983. gap: 4px;
  2984. &.red {
  2985. color: #dc2626;
  2986. }
  2987. &.amber {
  2988. color: #d97706;
  2989. }
  2990. }
  2991. .refund-area-grid {
  2992. display: grid;
  2993. grid-template-columns: repeat(4, minmax(0, 1fr));
  2994. gap: 14px 20px;
  2995. .data-label {
  2996. font-size: 11px;
  2997. }
  2998. .data-value {
  2999. font-size: 13px;
  3000. &.red {
  3001. color: #dc2626;
  3002. font-weight: 700;
  3003. }
  3004. &.amber {
  3005. color: #d97706;
  3006. font-weight: 700;
  3007. }
  3008. }
  3009. .full-col {
  3010. grid-column: 1 / -1;
  3011. }
  3012. }
  3013. /* ---- Finance Area ---- */
  3014. .finance-area {
  3015. margin-top: 12px;
  3016. padding: 12px 16px;
  3017. border-radius: 8px;
  3018. background: #f0fdf4;
  3019. border: 1px solid #bbf7d0;
  3020. display: flex;
  3021. flex-direction: column;
  3022. gap: 8px;
  3023. }
  3024. .finance-area-title {
  3025. font-size: 12px;
  3026. font-weight: 600;
  3027. color: #065f46;
  3028. margin-bottom: 2px;
  3029. }
  3030. .finance-area-grid {
  3031. display: grid;
  3032. grid-template-columns: 1fr 1fr;
  3033. gap: 8px 20px;
  3034. .data-label {
  3035. font-size: 11px;
  3036. }
  3037. .data-value {
  3038. font-size: 13px;
  3039. }
  3040. }
  3041. @keyframes pulseAmber {
  3042. 0%,
  3043. 100% {
  3044. box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
  3045. }
  3046. 50% {
  3047. box-shadow: 0 0 0 6px rgba(217, 119, 6, 0.25);
  3048. }
  3049. }
  3050. /* ---- Payment Overview Timeline ---- */
  3051. .payment-timeline {
  3052. margin-top: 16px;
  3053. padding-top: 14px;
  3054. border-top: 1px dashed #e2e8f0;
  3055. }
  3056. .timeline-title {
  3057. font-size: 12px;
  3058. color: var(--mint-text-muted, #334155);
  3059. font-weight: 600;
  3060. margin-bottom: 12px;
  3061. }
  3062. .timeline {
  3063. display: flex;
  3064. align-items: center;
  3065. gap: 0;
  3066. position: relative;
  3067. }
  3068. .timeline-step {
  3069. display: flex;
  3070. flex-direction: column;
  3071. align-items: center;
  3072. position: relative;
  3073. flex: 1;
  3074. }
  3075. .timeline-dot {
  3076. width: 28px;
  3077. height: 28px;
  3078. border-radius: 50%;
  3079. display: flex;
  3080. align-items: center;
  3081. justify-content: center;
  3082. font-size: 12px;
  3083. font-weight: 600;
  3084. z-index: 1;
  3085. transition: transform 0.2s;
  3086. &.done {
  3087. background: #047857;
  3088. color: #fff;
  3089. box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.15);
  3090. }
  3091. &.current {
  3092. background: #fff;
  3093. border: 2px solid #047857;
  3094. color: #047857;
  3095. box-shadow: 0 0 0 4px rgba(4, 120, 87, 0.1);
  3096. }
  3097. &.pending {
  3098. background: #f1f5f9;
  3099. color: #94a3b8;
  3100. border: 2px solid #e2e8f0;
  3101. }
  3102. &.refund {
  3103. background: #dc2626;
  3104. color: #fff;
  3105. box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15);
  3106. }
  3107. &.refund-current {
  3108. background: #fff;
  3109. border: 2px solid #d97706;
  3110. color: #d97706;
  3111. box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.15);
  3112. animation: pulseAmber 2s ease-in-out infinite;
  3113. }
  3114. }
  3115. .timeline-label {
  3116. font-size: 11px;
  3117. color: var(--mint-text-muted, #334155);
  3118. margin-top: 8px;
  3119. text-align: center;
  3120. max-width: 80px;
  3121. line-height: 1.4;
  3122. &.done {
  3123. color: #065f46;
  3124. font-weight: 600;
  3125. }
  3126. &.refund {
  3127. color: #dc2626;
  3128. font-weight: 600;
  3129. }
  3130. &.refund-current {
  3131. color: #d97706;
  3132. font-weight: 600;
  3133. }
  3134. }
  3135. .timeline-connector {
  3136. position: absolute;
  3137. top: 14px;
  3138. height: 2px;
  3139. background: #e2e8f0;
  3140. z-index: 0;
  3141. &.done {
  3142. background: #047857;
  3143. }
  3144. &.current {
  3145. background: #047857;
  3146. }
  3147. &.refund {
  3148. background: #dc2626;
  3149. }
  3150. &.refund-current {
  3151. background: #d97706;
  3152. }
  3153. }
  3154. /* ---- Preview ---- */
  3155. .preview-container {
  3156. text-align: center;
  3157. }
  3158. /* ---- Responsive ---- */
  3159. @media (max-width: 1200px) {
  3160. .kpi-strip {
  3161. grid-template-columns: repeat(2, 1fr);
  3162. }
  3163. .kpi-strip .kpi-card {
  3164. border-right: none !important;
  3165. border-bottom: 1px solid rgba(168, 212, 196, 0.75);
  3166. &:nth-last-child(-n + 2) {
  3167. border-bottom: none;
  3168. }
  3169. }
  3170. .client-sub-cards,
  3171. .handle-summary-cards {
  3172. grid-template-columns: 1fr;
  3173. }
  3174. .protocol-attach-remark-row.data-grid--2 {
  3175. grid-template-columns: 1fr;
  3176. }
  3177. .payment-summary {
  3178. grid-template-columns: repeat(2, 1fr);
  3179. }
  3180. }
  3181. @media (max-width: 900px) {
  3182. .kpi-strip {
  3183. grid-template-columns: repeat(2, 1fr);
  3184. }
  3185. .kpi-strip .kpi-card:nth-last-child(-n + 2) {
  3186. border-bottom: 1px solid rgba(168, 212, 196, 0.75);
  3187. }
  3188. .kpi-strip .kpi-card:last-child {
  3189. border-bottom: none;
  3190. }
  3191. .client-sub-cards,
  3192. .handle-summary-cards {
  3193. grid-template-columns: 1fr;
  3194. }
  3195. .data-grid--4,
  3196. .data-grid--6,
  3197. .data-grid--7 {
  3198. grid-template-columns: repeat(2, minmax(0, 1fr));
  3199. }
  3200. .payment-summary,
  3201. .payment-summary--3 {
  3202. grid-template-columns: repeat(2, 1fr);
  3203. }
  3204. .pdc-info-row {
  3205. grid-template-columns: repeat(2, minmax(0, 1fr));
  3206. }
  3207. .refund-area-grid {
  3208. grid-template-columns: repeat(2, minmax(0, 1fr));
  3209. }
  3210. .finance-area-grid {
  3211. grid-template-columns: 1fr;
  3212. }
  3213. }
  3214. </style>