index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862
  1. <template>
  2. <view class="main">
  3. <NavBar :user-info="userInfo" :work-Status="workStatus" @update-user="updateUser" />
  4. <view class="body">
  5. <view class="tab-box">
  6. <view class="tab-bar">
  7. <view class="tab_item" v-for="(tab, index) in tabList" :key="index"
  8. :class="{'active':tabActive==index}" @click="checkIndex(index)">
  9. <text class="text">{{tab.title}}{{tabActive===0 && index==0 && orderList.length>0?"("+orderList.length+")":""}}</text>
  10. </view>
  11. </view>
  12. <view class="search-bar">
  13. <view v-if="tabActive === 0" class="today">
  14. <view class="search">
  15. <uni-easyinput prefixIcon="search" v-model="searchVal" placeholder="请输入姓名" />
  16. </view>
  17. <button type="primary" @click="handleSearch" class="search-button">搜 索</button>
  18. <button type="primary" v-if="s=='1'" :disabled="workStatus==='1'?false:true" @click="handleRefresh" :class="workStatus==='1'?'refresh':'refresh active'">{{ccc}}</button>
  19. <button type="primary" v-else @click="handleRelease" :class="'refresh'">完成</button>
  20. </view>
  21. <view v-else class="history">
  22. <view class="searchchoice">
  23. <view class="row1">
  24. <view class="timequan">
  25. <text class="time_t">时间区间:</text>
  26. <uni-datetime-picker v-model="searchTime[0]" placeholder="开始时间" type="datetime" :hide-second="true" class="datepick"/>
  27. <uni-datetime-picker v-model="searchTime[1]" placeholder="结束时间" type="datetime" :hide-second="true" class="datepick"/>
  28. <!-- <timeSlot
  29. ref="timeslot"
  30. :title="'选择时间段'"
  31. @confirm="confirmTime">
  32. </timeSlot> -->
  33. <!-- <el-date-picker
  34. v-model="searchTime"
  35. type="datetimerange"
  36. range-separator="-"
  37. start-placeholder="开始时间"
  38. end-placeholder="结束时间"
  39. /> -->
  40. </view>
  41. </view>
  42. <view class="row2">
  43. <view class="office">
  44. <view class="time_t">
  45. 科室:
  46. </view>
  47. <picker @change="handleGetOffice" placeholder="请选择" :value="officeIndex" :range="officeArr">
  48. <view class="uni-input">{{officeArr[officeIndex]}}</view>
  49. </picker>
  50. </view>
  51. <view class="presid">
  52. <picker @change="handleGetType" :value="typeIndex" :range="typeArr">
  53. <view class="uni-input">{{typeArr[typeIndex]}}</view>
  54. </picker>
  55. </view>
  56. <view v-if="typeIndex === 0" class="search">
  57. <uni-easyinput prefixIcon="search" v-model="searchName" placeholder="请输入姓名" />
  58. </view>
  59. <view v-else class="search">
  60. <uni-easyinput prefixIcon="search" v-model="searchPreNo" placeholder="请输入处方号" />
  61. </view>
  62. <button type="primary" @click="handleSearch" class="search-button">搜索</button>
  63. </view>
  64. <view class="row3">
  65. <view class="tag-view" v-for="(v, i) in tags" :key="i">
  66. <uni-tag :circle="true" :inverted="!searchTags.includes(v)" :text=v @click="handleGetTags(v)" />
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="tab-content">
  74. <view class="order-list">
  75. <scroll-view
  76. v-if="orderList.length > 0"
  77. class="order-list-wrap"
  78. scroll-y="true"
  79. :scroll-top="50"
  80. @scrolltoupper="loadPreList"
  81. @scrolltolower="loadMoreList"
  82. >
  83. <template v-for="(v,i) in orderList" :key="i">
  84. <orderCard v-if="v " :s="s" :v="v" :work-Status="workStatus" :c="tabActive"
  85. @emit-select="emitSelect"
  86. />
  87. </template>
  88. <view v-if="isBottom" class="order-bottom">
  89. <view class="text">-- 没有更多数据 --</view>
  90. </view>
  91. </scroll-view>
  92. <view v-else class="text">
  93. <image class="zwsj" aspectFill :src="'/static/zwsj.png'" />
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </template>
  100. <script setup>
  101. import NavBar from "@/components/nav-bar/nav-bar.vue"
  102. import OrderCard from "@/components/order-card/order-card.vue"
  103. import { onMounted,ref, getCurrentInstance } from 'vue'
  104. import { onLoad } from "@dcloudio/uni-app"
  105. import {receiveOrderList, selectDepartment } from "@/static/js/api.js"
  106. import {releaseOrder} from "@/static/js/request.js"
  107. import debounce from 'lodash.debounce'
  108. // import { ID_INJECTION_KEY } from 'element-plus'
  109. const userInfo = ref({})
  110. const workStatus = ref('0')
  111. const tabList = ref([
  112. {title:"今日待完成", status: '0', leng:0},
  113. {title:"历史处方", status: '1'},
  114. ])
  115. const currentStatus = ref(0)
  116. const tabActive = ref(0) // 当前tab Index
  117. const tabName = ref('今日待完成') // 当前tab Name
  118. // const tags = ref([])
  119. const orderList = ref([
  120. {id:1,prescriptionTime:'2023-07-06 14:54', faceurl:'/static/hz.png',name:'张三三',sex: '女',age: 23,disName:'胃脘痛病',symName:'脾胃虚寒证',deployState:'调配',preNo:10230516091026,department:'中医内科',dosageForm:'汤剂',number:3,prescriptionSum:135.62,preMzZy:'1'},
  121. {id:2,prescriptionTime:'2023-07-06 14:54', faceurl:'/static/hz.png',name:'张三三',sex: '女',age: 23,disName:'胃脘痛病',symName:'脾胃虚寒证',deployState:'调配',preNo:10230516091026,department:'中医内科',dosageForm:'汤剂',number:3,prescriptionSum:135.62,preMzZy:'1'},
  122. {id:3,prescriptionTime:'2023-07-06 14:54', faceurl:'/static/hz.png',name:'张三三',sex: '女',age: 23,disName:'胃脘痛病',symName:'脾胃虚寒证',deployState:'调配',preNo:10230516091026,department:'中医内科',dosageForm:'汤剂',number:3,prescriptionSum:135.62,preMzZy:'2'},
  123. {id:4,prescriptionTime:'2023-07-06 14:54', faceurl:'/static/hz.png',name:'张三三',sex: '女',age: 23,disName:'胃脘痛病',symName:'脾胃虚寒证',deployState:'调配',preNo:10230516091026,department:'中医内科',dosageForm:'汤剂',number:3,prescriptionSum:135.62,preMzZy:'1'},
  124. {id:5,prescriptionTime:'2023-07-06 14:54', faceurl:'/static/hz.png',name:'张三三',sex: '女',age: 23,disName:'胃脘痛病',symName:'脾胃虚寒证',deployState:'调配',preNo:10230516091026,department:'中医内科',dosageForm:'汤剂',number:3,prescriptionSum:135.62,preMzZy:'2'}
  125. ])
  126. const isBottom = ref(false) // 是否触底
  127. const officeArr = ref(['全部'])
  128. const officeIndex = ref(0)
  129. const typeArr = ref(['姓名:','处方号:'])
  130. const typeIndex = ref(0)
  131. const searchVal = ref('')
  132. const searchTime =ref([])
  133. const searchDepartment = ref('')
  134. const searchName = ref('')
  135. const searchPreNo = ref('')
  136. const searchSex = ref('')
  137. const searchPreMzZy = ref('')
  138. const searchStatus = ref('')
  139. const searchTags = ref([])
  140. const tags = ref(['全部','门诊','住院','男','女','煎煮','发药'])
  141. const deployArr = ref([
  142. {name:'抓药', id: '1' },
  143. {name:'复核', id: '2' },
  144. {name:'浸泡', id: '3' },
  145. {name:'煎煮', id: '4' },
  146. {name:'打包', id: '5' },
  147. ])
  148. const page = ref(1)
  149. const pageSize = ref(10)
  150. const total = ref(0)
  151. const status = ref('')
  152. const s = ref('1')
  153. const ccc = ref('一键释放')
  154. const ids = ref([])
  155. const today =ref({
  156. leng: 0,
  157. })
  158. // app.provide(ID_INJECTION_KEY, {
  159. // prefix: Math.floor(Math.random() * 10000),
  160. // current: 0,
  161. // })
  162. const {proxy} = getCurrentInstance()
  163. onMounted(() => {
  164. })
  165. onLoad(async () => {
  166. const token = uni.getStorageSync('token')
  167. userInfo.value.name = uni.getStorageSync('username')
  168. workStatus.value = uni.getStorageSync('workStatus') || '0'
  169. const params = {
  170. token: token,
  171. data:JSON.stringify({
  172. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  173. pageNum: page.value,
  174. pageSize: pageSize.value,
  175. status: '0'
  176. })
  177. }
  178. const {data:res} = await receiveOrderList(params)
  179. if (res.code === 200) {
  180. total.value = res.total
  181. orderList.value = res.rows
  182. if(orderList.value.length < pageSize.value){
  183. isBottom.value = true
  184. }
  185. if(tabActive.value ==0){
  186. tabList.value[0].leng = orderList.value.length
  187. }
  188. }
  189. })
  190. const reset = ()=>{
  191. searchTime.value =[]
  192. officeIndex.value =0
  193. searchName.value =''
  194. searchPreNo.value =''
  195. searchSex.value =''
  196. searchPreMzZy.value =''
  197. searchStatus.value =''
  198. searchVal.value = ''
  199. officeArr.value = ['全部']
  200. }
  201. // 子传父,更新userInfo
  202. const updateUser = (v)=>{
  203. console.log('updateUserStatus', v)
  204. workStatus.value = v+''
  205. console.log('workStatus.value', workStatus.value)
  206. }
  207. const emitSelect = (v)=>{
  208. console.log('emitSelect', v)
  209. // 查在ids中查找v,如果存在就删除,如果不存在就添加
  210. const index = ids.value.findIndex(x=>x==v)
  211. if (index>-1){
  212. ids.value.splice(index, 1)
  213. } else {
  214. ids.value.push(v)
  215. }
  216. }
  217. const handleSearch = debounce(async()=>{
  218. console.log('handleSearch searchPreMzZy',searchPreMzZy.value)
  219. console.log('handleSearch searchStatus',searchStatus.value)
  220. console.log('handleSearch searchSex',searchSex.value)
  221. if(tabActive.value ===0) {
  222. const params = {
  223. token: uni.getStorageSync('token'),
  224. data: JSON.stringify({
  225. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  226. name: searchVal.value.trim(),
  227. pageNum: page.value,
  228. pageSize: pageSize.value,
  229. status: tabList.value[tabActive.value].status,
  230. })
  231. }
  232. const {data:res} = await receiveOrderList(params)
  233. if (res.code === 200) {
  234. total.value = res.total
  235. orderList.value = res.rows
  236. if(orderList.value.length < pageSize.value){
  237. isBottom.value = true
  238. }
  239. }
  240. }
  241. if(tabActive.value==1){
  242. const params = {
  243. token: uni.getStorageSync('token'),
  244. data: JSON.stringify({
  245. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  246. startTime: searchTime.value[0] || '',
  247. endTime: searchTime.value[1] || '',
  248. name: searchName.value.trim() || '',
  249. preNo: searchPreNo.value || '',
  250. department: searchDepartment.value || '',
  251. prescriptionStatus: searchStatus.value || '',//煎煮发药
  252. sex: searchSex.value || '',
  253. preMzZy: searchPreMzZy.value || '',//门诊住院
  254. pageNum: page.value,
  255. pageSize: pageSize.value,
  256. status: tabList.value[tabActive.value].status
  257. })
  258. }
  259. console.log('历史记录查询params',params)
  260. const {data:res} = await receiveOrderList(params)
  261. if (res.code === 200) {
  262. total.value = res.total
  263. orderList.value = res.rows
  264. if(orderList.value.length < pageSize.value){
  265. isBottom.value = true
  266. }
  267. if(tabActive.value ==0){
  268. tabList.value[0].leng = orderList.value.length
  269. }
  270. }
  271. }
  272. },500)
  273. const handleRefresh = debounce(()=>{
  274. console.log('yijianshifang >orderList>>', orderList.value)
  275. // let ids = ''
  276. // orderList.value.forEach((v)=>{if(v.id){
  277. // ids= ids+v.id+','
  278. // console.log('yijianshifang >orderList>>',ids)
  279. // }})
  280. // console.log('yijianshifang >orderList>>666',ids)
  281. s.value = '0'
  282. console.log('handleRefresh>>ids.value ',ids.value)
  283. // ccc.value = '完成'
  284. // const params = {
  285. // token: uni.getStorageSync('token'),
  286. // data:{ids:ids.value.toString()}
  287. // }
  288. // console.log('handleRefresh >params>>666',params)
  289. // const {data:res} = await releaseOrder(params)
  290. // if (res.code === 200) {
  291. // if(ids.value.length>0){
  292. // console.log('ids.value',ids.value)
  293. // ids.value.forEach(x=>{
  294. // console.log('orderList',orderList.value)
  295. // const index = orderList.value.findIndex(y=>y.id == x)
  296. // console.log('orderList index',index)
  297. // if(index>-1){
  298. // console.log('orderList',orderList.value)
  299. // orderList.value.splice(index,1)
  300. // console.log('orderList',orderList.value)
  301. // }
  302. // })
  303. // ids.value = []
  304. // }
  305. // }
  306. },500)
  307. const handleRelease = debounce(async()=>{
  308. const params = {
  309. token: uni.getStorageSync('token'),
  310. data:{ids:ids.value.toString()}
  311. }
  312. console.log('handleRefresh >params>>666',params)
  313. const {data:res} = await releaseOrder(params)
  314. if (res.code === 200) {
  315. if(ids.value.length>0){
  316. console.log('ids.value',ids.value)
  317. ids.value.forEach(x=>{
  318. console.log('orderList',orderList.value)
  319. const index = orderList.value.findIndex(y=>y.id == x)
  320. console.log('orderList index',index)
  321. if(index>-1){
  322. console.log('orderList',orderList.value)
  323. orderList.value.splice(index,1)
  324. console.log('orderList',orderList.value)
  325. }
  326. })
  327. ids.value = []
  328. }
  329. }
  330. s.value = '1'
  331. console.log('after handleRelease ids.value', ids.value)
  332. },500)
  333. const handleGetOffice = (e)=>{
  334. console.log('handleGetOffice', e.detail.value)
  335. console.log('officeIndex', officeIndex)
  336. console.log('officeIndex', officeIndex)
  337. officeIndex.value = e.detail.value
  338. searchDepartment.value = officeArr.value[officeIndex.value]
  339. }
  340. const handleGetType = (e)=>{
  341. console.log('handleGetType', e.detail.value)
  342. console.log('typeIndex', typeIndex)
  343. console.log('typeArr', typeIndex)
  344. typeIndex.value = e.detail.value
  345. if(typeIndex.value ===1 ){
  346. searchName.value = ''
  347. } else {
  348. searchPreNo.value = ''
  349. }
  350. }
  351. const handleGetTags = (v)=>{
  352. console.log('handleGetTags', v)
  353. if(!searchTags.value.includes(v)) {
  354. searchTags.value.push(v)
  355. } else {
  356. searchTags.value.splice(searchTags.value.indexOf(v), 1)
  357. if(v=='门诊' || v=='住院'){
  358. searchPreMzZy.value = ''
  359. console.log('删除了 v searchPreMzZy.value',v,searchPreMzZy.value)
  360. }
  361. if(v=='男' || v=='女'){
  362. searchSex.value = ''
  363. console.log('删除了 v searchSex.value',v,searchSex.value)
  364. }
  365. if(v=='煎煮' || v=='发药'){
  366. searchStatus.value = ''
  367. console.log('删除了 v searchStatus.value',v,searchStatus.value)
  368. }
  369. }
  370. switch (v) {
  371. case '全部':
  372. if(searchTags.value.includes(v)){
  373. searchTags.value = ['全部']
  374. searchTime.value = []
  375. searchDepartment.value = ''
  376. searchName.value = ''
  377. searchPreNo.value = ''
  378. searchSex.value = ''
  379. searchPreMzZy.value = ''
  380. searchStatus.value = ''
  381. officeIndex.value = 0
  382. }
  383. break
  384. case '门诊':
  385. if(searchTags.value.includes(v)){
  386. if(searchTags.value.includes('住院')){
  387. searchTags.value.splice(searchTags.value.indexOf('住院'), 1)
  388. }
  389. if(searchTags.value.includes('全部')){
  390. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  391. }
  392. searchPreMzZy.value = '1'
  393. }
  394. break
  395. case '住院':
  396. if(searchTags.value.includes(v)){
  397. if(searchTags.value.includes('门诊')){
  398. searchTags.value.splice(searchTags.value.indexOf('门诊'), 1)
  399. }
  400. if(searchTags.value.includes('全部')){
  401. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  402. }
  403. searchPreMzZy.value = '2'
  404. }
  405. break
  406. case '男':
  407. if(searchTags.value.includes(v)){
  408. if(searchTags.value.includes('女')){
  409. searchTags.value.splice(searchTags.value.indexOf('女'), 1)
  410. }
  411. if(searchTags.value.includes('全部')){
  412. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  413. }
  414. searchSex.value = '男'
  415. }
  416. break
  417. case '女':
  418. if(searchTags.value.includes(v)){
  419. if(searchTags.value.includes('男')){
  420. searchTags.value.splice(searchTags.value.indexOf('男'), 1)
  421. }
  422. if(searchTags.value.includes('全部')){
  423. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  424. }
  425. searchSex.value = '女'
  426. }
  427. break
  428. case '煎煮':
  429. if(searchTags.value.includes(v)){
  430. if(searchTags.value.includes('发药')){
  431. searchTags.value.splice(searchTags.value.indexOf('发药'), 1)
  432. }
  433. if(searchTags.value.includes('全部')){
  434. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  435. }
  436. searchStatus.value = '2'
  437. }
  438. break
  439. case '发药':
  440. if(searchTags.value.includes(v)){
  441. if(searchTags.value.includes('煎煮')){
  442. searchTags.value.splice(searchTags.value.indexOf('煎煮'), 1)
  443. }
  444. if(searchTags.value.includes('全部')){
  445. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  446. }
  447. searchStatus.value = '3'
  448. }
  449. break
  450. default:
  451. searchTags.value = ['全部']
  452. }
  453. }
  454. // 更新处方列表
  455. const checkIndex = debounce(async(index) => {
  456. tabActive.value = index
  457. page.value= 1
  458. console.log('index',index)
  459. ids.value = []
  460. reset()
  461. tabName.value = tabList.value[index].title
  462. currentStatus.value = parseInt(tabList.value[index].status)
  463. const token = uni.getStorageSync('token')
  464. const paramss = {
  465. token: uni.getStorageSync('token'),
  466. data:JSON.stringify({
  467. currentUserId: parseInt(uni.getStorageSync('userId')),
  468. pageNum: page.value,
  469. pageSize: pageSize.value,
  470. status: tabList.value[tabActive.value].status
  471. })
  472. }
  473. console.log('checkIndex params',paramss)
  474. const {data:res} = await receiveOrderList(paramss)
  475. if (res.code === 200) {
  476. total.value = res.total
  477. orderList.value = res.rows
  478. if(orderList.value.length < pageSize.value){
  479. isBottom.value = true
  480. }
  481. if(tabActive.value ==0){
  482. tabList.value[0].leng = orderList.value.length
  483. }
  484. }
  485. if(tabActive.value==1) {
  486. const param = {
  487. token: uni.getStorageSync('token'),
  488. // data:JSON.stringify({
  489. // currentUserId: parseInt(uni.getStorageSync('userId')),
  490. // page: page.value,
  491. // pageSize: pageSize.value,
  492. // status: tabList.value[tabActive.value].status
  493. // })
  494. }
  495. console.log('checkIndex param',param)
  496. const {data:res} = await selectDepartment(param)
  497. if (res.code === 200) {
  498. officeArr.value.push(...res.data)
  499. console.log('selectDepartment officeArr.value', officeArr.value)
  500. }
  501. }
  502. },500)
  503. const openTime = ()=>{
  504. proxy.$refs.timeslot.open()
  505. }
  506. const loadMoreList = debounce(async()=>{
  507. console.log('loadMoreList>>>')
  508. if(isBottom){
  509. return
  510. }
  511. page.value = page.value +1
  512. const params = {
  513. token: uni.getStorageSync('token'),
  514. data: JSON.stringify({
  515. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  516. startTime: searchTime.value[0] || '',
  517. endTime: searchTime.value[1] || '',
  518. name: searchName.value.trim() || '',
  519. preNo: searchPreNo.value || '',
  520. department: searchDepartment.value || '',
  521. prescriptionStatus: searchStatus.value || '',//煎煮发药
  522. sex: searchSex.value || '',
  523. preMzZy: searchPreMzZy.value || '',//门诊住院
  524. pageNum: page.value,
  525. pageSize: pageSize.value,
  526. status: tabList.value[tabActive.value].status
  527. })
  528. }
  529. const {data:res} = await receiveOrderList(params)
  530. console.log('orderList.value before',orderList.value)
  531. if (res.code === 200) {
  532. total.value = res.total
  533. if(total.value< pageSize.value){
  534. isBottom.value = true
  535. }
  536. console.log('res.rows after',res.rows)
  537. res.rows.forEach(item=>{
  538. orderList.value.push(item)
  539. })
  540. console.log('orderList.value after',orderList.value)
  541. if(tabActive.value ==0){
  542. console.log('tabActive===',)
  543. tabList.value[0].leng = orderList.value.length
  544. }
  545. }
  546. },500)
  547. const loadPreList = debounce(async()=>{
  548. console.log('loadPreList>>>')
  549. page.value = 1
  550. const params = {
  551. token: uni.getStorageSync('token'),
  552. data: JSON.stringify({
  553. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  554. startTime: searchTime.value[0] || '',
  555. endTime: searchTime.value[1] || '',
  556. name: searchName.value.trim() || '',
  557. preNo: searchPreNo.value || '',
  558. department: searchDepartment.value || '',
  559. prescriptionStatus: searchStatus.value || '',//煎煮发药
  560. sex: searchSex.value || '',
  561. preMzZy: searchPreMzZy.value || '',//门诊住院
  562. pageNum: page.value,
  563. pageSize: pageSize.value,
  564. status: tabList.value[tabActive.value].status
  565. })
  566. }
  567. const {data:res} = await receiveOrderList(params)
  568. if (res.code === 200) {
  569. total.value = res.total
  570. orderList.value = res.rows
  571. if(orderList.value.length < pageSize.value){
  572. isBottom.value = true
  573. }
  574. if(tabActive ==0){
  575. tabList.value[0].leng = orderList.value.length
  576. }
  577. }
  578. },500)
  579. </script>
  580. <style lang="scss">
  581. .main {
  582. display: flex;
  583. flex-direction:column;
  584. justify-content:flex-start;
  585. // height: 2000px;
  586. width: 750rpx;
  587. .nav{
  588. display: flex;
  589. height:74.34rpx;
  590. width: 750rpx;
  591. // position: sticky;
  592. // top: 0;
  593. }
  594. .body{
  595. display: flex;
  596. height:calc(100% - 74.34rpx);
  597. flex-direction:column;
  598. justify-content:flex-start;
  599. .tab-box {
  600. display: flex;
  601. position: sticky;
  602. flex-direction:column;
  603. z-index: 100;
  604. .tab-bar{
  605. height: 62.5rpx;
  606. display: flex;
  607. justify-content:center;
  608. width: 100%;
  609. // border: 1px solid #000;
  610. .tab_item{
  611. display: flex;
  612. flex:1;
  613. justify-content:center;
  614. align-items: center;
  615. font-size: 17.5rpx;
  616. background-color: #fff;
  617. color: #000;
  618. }
  619. .active{
  620. border-bottom: 5rpx solid #18C7B0;
  621. }
  622. }
  623. .search-bar{
  624. display: flex;
  625. background-color: #fff;
  626. border-radius: 4rpx;
  627. .today{
  628. display: flex;
  629. flex-direction:row;
  630. justify-content: flex-start;
  631. .search{
  632. width: 453.75rpx;
  633. margin: 13.75rpx 10.1rpx;
  634. :deep(.uni-easyinput__placeholder-class){
  635. font-size: 15rpx;
  636. }
  637. }
  638. .search-button{
  639. display: flex;
  640. justify-content:center;
  641. align-items: center;
  642. width:112.5rpx;
  643. margin: 13.75rpx 10.1rpx;
  644. font-size: 15rpx;
  645. background-color: #18C7B0;
  646. }
  647. .refresh {
  648. display: flex;
  649. justify-content:center;
  650. align-items: center;
  651. width:120rpx;
  652. margin: 13.75px 8rpx;
  653. font-size: 15rpx;
  654. background-color: #18C7B0;
  655. }
  656. .active{
  657. background-color:#DEDEDE;
  658. }
  659. }
  660. .history{
  661. display: flex;
  662. width: 100%;
  663. .searchchoice{
  664. padding: 0 10rpx;
  665. display: flex;
  666. width: 100%;
  667. flex-direction:column;
  668. font-size: 24rpx;
  669. .row1{
  670. display: flex;
  671. width: 100%;
  672. justify-content:flex-start;
  673. align-items: center;
  674. margin: 10rpx 0 10rpx;
  675. font-size: 15rpx;
  676. .timequan{
  677. display: flex;
  678. justify-content:center;
  679. align-items: center;
  680. :deep(.uni-date__x-input){
  681. font-size: 15rpx;
  682. }
  683. .datepick {
  684. z-index: 999;
  685. width: 300rpx;
  686. margin:0 10rpx;
  687. }
  688. }
  689. }
  690. .row2{
  691. display: flex;
  692. width: 100%;
  693. justify-content:flex-start;
  694. align-items: center;
  695. margin: 0 0 10rpx;
  696. .office{
  697. display: flex;
  698. justify-content:center;
  699. align-items: center;
  700. font-size: 15rpx;
  701. .uni-input{
  702. display: flex;
  703. justify-content:center;
  704. align-items: center;
  705. border:1px solid #e1e5f1;
  706. // font-size: 15rpx;
  707. width:190rpx;
  708. // height: 40rpx;
  709. border-radius: 5rpx;
  710. background-color: #e1e5f1;
  711. margin-right: 10rpx;
  712. }
  713. }
  714. .uni-input{
  715. display: flex;
  716. justify-content:center;
  717. align-items: center;
  718. border:1px solid #e1e5f1;
  719. font-size: 15rpx;
  720. width:100rpx;
  721. height: 40rpx;
  722. border-radius: 5rpx;
  723. background-color: #e1e5f1;
  724. margin-right: 10rpx;
  725. }
  726. .search{
  727. width: 187.5rpx;
  728. // height: 40rpx;
  729. // :deep(.easyinput__content-input){
  730. // // height: 40rpx!important;
  731. // }
  732. :deep(.uni-easyinput__placeholder-class){
  733. font-size: 14rpx;
  734. }
  735. }
  736. .search-button{
  737. display: flex;
  738. justify-content:center;
  739. align-items: center;
  740. width:120rpx;
  741. margin: 8rpx 12rpx;
  742. font-size: 14rpx;
  743. height: 40rpx!important;
  744. color: #fff;
  745. background-color: #18C7B0;
  746. }
  747. }
  748. .row3{
  749. display: flex;
  750. width: 100%;
  751. justify-content:flex-start;
  752. align-items: center;
  753. margin: 0 0 18rpx;
  754. .tag-view:deep(.uni-tag){
  755. display: inline;
  756. font-size: 15rpx;
  757. font-weight:500;
  758. margin-right: 16.67rpx;
  759. // height: 40px;
  760. width: 120rpx;
  761. padding: 6rpx 20rpx;
  762. }
  763. }
  764. }
  765. }
  766. }
  767. }
  768. .tab-content{
  769. display: flex;
  770. margin: 8rpx 10rpx;
  771. border-radius: 4rpx;
  772. background-color: #fff;
  773. width: calc(100% - 20rpx);
  774. height: 980rpx;
  775. z-index:10;
  776. .order-list{
  777. padding: 8rpx;
  778. display: flex;
  779. width: 100%;
  780. // height: 100%;
  781. .text{
  782. display: flex;
  783. width: 750rpx;
  784. justify-content:center;
  785. align-items: flex-start;
  786. .zwsj {
  787. margin-top: 103.13rpx;
  788. width: 640.63rpx;
  789. height: 310rpx;
  790. }
  791. }
  792. .order-list-wrap{
  793. display: flex;
  794. .order-card{
  795. display: flex;
  796. width: 100%;
  797. // border-bottom: 1px solid #e6e8ee;;
  798. }
  799. }
  800. }
  801. }
  802. }
  803. }
  804. </style>