index.vue 65 KB

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