index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866
  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, onPullDownRefresh } 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. uni.$showMsg(res.msg, 2000)
  329. }
  330. } else {
  331. uni.$showMsg(res.msg, 2000)
  332. }
  333. s.value = '1'
  334. console.log('after handleRelease ids.value', ids.value)
  335. },500)
  336. const handleGetOffice = (e)=>{
  337. console.log('handleGetOffice', e.detail.value)
  338. console.log('officeIndex', officeIndex)
  339. console.log('officeIndex', officeIndex)
  340. officeIndex.value = e.detail.value
  341. searchDepartment.value = officeArr.value[officeIndex.value]
  342. }
  343. const handleGetType = (e)=>{
  344. console.log('handleGetType', e.detail.value)
  345. console.log('typeIndex', typeIndex)
  346. console.log('typeArr', typeIndex)
  347. typeIndex.value = e.detail.value
  348. if(typeIndex.value ===1 ){
  349. searchName.value = ''
  350. } else {
  351. searchPreNo.value = ''
  352. }
  353. }
  354. const handleGetTags = (v)=>{
  355. console.log('handleGetTags', v)
  356. if(!searchTags.value.includes(v)) {
  357. searchTags.value.push(v)
  358. } else {
  359. searchTags.value.splice(searchTags.value.indexOf(v), 1)
  360. if(v=='门诊' || v=='住院'){
  361. searchPreMzZy.value = ''
  362. console.log('删除了 v searchPreMzZy.value',v,searchPreMzZy.value)
  363. }
  364. if(v=='男' || v=='女'){
  365. searchSex.value = ''
  366. console.log('删除了 v searchSex.value',v,searchSex.value)
  367. }
  368. if(v=='煎煮' || v=='发药'){
  369. searchStatus.value = ''
  370. console.log('删除了 v searchStatus.value',v,searchStatus.value)
  371. }
  372. }
  373. switch (v) {
  374. case '全部':
  375. if(searchTags.value.includes(v)){
  376. searchTags.value = ['全部']
  377. searchTime.value = []
  378. searchDepartment.value = ''
  379. searchName.value = ''
  380. searchPreNo.value = ''
  381. searchSex.value = ''
  382. searchPreMzZy.value = ''
  383. searchStatus.value = ''
  384. officeIndex.value = 0
  385. }
  386. break
  387. case '门诊':
  388. if(searchTags.value.includes(v)){
  389. if(searchTags.value.includes('住院')){
  390. searchTags.value.splice(searchTags.value.indexOf('住院'), 1)
  391. }
  392. if(searchTags.value.includes('全部')){
  393. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  394. }
  395. searchPreMzZy.value = '1'
  396. }
  397. break
  398. case '住院':
  399. if(searchTags.value.includes(v)){
  400. if(searchTags.value.includes('门诊')){
  401. searchTags.value.splice(searchTags.value.indexOf('门诊'), 1)
  402. }
  403. if(searchTags.value.includes('全部')){
  404. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  405. }
  406. searchPreMzZy.value = '2'
  407. }
  408. break
  409. case '男':
  410. if(searchTags.value.includes(v)){
  411. if(searchTags.value.includes('女')){
  412. searchTags.value.splice(searchTags.value.indexOf('女'), 1)
  413. }
  414. if(searchTags.value.includes('全部')){
  415. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  416. }
  417. searchSex.value = '男'
  418. }
  419. break
  420. case '女':
  421. if(searchTags.value.includes(v)){
  422. if(searchTags.value.includes('男')){
  423. searchTags.value.splice(searchTags.value.indexOf('男'), 1)
  424. }
  425. if(searchTags.value.includes('全部')){
  426. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  427. }
  428. searchSex.value = '女'
  429. }
  430. break
  431. case '煎煮':
  432. if(searchTags.value.includes(v)){
  433. if(searchTags.value.includes('发药')){
  434. searchTags.value.splice(searchTags.value.indexOf('发药'), 1)
  435. }
  436. if(searchTags.value.includes('全部')){
  437. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  438. }
  439. searchStatus.value = '2'
  440. }
  441. break
  442. case '发药':
  443. if(searchTags.value.includes(v)){
  444. if(searchTags.value.includes('煎煮')){
  445. searchTags.value.splice(searchTags.value.indexOf('煎煮'), 1)
  446. }
  447. if(searchTags.value.includes('全部')){
  448. searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
  449. }
  450. searchStatus.value = '3'
  451. }
  452. break
  453. default:
  454. searchTags.value = ['全部']
  455. }
  456. }
  457. // 更新处方列表
  458. const checkIndex = debounce(async(index) => {
  459. tabActive.value = index
  460. page.value= 1
  461. console.log('index',index)
  462. ids.value = []
  463. reset()
  464. tabName.value = tabList.value[index].title
  465. currentStatus.value = parseInt(tabList.value[index].status)
  466. const token = uni.getStorageSync('token')
  467. const paramss = {
  468. token: uni.getStorageSync('token'),
  469. data:JSON.stringify({
  470. currentUserId: parseInt(uni.getStorageSync('userId')),
  471. pageNum: page.value,
  472. pageSize: pageSize.value,
  473. status: tabList.value[tabActive.value].status
  474. })
  475. }
  476. console.log('checkIndex params',paramss)
  477. const {data:res} = await receiveOrderList(paramss)
  478. if (res.code === 200) {
  479. total.value = res.total
  480. orderList.value = res.rows
  481. if(orderList.value.length < pageSize.value){
  482. isBottom.value = true
  483. }
  484. if(tabActive.value ==0){
  485. tabList.value[0].leng = orderList.value.length
  486. }
  487. }
  488. if(tabActive.value==1) {
  489. const param = {
  490. token: uni.getStorageSync('token'),
  491. // data:JSON.stringify({
  492. // currentUserId: parseInt(uni.getStorageSync('userId')),
  493. // page: page.value,
  494. // pageSize: pageSize.value,
  495. // status: tabList.value[tabActive.value].status
  496. // })
  497. }
  498. console.log('checkIndex param',param)
  499. const {data:res} = await selectDepartment(param)
  500. if (res.code === 200) {
  501. officeArr.value.push(...res.data)
  502. console.log('selectDepartment officeArr.value', officeArr.value)
  503. }
  504. }
  505. },500)
  506. const openTime = ()=>{
  507. proxy.$refs.timeslot.open()
  508. }
  509. const loadMoreList = debounce(async()=>{
  510. console.log('loadMoreList>>>')
  511. if(isBottom){
  512. return
  513. }
  514. page.value = page.value +1
  515. const params = {
  516. token: uni.getStorageSync('token'),
  517. data: JSON.stringify({
  518. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  519. startTime: searchTime.value[0] || '',
  520. endTime: searchTime.value[1] || '',
  521. name: searchName.value.trim() || '',
  522. preNo: searchPreNo.value || '',
  523. department: searchDepartment.value || '',
  524. prescriptionStatus: searchStatus.value || '',//煎煮发药
  525. sex: searchSex.value || '',
  526. preMzZy: searchPreMzZy.value || '',//门诊住院
  527. pageNum: page.value,
  528. pageSize: pageSize.value,
  529. status: tabList.value[tabActive.value].status
  530. })
  531. }
  532. const {data:res} = await receiveOrderList(params)
  533. console.log('orderList.value before',orderList.value)
  534. if (res.code === 200) {
  535. total.value = res.total
  536. if(total.value< pageSize.value){
  537. isBottom.value = true
  538. }
  539. console.log('res.rows after',res.rows)
  540. res.rows.forEach(item=>{
  541. orderList.value.push(item)
  542. })
  543. console.log('orderList.value after',orderList.value)
  544. if(tabActive.value ==0){
  545. console.log('tabActive===',)
  546. tabList.value[0].leng = orderList.value.length
  547. }
  548. }
  549. },500)
  550. const loadPreList = debounce(async()=>{
  551. console.log('loadPreList>>>')
  552. page.value = 1
  553. const params = {
  554. token: uni.getStorageSync('token'),
  555. data: JSON.stringify({
  556. currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
  557. startTime: searchTime.value[0] || '',
  558. endTime: searchTime.value[1] || '',
  559. name: searchName.value.trim() || '',
  560. preNo: searchPreNo.value || '',
  561. department: searchDepartment.value || '',
  562. prescriptionStatus: searchStatus.value || '',//煎煮发药
  563. sex: searchSex.value || '',
  564. preMzZy: searchPreMzZy.value || '',//门诊住院
  565. pageNum: page.value,
  566. pageSize: pageSize.value,
  567. status: tabList.value[tabActive.value].status
  568. })
  569. }
  570. const {data:res} = await receiveOrderList(params)
  571. if (res.code === 200) {
  572. total.value = res.total
  573. orderList.value = res.rows
  574. if(orderList.value.length < pageSize.value){
  575. isBottom.value = true
  576. }
  577. if(tabActive ==0){
  578. tabList.value[0].leng = orderList.value.length
  579. }
  580. }
  581. },500)
  582. </script>
  583. <style lang="scss">
  584. .main {
  585. display: flex;
  586. flex-direction:column;
  587. justify-content:flex-start;
  588. // height: 2000px;
  589. width: 750rpx;
  590. .nav{
  591. display: flex;
  592. height:74.34rpx;
  593. width: 750rpx;
  594. // position: sticky;
  595. // top: 0;
  596. }
  597. .body{
  598. display: flex;
  599. height:calc(100% - 74.34rpx);
  600. flex-direction:column;
  601. justify-content:flex-start;
  602. .tab-box {
  603. display: flex;
  604. position: sticky;
  605. flex-direction:column;
  606. z-index: 100;
  607. .tab-bar{
  608. height: 62.5rpx;
  609. display: flex;
  610. justify-content:center;
  611. width: 100%;
  612. // border: 1px solid #000;
  613. .tab_item{
  614. display: flex;
  615. flex:1;
  616. justify-content:center;
  617. align-items: center;
  618. font-size: 17.5rpx;
  619. background-color: #fff;
  620. color: #000;
  621. }
  622. .active{
  623. border-bottom: 5rpx solid #18C7B0;
  624. }
  625. }
  626. .search-bar{
  627. display: flex;
  628. background-color: #fff;
  629. border-radius: 4rpx;
  630. .today{
  631. display: flex;
  632. flex-direction:row;
  633. justify-content: flex-start;
  634. .search{
  635. width: 453.75rpx;
  636. margin: 13.75rpx 10.1rpx;
  637. :deep(.uni-easyinput__placeholder-class){
  638. font-size: 15rpx;
  639. }
  640. }
  641. .search-button{
  642. display: flex;
  643. justify-content:center;
  644. align-items: center;
  645. width:112.5rpx;
  646. margin: 13.75rpx 10.1rpx;
  647. font-size: 15rpx;
  648. background-color: #18C7B0;
  649. }
  650. .refresh {
  651. display: flex;
  652. justify-content:center;
  653. align-items: center;
  654. width:120rpx;
  655. margin: 13.75px 8rpx;
  656. font-size: 15rpx;
  657. background-color: #18C7B0;
  658. }
  659. .active{
  660. background-color:#DEDEDE;
  661. }
  662. }
  663. .history{
  664. display: flex;
  665. width: 100%;
  666. .searchchoice{
  667. padding: 0 10rpx;
  668. display: flex;
  669. width: 100%;
  670. flex-direction:column;
  671. font-size: 24rpx;
  672. .row1{
  673. display: flex;
  674. width: 100%;
  675. justify-content:flex-start;
  676. align-items: center;
  677. margin: 10rpx 0 10rpx;
  678. font-size: 15rpx;
  679. .timequan{
  680. display: flex;
  681. justify-content:center;
  682. align-items: center;
  683. :deep(.uni-date__x-input){
  684. font-size: 15rpx;
  685. }
  686. .datepick {
  687. z-index: 999;
  688. width: 300rpx;
  689. margin:0 10rpx;
  690. }
  691. }
  692. }
  693. .row2{
  694. display: flex;
  695. width: 100%;
  696. justify-content:flex-start;
  697. align-items: center;
  698. margin: 0 0 10rpx;
  699. .office{
  700. display: flex;
  701. justify-content:center;
  702. align-items: center;
  703. font-size: 15rpx;
  704. .uni-input{
  705. display: flex;
  706. justify-content:center;
  707. align-items: center;
  708. border:1px solid #e1e5f1;
  709. // font-size: 15rpx;
  710. width:190rpx;
  711. // height: 40rpx;
  712. border-radius: 5rpx;
  713. background-color: #e1e5f1;
  714. margin-right: 10rpx;
  715. }
  716. }
  717. .uni-input{
  718. display: flex;
  719. justify-content:center;
  720. align-items: center;
  721. border:1px solid #e1e5f1;
  722. font-size: 15rpx;
  723. width:100rpx;
  724. height: 40rpx;
  725. border-radius: 5rpx;
  726. background-color: #e1e5f1;
  727. margin-right: 10rpx;
  728. }
  729. .search{
  730. width: 187.5rpx;
  731. // height: 40rpx;
  732. // :deep(.easyinput__content-input){
  733. // // height: 40rpx!important;
  734. // }
  735. :deep(.uni-easyinput__placeholder-class){
  736. font-size: 14rpx;
  737. }
  738. }
  739. .search-button{
  740. display: flex;
  741. justify-content:center;
  742. align-items: center;
  743. width:120rpx;
  744. margin: 8rpx 12rpx;
  745. font-size: 14rpx;
  746. height: 40rpx!important;
  747. color: #fff;
  748. background-color: #18C7B0;
  749. }
  750. }
  751. .row3{
  752. display: flex;
  753. width: 100%;
  754. justify-content:flex-start;
  755. align-items: center;
  756. margin: 0 0 18rpx;
  757. .tag-view:deep(.uni-tag){
  758. display: inline;
  759. font-size: 15rpx;
  760. font-weight:500;
  761. margin-right: 16.67rpx;
  762. // height: 40px;
  763. width: 120rpx;
  764. padding: 6rpx 20rpx;
  765. }
  766. }
  767. }
  768. }
  769. }
  770. }
  771. .tab-content{
  772. display: flex;
  773. margin: 8rpx 10rpx;
  774. border-radius: 4rpx;
  775. background-color: #fff;
  776. width: calc(100% - 20rpx);
  777. height: 980rpx;
  778. z-index:10;
  779. .order-list{
  780. padding: 8rpx;
  781. display: flex;
  782. width: 100%;
  783. // height: 100%;
  784. .text{
  785. display: flex;
  786. width: 750rpx;
  787. justify-content:center;
  788. align-items: flex-start;
  789. .zwsj {
  790. margin-top: 103.13rpx;
  791. width: 640.63rpx;
  792. height: 310rpx;
  793. }
  794. }
  795. .order-list-wrap{
  796. display: flex;
  797. .order-card{
  798. display: flex;
  799. width: 100%;
  800. // border-bottom: 1px solid #e6e8ee;;
  801. }
  802. }
  803. }
  804. }
  805. }
  806. }
  807. </style>