index.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156
  1. <template>
  2. <view class="report-export-page">
  3. <view class="report-export-search-bar-container">
  4. <view class="report-export-search-bar">
  5. <view class="report-export-search-input-wrap">
  6. <image
  7. src="../../../static/images/search.png"
  8. mode="scaleToFill"
  9. class="report-export-search-icon"
  10. />
  11. <input
  12. class="report-export-search-input"
  13. v-model="keyword"
  14. placeholder="搜索公司"
  15. />
  16. <view class="report-export-search-btn" @click="onSearch">搜索</view>
  17. </view>
  18. <view class="report-export-filter-btn" @click="onFilter">
  19. <image
  20. src="../../../static/images/filter.png"
  21. mode="scaleToFill"
  22. class="report-export-filter-icon"
  23. />
  24. <text class="report-export-filter-text">筛选</text>
  25. </view>
  26. </view>
  27. </view>
  28. <view class="scan-rate-ranges-container">
  29. <view class="scan-rate-ranges">
  30. <view class="scan-rate-ranges-content">
  31. <view
  32. v-for="(value, i) in options.status"
  33. :key="value"
  34. class="scan-rate-range"
  35. :class="{
  36. 'scan-rate-active': filterForm.status == value,
  37. }"
  38. @click.stop="pickFilterOption('status', value)"
  39. >{{ value }}</view
  40. >
  41. </view>
  42. </view>
  43. </view>
  44. <view
  45. v-if="loading"
  46. class="report-export-list-scroll"
  47. :style="{ height: 'auto' }"
  48. >
  49. <view class="report-export-loading-row">
  50. <view class="report-export-loading-wrapper">
  51. <image
  52. class="report-export-loading-icon"
  53. src="../../../static/images/loading.png"
  54. />
  55. </view>
  56. </view>
  57. </view>
  58. <scroll-view
  59. v-else-if="list.length > 0"
  60. class="report-export-list-scroll"
  61. scroll-y="true"
  62. :style="{ height: listViewHeight }"
  63. @scrolltolower="onScrollToLower"
  64. >
  65. <view
  66. class="report-export-item-card"
  67. v-for="(item, i) in list"
  68. :key="item.id"
  69. >
  70. <view class="report-export-item-header">
  71. <text class="report-export-item-title" @click="showModal(item)"
  72. >{{ getCustomerName(item) }}报表</text
  73. >
  74. <text
  75. class="report-export-status"
  76. :class="'report-export-status-' + item.status"
  77. >{{ getStatusText(item.status) }}</text
  78. >
  79. </view>
  80. <view class="report-export-item-row"
  81. >品种:{{ item.physicName || "" }}</view
  82. >
  83. <view class="report-export-item-row"
  84. >规格:{{ item.pkgSpec || "" }}</view
  85. >
  86. <view class="report-export-item-row"
  87. >时间:{{ formatDate(item.beginTime) }}--{{
  88. formatDate(item.endTime)
  89. }}</view
  90. >
  91. <view v-if="item.status == 2" class="report-export-progress-wrap">
  92. <view class="report-export-progress">
  93. <view
  94. class="report-export-progress-fill"
  95. :style="{ width: 60 + '%' }"
  96. ></view>
  97. <text class="report-export-progress-text">{{ 60 }}</text>
  98. </view>
  99. </view>
  100. <view v-if="item.status == 1" class="report-export-action-row">
  101. <view
  102. class="report-export-action-btn report-export-primary"
  103. @click="onStart(item)"
  104. >
  105. 确认开始计算
  106. </view>
  107. </view>
  108. <view v-else-if="item.status == 3" class="report-export-action-row">
  109. <view
  110. class="report-export-action-btn report-export-info"
  111. @click="toDetail(item)"
  112. >查看</view
  113. >
  114. <view
  115. class="report-export-action-btn report-export-primary"
  116. @click="onSend(item)"
  117. >
  118. 导出
  119. </view>
  120. </view>
  121. </view>
  122. <view class="report-export-loading-row" v-if="hasmore">
  123. <view class="report-export-loading-wrapper">
  124. <image
  125. class="report-export-loading-icon"
  126. src="../../../static/images/loading.png"
  127. />
  128. </view>
  129. </view>
  130. </scroll-view>
  131. <EmptyView v-else text="暂无导出任务" />
  132. <view class="report-export-footer">
  133. <view class="report-export-footer-btn" @click="onCreate">新建任务</view>
  134. </view>
  135. <view
  136. v-show="createModalOpen || filterModalOpen || emailModalOpen"
  137. class="report-export-create-modal-mask"
  138. @click="closeCreate"
  139. >
  140. </view>
  141. <view
  142. class="report-export-create-modal"
  143. :class="{ 'report-export-create-modal--open': createModalOpen }"
  144. >
  145. <view class="report-export-create-modal-title" @click="closeDropdownAll">
  146. <text>{{ taskTitle }}</text>
  147. <view class="report-export-create-modal-close" @click.stop="closeCreate"
  148. >×</view
  149. >
  150. </view>
  151. <view
  152. class="report-export-create-modal-body"
  153. :style="{ paddingBottom: 0 }"
  154. @click="closeDropdownAll"
  155. >
  156. <scroll-view
  157. scroll-y="true"
  158. :style="{
  159. height: '750rpx',
  160. paddingBottom: '20rpx',
  161. }"
  162. >
  163. <view class="report-export-create-modal-row">
  164. <text class="report-export-create-modal-label">省份</text>
  165. <view
  166. class="report-export-create-modal-inputwrap"
  167. @click.stop="modalType !== 'read' && openDropdown('region')"
  168. >
  169. <view class="report-export-create-modal-static">{{
  170. form.region && form.region.regionName
  171. ? form.region.regionName
  172. : "请选择省份"
  173. }}</view>
  174. <view
  175. class="report-export-input-arrow"
  176. v-if="modalType !== 'read'"
  177. ></view>
  178. <view
  179. class="report-export-create-modal-dropdown"
  180. v-if="dropdown.region"
  181. @click.stop
  182. :style="dropdownPosStyle()"
  183. >
  184. <view class="report-export-dropdown-search-row">
  185. <input
  186. class="report-export-dropdown-search-input"
  187. v-model="searchForm.region"
  188. :disabled="modalType === 'read'"
  189. @input="modalType !== 'read' && onInput('region')"
  190. @focus="onSearchFocus"
  191. @blur="onSearchBlur"
  192. />
  193. </view>
  194. <scroll-view
  195. class="report-export-create-modal-dropdown-list"
  196. scroll-y
  197. >
  198. <view
  199. class="report-export-create-modal-dropdown-item"
  200. v-for="(op, i) in filteredOptions('region')"
  201. :key="'r-' + i"
  202. @click.stop="
  203. modalType !== 'read' && pickOption('region', op)
  204. "
  205. >{{ op.regionName }}
  206. </view>
  207. <view
  208. v-if="
  209. !filteredOptions('region') ||
  210. filteredOptions('region').length === 0
  211. "
  212. class="report-export-create-modal-dropdown-item"
  213. >
  214. 未查找到该省份</view
  215. >
  216. </scroll-view>
  217. </view>
  218. </view>
  219. </view>
  220. <view class="report-export-create-modal-row">
  221. <text class="report-export-create-modal-label">客户类型</text>
  222. <view
  223. class="report-export-create-modal-inputwrap"
  224. @click.stop="modalType !== 'read' && openDropdown('customerType')"
  225. >
  226. <view class="report-export-create-modal-static">{{
  227. form.customerType || "请选择客户类型"
  228. }}</view>
  229. <view
  230. class="report-export-input-arrow"
  231. v-if="modalType !== 'read'"
  232. ></view>
  233. <view
  234. class="report-export-create-modal-dropdown"
  235. v-if="dropdown.customerType"
  236. @click.stop
  237. :style="dropdownPosStyle()"
  238. >
  239. <view
  240. class="report-export-create-modal-dropdown-item"
  241. v-for="(op, i) in filteredOptions('customerType')"
  242. :key="'t-' + i"
  243. @click.stop="
  244. modalType !== 'read' && pickOption('customerType', op)
  245. "
  246. >{{ op }}</view
  247. >
  248. <view
  249. v-if="filteredOptions('customerType').length === 0"
  250. class="report-export-create-modal-dropdown-item"
  251. >未查找到该客户类型</view
  252. >
  253. </view>
  254. </view>
  255. </view>
  256. <view class="report-export-create-modal-row">
  257. <text class="report-export-create-modal-label">客户</text>
  258. <view
  259. class="report-export-create-modal-inputwrap"
  260. @click.stop="modalType !== 'read' && openDropdown('customer')"
  261. >
  262. <view
  263. class="report-export-create-modal-static"
  264. :style="{ maxHeight: 'auto', overflowY: 'visible' }"
  265. >
  266. <block
  267. v-if="Array.isArray(form.customer) && form.customer.length"
  268. >
  269. <view
  270. :style="{
  271. maxHeight: '100rpx',
  272. overflowY: 'auto',
  273. paddingRight: '40rpx',
  274. }"
  275. >
  276. <text
  277. v-for="(op, i) in form.customer"
  278. :key="'cust-tag-' + i"
  279. class="customer-chip"
  280. >
  281. {{ op.customerName }}
  282. <text
  283. class="customer-chip-close"
  284. @click.stop="
  285. modalType !== 'read' &&
  286. removeCustomer(op.customerName)
  287. "
  288. >×</text
  289. >
  290. </text>
  291. </view>
  292. </block>
  293. <text v-else>请选择客户</text>
  294. <text
  295. v-if="
  296. form.customer &&
  297. form.customer.length &&
  298. modalType !== 'read'
  299. "
  300. class="customer-clear-all"
  301. @click.stop="modalType !== 'read' && clearAllCustomers()"
  302. >×</text
  303. >
  304. </view>
  305. <view
  306. class="report-export-input-arrow"
  307. v-if="modalType !== 'read'"
  308. ></view>
  309. <view
  310. class="report-export-create-modal-dropdown"
  311. v-if="dropdown.customer"
  312. @click.stop
  313. :style="[
  314. dropdownPosStyle(),
  315. { maxHeight: 'none', overflow: 'visible' },
  316. ]"
  317. >
  318. <view class="report-export-dropdown-search-row">
  319. <input
  320. class="report-export-dropdown-search-input"
  321. v-model="customerSearch"
  322. :disabled="modalType === 'read'"
  323. @input="modalType !== 'read' && onInput('customer')"
  324. @focus="onSearchFocus"
  325. @blur="onSearchBlur"
  326. />
  327. </view>
  328. <scroll-view
  329. class="report-export-create-modal-dropdown-list"
  330. scroll-y
  331. lower-threshold="20"
  332. @scrolltolower="getCustomerOptions"
  333. >
  334. <view
  335. class="report-export-create-modal-dropdown-item"
  336. :class="{
  337. 'report-export-selected': isCustomerSelected(
  338. op.customerName,
  339. ),
  340. }"
  341. v-for="(op, i) in customers"
  342. :key="'cust-' + i"
  343. @click.stop="
  344. modalType !== 'read' && pickOption('customer', op)
  345. "
  346. >{{ op.customerName }}</view
  347. >
  348. <view
  349. v-if="customers.length === 0 && !customerHasMore"
  350. class="report-export-create-modal-dropdown-item"
  351. >未查找到该客户</view
  352. >
  353. <view
  354. v-if="customerHasMore"
  355. class="report-export-loading-row"
  356. >
  357. <view class="report-export-loading-wrapper">
  358. <image
  359. class="report-export-loading-icon"
  360. src="../../../static/images/loading.png"
  361. />
  362. </view>
  363. </view>
  364. </scroll-view>
  365. </view>
  366. </view>
  367. </view>
  368. <view class="report-export-create-modal-row">
  369. <text class="report-export-create-modal-label">其它客户</text>
  370. <view class="report-export-create-modal-inputwrap">
  371. <input
  372. class="report-export-dropdown-search-input"
  373. v-model="form.otherCustomer"
  374. placeholder="请填写(多个客户用半角逗号隔开)"
  375. placeholder-class="report-export-dropdown-other-customer-input"
  376. :disabled="modalType === 'read'"
  377. :style="{ color: '#666', padding: 0, border: 'none' }"
  378. />
  379. </view>
  380. </view>
  381. <view class="report-export-create-modal-row">
  382. <text class="report-export-create-modal-label">品种</text>
  383. <view
  384. class="report-export-create-modal-inputwrap"
  385. @click.stop="modalType !== 'read' && openDropdown('product')"
  386. >
  387. <view class="report-export-create-modal-static">{{
  388. form.product?.physicName || "请选择品种"
  389. }}</view>
  390. <view
  391. class="report-export-input-arrow"
  392. v-if="modalType !== 'read'"
  393. ></view>
  394. <view
  395. class="report-export-create-modal-dropdown"
  396. :style="[{ top: 'auto', bottom: '84rpx' }]"
  397. v-if="dropdown.product"
  398. @click.stop
  399. >
  400. <view class="report-export-dropdown-search-row">
  401. <input
  402. class="report-export-dropdown-search-input"
  403. v-model="searchForm.product"
  404. :disabled="modalType === 'read'"
  405. @input="modalType !== 'read' && onInput('product')"
  406. @focus="onSearchFocus"
  407. @blur="onSearchBlur"
  408. />
  409. </view>
  410. <scroll-view
  411. class="report-export-create-modal-dropdown-list"
  412. scroll-y
  413. @scrolltolower="loadMoreProducts('create')"
  414. >
  415. <view
  416. class="report-export-create-modal-dropdown-item"
  417. v-for="(op, i) in displayProducts"
  418. :key="'p-' + i"
  419. @click.stop="
  420. modalType !== 'read' && pickOption('product', op)
  421. "
  422. >{{ op.physicName }}
  423. </view>
  424. <view
  425. v-if="displayProducts?.length === 0"
  426. class="report-export-create-modal-dropdown-item"
  427. >
  428. 未查找到该品种</view
  429. >
  430. </scroll-view>
  431. </view>
  432. </view>
  433. </view>
  434. <view class="report-export-create-modal-row">
  435. <text class="report-export-create-modal-label">规格</text>
  436. <view
  437. class="report-export-create-modal-inputwrap"
  438. :class="{
  439. 'report-export-input-disabled':
  440. !form.product?.drugEntBaseInfoId,
  441. }"
  442. @click.stop="
  443. modalType !== 'read' &&
  444. form.product?.drugEntBaseInfoId &&
  445. openDropdown('pkgSpec')
  446. "
  447. >
  448. <view class="report-export-create-modal-static">{{
  449. form.pkgSpec || "请选择规格(请先选择品种)"
  450. }}</view>
  451. <view
  452. class="report-export-input-arrow"
  453. v-if="modalType !== 'read'"
  454. ></view>
  455. <view
  456. class="report-export-create-modal-dropdown"
  457. v-if="dropdown.pkgSpec"
  458. @click.stop
  459. :style="[{ top: 'auto', bottom: '84rpx' }]"
  460. >
  461. <view
  462. class="report-export-create-modal-dropdown-item"
  463. v-for="(op, i) in filteredOptions('pkgSpec')"
  464. :key="'t-' + i"
  465. @click.stop="
  466. modalType !== 'read' && pickOption('pkgSpec', op)
  467. "
  468. >{{ op }}</view
  469. >
  470. <view
  471. v-if="filteredOptions('pkgSpec')?.length === 0"
  472. class="report-export-create-modal-dropdown-item"
  473. >
  474. 未查找到该品种规格</view
  475. >
  476. </view>
  477. </view>
  478. </view>
  479. <view class="report-export-create-modal-row">
  480. <text class="report-export-create-modal-label">时间</text>
  481. <view
  482. class="report-export-create-modal-inputwrap"
  483. @click="openDatePicker"
  484. >
  485. <view
  486. class="report-export-create-modal-static report-export-input-simulator"
  487. :style="{
  488. color: dateRange && dateRange.length ? '#333' : '#606266',
  489. }"
  490. >
  491. <uni-icons
  492. type="calendar"
  493. size="22"
  494. color="#c0c4cc"
  495. ></uni-icons>
  496. <view style="flex: 1; text-align: center"
  497. >{{
  498. dateRange && dateRange.length ? dateRange[0] : "开始时间"
  499. }}
  500. </view>
  501. <view>-</view>
  502. <view style="flex: 1; text-align: center"
  503. >{{
  504. dateRange && dateRange.length ? dateRange[1] : "结束时间"
  505. }}
  506. </view>
  507. </view>
  508. <view
  509. class="report-export-input-simulator-clear"
  510. v-if="dateRange && dateRange.length"
  511. @click.stop="dateRange = []"
  512. >
  513. <uni-icons type="clear" size="22" color="#c0c4cc"></uni-icons>
  514. </view>
  515. </view>
  516. </view>
  517. </scroll-view>
  518. <!-- Hidden Picker for API access -->
  519. <view style="position: absolute; left: -10000px; top: 0">
  520. <uni-datetime-picker
  521. ref="datePicker"
  522. type="daterange"
  523. v-model="dateRange"
  524. @change="onDateChange"
  525. />
  526. </view>
  527. </view>
  528. <view class="report-export-create-modal-footer" @click="closeDropdownAll">
  529. <view
  530. class="report-export-create-modal-btn"
  531. @click.stop="confirmCreate"
  532. v-if="modalType !== 'read'"
  533. >{{ modalType === "create" ? "新建任务" : "修改任务" }}</view
  534. >
  535. <view
  536. :style="{ display: 'flex', 'justify-content': 'space-between' }"
  537. v-else
  538. >
  539. <view
  540. class="report-export-create-modal-btn"
  541. :style="{ flex: '0 0 40%' }"
  542. @click.stop="closeCreate"
  543. >关闭</view
  544. >
  545. <view
  546. class="report-export-create-modal-btn"
  547. :style="{ background: 'red', flex: '0 0 40%' }"
  548. @click.stop="confirmDelete"
  549. >删除</view
  550. >
  551. </view>
  552. </view>
  553. </view>
  554. <view
  555. class="report-export-create-modal"
  556. :class="{ 'report-export-create-modal--open': filterModalOpen }"
  557. >
  558. <view class="report-export-create-modal-title" @click="closeDropdownAll"
  559. >筛选条件</view
  560. >
  561. <view class="report-export-create-modal-body" @click="closeDropdownAll">
  562. <view class="report-export-create-modal-row">
  563. <text class="report-export-create-modal-label">品种:</text>
  564. <view
  565. class="report-export-create-modal-inputwrap"
  566. @click.stop="openFilterDropdown('product')"
  567. >
  568. <view class="report-export-create-modal-static">{{
  569. filterForm.product?.physicName || "请选择品种"
  570. }}</view>
  571. <view
  572. class="report-export-create-modal-dropdown"
  573. :style="[{ top: 'auto', bottom: '84rpx' }]"
  574. v-if="filterDropdown.product"
  575. @click.stop
  576. >
  577. <view class="report-export-dropdown-search-row">
  578. <input
  579. class="report-export-dropdown-search-input"
  580. v-model="filterSearchForm.product"
  581. @input="onFilterInput('product')"
  582. @focus="onSearchFocus"
  583. @blur="onSearchBlur"
  584. />
  585. </view>
  586. <scroll-view
  587. class="report-export-create-modal-dropdown-list"
  588. scroll-y
  589. @scrolltolower="loadMoreProducts('filter')"
  590. >
  591. <view
  592. class="report-export-create-modal-dropdown-item"
  593. v-for="(op, i) in filterDisplayProducts"
  594. :key="'prd-' + i"
  595. @click.stop="pickFilterOption('product', op)"
  596. >{{ op.physicName }}</view
  597. >
  598. <view
  599. v-if="filterDisplayProducts?.length === 0"
  600. class="report-export-create-modal-dropdown-item"
  601. >
  602. 未查找到该品种
  603. </view>
  604. </scroll-view>
  605. </view>
  606. </view>
  607. </view>
  608. <!-- <view class="report-export-create-modal-row">
  609. <text class="report-export-create-modal-label">规格</text>
  610. <view class="report-export-create-modal-inputwrap"
  611. :class="{ 'report-export-input-disabled': !filterForm.product?.drugEntBaseInfoId }"
  612. @click.stop="filterForm.product?.drugEntBaseInfoId && openFilterDropdown('pkgSpec')">
  613. <view class="report-export-create-modal-static">{{
  614. filterForm.pkgSpec || "请选择品种规格(请先选择品种)"
  615. }}</view>
  616. <view class="report-export-input-arrow"></view>
  617. <view class="report-export-create-modal-dropdown" v-if="filterDropdown.pkgSpec" @click.stop
  618. :style="[{ top: 'auto', bottom: '84rpx' }]">
  619. <view class="report-export-create-modal-dropdown-item" v-for="(op, i) in filteredOptions('pkgSpec')"
  620. :key="'t-' + i" @click.stop="
  621. pickFilterOption('pkgSpec', op)
  622. ">{{ op }}</view>
  623. <view v-if="filteredOptions('pkgSpec')?.length === 0" class="report-export-create-modal-dropdown-item">
  624. 未查找到该品种规格</view>
  625. </view>
  626. </view>
  627. </view> -->
  628. <view class="report-export-create-modal-row">
  629. <text class="report-export-create-modal-label">时间:</text>
  630. <view
  631. class="report-export-create-modal-inputwrap"
  632. v-if="filterModalOpen"
  633. >
  634. <uni-datetime-picker
  635. type="daterange"
  636. :border="false"
  637. v-model="filterDateRange"
  638. @change="onFilterDateChange"
  639. />
  640. </view>
  641. </view>
  642. </view>
  643. <view class="report-export-create-modal-footer" @click="closeDropdownAll">
  644. <view class="report-export-create-modal-btn" @click.stop="confirmFilter"
  645. >确认</view
  646. >
  647. </view>
  648. </view>
  649. <view
  650. class="report-export-create-modal report-export-create-email-modal"
  651. :class="{ 'report-export-create-modal--open': emailModalOpen }"
  652. :style="{ transform: 'translateY(1000%)' }"
  653. >
  654. <view class="report-export-create-modal-title">
  655. <text>发送至邮箱</text>
  656. <view
  657. class="report-export-create-modal-close"
  658. @click.stop="closeEmailModal"
  659. >×</view
  660. >
  661. </view>
  662. <view
  663. class="report-export-create-modal-body"
  664. :style="{ padding: '40rpx' }"
  665. >
  666. <!-- <view class="report-export-email-input-wrap" :class="{ 'report-export-input-error': emailError }">
  667. <input class="report-export-email-input" v-model="emailForm.email" placeholder="请填写邮箱"
  668. placeholder-style="color: #c0c4cc" @input="emailError = false" />
  669. <text class="report-export-email-suffix">@999.com.cn</text>
  670. </view> -->
  671. <up-input
  672. v-model="emailForm.email"
  673. border="none"
  674. :customStyle="{
  675. backgroundColor: '#ebf3fb',
  676. height: '80rpx',
  677. paddingLeft: '20rpx',
  678. }"
  679. placeholder="请填写邮箱"
  680. >
  681. <template #suffix style="margin-right: 30rpx"> @999.com.cn </template>
  682. </up-input>
  683. <text v-if="emailError" class="report-export-error-text"
  684. >请输入邮箱</text
  685. >
  686. </view>
  687. <view
  688. class="report-export-create-modal-footer"
  689. :style="{
  690. padding: '20rpx 40rpx 40rpx',
  691. display: 'flex',
  692. 'justify-content': 'space-between',
  693. }"
  694. >
  695. <view
  696. class="report-export-create-modal-btn"
  697. :style="{
  698. background: '#fff',
  699. color: '#666',
  700. border: '1rpx solid #dcdfe6',
  701. flex: '0 0 45%',
  702. }"
  703. @click.stop="closeEmailModal"
  704. >取消</view
  705. >
  706. <view
  707. class="report-export-create-modal-btn"
  708. :style="{ flex: '0 0 45%' }"
  709. @click.stop="handleSendEmail"
  710. >发送
  711. </view>
  712. </view>
  713. </view>
  714. </view>
  715. </template>
  716. <script>
  717. import EmptyView from "../../../wigets/empty.vue";
  718. import { formatDate, getPaginatedList } from "../../../utils/utils.js";
  719. import request from "../../../request/index.js";
  720. const customerTypeMap = {
  721. VIP客户: "VIP",
  722. 二级客户: "二级",
  723. 三级客户: "三级",
  724. };
  725. const statusMap = {
  726. 全部: 0,
  727. 待开始: 1,
  728. 进行中: 2,
  729. 已完成: 3,
  730. };
  731. export default {
  732. components: {
  733. EmptyView,
  734. },
  735. data() {
  736. return {
  737. keyword: "",
  738. totalCount: 0,
  739. loading: true,
  740. hasmore: true,
  741. fetchLoading: false,
  742. pageNum: 1,
  743. pageSize: 10,
  744. list: [],
  745. listViewHeight: "400px",
  746. createModalOpen: false,
  747. form: {
  748. region: { regionName: "" },
  749. customerType: "",
  750. customer: [],
  751. product: { physicName: "" },
  752. otherCustomer: "",
  753. },
  754. dateRange: [],
  755. computeTimer: null,
  756. dropdown: {
  757. region: false,
  758. customerType: false,
  759. customer: false,
  760. product: false,
  761. pkgSpec: false,
  762. },
  763. options: {
  764. region: [],
  765. customerType: ["VIP客户", "二级客户", "三级客户"],
  766. product: [],
  767. pkgSpec: [],
  768. status: ["全部", "待开始", "进行中", "已完成"],
  769. },
  770. // dropdown search inputs (create modal)
  771. searchForm: {
  772. region: "",
  773. product: "",
  774. },
  775. // Pagination state for products
  776. productPage: 0,
  777. productPageSize: 10,
  778. displayProducts: [], // Currently displayed products
  779. // dropdown search inputs (filter modal)
  780. filterSearchForm: {
  781. product: "",
  782. },
  783. // Pagination state for filter products
  784. filterProductPage: 0,
  785. filterDisplayProducts: [],
  786. customers: [],
  787. customerPage: 1,
  788. customerPageSize: 10,
  789. customerTotal: null,
  790. customerHasMore: true,
  791. customerLoading: false,
  792. customerDebounceTimer: null,
  793. taskTitle: "创建任务",
  794. filterModalOpen: false,
  795. filterForm: {
  796. product: { physicName: "" },
  797. status: "全部",
  798. pkgSpec: "",
  799. },
  800. filterDropdown: { product: false, pkgSpec: false },
  801. filterDateRange: [],
  802. modalType: "",
  803. dropdownUpward: false,
  804. customerSearch: "",
  805. currentItem: {},
  806. emailModalOpen: false,
  807. emailForm: {
  808. email: "",
  809. },
  810. emailError: false,
  811. };
  812. },
  813. created() {
  814. const userInfo = uni.getStorageSync("userInfo");
  815. const staffEmail = userInfo?.staffEmail || "";
  816. this.emailForm.email = staffEmail.split("@")[0];
  817. console.log("reportExport\index.vue,storage,userInfo", userInfo);
  818. this.initList();
  819. this.getProviceList();
  820. this.getDrugInfoName();
  821. this.fetchList();
  822. try {
  823. uni.onKeyboardHeightChange(({ height }) => {
  824. this.dropdownUpward = height > 0;
  825. });
  826. } catch (e) {}
  827. },
  828. computed: {
  829. taskTitle() {
  830. if (this.modalType === "create") {
  831. return "创建任务";
  832. } else if (this.modalType == "edit") {
  833. return "修改任务";
  834. } else if (this.modalType == "read") {
  835. return "查看任务";
  836. }
  837. },
  838. },
  839. watch: {
  840. "form.customerType"(val) {
  841. this.customerPage = 1;
  842. this.customerTotal = null;
  843. this.customerHasMore = true;
  844. this.customers = [];
  845. if (this.customerDebounceTimer) clearTimeout(this.customerDebounceTimer);
  846. this.getCustomerOptions();
  847. },
  848. "form.region": {
  849. handler() {
  850. this.customerPage = 1;
  851. this.customerTotal = null;
  852. this.customerHasMore = true;
  853. this.customers = [];
  854. if (this.customerDebounceTimer)
  855. clearTimeout(this.customerDebounceTimer);
  856. this.getCustomerOptions();
  857. },
  858. deep: true,
  859. },
  860. "emailForm.email": {
  861. handler(newVal, oldVal) {
  862. if (!oldVal && !newVal && newVal !== oldVal) {
  863. this.emailError = false;
  864. } else {
  865. this.emailError = !newVal;
  866. }
  867. },
  868. deep: true,
  869. },
  870. "filterForm.status"(val) {
  871. this.resetFetch();
  872. },
  873. },
  874. methods: {
  875. getCustomerName(data = {}) {
  876. const { customerName = "", otherCustomer = "" } = data;
  877. let name = customerName || "";
  878. if (otherCustomer) {
  879. if (name) {
  880. name += `,${otherCustomer}`;
  881. } else {
  882. name = otherCustomer;
  883. }
  884. }
  885. const arr = name.split(",");
  886. if (arr.length == 0) return "--";
  887. return arr.length == 1
  888. ? arr[0].trim()
  889. : `${arr[0].trim()}等${arr.length}个公司`;
  890. },
  891. formatDate(date) {
  892. return formatDate({ date }, "YYYY-MM-DD");
  893. },
  894. getStatusText(status) {
  895. if (status == "1") {
  896. return "导出待开始";
  897. } else if (status == "2") {
  898. return "导出进行中";
  899. } else if (status == "3" || status == "4") {
  900. return "导出已完成";
  901. }
  902. return "未知状态";
  903. },
  904. getDrugInfoName() {
  905. request("/bills/getDrugInfoName", {
  906. path: "/reportExport/index.vue",
  907. }).then((res) => {
  908. if (res.code == 200) {
  909. const _data = res.data;
  910. this.options.product = _data;
  911. }
  912. });
  913. },
  914. getGuigeList(physicName) {
  915. if (!physicName) return;
  916. request("/report/getDrugSpec", {
  917. physicName,
  918. path: "/reportExport/index.vue",
  919. }).then((res) => {
  920. if (res.code == 200) {
  921. this.options.pkgSpec = res.data || [];
  922. }
  923. });
  924. },
  925. getProviceList() {
  926. request("/common/getProviceList", {
  927. path: "/reportExport/index.vue",
  928. }).then((res) => {
  929. if (res.code == 200) {
  930. const _data = res.data;
  931. this.options.region = _data;
  932. }
  933. });
  934. },
  935. getCustomerOptions() {
  936. if (!this.customerHasMore || this.customerLoading) return;
  937. this.customerLoading = true;
  938. request("/customer/info/getCustomerInfo", {
  939. pageNum: this.customerPage,
  940. pageSize: this.customerPageSize,
  941. customerName: this.customerSearch || "",
  942. customerLevel: customerTypeMap?.[this.form.customerType] || undefined,
  943. provinceCode: this.form?.region?.regionCode || undefined,
  944. path: "/reportExport/index.vue",
  945. }).then((res) => {
  946. if (res.code == 200) {
  947. const _data = res.data || {};
  948. this.customerTotal = _data.total || 0;
  949. const list = Array.isArray(_data.list) ? _data.list : [];
  950. this.customers = [...this.customers, ...list];
  951. if (this.customers.length >= this.customerTotal) {
  952. this.customerHasMore = false;
  953. } else {
  954. this.customerPage++;
  955. this.customerHasMore = true;
  956. }
  957. }
  958. this.customerLoading = false;
  959. });
  960. },
  961. initList() {
  962. const info = uni.getSystemInfoSync();
  963. const h = info.windowHeight || 800;
  964. this.listViewHeight = Math.max(0, h - 280) + "px";
  965. // this.list = this.genItems(Math.min(10, this.totalCount));
  966. // this.animateAll();
  967. },
  968. onFilter() {
  969. this.filterModalOpen = true;
  970. },
  971. showModal(item = {}) {
  972. const map = {
  973. 1: "edit",
  974. 2: "read",
  975. 3: "read",
  976. };
  977. this.modalType = map[item?.status] || "create";
  978. if (this.modalType === "create") {
  979. this.taskTitle = "创建任务";
  980. } else {
  981. if (this.modalType == "edit") {
  982. this.taskTitle = "修改任务";
  983. } else if (this.modalType == "read") {
  984. this.taskTitle = "查看任务";
  985. }
  986. const cNames = item.customerName.split(",");
  987. const cCodes = (item.customerId || "").split(",");
  988. this.form = {
  989. customer: cCodes.map((i, index) => ({
  990. customerName: cNames[index],
  991. customerCode: i,
  992. })),
  993. region: {
  994. regionCode: item.regionCode,
  995. regionName: item.regionName,
  996. },
  997. customerType:
  998. item.customerType == 1
  999. ? "VIP客户"
  1000. : item.customerType == 2
  1001. ? "二级客户"
  1002. : item.customerType == 3
  1003. ? "三级客户"
  1004. : "",
  1005. product: {
  1006. physicName: item.physicName,
  1007. drugEntBaseInfoId: item.drugEntBaseInfoId,
  1008. },
  1009. pkgSpec: item?.pkgSpec || "",
  1010. otherCustomer: item?.otherCustomer || "",
  1011. };
  1012. if (item.physicName) {
  1013. this.getGuigeList(item.physicName);
  1014. }
  1015. this.dateRange = [item.beginTime, item.endTime];
  1016. }
  1017. this.createModalOpen = true;
  1018. this.currentItem = item;
  1019. },
  1020. fetchList() {
  1021. // this.list = [];
  1022. // setTimeout(() => {
  1023. // const n = Math.min(10, this.totalCount || 10);
  1024. // this.list = this.genItems(n);
  1025. // if (!this.totalCount) this.totalCount = this.list.length;
  1026. // this.animateAll();
  1027. // this.fetchLoading = false;
  1028. // }, 1000);
  1029. if (!this.hasmore) {
  1030. setTimeout(() => {
  1031. this.fetchLoading = false;
  1032. this.loading = false;
  1033. }, 500);
  1034. return;
  1035. }
  1036. if (this.fetchLoading) return;
  1037. this.fetchLoading = true;
  1038. request("/report/getReportTaskPage", {
  1039. reportType: 2,
  1040. taskType: statusMap?.[this.filterForm?.status] || "",
  1041. drugEntBaseInfoId: this.filterForm?.product?.drugEntBaseInfoId,
  1042. pkgSpec: this.filterForm?.pkgSpec || "",
  1043. beginTime: this.filterDateRange[0],
  1044. endTime: this.filterDateRange[1],
  1045. customerName: this.keyword || "",
  1046. pageNum: this.pageNum,
  1047. pageSize: this.pageSize,
  1048. path: "reportExport/index.vue",
  1049. }).then((res) => {
  1050. if (res.code == 200) {
  1051. const _data = res.data || {};
  1052. const { list, total } = _data;
  1053. this.totalCount = total || 0;
  1054. this.list = Array.isArray(list)
  1055. ? [...this.list, ...list]
  1056. : [...this.list];
  1057. if (this.list.length < this.totalCount) {
  1058. this.hasmore = true;
  1059. this.pageNum++;
  1060. } else {
  1061. this.hasmore = false;
  1062. }
  1063. // this.list.push({
  1064. // ...this.list[1],
  1065. // status: 3,
  1066. // });
  1067. // this.list.push({
  1068. // ...this.list[0],
  1069. // finishTime: "2025-12-15",
  1070. // status: 3,
  1071. // });
  1072. // this.animateAll();
  1073. }
  1074. this.fetchLoading = false;
  1075. this.loading = false;
  1076. });
  1077. },
  1078. resetFetch() {
  1079. this.loading = true;
  1080. this.list = [];
  1081. this.pageNum = 1;
  1082. this.hasmore = true;
  1083. this.fetchList();
  1084. },
  1085. toDetail(item) {
  1086. uni.navigateTo({
  1087. url: `/traceCodePackages/traceabilityReport/pages/reportExport/detail/index?id=${
  1088. item.id
  1089. }&title=${encodeURIComponent(this.getCustomerName(item.customerName))}`,
  1090. });
  1091. },
  1092. onSearch() {
  1093. this.resetFetch();
  1094. },
  1095. onCreate() {
  1096. this.modalType = "create";
  1097. this.taskTitle = "创建任务";
  1098. this.createModalOpen = true;
  1099. },
  1100. closeCreate() {
  1101. this.filterModalOpen = false;
  1102. this.createModalOpen = false;
  1103. this.closeDropdownAll();
  1104. this.form = {
  1105. region: { regionName: "" },
  1106. customerType: "",
  1107. customer: [],
  1108. product: { physicName: "" },
  1109. otherCustomer: "",
  1110. };
  1111. this.searchForm = {
  1112. region: "",
  1113. product: "",
  1114. };
  1115. this.dateRange = [];
  1116. if (this.computeTimer) {
  1117. clearTimeout(this.computeTimer);
  1118. this.computeTimer = null;
  1119. }
  1120. },
  1121. confirmCreate() {
  1122. let flag = false;
  1123. Object.values(this.dropdown).forEach((v) => {
  1124. if (v) {
  1125. flag = true;
  1126. }
  1127. });
  1128. if (flag) {
  1129. this.closeDropdownAll();
  1130. return;
  1131. }
  1132. if (!this.isFormComplete()) {
  1133. // uni.showToast({ title: "请完整填写任务内容", icon: "none" });
  1134. return;
  1135. }
  1136. // uni.showToast({ title: "已创建", icon: "none" });
  1137. uni.showLoading({
  1138. title: this.modalType === "create" ? "创建中..." : "修改中...",
  1139. });
  1140. const url =
  1141. this.modalType === "create" ? `/report/save` : `/report/update`;
  1142. const customerId = (this.form?.customer || [])
  1143. .map((v) => v?.customerCode || "")
  1144. .join(",");
  1145. const customerName = (this.form?.customer || [])
  1146. .map((v) => v?.customerName || "")
  1147. .join(",");
  1148. request(url, {
  1149. id:
  1150. this.modalType === "create" ? undefined : this.currentItem?.id || "",
  1151. reportType: 2,
  1152. regionCode: this.form?.region?.regionCode || "",
  1153. customerType: customerTypeMap?.[this.form?.customerType] || "",
  1154. customerId,
  1155. customerName,
  1156. otherCustomer: this.form?.otherCustomer || "",
  1157. drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
  1158. pkgSpec: this.form?.pkgSpec || "",
  1159. physicName: this.form?.product?.physicName || "",
  1160. beginTime: this.formatDate(this.dateRange[0], "YYYY-MM-DD"),
  1161. endTime: this.formatDate(this.dateRange[1], "YYYY-MM-DD"),
  1162. path: "",
  1163. }).then((res) => {
  1164. if (res.code == 200) {
  1165. uni.hideLoading();
  1166. uni.showToast({
  1167. title: this.modalType === "create" ? "已创建" : "已修改",
  1168. icon: "none",
  1169. });
  1170. this.resetFetch();
  1171. this.closeCreate();
  1172. }
  1173. });
  1174. },
  1175. isFormComplete() {
  1176. const f = this.form;
  1177. const drOk =
  1178. Array.isArray(this.dateRange) &&
  1179. this.dateRange.length === 2 &&
  1180. this.dateRange[0] &&
  1181. this.dateRange[1];
  1182. let customerOk = Array.isArray(f.customer)
  1183. ? f.customer.length > 0
  1184. : !!f.customer;
  1185. customerOk = customerOk || f.otherCustomer;
  1186. if (!customerOk) {
  1187. uni.showToast({ title: "请选择至少一个客户或其他客户", icon: "none" });
  1188. return false;
  1189. }
  1190. if (!f.product?.physicName) {
  1191. uni.showToast({ title: "请选择品种", icon: "none" });
  1192. return false;
  1193. }
  1194. if (!drOk) {
  1195. uni.showToast({ title: "请选择时间范围", icon: "none" });
  1196. return false;
  1197. }
  1198. return true;
  1199. // return (
  1200. // f.region?.regionName &&
  1201. // f.customerType &&
  1202. // customerOk &&
  1203. // f.product?.physicName &&
  1204. // drOk
  1205. // );
  1206. },
  1207. confirmDelete() {
  1208. uni.showModal({
  1209. title: "确认删除吗?",
  1210. success: (res) => {
  1211. if (res.confirm) {
  1212. uni.showLoading();
  1213. request("/report/delete", {
  1214. id: this.currentItem?.id || "",
  1215. path: "reportExport/index.vue",
  1216. }).then((res) => {
  1217. uni.hideLoading();
  1218. if (res.code == 200) {
  1219. uni.showToast({
  1220. title: "删除成功",
  1221. icon: "none",
  1222. duration: 2000,
  1223. });
  1224. this.resetFetch();
  1225. this.closeCreate();
  1226. } else {
  1227. uni.showToast({
  1228. title: res?.msg || "删除失败",
  1229. icon: "none",
  1230. duration: 2000,
  1231. });
  1232. }
  1233. });
  1234. }
  1235. },
  1236. });
  1237. },
  1238. onInput(k) {
  1239. this.closeDropdownAll();
  1240. this.dropdown[k] = true;
  1241. if (k === "customer") {
  1242. this.customerPage = 1;
  1243. this.customerTotal = null;
  1244. this.customerHasMore = true;
  1245. this.customers = [];
  1246. if (this.customerDebounceTimer)
  1247. clearTimeout(this.customerDebounceTimer);
  1248. this.customerDebounceTimer = setTimeout(() => {
  1249. this.getCustomerOptions();
  1250. }, 500);
  1251. return;
  1252. }
  1253. if (k === "product") {
  1254. this.initProductList("create");
  1255. }
  1256. },
  1257. closeDropdownAll() {
  1258. this.dropdown = {
  1259. region: false,
  1260. customerType: false,
  1261. customer: false,
  1262. product: false,
  1263. pkgSpec: false,
  1264. };
  1265. this.filterDropdown.product = false;
  1266. this.filterDropdown.pkgSpec = false;
  1267. },
  1268. openFilterDropdown(k) {
  1269. this.closeDropdownAll();
  1270. this.filterDropdown[k] = true;
  1271. if (k === "product") {
  1272. this.initProductList("filter");
  1273. }
  1274. },
  1275. toggleFilterDropdown(k) {
  1276. this.filterDropdown[k] = !this.filterDropdown[k];
  1277. },
  1278. onFilterInput(k) {
  1279. this.closeDropdownAll();
  1280. this.filterDropdown[k] = true;
  1281. if (k === "product") {
  1282. this.initProductList("filter");
  1283. }
  1284. },
  1285. pickFilterOption(k, v) {
  1286. if (!["status"].includes(k) && this.filterForm[k] === v) {
  1287. this.filterForm[k] = "";
  1288. this.filterDropdown[k] = false;
  1289. return;
  1290. }
  1291. this.filterForm[k] = v;
  1292. if (k === "product") {
  1293. this.filterForm.pkgSpec = "";
  1294. this.getGuigeList(v.physicName);
  1295. }
  1296. this.filterDropdown[k] = false;
  1297. },
  1298. filteredFilterOptions(k) {
  1299. const arr = k === "product" ? this.products || [] : [];
  1300. const q = String(this.filterForm[k] || "").trim();
  1301. if (!q) return arr;
  1302. return arr.filter((it) => it.indexOf(q) !== -1);
  1303. },
  1304. onFilterDateChange() {},
  1305. confirmFilter() {
  1306. this.filterModalOpen = false;
  1307. },
  1308. openDropdown(k) {
  1309. this.closeDropdownAll();
  1310. this.dropdown[k] = true;
  1311. if (k === "customer") {
  1312. if (!this.customers || this.customers.length === 0) {
  1313. this.customerPage = 1;
  1314. this.customerTotal = null;
  1315. this.customerHasMore = true;
  1316. this.getCustomerOptions();
  1317. }
  1318. }
  1319. if (k === "product") {
  1320. this.initProductList("create");
  1321. }
  1322. },
  1323. toggleDropdown(k) {
  1324. this.dropdown[k] = !this.dropdown[k];
  1325. },
  1326. pickOption(k, v) {
  1327. if (k === "customer") {
  1328. if (!Array.isArray(this.form.customer)) this.form.customer = [];
  1329. const idx = this.form.customer.indexOf(v);
  1330. if (idx === -1) {
  1331. this.form.customer.push(v);
  1332. } else {
  1333. this.form.customer.splice(idx, 1);
  1334. }
  1335. return;
  1336. }
  1337. this.form[k] = v;
  1338. if (k === "product") {
  1339. this.form.pkgSpec = "";
  1340. this.getGuigeList(v.physicName);
  1341. }
  1342. this.dropdown[k] = false;
  1343. },
  1344. isCustomerSelected(name) {
  1345. const arr = this.form.customer;
  1346. if (!Array.isArray(arr)) return false;
  1347. return arr.some((i) => i.customerName === name);
  1348. },
  1349. removeCustomer(name) {
  1350. if (!Array.isArray(this.form.customer)) return;
  1351. const idx = this.form.customer.findIndex((i) => i.customerName === name);
  1352. if (idx !== -1) this.form.customer.splice(idx, 1);
  1353. },
  1354. clearAllCustomers() {
  1355. this.form.customer = [];
  1356. },
  1357. filteredOptions(k, type) {
  1358. const arr = this.options[k] || [];
  1359. let q = "";
  1360. if (type === "filter") {
  1361. q = this.filterSearchForm[k] || "";
  1362. } else {
  1363. q = this.searchForm[k] || "";
  1364. }
  1365. q = String(q).trim().toLocaleLowerCase();
  1366. if (!q) return arr;
  1367. return arr.filter((it) => {
  1368. if (typeof it === "string")
  1369. return it.toLocaleLowerCase().indexOf(q) !== -1;
  1370. if (it && typeof it === "object") {
  1371. const name =
  1372. k === "region"
  1373. ? it.regionName || it.name || ""
  1374. : it.physicName || it.productName || "";
  1375. return String(name).toLocaleLowerCase().indexOf(q) !== -1;
  1376. }
  1377. return false;
  1378. });
  1379. },
  1380. // Initialize product list for pagination
  1381. initProductList(mode) {
  1382. const allProducts = this.filteredOptions(
  1383. "product",
  1384. mode === "filter" ? "filter" : undefined,
  1385. );
  1386. const res = getPaginatedList({
  1387. page: 0,
  1388. size: 10,
  1389. initData: allProducts,
  1390. data: [],
  1391. });
  1392. if (mode === "filter") {
  1393. this.filterProductPage = res.page;
  1394. this.filterDisplayProducts = res.data;
  1395. } else {
  1396. this.productPage = res.page;
  1397. this.displayProducts = res.data;
  1398. }
  1399. },
  1400. // Load more products on scroll
  1401. loadMoreProducts(mode) {
  1402. const allProducts = this.filteredOptions(
  1403. "product",
  1404. mode === "filter" ? "filter" : undefined,
  1405. );
  1406. const isFilter = mode === "filter";
  1407. const currentPage = isFilter ? this.filterProductPage : this.productPage;
  1408. const currentData = isFilter
  1409. ? this.filterDisplayProducts
  1410. : this.displayProducts;
  1411. const res = getPaginatedList({
  1412. page: currentPage,
  1413. size: 10,
  1414. initData: allProducts,
  1415. data: currentData,
  1416. });
  1417. if (res.data) {
  1418. if (isFilter) {
  1419. this.filterProductPage = res.page;
  1420. this.filterDisplayProducts = res.data;
  1421. } else {
  1422. this.productPage = res.page;
  1423. this.displayProducts = res.data;
  1424. }
  1425. }
  1426. },
  1427. onSearchFocus() {
  1428. this.dropdownUpward = true;
  1429. },
  1430. onSearchBlur() {
  1431. this.dropdownUpward = false;
  1432. },
  1433. dropdownPosStyle() {
  1434. // if (this.dropdownUpward) {
  1435. // return { bottom: "84rpx" };
  1436. // }
  1437. return { top: "84rpx" };
  1438. },
  1439. openDatePicker() {
  1440. if (this.modalType === "read") return;
  1441. this.$refs.datePicker.show();
  1442. },
  1443. onDateChange() {},
  1444. onStart(item) {
  1445. uni.showModal({
  1446. title: "是否开始导出报表?",
  1447. success: (res) => {
  1448. if (res.confirm) {
  1449. uni.showLoading();
  1450. request("/report/confirm", {
  1451. id: item?.id || "",
  1452. path: "reportExport/index.vue",
  1453. }).then((res) => {
  1454. uni.hideLoading();
  1455. if (res.code == 200) {
  1456. uni.showToast({
  1457. title: "已开始导出",
  1458. icon: "none",
  1459. duration: 2000,
  1460. });
  1461. this.resetFetch();
  1462. this.closeCreate();
  1463. } else {
  1464. uni.showToast({
  1465. title: res?.msg || "请求失败",
  1466. icon: "none",
  1467. duration: 2000,
  1468. });
  1469. }
  1470. });
  1471. }
  1472. },
  1473. });
  1474. },
  1475. onSend(item) {
  1476. this.currentItem = item;
  1477. this.emailError = false;
  1478. this.emailModalOpen = true;
  1479. },
  1480. closeEmailModal() {
  1481. this.emailModalOpen = false;
  1482. },
  1483. handleSendEmail() {
  1484. const email = String(this.emailForm.email || "").trim();
  1485. if (!email) {
  1486. this.emailError = true;
  1487. return;
  1488. }
  1489. this.closeEmailModal();
  1490. uni.showLoading({
  1491. title: "发送中...",
  1492. });
  1493. const url = "/report/sendEmail";
  1494. request(url, {
  1495. taskId: this.currentItem?.id,
  1496. emailAddress: email + "@999.com.cn",
  1497. path: "reportExport/index.vue",
  1498. }).then((res) => {
  1499. uni.hideLoading();
  1500. if (res.code === 200) {
  1501. uni.showToast({
  1502. title: "发送成功",
  1503. icon: "none",
  1504. duration: 2000,
  1505. });
  1506. } else {
  1507. uni.showToast({
  1508. title: res?.msg || "发送失败",
  1509. icon: "none",
  1510. duration: 2000,
  1511. });
  1512. }
  1513. });
  1514. },
  1515. onScrollToLower() {
  1516. // if (this.isLoading) return;
  1517. // if (this.list.length >= this.totalCount) return;
  1518. // this.isLoading = true;
  1519. // const remain = this.totalCount - this.list.length;
  1520. // const toAdd = Math.min(10, remain);
  1521. // setTimeout(() => {
  1522. // const more = this.genItems(toAdd);
  1523. // this.list = this.list.concat(more);
  1524. // this.animateNew(more);
  1525. // this.isLoading = false;
  1526. // }, 800);
  1527. this.fetchList();
  1528. },
  1529. genItems(n) {
  1530. const res = [];
  1531. const base = this.list.length;
  1532. for (let i = 0; i < n; i++) {
  1533. const idx = base + i + 1;
  1534. const statusIdx = idx % 3;
  1535. const target = [60, 0, 100][statusIdx];
  1536. const sText = ["导出进行中", "导出待开始", "导出已完成"][statusIdx];
  1537. const sClass = ["ing", "wait", "done"][statusIdx];
  1538. const action = ["", "start", "done"][statusIdx];
  1539. res.push({
  1540. title: `第${idx}条公司报表`,
  1541. product: "感冒灵",
  1542. range: "2025-11-27—2025-12-27",
  1543. statusText: sText,
  1544. statusClass: sClass,
  1545. showProgress: statusIdx !== 1,
  1546. progress: 0,
  1547. progressTarget: target,
  1548. action,
  1549. });
  1550. }
  1551. return res;
  1552. },
  1553. // animateAll() {
  1554. // this.list.forEach((it) => this.animateItem(it));
  1555. // },
  1556. // animateNew(arr) {
  1557. // arr.forEach((it) => this.animateItem(it));
  1558. // },
  1559. // animateItem(item) {
  1560. // if (!item.showProgress) return;
  1561. // item.progress = 60;
  1562. // const target = Number(item.progressTarget) || 0;
  1563. // const step = Math.max(1, Math.round(target / 60));
  1564. // const timer = setInterval(() => {
  1565. // item.progress += step;
  1566. // if (item.progress >= target) {
  1567. // item.progress = target;
  1568. // clearInterval(timer);
  1569. // }
  1570. // }, 16);
  1571. // },
  1572. },
  1573. };
  1574. </script>
  1575. <style>
  1576. .report-export-page {
  1577. position: relative;
  1578. box-sizing: border-box;
  1579. /* padding: 170rpx 0 calc(50rpx + env(safe-area-inset-bottom)); */
  1580. padding-top: 290rpx;
  1581. }
  1582. .report-export-search-bar-container {
  1583. position: fixed;
  1584. top: 100rpx;
  1585. left: 0;
  1586. padding: 24rpx 24rpx 16rpx;
  1587. background-color: #f3f6f9;
  1588. z-index: 10;
  1589. box-sizing: border-box;
  1590. width: 100%;
  1591. }
  1592. .report-export-search-bar {
  1593. display: flex;
  1594. align-items: center;
  1595. background: #fff;
  1596. border-radius: 16rpx;
  1597. padding: 16rpx;
  1598. }
  1599. .report-export-search-input-wrap {
  1600. flex: 1;
  1601. position: relative;
  1602. background: #f3f6f9;
  1603. border-radius: 40rpx;
  1604. display: flex;
  1605. align-items: center;
  1606. height: 90rpx;
  1607. padding: 0 12rpx;
  1608. }
  1609. .report-export-search-icon {
  1610. width: 28rpx;
  1611. height: 28rpx;
  1612. margin-left: 16rpx;
  1613. }
  1614. .report-export-search-input {
  1615. flex: 1;
  1616. height: 90rpx;
  1617. padding: 0 16rpx;
  1618. font-size: 28rpx;
  1619. }
  1620. .report-export-search-btn {
  1621. height: 72rpx;
  1622. line-height: 72rpx;
  1623. padding: 0 34rpx;
  1624. border-radius: 36rpx;
  1625. background: #2c69ff;
  1626. color: #fff;
  1627. font-size: 34rpx;
  1628. margin-left: 12rpx;
  1629. }
  1630. .report-export-filter-btn {
  1631. margin-left: 12rpx;
  1632. display: flex;
  1633. flex-direction: column;
  1634. align-items: center;
  1635. justify-content: center;
  1636. }
  1637. .report-export-filter-icon {
  1638. width: 40rpx;
  1639. height: 40rpx;
  1640. }
  1641. .report-export-filter-text {
  1642. margin-top: 8rpx;
  1643. font-size: 24rpx;
  1644. color: #2c69ff;
  1645. }
  1646. .scan-rate-ranges-container {
  1647. position: fixed;
  1648. top: 262rpx;
  1649. left: 0;
  1650. width: 100%;
  1651. height: 120rpx;
  1652. background: #f3f6f9;
  1653. z-index: 6;
  1654. }
  1655. .scan-rate-ranges {
  1656. padding: 0rpx 24rpx 20rpx;
  1657. }
  1658. .scan-rate-ranges-content {
  1659. display: flex;
  1660. background: #fff;
  1661. padding: 20rpx 30rpx;
  1662. border-radius: 16rpx;
  1663. justify-content: space-between;
  1664. }
  1665. .scan-rate-range {
  1666. padding: 12rpx 35rpx;
  1667. border-radius: 5rpx;
  1668. background: rgb(240, 240, 240);
  1669. font-size: 26rpx;
  1670. }
  1671. .scan-rate-range.scan-rate-active {
  1672. background: #2c69ff;
  1673. color: #fff;
  1674. }
  1675. .report-export-list-scroll {
  1676. position: fixed;
  1677. top: 380rpx;
  1678. left: 0;
  1679. box-sizing: border-box;
  1680. width: 100%;
  1681. padding: 0 24rpx;
  1682. padding-bottom: calc(env(safe-area-inset-bottom) + 50rpx);
  1683. box-sizing: border-box;
  1684. }
  1685. .report-export-item-card {
  1686. background: #fff;
  1687. border-radius: 16rpx;
  1688. padding: 24rpx;
  1689. margin-bottom: 16rpx;
  1690. }
  1691. .report-export-item-header {
  1692. width: 100%;
  1693. display: flex;
  1694. align-items: flex-start;
  1695. flex-wrap: wrap;
  1696. }
  1697. .report-export-item-title {
  1698. flex: 1;
  1699. width: 0;
  1700. word-break: break-word;
  1701. margin-right: 20rpx;
  1702. font-size: 38rpx;
  1703. color: #2c69ff;
  1704. display: -webkit-box;
  1705. -webkit-box-orient: vertical;
  1706. -webkit-line-clamp: 2;
  1707. overflow: hidden;
  1708. }
  1709. .report-export-status {
  1710. flex-shrink: 0;
  1711. padding: 8rpx 12rpx;
  1712. border-radius: 10rpx;
  1713. font-size: 22rpx;
  1714. color: #fff;
  1715. }
  1716. .report-export-status.report-export-status-2 {
  1717. background: #67c23a;
  1718. }
  1719. .report-export-status.report-export-status-1 {
  1720. background: #888;
  1721. }
  1722. .report-export-status.report-export-status-3,
  1723. .report-export-status.report-export-status-4 {
  1724. background: #2c69ff;
  1725. }
  1726. .report-export-item-row {
  1727. margin-top: 12rpx;
  1728. font-size: 28rpx;
  1729. color: #999;
  1730. }
  1731. .report-export-progress-wrap {
  1732. margin-top: 20rpx;
  1733. }
  1734. .report-export-progress {
  1735. margin-top: 8rpx;
  1736. height: 32rpx;
  1737. background: #e6ebf5;
  1738. border-radius: 999rpx;
  1739. overflow: hidden;
  1740. position: relative;
  1741. }
  1742. .report-export-progress-fill {
  1743. position: absolute;
  1744. left: 0;
  1745. top: 0;
  1746. height: 100%;
  1747. background: #2c69ff;
  1748. border-radius: 999rpx;
  1749. width: 0;
  1750. transition: width 0.2s linear;
  1751. }
  1752. .report-export-progress-text {
  1753. position: absolute;
  1754. left: 50%;
  1755. top: 50%;
  1756. transform: translate(-50%, -50%);
  1757. font-size: 26rpx;
  1758. color: #fff;
  1759. z-index: 2;
  1760. }
  1761. .report-export-action-row {
  1762. margin-top: 16rpx;
  1763. display: flex;
  1764. align-items: center;
  1765. justify-content: flex-end;
  1766. }
  1767. .report-export-action-btn {
  1768. height: 50rpx;
  1769. line-height: 50rpx;
  1770. padding: 0 28rpx;
  1771. border-radius: 12rpx;
  1772. font-size: 30rpx;
  1773. margin: 0;
  1774. }
  1775. .report-export-action-btn + .report-export-action-btn {
  1776. margin-left: 12rpx;
  1777. }
  1778. .report-export-action-btn.report-export-primary {
  1779. background: #2c69ff;
  1780. color: #fff;
  1781. }
  1782. .report-export-action-btn.report-export-info {
  1783. background: #67c23a;
  1784. color: #fff;
  1785. }
  1786. .report-export-loading-row {
  1787. justify-content: center;
  1788. }
  1789. .report-export-loading-wrapper {
  1790. width: 100%;
  1791. height: 76rpx;
  1792. display: flex;
  1793. align-items: center;
  1794. justify-content: center;
  1795. }
  1796. .report-export-loading-icon {
  1797. width: 40rpx;
  1798. height: 40rpx;
  1799. animation: spin 1s linear infinite;
  1800. }
  1801. @keyframes spin {
  1802. from {
  1803. transform: rotate(0deg);
  1804. }
  1805. to {
  1806. transform: rotate(360deg);
  1807. }
  1808. }
  1809. .report-export-footer {
  1810. position: fixed;
  1811. left: 0;
  1812. right: 0;
  1813. bottom: 0;
  1814. padding: 12rpx 30rpx calc(50rpx + env(safe-area-inset-bottom));
  1815. background: #fff;
  1816. }
  1817. .report-export-footer-btn {
  1818. height: 86rpx;
  1819. border-radius: 999rpx;
  1820. background: #2c69ff;
  1821. color: #fff;
  1822. display: flex;
  1823. align-items: center;
  1824. justify-content: center;
  1825. font-size: 30rpx;
  1826. box-shadow: 0 8rpx 24rpx rgba(44, 105, 255, 0.35);
  1827. }
  1828. .report-export-create-modal-mask {
  1829. position: fixed;
  1830. left: 0;
  1831. right: 0;
  1832. top: 0;
  1833. bottom: 0;
  1834. background: rgba(0, 0, 0, 0.35);
  1835. z-index: 90;
  1836. }
  1837. .report-export-create-modal {
  1838. position: fixed;
  1839. left: 0;
  1840. right: 0;
  1841. bottom: -100%;
  1842. width: 100%;
  1843. background: #fff;
  1844. border-top-left-radius: 45rpx;
  1845. border-top-right-radius: 45rpx;
  1846. z-index: 92;
  1847. box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.12);
  1848. /* transform: translateY(100%); */
  1849. transition: bottom 0.25s ease-out;
  1850. }
  1851. .report-export-create-modal--open {
  1852. /* transform: translateY(0) !important; */
  1853. bottom: 0 !important;
  1854. }
  1855. .report-export-create-modal-title {
  1856. position: relative;
  1857. padding: 28rpx 28rpx 12rpx;
  1858. font-size: 34rpx;
  1859. color: #333;
  1860. text-align: center;
  1861. line-height: 60rpx;
  1862. font-weight: 500;
  1863. }
  1864. .report-export-create-modal-close {
  1865. position: absolute;
  1866. right: 32rpx;
  1867. top: 50%;
  1868. transform: translateY(-50%);
  1869. padding: 10rpx;
  1870. color: #909399;
  1871. font-size: 55rpx;
  1872. line-height: 1;
  1873. }
  1874. .report-export-create-modal-body {
  1875. padding: 0 32rpx 100rpx;
  1876. }
  1877. .report-export-create-modal-row {
  1878. display: flex;
  1879. flex-direction: column;
  1880. margin-top: 32rpx;
  1881. position: relative;
  1882. }
  1883. .report-export-create-modal-label {
  1884. width: auto;
  1885. font-size: 28rpx;
  1886. color: #333;
  1887. margin-bottom: 16rpx;
  1888. font-weight: 500;
  1889. }
  1890. .report-export-create-modal-inputwrap {
  1891. flex: 1;
  1892. position: relative;
  1893. border: 1rpx solid #dcdfe6;
  1894. border-radius: 12rpx;
  1895. display: flex;
  1896. align-items: center;
  1897. min-height: 80rpx;
  1898. padding: 0 24rpx;
  1899. background-color: #fff;
  1900. }
  1901. .report-export-create-modal-static {
  1902. position: relative;
  1903. flex: 1;
  1904. max-height: 115rpx;
  1905. font-size: 28rpx;
  1906. color: #606266;
  1907. line-height: 40rpx;
  1908. padding: 20rpx 0;
  1909. overflow-y: auto;
  1910. padding-right: 20rpx;
  1911. }
  1912. .report-export-input-simulator {
  1913. display: flex;
  1914. justify-content: center;
  1915. align-items: center;
  1916. }
  1917. .report-export-create-modal-input {
  1918. flex: 1;
  1919. height: 80rpx;
  1920. font-size: 28rpx;
  1921. color: #606266;
  1922. }
  1923. /deep/.report-export-dropdown-other-customer-input {
  1924. color: #666;
  1925. }
  1926. /* .report-export-create-modal-select-arrow {
  1927. width: 18rpx;
  1928. height: 18rpx;
  1929. border: 5rpx solid #999;
  1930. border-top: none;
  1931. border-left: none;
  1932. transform: rotate(45deg);
  1933. margin: 0 8rpx 10rpx 12rpx;
  1934. }
  1935. .report-export-create-modal-select-arrow.disabled {
  1936. opacity: 0.4;
  1937. pointer-events: none;
  1938. } */
  1939. .report-export-create-modal-dropdown {
  1940. position: absolute;
  1941. left: 0;
  1942. right: 0;
  1943. background: #fff;
  1944. border: 1rpx solid #eef0f4;
  1945. border-radius: 12rpx;
  1946. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  1947. z-index: 6;
  1948. max-height: 510rpx;
  1949. overflow-y: auto;
  1950. -webkit-overflow-scrolling: touch;
  1951. }
  1952. .report-export-create-modal-dropdown-list {
  1953. max-height: 350rpx;
  1954. }
  1955. .report-export-dropdown-search-row {
  1956. padding: 10rpx;
  1957. }
  1958. .report-export-dropdown-search-input {
  1959. width: 100%;
  1960. height: 60rpx;
  1961. border: 1rpx solid #eaeef4;
  1962. border-radius: 8rpx;
  1963. box-sizing: border-box;
  1964. padding: 0 16rpx;
  1965. font-size: 28rpx;
  1966. }
  1967. .report-export-create-modal-dropdown-item {
  1968. padding: 16rpx 20rpx;
  1969. font-size: 28rpx;
  1970. color: #333;
  1971. }
  1972. .report-export-selected {
  1973. background: #f0f5ff;
  1974. }
  1975. .report-export-input-arrow {
  1976. width: 16rpx;
  1977. height: 16rpx;
  1978. border-right: 3rpx solid #c0c4cc;
  1979. border-bottom: 3rpx solid #c0c4cc;
  1980. transform: rotate(45deg);
  1981. margin-top: -6rpx;
  1982. }
  1983. .customer-chip {
  1984. display: inline-block;
  1985. position: relative;
  1986. line-height: 50rpx;
  1987. border: 1rpx solid #eaeef4;
  1988. border-radius: 8rpx;
  1989. padding: 0rpx 44rpx 0rpx 16rpx;
  1990. margin-right: 8rpx;
  1991. margin-bottom: 8rpx;
  1992. font-size: 22rpx;
  1993. color: #333;
  1994. }
  1995. .customer-chip-close {
  1996. position: absolute;
  1997. right: 6rpx;
  1998. top: 0;
  1999. color: #666;
  2000. font-size: 28rpx;
  2001. padding: 0 8rpx;
  2002. border-radius: 6rpx;
  2003. }
  2004. .customer-clear-all {
  2005. position: absolute;
  2006. right: 6rpx;
  2007. top: 50%;
  2008. transform: translateY(-50%);
  2009. line-height: 50rpx;
  2010. padding: 8rpx 10rpx;
  2011. font-size: 40rpx;
  2012. }
  2013. .report-export-create-modal-estimated {
  2014. font-size: 28rpx;
  2015. color: #666;
  2016. }
  2017. .report-export-create-modal-footer {
  2018. padding: 18rpx 28rpx calc(50rpx + env(safe-area-inset-bottom));
  2019. }
  2020. .report-export-create-modal-btn {
  2021. line-height: 90rpx;
  2022. border-radius: 20rpx;
  2023. background: #2c69ff;
  2024. color: #fff;
  2025. text-align: center;
  2026. font-size: 30rpx;
  2027. }
  2028. .report-export-create-email-modal {
  2029. transform: translateY(200%);
  2030. height: auto;
  2031. top: 30%;
  2032. bottom: auto;
  2033. border-radius: 16rpx;
  2034. width: 600rpx;
  2035. left: 75rpx;
  2036. }
  2037. .report-export-email-input-wrap {
  2038. display: flex;
  2039. align-items: center;
  2040. background: #f5f7fa;
  2041. border-radius: 8rpx;
  2042. padding: 0 20rpx;
  2043. height: 80rpx;
  2044. border: 1rpx solid transparent;
  2045. }
  2046. .report-export-input-error {
  2047. border-color: #ff4d4f;
  2048. }
  2049. .report-export-email-input {
  2050. flex: 1;
  2051. font-size: 28rpx;
  2052. color: #333;
  2053. height: 100%;
  2054. }
  2055. .report-export-email-suffix {
  2056. font-size: 28rpx;
  2057. color: #333;
  2058. margin-left: 10rpx;
  2059. }
  2060. .report-export-error-text {
  2061. font-size: 24rpx;
  2062. color: #ff4d4f;
  2063. margin-top: 10rpx;
  2064. display: block;
  2065. }
  2066. .report-export-input-disabled {
  2067. background-color: #f5f7fa;
  2068. cursor: not-allowed;
  2069. opacity: 0.7;
  2070. }
  2071. </style>