index.vue 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157
  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. text-decoration: underline;
  1709. }
  1710. .report-export-status {
  1711. flex-shrink: 0;
  1712. padding: 8rpx 12rpx;
  1713. border-radius: 10rpx;
  1714. font-size: 22rpx;
  1715. color: #fff;
  1716. }
  1717. .report-export-status.report-export-status-2 {
  1718. background: #67c23a;
  1719. }
  1720. .report-export-status.report-export-status-1 {
  1721. background: #888;
  1722. }
  1723. .report-export-status.report-export-status-3,
  1724. .report-export-status.report-export-status-4 {
  1725. background: #2c69ff;
  1726. }
  1727. .report-export-item-row {
  1728. margin-top: 12rpx;
  1729. font-size: 28rpx;
  1730. color: #999;
  1731. }
  1732. .report-export-progress-wrap {
  1733. margin-top: 20rpx;
  1734. }
  1735. .report-export-progress {
  1736. margin-top: 8rpx;
  1737. height: 32rpx;
  1738. background: #e6ebf5;
  1739. border-radius: 999rpx;
  1740. overflow: hidden;
  1741. position: relative;
  1742. }
  1743. .report-export-progress-fill {
  1744. position: absolute;
  1745. left: 0;
  1746. top: 0;
  1747. height: 100%;
  1748. background: #2c69ff;
  1749. border-radius: 999rpx;
  1750. width: 0;
  1751. transition: width 0.2s linear;
  1752. }
  1753. .report-export-progress-text {
  1754. position: absolute;
  1755. left: 50%;
  1756. top: 50%;
  1757. transform: translate(-50%, -50%);
  1758. font-size: 26rpx;
  1759. color: #fff;
  1760. z-index: 2;
  1761. }
  1762. .report-export-action-row {
  1763. margin-top: 16rpx;
  1764. display: flex;
  1765. align-items: center;
  1766. justify-content: flex-end;
  1767. }
  1768. .report-export-action-btn {
  1769. height: 50rpx;
  1770. line-height: 50rpx;
  1771. padding: 0 28rpx;
  1772. border-radius: 12rpx;
  1773. font-size: 30rpx;
  1774. margin: 0;
  1775. }
  1776. .report-export-action-btn + .report-export-action-btn {
  1777. margin-left: 12rpx;
  1778. }
  1779. .report-export-action-btn.report-export-primary {
  1780. background: #2c69ff;
  1781. color: #fff;
  1782. }
  1783. .report-export-action-btn.report-export-info {
  1784. background: #67c23a;
  1785. color: #fff;
  1786. }
  1787. .report-export-loading-row {
  1788. justify-content: center;
  1789. }
  1790. .report-export-loading-wrapper {
  1791. width: 100%;
  1792. height: 76rpx;
  1793. display: flex;
  1794. align-items: center;
  1795. justify-content: center;
  1796. }
  1797. .report-export-loading-icon {
  1798. width: 40rpx;
  1799. height: 40rpx;
  1800. animation: spin 1s linear infinite;
  1801. }
  1802. @keyframes spin {
  1803. from {
  1804. transform: rotate(0deg);
  1805. }
  1806. to {
  1807. transform: rotate(360deg);
  1808. }
  1809. }
  1810. .report-export-footer {
  1811. position: fixed;
  1812. left: 0;
  1813. right: 0;
  1814. bottom: 0;
  1815. padding: 12rpx 30rpx calc(50rpx + env(safe-area-inset-bottom));
  1816. background: #fff;
  1817. }
  1818. .report-export-footer-btn {
  1819. height: 86rpx;
  1820. border-radius: 999rpx;
  1821. background: #2c69ff;
  1822. color: #fff;
  1823. display: flex;
  1824. align-items: center;
  1825. justify-content: center;
  1826. font-size: 30rpx;
  1827. box-shadow: 0 8rpx 24rpx rgba(44, 105, 255, 0.35);
  1828. }
  1829. .report-export-create-modal-mask {
  1830. position: fixed;
  1831. left: 0;
  1832. right: 0;
  1833. top: 0;
  1834. bottom: 0;
  1835. background: rgba(0, 0, 0, 0.35);
  1836. z-index: 90;
  1837. }
  1838. .report-export-create-modal {
  1839. position: fixed;
  1840. left: 0;
  1841. right: 0;
  1842. bottom: -100%;
  1843. width: 100%;
  1844. background: #fff;
  1845. border-top-left-radius: 45rpx;
  1846. border-top-right-radius: 45rpx;
  1847. z-index: 92;
  1848. box-shadow: 0 -8rpx 24rpx rgba(0, 0, 0, 0.12);
  1849. /* transform: translateY(100%); */
  1850. transition: bottom 0.25s ease-out;
  1851. }
  1852. .report-export-create-modal--open {
  1853. /* transform: translateY(0) !important; */
  1854. bottom: 0 !important;
  1855. }
  1856. .report-export-create-modal-title {
  1857. position: relative;
  1858. padding: 28rpx 28rpx 12rpx;
  1859. font-size: 34rpx;
  1860. color: #333;
  1861. text-align: center;
  1862. line-height: 60rpx;
  1863. font-weight: 500;
  1864. }
  1865. .report-export-create-modal-close {
  1866. position: absolute;
  1867. right: 32rpx;
  1868. top: 50%;
  1869. transform: translateY(-50%);
  1870. padding: 10rpx;
  1871. color: #909399;
  1872. font-size: 55rpx;
  1873. line-height: 1;
  1874. }
  1875. .report-export-create-modal-body {
  1876. padding: 0 32rpx 100rpx;
  1877. }
  1878. .report-export-create-modal-row {
  1879. display: flex;
  1880. flex-direction: column;
  1881. margin-top: 32rpx;
  1882. position: relative;
  1883. }
  1884. .report-export-create-modal-label {
  1885. width: auto;
  1886. font-size: 28rpx;
  1887. color: #333;
  1888. margin-bottom: 16rpx;
  1889. font-weight: 500;
  1890. }
  1891. .report-export-create-modal-inputwrap {
  1892. flex: 1;
  1893. position: relative;
  1894. border: 1rpx solid #dcdfe6;
  1895. border-radius: 12rpx;
  1896. display: flex;
  1897. align-items: center;
  1898. min-height: 80rpx;
  1899. padding: 0 24rpx;
  1900. background-color: #fff;
  1901. }
  1902. .report-export-create-modal-static {
  1903. position: relative;
  1904. flex: 1;
  1905. max-height: 115rpx;
  1906. font-size: 28rpx;
  1907. color: #606266;
  1908. line-height: 40rpx;
  1909. padding: 20rpx 0;
  1910. overflow-y: auto;
  1911. padding-right: 20rpx;
  1912. }
  1913. .report-export-input-simulator {
  1914. display: flex;
  1915. justify-content: center;
  1916. align-items: center;
  1917. }
  1918. .report-export-create-modal-input {
  1919. flex: 1;
  1920. height: 80rpx;
  1921. font-size: 28rpx;
  1922. color: #606266;
  1923. }
  1924. /deep/.report-export-dropdown-other-customer-input {
  1925. color: #666;
  1926. }
  1927. /* .report-export-create-modal-select-arrow {
  1928. width: 18rpx;
  1929. height: 18rpx;
  1930. border: 5rpx solid #999;
  1931. border-top: none;
  1932. border-left: none;
  1933. transform: rotate(45deg);
  1934. margin: 0 8rpx 10rpx 12rpx;
  1935. }
  1936. .report-export-create-modal-select-arrow.disabled {
  1937. opacity: 0.4;
  1938. pointer-events: none;
  1939. } */
  1940. .report-export-create-modal-dropdown {
  1941. position: absolute;
  1942. left: 0;
  1943. right: 0;
  1944. background: #fff;
  1945. border: 1rpx solid #eef0f4;
  1946. border-radius: 12rpx;
  1947. box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.08);
  1948. z-index: 6;
  1949. max-height: 510rpx;
  1950. overflow-y: auto;
  1951. -webkit-overflow-scrolling: touch;
  1952. }
  1953. .report-export-create-modal-dropdown-list {
  1954. max-height: 350rpx;
  1955. }
  1956. .report-export-dropdown-search-row {
  1957. padding: 10rpx;
  1958. }
  1959. .report-export-dropdown-search-input {
  1960. width: 100%;
  1961. height: 60rpx;
  1962. border: 1rpx solid #eaeef4;
  1963. border-radius: 8rpx;
  1964. box-sizing: border-box;
  1965. padding: 0 16rpx;
  1966. font-size: 28rpx;
  1967. }
  1968. .report-export-create-modal-dropdown-item {
  1969. padding: 16rpx 20rpx;
  1970. font-size: 28rpx;
  1971. color: #333;
  1972. }
  1973. .report-export-selected {
  1974. background: #f0f5ff;
  1975. }
  1976. .report-export-input-arrow {
  1977. width: 16rpx;
  1978. height: 16rpx;
  1979. border-right: 3rpx solid #c0c4cc;
  1980. border-bottom: 3rpx solid #c0c4cc;
  1981. transform: rotate(45deg);
  1982. margin-top: -6rpx;
  1983. }
  1984. .customer-chip {
  1985. display: inline-block;
  1986. position: relative;
  1987. line-height: 50rpx;
  1988. border: 1rpx solid #eaeef4;
  1989. border-radius: 8rpx;
  1990. padding: 0rpx 44rpx 0rpx 16rpx;
  1991. margin-right: 8rpx;
  1992. margin-bottom: 8rpx;
  1993. font-size: 22rpx;
  1994. color: #333;
  1995. }
  1996. .customer-chip-close {
  1997. position: absolute;
  1998. right: 6rpx;
  1999. top: 0;
  2000. color: #666;
  2001. font-size: 28rpx;
  2002. padding: 0 8rpx;
  2003. border-radius: 6rpx;
  2004. }
  2005. .customer-clear-all {
  2006. position: absolute;
  2007. right: 6rpx;
  2008. top: 50%;
  2009. transform: translateY(-50%);
  2010. line-height: 50rpx;
  2011. padding: 8rpx 10rpx;
  2012. font-size: 40rpx;
  2013. }
  2014. .report-export-create-modal-estimated {
  2015. font-size: 28rpx;
  2016. color: #666;
  2017. }
  2018. .report-export-create-modal-footer {
  2019. padding: 18rpx 28rpx calc(50rpx + env(safe-area-inset-bottom));
  2020. }
  2021. .report-export-create-modal-btn {
  2022. line-height: 90rpx;
  2023. border-radius: 20rpx;
  2024. background: #2c69ff;
  2025. color: #fff;
  2026. text-align: center;
  2027. font-size: 30rpx;
  2028. }
  2029. .report-export-create-email-modal {
  2030. transform: translateY(200%);
  2031. height: auto;
  2032. top: 30%;
  2033. bottom: auto;
  2034. border-radius: 16rpx;
  2035. width: 600rpx;
  2036. left: 75rpx;
  2037. }
  2038. .report-export-email-input-wrap {
  2039. display: flex;
  2040. align-items: center;
  2041. background: #f5f7fa;
  2042. border-radius: 8rpx;
  2043. padding: 0 20rpx;
  2044. height: 80rpx;
  2045. border: 1rpx solid transparent;
  2046. }
  2047. .report-export-input-error {
  2048. border-color: #ff4d4f;
  2049. }
  2050. .report-export-email-input {
  2051. flex: 1;
  2052. font-size: 28rpx;
  2053. color: #333;
  2054. height: 100%;
  2055. }
  2056. .report-export-email-suffix {
  2057. font-size: 28rpx;
  2058. color: #333;
  2059. margin-left: 10rpx;
  2060. }
  2061. .report-export-error-text {
  2062. font-size: 24rpx;
  2063. color: #ff4d4f;
  2064. margin-top: 10rpx;
  2065. display: block;
  2066. }
  2067. .report-export-input-disabled {
  2068. background-color: #f5f7fa;
  2069. cursor: not-allowed;
  2070. opacity: 0.7;
  2071. }
  2072. </style>