index.vue 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189
  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
  644. class="report-export-create-modal-footer"
  645. @click="closeDropdownAll"
  646. :style="{ display: 'flex', justifyContent: 'space-between' }"
  647. >
  648. <view
  649. class="report-export-create-modal-btn"
  650. :style="{
  651. background: '#fff',
  652. color: '#666',
  653. border: '1rpx solid #dcdfe6',
  654. flex: '0 0 45%',
  655. }"
  656. @click.stop="resetFilter"
  657. >重置</view
  658. >
  659. <view
  660. class="report-export-create-modal-btn"
  661. :style="{ flex: '0 0 45%' }"
  662. @click.stop="confirmFilter"
  663. >确认</view
  664. >
  665. </view>
  666. </view>
  667. <view
  668. class="report-export-create-modal report-export-create-email-modal"
  669. :class="{ 'report-export-create-modal--open': emailModalOpen }"
  670. :style="{ transform: 'translateY(1000%)' }"
  671. >
  672. <view class="report-export-create-modal-title">
  673. <text>发送至邮箱</text>
  674. <view
  675. class="report-export-create-modal-close"
  676. @click.stop="closeEmailModal"
  677. >×</view
  678. >
  679. </view>
  680. <view
  681. class="report-export-create-modal-body"
  682. :style="{ padding: '40rpx' }"
  683. >
  684. <!-- <view class="report-export-email-input-wrap" :class="{ 'report-export-input-error': emailError }">
  685. <input class="report-export-email-input" v-model="emailForm.email" placeholder="请填写邮箱"
  686. placeholder-style="color: #c0c4cc" @input="emailError = false" />
  687. <text class="report-export-email-suffix">@999.com.cn</text>
  688. </view> -->
  689. <up-input
  690. v-model="emailForm.email"
  691. border="none"
  692. :customStyle="{
  693. backgroundColor: '#ebf3fb',
  694. height: '80rpx',
  695. paddingLeft: '20rpx',
  696. }"
  697. placeholder="请填写邮箱"
  698. >
  699. <template #suffix style="margin-right: 30rpx"> @999.com.cn </template>
  700. </up-input>
  701. <text v-if="emailError" class="report-export-error-text"
  702. >请输入邮箱</text
  703. >
  704. </view>
  705. <view
  706. class="report-export-create-modal-footer"
  707. :style="{
  708. padding: '20rpx 40rpx 40rpx',
  709. display: 'flex',
  710. 'justify-content': 'space-between',
  711. }"
  712. >
  713. <view
  714. class="report-export-create-modal-btn"
  715. :style="{
  716. background: '#fff',
  717. color: '#666',
  718. border: '1rpx solid #dcdfe6',
  719. flex: '0 0 45%',
  720. }"
  721. @click.stop="closeEmailModal"
  722. >取消</view
  723. >
  724. <view
  725. class="report-export-create-modal-btn"
  726. :style="{ flex: '0 0 45%' }"
  727. @click.stop="handleSendEmail"
  728. >发送
  729. </view>
  730. </view>
  731. </view>
  732. </view>
  733. </template>
  734. <script>
  735. import EmptyView from "../../../wigets/empty.vue";
  736. import { formatDate, getPaginatedList } from "../../../utils/utils.js";
  737. import request from "../../../request/index.js";
  738. const customerTypeMap = {
  739. VIP客户: "VIP",
  740. 二级客户: "二级",
  741. 三级客户: "三级",
  742. };
  743. const statusMap = {
  744. 全部: 0,
  745. 待开始: 1,
  746. 进行中: 2,
  747. 已完成: 3,
  748. };
  749. export default {
  750. components: {
  751. EmptyView,
  752. },
  753. data() {
  754. return {
  755. keyword: "",
  756. totalCount: 0,
  757. loading: true,
  758. hasmore: true,
  759. fetchLoading: false,
  760. pageNum: 1,
  761. pageSize: 10,
  762. list: [],
  763. listViewHeight: "400px",
  764. createModalOpen: false,
  765. form: {
  766. region: { regionName: "" },
  767. customerType: "",
  768. customer: [],
  769. product: { physicName: "" },
  770. otherCustomer: "",
  771. },
  772. dateRange: [],
  773. computeTimer: null,
  774. dropdown: {
  775. region: false,
  776. customerType: false,
  777. customer: false,
  778. product: false,
  779. pkgSpec: false,
  780. },
  781. options: {
  782. region: [],
  783. customerType: ["VIP客户", "二级客户", "三级客户"],
  784. product: [],
  785. pkgSpec: [],
  786. status: ["全部", "已完成", "待开始", "进行中"],
  787. },
  788. // dropdown search inputs (create modal)
  789. searchForm: {
  790. region: "",
  791. product: "",
  792. },
  793. // Pagination state for products
  794. productPage: 0,
  795. productPageSize: 10,
  796. displayProducts: [], // Currently displayed products
  797. // dropdown search inputs (filter modal)
  798. filterSearchForm: {
  799. product: "",
  800. },
  801. // Pagination state for filter products
  802. filterProductPage: 0,
  803. filterDisplayProducts: [],
  804. customers: [],
  805. customerPage: 1,
  806. customerPageSize: 10,
  807. customerTotal: null,
  808. customerHasMore: true,
  809. customerLoading: false,
  810. customerDebounceTimer: null,
  811. taskTitle: "创建任务",
  812. filterModalOpen: false,
  813. filterForm: {
  814. product: { physicName: "" },
  815. status: "全部",
  816. pkgSpec: "",
  817. },
  818. filterDropdown: { product: false, pkgSpec: false },
  819. filterDateRange: [],
  820. modalType: "",
  821. dropdownUpward: false,
  822. customerSearch: "",
  823. currentItem: {},
  824. emailModalOpen: false,
  825. emailForm: {
  826. email: "",
  827. },
  828. emailError: false,
  829. };
  830. },
  831. created() {
  832. const userInfo = uni.getStorageSync("userInfo");
  833. const staffEmail = userInfo?.staffEmail || "";
  834. this.emailForm.email = staffEmail.split("@")[0];
  835. console.log("reportExport\index.vue,storage,userInfo", userInfo);
  836. this.initList();
  837. this.getProviceList();
  838. this.getDrugInfoName();
  839. this.fetchList();
  840. try {
  841. uni.onKeyboardHeightChange(({ height }) => {
  842. this.dropdownUpward = height > 0;
  843. });
  844. } catch (e) {}
  845. },
  846. computed: {
  847. taskTitle() {
  848. if (this.modalType === "create") {
  849. return "创建任务";
  850. } else if (this.modalType == "edit") {
  851. return "修改任务";
  852. } else if (this.modalType == "read") {
  853. return "查看任务";
  854. }
  855. },
  856. },
  857. watch: {
  858. "form.customerType"(val) {
  859. this.customerPage = 1;
  860. this.customerTotal = null;
  861. this.customerHasMore = true;
  862. this.customers = [];
  863. if (this.customerDebounceTimer) clearTimeout(this.customerDebounceTimer);
  864. this.getCustomerOptions();
  865. },
  866. "form.region": {
  867. handler() {
  868. this.customerPage = 1;
  869. this.customerTotal = null;
  870. this.customerHasMore = true;
  871. this.customers = [];
  872. if (this.customerDebounceTimer)
  873. clearTimeout(this.customerDebounceTimer);
  874. this.getCustomerOptions();
  875. },
  876. deep: true,
  877. },
  878. "emailForm.email": {
  879. handler(newVal, oldVal) {
  880. if (!oldVal && !newVal && newVal !== oldVal) {
  881. this.emailError = false;
  882. } else {
  883. this.emailError = !newVal;
  884. }
  885. },
  886. deep: true,
  887. },
  888. "filterForm.status"(val) {
  889. this.resetFetch();
  890. },
  891. },
  892. methods: {
  893. getCustomerName(data = {}) {
  894. const { customerName = "", otherCustomer = "" } = data;
  895. let name = customerName || "";
  896. if (otherCustomer) {
  897. if (name) {
  898. name += `,${otherCustomer}`;
  899. } else {
  900. name = otherCustomer;
  901. }
  902. }
  903. const arr = name.split(",");
  904. if (arr.length == 0) return "--";
  905. return arr.length == 1
  906. ? arr[0].trim()
  907. : `${arr[0].trim()}等${arr.length}个公司`;
  908. },
  909. formatDate(date) {
  910. return formatDate({ date }, "YYYY-MM-DD");
  911. },
  912. getStatusText(status) {
  913. if (status == "1") {
  914. return "导出待开始";
  915. } else if (status == "2") {
  916. return "导出进行中";
  917. } else if (status == "3" || status == "4") {
  918. return "导出已完成";
  919. }
  920. return "未知状态";
  921. },
  922. getDrugInfoName() {
  923. request("/bills/getDrugInfoName", {
  924. path: "/reportExport/index.vue",
  925. }).then((res) => {
  926. if (res.code == 200) {
  927. const _data = res.data;
  928. this.options.product = _data;
  929. }
  930. });
  931. },
  932. getGuigeList(physicName) {
  933. if (!physicName) return;
  934. request("/report/getDrugSpec", {
  935. physicName,
  936. path: "/reportExport/index.vue",
  937. }).then((res) => {
  938. if (res.code == 200) {
  939. this.options.pkgSpec = res.data || [];
  940. }
  941. });
  942. },
  943. getProviceList() {
  944. request("/common/getProviceList", {
  945. path: "/reportExport/index.vue",
  946. }).then((res) => {
  947. if (res.code == 200) {
  948. const _data = res.data;
  949. this.options.region = _data;
  950. }
  951. });
  952. },
  953. getCustomerOptions() {
  954. if (!this.customerHasMore || this.customerLoading) return;
  955. this.customerLoading = true;
  956. request("/customer/info/getCustomerInfo", {
  957. pageNum: this.customerPage,
  958. pageSize: this.customerPageSize,
  959. customerName: this.customerSearch || "",
  960. customerLevel: customerTypeMap?.[this.form.customerType] || undefined,
  961. provinceCode: this.form?.region?.regionCode || undefined,
  962. path: "/reportExport/index.vue",
  963. }).then((res) => {
  964. if (res.code == 200) {
  965. const _data = res.data || {};
  966. this.customerTotal = _data.total || 0;
  967. const list = Array.isArray(_data.list) ? _data.list : [];
  968. this.customers = [...this.customers, ...list];
  969. if (this.customers.length >= this.customerTotal) {
  970. this.customerHasMore = false;
  971. } else {
  972. this.customerPage++;
  973. this.customerHasMore = true;
  974. }
  975. }
  976. this.customerLoading = false;
  977. });
  978. },
  979. initList() {
  980. const info = uni.getSystemInfoSync();
  981. const h = info.windowHeight || 800;
  982. this.listViewHeight = Math.max(0, h - 280) + "px";
  983. // this.list = this.genItems(Math.min(10, this.totalCount));
  984. // this.animateAll();
  985. },
  986. onFilter() {
  987. this.filterModalOpen = true;
  988. },
  989. showModal(item = {}) {
  990. const map = {
  991. 1: "edit",
  992. 2: "read",
  993. 3: "read",
  994. };
  995. this.modalType = map[item?.status] || "create";
  996. if (this.modalType === "create") {
  997. this.taskTitle = "创建任务";
  998. } else {
  999. if (this.modalType == "edit") {
  1000. this.taskTitle = "修改任务";
  1001. } else if (this.modalType == "read") {
  1002. this.taskTitle = "查看任务";
  1003. }
  1004. const cNames = item.customerName.split(",");
  1005. const cCodes = (item.customerId || "").split(",");
  1006. this.form = {
  1007. customer: cCodes.map((i, index) => ({
  1008. customerName: cNames[index],
  1009. customerCode: i,
  1010. })),
  1011. region: {
  1012. regionCode: item.regionCode,
  1013. regionName: item.regionName,
  1014. },
  1015. customerType:
  1016. item.customerType == 1
  1017. ? "VIP客户"
  1018. : item.customerType == 2
  1019. ? "二级客户"
  1020. : item.customerType == 3
  1021. ? "三级客户"
  1022. : "",
  1023. product: {
  1024. physicName: item.physicName,
  1025. drugEntBaseInfoId: item.drugEntBaseInfoId,
  1026. },
  1027. pkgSpec: item?.pkgSpec || "",
  1028. otherCustomer: item?.otherCustomer || "",
  1029. };
  1030. if (item.physicName) {
  1031. this.getGuigeList(item.physicName);
  1032. }
  1033. this.dateRange = [item.beginTime, item.endTime];
  1034. }
  1035. this.createModalOpen = true;
  1036. this.currentItem = item;
  1037. },
  1038. fetchList() {
  1039. // this.list = [];
  1040. // setTimeout(() => {
  1041. // const n = Math.min(10, this.totalCount || 10);
  1042. // this.list = this.genItems(n);
  1043. // if (!this.totalCount) this.totalCount = this.list.length;
  1044. // this.animateAll();
  1045. // this.fetchLoading = false;
  1046. // }, 1000);
  1047. if (!this.hasmore && this.pageNum > 1) {
  1048. setTimeout(() => {
  1049. this.fetchLoading = false;
  1050. this.loading = false;
  1051. }, 500);
  1052. return;
  1053. }
  1054. if (this.fetchLoading) return;
  1055. this.fetchLoading = true;
  1056. request("/report/getReportTaskPage", {
  1057. reportType: 2,
  1058. taskType: statusMap?.[this.filterForm?.status] || "",
  1059. drugEntBaseInfoId: this.filterForm?.product?.drugEntBaseInfoId,
  1060. pkgSpec: this.filterForm?.pkgSpec || "",
  1061. beginTime: this.filterDateRange[0],
  1062. endTime: this.filterDateRange[1],
  1063. customerName: this.keyword || "",
  1064. pageNum: this.pageNum,
  1065. pageSize: this.pageSize,
  1066. path: "reportExport/index.vue",
  1067. }).then((res) => {
  1068. if (res.code == 200) {
  1069. const _data = res.data || {};
  1070. const { list, total } = _data;
  1071. this.totalCount = total || 0;
  1072. this.list = Array.isArray(list)
  1073. ? [...this.list, ...list]
  1074. : [...this.list];
  1075. if (this.list.length < this.totalCount) {
  1076. this.hasmore = true;
  1077. this.pageNum++;
  1078. } else {
  1079. this.hasmore = false;
  1080. }
  1081. // this.list.push({
  1082. // ...this.list[1],
  1083. // status: 3,
  1084. // });
  1085. // this.list.push({
  1086. // ...this.list[0],
  1087. // finishTime: "2025-12-15",
  1088. // status: 3,
  1089. // });
  1090. // this.animateAll();
  1091. }
  1092. this.fetchLoading = false;
  1093. this.loading = false;
  1094. });
  1095. },
  1096. resetFetch() {
  1097. this.loading = true;
  1098. this.list = [];
  1099. this.pageNum = 1;
  1100. this.hasmore = true;
  1101. this.fetchList();
  1102. },
  1103. toDetail(item) {
  1104. uni.navigateTo({
  1105. url: `/traceCodePackages/traceabilityReport/pages/reportExport/detail/index?id=${
  1106. item.id
  1107. }&title=${encodeURIComponent(this.getCustomerName(item.customerName))}`,
  1108. });
  1109. },
  1110. onSearch() {
  1111. this.resetFetch();
  1112. },
  1113. onCreate() {
  1114. this.modalType = "create";
  1115. this.taskTitle = "创建任务";
  1116. this.createModalOpen = true;
  1117. },
  1118. closeCreate() {
  1119. this.filterModalOpen = false;
  1120. this.createModalOpen = false;
  1121. this.closeDropdownAll();
  1122. this.form = {
  1123. region: { regionName: "" },
  1124. customerType: "",
  1125. customer: [],
  1126. product: { physicName: "" },
  1127. otherCustomer: "",
  1128. };
  1129. this.searchForm = {
  1130. region: "",
  1131. product: "",
  1132. };
  1133. this.dateRange = [];
  1134. if (this.computeTimer) {
  1135. clearTimeout(this.computeTimer);
  1136. this.computeTimer = null;
  1137. }
  1138. },
  1139. confirmCreate() {
  1140. let flag = false;
  1141. Object.values(this.dropdown).forEach((v) => {
  1142. if (v) {
  1143. flag = true;
  1144. }
  1145. });
  1146. if (flag) {
  1147. this.closeDropdownAll();
  1148. return;
  1149. }
  1150. if (!this.isFormComplete()) {
  1151. // uni.showToast({ title: "请完整填写任务内容", icon: "none" });
  1152. return;
  1153. }
  1154. // uni.showToast({ title: "已创建", icon: "none" });
  1155. uni.showLoading({
  1156. title: this.modalType === "create" ? "创建中..." : "修改中...",
  1157. });
  1158. const url =
  1159. this.modalType === "create" ? `/report/save` : `/report/update`;
  1160. const customerId = (this.form?.customer || [])
  1161. .map((v) => v?.customerCode || "")
  1162. .join(",");
  1163. const customerName = (this.form?.customer || [])
  1164. .map((v) => v?.customerName || "")
  1165. .join(",");
  1166. request(url, {
  1167. id:
  1168. this.modalType === "create" ? undefined : this.currentItem?.id || "",
  1169. reportType: 2,
  1170. regionCode: this.form?.region?.regionCode || "",
  1171. customerType: customerTypeMap?.[this.form?.customerType] || "",
  1172. customerId,
  1173. customerName,
  1174. otherCustomer: this.form?.otherCustomer || "",
  1175. drugEntBaseInfoId: this.form?.product?.drugEntBaseInfoId || "",
  1176. pkgSpec: this.form?.pkgSpec || "",
  1177. physicName: this.form?.product?.physicName || "",
  1178. beginTime: this.formatDate(this.dateRange[0], "YYYY-MM-DD"),
  1179. endTime: this.formatDate(this.dateRange[1], "YYYY-MM-DD"),
  1180. path: "",
  1181. }).then((res) => {
  1182. if (res.code == 200) {
  1183. uni.hideLoading();
  1184. uni.showToast({
  1185. title: this.modalType === "create" ? "已创建" : "已修改",
  1186. icon: "none",
  1187. });
  1188. this.resetFetch();
  1189. this.closeCreate();
  1190. }
  1191. });
  1192. },
  1193. isFormComplete() {
  1194. const f = this.form;
  1195. const drOk =
  1196. Array.isArray(this.dateRange) &&
  1197. this.dateRange.length === 2 &&
  1198. this.dateRange[0] &&
  1199. this.dateRange[1];
  1200. let customerOk = Array.isArray(f.customer)
  1201. ? f.customer.length > 0
  1202. : !!f.customer;
  1203. customerOk = customerOk || f.otherCustomer;
  1204. if (!customerOk) {
  1205. uni.showToast({ title: "请选择至少一个客户或其他客户", icon: "none" });
  1206. return false;
  1207. }
  1208. if (!f.product?.physicName) {
  1209. uni.showToast({ title: "请选择品种", icon: "none" });
  1210. return false;
  1211. }
  1212. if (!drOk) {
  1213. uni.showToast({ title: "请选择时间范围", icon: "none" });
  1214. return false;
  1215. }
  1216. return true;
  1217. // return (
  1218. // f.region?.regionName &&
  1219. // f.customerType &&
  1220. // customerOk &&
  1221. // f.product?.physicName &&
  1222. // drOk
  1223. // );
  1224. },
  1225. confirmDelete() {
  1226. uni.showModal({
  1227. title: "确认删除吗?",
  1228. success: (res) => {
  1229. if (res.confirm) {
  1230. uni.showLoading();
  1231. request("/report/delete", {
  1232. id: this.currentItem?.id || "",
  1233. path: "reportExport/index.vue",
  1234. }).then((res) => {
  1235. uni.hideLoading();
  1236. if (res.code == 200) {
  1237. uni.showToast({
  1238. title: "删除成功",
  1239. icon: "none",
  1240. duration: 2000,
  1241. });
  1242. this.resetFetch();
  1243. this.closeCreate();
  1244. } else {
  1245. uni.showToast({
  1246. title: res?.msg || "删除失败",
  1247. icon: "none",
  1248. duration: 2000,
  1249. });
  1250. }
  1251. });
  1252. }
  1253. },
  1254. });
  1255. },
  1256. onInput(k) {
  1257. this.closeDropdownAll();
  1258. this.dropdown[k] = true;
  1259. if (k === "customer") {
  1260. this.customerPage = 1;
  1261. this.customerTotal = null;
  1262. this.customerHasMore = true;
  1263. this.customers = [];
  1264. if (this.customerDebounceTimer)
  1265. clearTimeout(this.customerDebounceTimer);
  1266. this.customerDebounceTimer = setTimeout(() => {
  1267. this.getCustomerOptions();
  1268. }, 500);
  1269. return;
  1270. }
  1271. if (k === "product") {
  1272. this.initProductList("create");
  1273. }
  1274. },
  1275. closeDropdownAll() {
  1276. this.dropdown = {
  1277. region: false,
  1278. customerType: false,
  1279. customer: false,
  1280. product: false,
  1281. pkgSpec: false,
  1282. };
  1283. this.filterDropdown.product = false;
  1284. this.filterDropdown.pkgSpec = false;
  1285. },
  1286. openFilterDropdown(k) {
  1287. this.closeDropdownAll();
  1288. this.filterDropdown[k] = true;
  1289. if (k === "product") {
  1290. this.initProductList("filter");
  1291. }
  1292. },
  1293. toggleFilterDropdown(k) {
  1294. this.filterDropdown[k] = !this.filterDropdown[k];
  1295. },
  1296. onFilterInput(k) {
  1297. this.closeDropdownAll();
  1298. this.filterDropdown[k] = true;
  1299. if (k === "product") {
  1300. this.initProductList("filter");
  1301. }
  1302. },
  1303. pickFilterOption(k, v) {
  1304. if (!["status"].includes(k) && this.filterForm[k] === v) {
  1305. this.filterForm[k] = "";
  1306. this.filterDropdown[k] = false;
  1307. return;
  1308. }
  1309. this.filterForm[k] = v;
  1310. if (k === "product") {
  1311. this.filterForm.pkgSpec = "";
  1312. this.getGuigeList(v.physicName);
  1313. }
  1314. this.filterDropdown[k] = false;
  1315. },
  1316. filteredFilterOptions(k) {
  1317. const arr = k === "product" ? this.products || [] : [];
  1318. const q = String(this.filterForm[k] || "").trim();
  1319. if (!q) return arr;
  1320. return arr.filter((it) => it.indexOf(q) !== -1);
  1321. },
  1322. onFilterDateChange() {},
  1323. confirmFilter() {
  1324. this.filterModalOpen = false;
  1325. this.resetFetch();
  1326. },
  1327. resetFilter() {
  1328. this.filterForm = {
  1329. product: { physicName: "" },
  1330. status: "全部",
  1331. pkgSpec: "",
  1332. };
  1333. this.filterSearchForm.product = "";
  1334. this.filterProductPage = 0;
  1335. this.filterDisplayProducts = [];
  1336. this.filterDropdown = { product: false, pkgSpec: false };
  1337. this.filterDateRange = [];
  1338. this.resetFetch();
  1339. },
  1340. openDropdown(k) {
  1341. this.closeDropdownAll();
  1342. this.dropdown[k] = true;
  1343. if (k === "customer") {
  1344. if (!this.customers || this.customers.length === 0) {
  1345. this.customerPage = 1;
  1346. this.customerTotal = null;
  1347. this.customerHasMore = true;
  1348. this.getCustomerOptions();
  1349. }
  1350. }
  1351. if (k === "product") {
  1352. this.initProductList("create");
  1353. }
  1354. },
  1355. toggleDropdown(k) {
  1356. this.dropdown[k] = !this.dropdown[k];
  1357. },
  1358. pickOption(k, v) {
  1359. if (k === "customer") {
  1360. if (!Array.isArray(this.form.customer)) this.form.customer = [];
  1361. const idx = this.form.customer.indexOf(v);
  1362. if (idx === -1) {
  1363. this.form.customer.push(v);
  1364. } else {
  1365. this.form.customer.splice(idx, 1);
  1366. }
  1367. return;
  1368. }
  1369. this.form[k] = v;
  1370. if (k === "product") {
  1371. this.form.pkgSpec = "";
  1372. this.getGuigeList(v.physicName);
  1373. }
  1374. this.dropdown[k] = false;
  1375. },
  1376. isCustomerSelected(name) {
  1377. const arr = this.form.customer;
  1378. if (!Array.isArray(arr)) return false;
  1379. return arr.some((i) => i.customerName === name);
  1380. },
  1381. removeCustomer(name) {
  1382. if (!Array.isArray(this.form.customer)) return;
  1383. const idx = this.form.customer.findIndex((i) => i.customerName === name);
  1384. if (idx !== -1) this.form.customer.splice(idx, 1);
  1385. },
  1386. clearAllCustomers() {
  1387. this.form.customer = [];
  1388. },
  1389. filteredOptions(k, type) {
  1390. const arr = this.options[k] || [];
  1391. let q = "";
  1392. if (type === "filter") {
  1393. q = this.filterSearchForm[k] || "";
  1394. } else {
  1395. q = this.searchForm[k] || "";
  1396. }
  1397. q = String(q).trim().toLocaleLowerCase();
  1398. if (!q) return arr;
  1399. return arr.filter((it) => {
  1400. if (typeof it === "string")
  1401. return it.toLocaleLowerCase().indexOf(q) !== -1;
  1402. if (it && typeof it === "object") {
  1403. const name =
  1404. k === "region"
  1405. ? it.regionName || it.name || ""
  1406. : it.physicName || it.productName || "";
  1407. return String(name).toLocaleLowerCase().indexOf(q) !== -1;
  1408. }
  1409. return false;
  1410. });
  1411. },
  1412. // Initialize product list for pagination
  1413. initProductList(mode) {
  1414. const allProducts = this.filteredOptions(
  1415. "product",
  1416. mode === "filter" ? "filter" : undefined,
  1417. );
  1418. const res = getPaginatedList({
  1419. page: 0,
  1420. size: 10,
  1421. initData: allProducts,
  1422. data: [],
  1423. });
  1424. if (mode === "filter") {
  1425. this.filterProductPage = res.page;
  1426. this.filterDisplayProducts = res.data;
  1427. } else {
  1428. this.productPage = res.page;
  1429. this.displayProducts = res.data;
  1430. }
  1431. },
  1432. // Load more products on scroll
  1433. loadMoreProducts(mode) {
  1434. const allProducts = this.filteredOptions(
  1435. "product",
  1436. mode === "filter" ? "filter" : undefined,
  1437. );
  1438. const isFilter = mode === "filter";
  1439. const currentPage = isFilter ? this.filterProductPage : this.productPage;
  1440. const currentData = isFilter
  1441. ? this.filterDisplayProducts
  1442. : this.displayProducts;
  1443. const res = getPaginatedList({
  1444. page: currentPage,
  1445. size: 10,
  1446. initData: allProducts,
  1447. data: currentData,
  1448. });
  1449. if (res.data) {
  1450. if (isFilter) {
  1451. this.filterProductPage = res.page;
  1452. this.filterDisplayProducts = res.data;
  1453. } else {
  1454. this.productPage = res.page;
  1455. this.displayProducts = res.data;
  1456. }
  1457. }
  1458. },
  1459. onSearchFocus() {
  1460. this.dropdownUpward = true;
  1461. },
  1462. onSearchBlur() {
  1463. this.dropdownUpward = false;
  1464. },
  1465. dropdownPosStyle() {
  1466. // if (this.dropdownUpward) {
  1467. // return { bottom: "84rpx" };
  1468. // }
  1469. return { top: "84rpx" };
  1470. },
  1471. openDatePicker() {
  1472. if (this.modalType === "read") return;
  1473. this.$refs.datePicker.show();
  1474. },
  1475. onDateChange() {},
  1476. onStart(item) {
  1477. uni.showModal({
  1478. title: "是否开始导出报表?",
  1479. success: (res) => {
  1480. if (res.confirm) {
  1481. uni.showLoading();
  1482. request("/report/confirm", {
  1483. id: item?.id || "",
  1484. path: "reportExport/index.vue",
  1485. }).then((res) => {
  1486. uni.hideLoading();
  1487. if (res.code == 200) {
  1488. uni.showToast({
  1489. title: "已开始导出",
  1490. icon: "none",
  1491. duration: 2000,
  1492. });
  1493. this.resetFetch();
  1494. this.closeCreate();
  1495. } else {
  1496. uni.showToast({
  1497. title: res?.msg || "请求失败",
  1498. icon: "none",
  1499. duration: 2000,
  1500. });
  1501. }
  1502. });
  1503. }
  1504. },
  1505. });
  1506. },
  1507. onSend(item) {
  1508. this.currentItem = item;
  1509. this.emailError = false;
  1510. this.emailModalOpen = true;
  1511. },
  1512. closeEmailModal() {
  1513. this.emailModalOpen = false;
  1514. },
  1515. handleSendEmail() {
  1516. const email = String(this.emailForm.email || "").trim();
  1517. if (!email) {
  1518. this.emailError = true;
  1519. return;
  1520. }
  1521. this.closeEmailModal();
  1522. uni.showLoading({
  1523. title: "发送中...",
  1524. });
  1525. const url = "/report/sendEmail";
  1526. request(url, {
  1527. taskId: this.currentItem?.id,
  1528. emailAddress: email + "@999.com.cn",
  1529. path: "reportExport/index.vue",
  1530. }).then((res) => {
  1531. uni.hideLoading();
  1532. if (res.code === 200) {
  1533. uni.showToast({
  1534. title: "发送成功",
  1535. icon: "none",
  1536. duration: 2000,
  1537. });
  1538. } else {
  1539. uni.showToast({
  1540. title: res?.msg || "发送失败",
  1541. icon: "none",
  1542. duration: 2000,
  1543. });
  1544. }
  1545. });
  1546. },
  1547. onScrollToLower() {
  1548. // if (this.isLoading) return;
  1549. // if (this.list.length >= this.totalCount) return;
  1550. // this.isLoading = true;
  1551. // const remain = this.totalCount - this.list.length;
  1552. // const toAdd = Math.min(10, remain);
  1553. // setTimeout(() => {
  1554. // const more = this.genItems(toAdd);
  1555. // this.list = this.list.concat(more);
  1556. // this.animateNew(more);
  1557. // this.isLoading = false;
  1558. // }, 800);
  1559. this.fetchList();
  1560. },
  1561. genItems(n) {
  1562. const res = [];
  1563. const base = this.list.length;
  1564. for (let i = 0; i < n; i++) {
  1565. const idx = base + i + 1;
  1566. const statusIdx = idx % 3;
  1567. const target = [60, 0, 100][statusIdx];
  1568. const sText = ["导出进行中", "导出待开始", "导出已完成"][statusIdx];
  1569. const sClass = ["ing", "wait", "done"][statusIdx];
  1570. const action = ["", "start", "done"][statusIdx];
  1571. res.push({
  1572. title: `第${idx}条公司报表`,
  1573. product: "感冒灵",
  1574. range: "2025-11-27—2025-12-27",
  1575. statusText: sText,
  1576. statusClass: sClass,
  1577. showProgress: statusIdx !== 1,
  1578. progress: 0,
  1579. progressTarget: target,
  1580. action,
  1581. });
  1582. }
  1583. return res;
  1584. },
  1585. // animateAll() {
  1586. // this.list.forEach((it) => this.animateItem(it));
  1587. // },
  1588. // animateNew(arr) {
  1589. // arr.forEach((it) => this.animateItem(it));
  1590. // },
  1591. // animateItem(item) {
  1592. // if (!item.showProgress) return;
  1593. // item.progress = 60;
  1594. // const target = Number(item.progressTarget) || 0;
  1595. // const step = Math.max(1, Math.round(target / 60));
  1596. // const timer = setInterval(() => {
  1597. // item.progress += step;
  1598. // if (item.progress >= target) {
  1599. // item.progress = target;
  1600. // clearInterval(timer);
  1601. // }
  1602. // }, 16);
  1603. // },
  1604. },
  1605. };
  1606. </script>
  1607. <style>
  1608. .report-export-page {
  1609. position: relative;
  1610. box-sizing: border-box;
  1611. /* padding: 170rpx 0 calc(50rpx + env(safe-area-inset-bottom)); */
  1612. padding-top: 290rpx;
  1613. }
  1614. .report-export-search-bar-container {
  1615. position: fixed;
  1616. top: 100rpx;
  1617. left: 0;
  1618. padding: 24rpx 24rpx 16rpx;
  1619. background-color: #f3f6f9;
  1620. z-index: 10;
  1621. box-sizing: border-box;
  1622. width: 100%;
  1623. }
  1624. .report-export-search-bar {
  1625. display: flex;
  1626. align-items: center;
  1627. background: #fff;
  1628. border-radius: 16rpx;
  1629. padding: 16rpx;
  1630. }
  1631. .report-export-search-input-wrap {
  1632. flex: 1;
  1633. position: relative;
  1634. background: #f3f6f9;
  1635. border-radius: 40rpx;
  1636. display: flex;
  1637. align-items: center;
  1638. height: 90rpx;
  1639. padding: 0 12rpx;
  1640. }
  1641. .report-export-search-icon {
  1642. width: 28rpx;
  1643. height: 28rpx;
  1644. margin-left: 16rpx;
  1645. }
  1646. .report-export-search-input {
  1647. flex: 1;
  1648. height: 90rpx;
  1649. padding: 0 16rpx;
  1650. font-size: 28rpx;
  1651. }
  1652. .report-export-search-btn {
  1653. height: 72rpx;
  1654. line-height: 72rpx;
  1655. padding: 0 34rpx;
  1656. border-radius: 36rpx;
  1657. background: #2c69ff;
  1658. color: #fff;
  1659. font-size: 34rpx;
  1660. margin-left: 12rpx;
  1661. }
  1662. .report-export-filter-btn {
  1663. margin-left: 12rpx;
  1664. display: flex;
  1665. flex-direction: column;
  1666. align-items: center;
  1667. justify-content: center;
  1668. }
  1669. .report-export-filter-icon {
  1670. width: 40rpx;
  1671. height: 40rpx;
  1672. }
  1673. .report-export-filter-text {
  1674. margin-top: 8rpx;
  1675. font-size: 24rpx;
  1676. color: #2c69ff;
  1677. }
  1678. .scan-rate-ranges-container {
  1679. position: fixed;
  1680. top: 262rpx;
  1681. left: 0;
  1682. width: 100%;
  1683. height: 120rpx;
  1684. background: #f3f6f9;
  1685. z-index: 6;
  1686. }
  1687. .scan-rate-ranges {
  1688. padding: 0rpx 24rpx 20rpx;
  1689. }
  1690. .scan-rate-ranges-content {
  1691. display: flex;
  1692. background: #fff;
  1693. padding: 20rpx 30rpx;
  1694. border-radius: 16rpx;
  1695. justify-content: space-between;
  1696. }
  1697. .scan-rate-range {
  1698. padding: 12rpx 35rpx;
  1699. border-radius: 5rpx;
  1700. background: rgb(240, 240, 240);
  1701. font-size: 26rpx;
  1702. }
  1703. .scan-rate-range.scan-rate-active {
  1704. background: #2c69ff;
  1705. color: #fff;
  1706. }
  1707. .report-export-list-scroll {
  1708. position: fixed;
  1709. top: 380rpx;
  1710. left: 0;
  1711. box-sizing: border-box;
  1712. width: 100%;
  1713. padding: 0 24rpx;
  1714. padding-bottom: calc(env(safe-area-inset-bottom) + 50rpx);
  1715. box-sizing: border-box;
  1716. }
  1717. .report-export-item-card {
  1718. background: #fff;
  1719. border-radius: 16rpx;
  1720. padding: 24rpx;
  1721. margin-bottom: 16rpx;
  1722. }
  1723. .report-export-item-header {
  1724. width: 100%;
  1725. display: flex;
  1726. align-items: flex-start;
  1727. flex-wrap: wrap;
  1728. }
  1729. .report-export-item-title {
  1730. flex: 1;
  1731. width: 0;
  1732. word-break: break-word;
  1733. margin-right: 20rpx;
  1734. font-size: 38rpx;
  1735. color: #2c69ff;
  1736. display: -webkit-box;
  1737. -webkit-box-orient: vertical;
  1738. -webkit-line-clamp: 2;
  1739. overflow: hidden;
  1740. text-decoration: underline;
  1741. }
  1742. .report-export-status {
  1743. flex-shrink: 0;
  1744. padding: 8rpx 12rpx;
  1745. border-radius: 10rpx;
  1746. font-size: 22rpx;
  1747. color: #fff;
  1748. }
  1749. .report-export-status.report-export-status-2 {
  1750. background: #67c23a;
  1751. }
  1752. .report-export-status.report-export-status-1 {
  1753. background: #888;
  1754. }
  1755. .report-export-status.report-export-status-3,
  1756. .report-export-status.report-export-status-4 {
  1757. background: #2c69ff;
  1758. }
  1759. .report-export-item-row {
  1760. margin-top: 12rpx;
  1761. font-size: 28rpx;
  1762. color: #999;
  1763. }
  1764. .report-export-progress-wrap {
  1765. margin-top: 20rpx;
  1766. }
  1767. .report-export-progress {
  1768. margin-top: 8rpx;
  1769. height: 32rpx;
  1770. background: #e6ebf5;
  1771. border-radius: 999rpx;
  1772. overflow: hidden;
  1773. position: relative;
  1774. }
  1775. .report-export-progress-fill {
  1776. position: absolute;
  1777. left: 0;
  1778. top: 0;
  1779. height: 100%;
  1780. background: #2c69ff;
  1781. border-radius: 999rpx;
  1782. width: 0;
  1783. transition: width 0.2s linear;
  1784. }
  1785. .report-export-progress-text {
  1786. position: absolute;
  1787. left: 50%;
  1788. top: 50%;
  1789. transform: translate(-50%, -50%);
  1790. font-size: 26rpx;
  1791. color: #fff;
  1792. z-index: 2;
  1793. }
  1794. .report-export-action-row {
  1795. margin-top: 16rpx;
  1796. display: flex;
  1797. align-items: center;
  1798. justify-content: flex-end;
  1799. }
  1800. .report-export-action-btn {
  1801. height: 50rpx;
  1802. line-height: 50rpx;
  1803. padding: 0 28rpx;
  1804. border-radius: 12rpx;
  1805. font-size: 30rpx;
  1806. margin: 0;
  1807. }
  1808. .report-export-action-btn + .report-export-action-btn {
  1809. margin-left: 12rpx;
  1810. }
  1811. .report-export-action-btn.report-export-primary {
  1812. background: #2c69ff;
  1813. color: #fff;
  1814. }
  1815. .report-export-action-btn.report-export-info {
  1816. background: #67c23a;
  1817. color: #fff;
  1818. }
  1819. .report-export-loading-row {
  1820. justify-content: center;
  1821. }
  1822. .report-export-loading-wrapper {
  1823. width: 100%;
  1824. height: 76rpx;
  1825. display: flex;
  1826. align-items: center;
  1827. justify-content: center;
  1828. }
  1829. .report-export-loading-icon {
  1830. width: 40rpx;
  1831. height: 40rpx;
  1832. animation: spin 1s linear infinite;
  1833. }
  1834. @keyframes spin {
  1835. from {
  1836. transform: rotate(0deg);
  1837. }
  1838. to {
  1839. transform: rotate(360deg);
  1840. }
  1841. }
  1842. .report-export-footer {
  1843. position: fixed;
  1844. left: 0;
  1845. right: 0;
  1846. bottom: 0;
  1847. padding: 12rpx 30rpx calc(50rpx + env(safe-area-inset-bottom));
  1848. background: #fff;
  1849. }
  1850. .report-export-footer-btn {
  1851. height: 86rpx;
  1852. border-radius: 999rpx;
  1853. background: #2c69ff;
  1854. color: #fff;
  1855. display: flex;
  1856. align-items: center;
  1857. justify-content: center;
  1858. font-size: 30rpx;
  1859. box-shadow: 0 8rpx 24rpx rgba(44, 105, 255, 0.35);
  1860. }
  1861. .report-export-create-modal-mask {
  1862. position: fixed;
  1863. left: 0;
  1864. right: 0;
  1865. top: 0;
  1866. bottom: 0;
  1867. background: rgba(0, 0, 0, 0.35);
  1868. z-index: 90;
  1869. }
  1870. .report-export-create-modal {
  1871. position: fixed;
  1872. left: 0;
  1873. right: 0;
  1874. bottom: -100%;
  1875. width: 100%;
  1876. background: #fff;
  1877. border-top-left-radius: 45rpx;
  1878. border-top-right-radius: 45rpx;
  1879. z-index: 92;
  1880. box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.12);
  1881. /* transform: translateY(100%); */
  1882. transition: bottom 0.25s ease-out;
  1883. }
  1884. .report-export-create-modal--open {
  1885. /* transform: translateY(0) !important; */
  1886. bottom: 0 !important;
  1887. }
  1888. .report-export-create-modal-title {
  1889. position: relative;
  1890. padding: 28rpx 28rpx 12rpx;
  1891. font-size: 34rpx;
  1892. color: #333;
  1893. text-align: center;
  1894. line-height: 60rpx;
  1895. font-weight: 500;
  1896. }
  1897. .report-export-create-modal-close {
  1898. position: absolute;
  1899. right: 32rpx;
  1900. top: 50%;
  1901. transform: translateY(-50%);
  1902. padding: 10rpx;
  1903. color: #909399;
  1904. font-size: 55rpx;
  1905. line-height: 1;
  1906. }
  1907. .report-export-create-modal-body {
  1908. padding: 0 32rpx 100rpx;
  1909. }
  1910. .report-export-create-modal-row {
  1911. display: flex;
  1912. flex-direction: column;
  1913. margin-top: 32rpx;
  1914. position: relative;
  1915. }
  1916. .report-export-create-modal-label {
  1917. width: auto;
  1918. font-size: 28rpx;
  1919. color: #333;
  1920. margin-bottom: 16rpx;
  1921. font-weight: 500;
  1922. }
  1923. .report-export-create-modal-inputwrap {
  1924. flex: 1;
  1925. position: relative;
  1926. border: 1rpx solid #dcdfe6;
  1927. border-radius: 12rpx;
  1928. display: flex;
  1929. align-items: center;
  1930. min-height: 80rpx;
  1931. padding: 0 24rpx;
  1932. background-color: #fff;
  1933. }
  1934. .report-export-create-modal-static {
  1935. position: relative;
  1936. flex: 1;
  1937. max-height: 115rpx;
  1938. font-size: 28rpx;
  1939. color: #606266;
  1940. line-height: 40rpx;
  1941. padding: 20rpx 0;
  1942. overflow-y: auto;
  1943. padding-right: 20rpx;
  1944. }
  1945. .report-export-input-simulator {
  1946. display: flex;
  1947. justify-content: center;
  1948. align-items: center;
  1949. }
  1950. .report-export-create-modal-input {
  1951. flex: 1;
  1952. height: 80rpx;
  1953. font-size: 28rpx;
  1954. color: #606266;
  1955. }
  1956. /deep/.report-export-dropdown-other-customer-input {
  1957. color: #666;
  1958. }
  1959. /* .report-export-create-modal-select-arrow {
  1960. width: 18rpx;
  1961. height: 18rpx;
  1962. border: 5rpx solid #999;
  1963. border-top: none;
  1964. border-left: none;
  1965. transform: rotate(45deg);
  1966. margin: 0 8rpx 10rpx 12rpx;
  1967. }
  1968. .report-export-create-modal-select-arrow.disabled {
  1969. opacity: 0.4;
  1970. pointer-events: none;
  1971. } */
  1972. .report-export-create-modal-dropdown {
  1973. position: absolute;
  1974. left: 0;
  1975. right: 0;
  1976. background: #fff;
  1977. border: 1rpx solid #eef0f4;
  1978. border-radius: 12rpx;
  1979. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  1980. z-index: 6;
  1981. max-height: 510rpx;
  1982. overflow-y: auto;
  1983. -webkit-overflow-scrolling: touch;
  1984. }
  1985. .report-export-create-modal-dropdown-list {
  1986. max-height: 350rpx;
  1987. }
  1988. .report-export-dropdown-search-row {
  1989. padding: 10rpx;
  1990. }
  1991. .report-export-dropdown-search-input {
  1992. width: 100%;
  1993. height: 60rpx;
  1994. border: 1rpx solid #eaeef4;
  1995. border-radius: 8rpx;
  1996. box-sizing: border-box;
  1997. padding: 0 16rpx;
  1998. font-size: 28rpx;
  1999. }
  2000. .report-export-create-modal-dropdown-item {
  2001. padding: 16rpx 20rpx;
  2002. font-size: 28rpx;
  2003. color: #333;
  2004. }
  2005. .report-export-selected {
  2006. background: #f0f5ff;
  2007. }
  2008. .report-export-input-arrow {
  2009. width: 16rpx;
  2010. height: 16rpx;
  2011. border-right: 3rpx solid #c0c4cc;
  2012. border-bottom: 3rpx solid #c0c4cc;
  2013. transform: rotate(45deg);
  2014. margin-top: -6rpx;
  2015. }
  2016. .customer-chip {
  2017. display: inline-block;
  2018. position: relative;
  2019. line-height: 50rpx;
  2020. border: 1rpx solid #eaeef4;
  2021. border-radius: 8rpx;
  2022. padding: 0rpx 44rpx 0rpx 16rpx;
  2023. margin-right: 8rpx;
  2024. margin-bottom: 8rpx;
  2025. font-size: 22rpx;
  2026. color: #333;
  2027. }
  2028. .customer-chip-close {
  2029. position: absolute;
  2030. right: 6rpx;
  2031. top: 0;
  2032. color: #666;
  2033. font-size: 28rpx;
  2034. padding: 0 8rpx;
  2035. border-radius: 6rpx;
  2036. }
  2037. .customer-clear-all {
  2038. position: absolute;
  2039. right: 6rpx;
  2040. top: 50%;
  2041. transform: translateY(-50%);
  2042. line-height: 50rpx;
  2043. padding: 8rpx 10rpx;
  2044. font-size: 40rpx;
  2045. }
  2046. .report-export-create-modal-estimated {
  2047. font-size: 28rpx;
  2048. color: #666;
  2049. }
  2050. .report-export-create-modal-footer {
  2051. padding: 18rpx 28rpx calc(50rpx + env(safe-area-inset-bottom));
  2052. }
  2053. .report-export-create-modal-btn {
  2054. line-height: 90rpx;
  2055. border-radius: 20rpx;
  2056. background: #2c69ff;
  2057. color: #fff;
  2058. text-align: center;
  2059. font-size: 30rpx;
  2060. }
  2061. .report-export-create-email-modal {
  2062. transform: translateY(200%);
  2063. height: auto;
  2064. top: 30%;
  2065. bottom: auto;
  2066. border-radius: 16rpx;
  2067. width: 600rpx;
  2068. left: 75rpx;
  2069. }
  2070. .report-export-email-input-wrap {
  2071. display: flex;
  2072. align-items: center;
  2073. background: #f5f7fa;
  2074. border-radius: 8rpx;
  2075. padding: 0 20rpx;
  2076. height: 80rpx;
  2077. border: 1rpx solid transparent;
  2078. }
  2079. .report-export-input-error {
  2080. border-color: #ff4d4f;
  2081. }
  2082. .report-export-email-input {
  2083. flex: 1;
  2084. font-size: 28rpx;
  2085. color: #333;
  2086. height: 100%;
  2087. }
  2088. .report-export-email-suffix {
  2089. font-size: 28rpx;
  2090. color: #333;
  2091. margin-left: 10rpx;
  2092. }
  2093. .report-export-error-text {
  2094. font-size: 24rpx;
  2095. color: #ff4d4f;
  2096. margin-top: 10rpx;
  2097. display: block;
  2098. }
  2099. .report-export-input-disabled {
  2100. background-color: #f5f7fa;
  2101. cursor: not-allowed;
  2102. opacity: 0.7;
  2103. }
  2104. </style>