123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113 |
- <template>
- <view class="main">
- <NavBar :user-info="userInfo" :work-Status="workStatus" @update-user="updateUser" />
- <view class="body">
- <view class="tab-box">
- <view class="tab-bar">
- <view class="tab_item" v-for="(tab, index) in tabList" :key="index"
- :class="{'active':tabActive==index}" @click="checkIndex(index)">
- <text class="text">{{tab.title}}</text>
- </view>
- </view>
- <view class="search-bar">
- <view v-if="tabActive === 0" class="today">
- <!-- 搜索框注销
- <view class="search">
- <uni-easyinput prefixIcon="search" v-model="searchVal" placeholder="请输入姓名" />
- </view> -->
- <!-- 6.2、新增三个字段展示位置 20240105 neo-->
- <view class="tongji">
- <span class="tongji-kongxi" style="background-color: antiquewhite;height: 40rpx;display: flex;justify-content:center;align-items: center;">待调配处方数:{{tongji.dtpcfs}}张</span>
- <span class="tongji-kongxi">已调配处方数:{{tongji.ytpcfs}}张</span>
- <span class="tongji-kongxi">已调配处方剂数:{{tongji.ytpcfjs}}剂</span>
- </view>
-
- <button type="primary" @click="handleSearch" class="search-button">刷 新</button>
-
-
-
- </view>
-
- <view v-else class="history">
- <view class="searchchoice">
- <view class="row1">
- <view class="timequan">
- <text class="time_t">时间区间:</text>
- <uni-datetime-picker v-model="searchTime[0]" placeholder="开始时间" type="datetime" :hide-second="true" class="datepick"/>
- 到
- <uni-datetime-picker v-model="searchTime[1]" placeholder="结束时间" type="datetime" :hide-second="true" class="datepick"/>
-
- </view>
-
- </view>
- <view class="row2">
- <view class="office">
- <view class="time_t">
- 科室:
- </view>
- <picker @change="handleGetOffice" placeholder="请选择" :value="officeIndex" :range="officeArr">
- <view class="uni-input">{{officeArr[officeIndex]}}</view>
- </picker>
- </view>
- <view class="presid">
- <picker @change="handleGetType" :value="typeIndex" :range="typeArr">
- <view class="uni-input">{{typeArr[typeIndex]}}</view>
- </picker>
- </view>
- <view v-if="typeIndex === 0" class="search">
- <uni-easyinput prefixIcon="search" v-model="searchName" placeholder="请输入姓名" />
- </view>
- <view v-else class="search">
- <uni-easyinput prefixIcon="search" v-model="searchPreNo" placeholder="请输入处方号" />
- </view>
- <button type="primary" @click="handleSearch" class="search-button">搜索</button>
- </view>
- <view class="row3">
- <view class="tag-view" v-for="(v, i) in tags" :key="i">
- <uni-tag :circle="true" :inverted="!searchTags.includes(v)" :text=v @click="handleGetTags(v)" />
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="tab-content" :style="tabActive === 1?'height:880rpx!important':''">
- <view class="order-list">
- <scroll-view
- v-if="orderList.length > 0"
- class="order-list-wrap"
- scroll-y="true"
- :scroll-top="0"
- refresher-enabled="true"
- :refresher-triggered="trigger"
-
- @refresherrefresh="loadPreList"
- @scrolltolower="loadMoreList"
- >
- <!-- @scrolltoupper="loadPreList" -->
- <template v-for="(v,i) in orderList" :key="i">
- <orderCard v-if="v " :s="s" :v="v" :work-Status="workStatus" :c="tabActive"
- @emit-select="emitSelect"
- />
- </template>
- <view v-if="isBottom" class="order-bottom">
- <view class="text" style="margin-top: 30rpx;font-size: 20rpx;color: #18C7B0;">-- 没有更多数据 --</view>
- </view>
- </scroll-view>
- <view v-else class="text">
- <image class="zwsj" aspectFill :src="'/static/zwsj.png'" />
- </view>
- </view>
-
- </view>
- </view>
- <uni-popup ref="message" type="message">
- <uni-popup-message type="warn" message="您有一个新的处方" :duration="2000"></uni-popup-message>
- </uni-popup>
- <button class="tiaopei" @click="handletiaopei">
- <span class="tiaopei-wenzi">调配扫码</span>
- </button>
- <button class="fuhe" @click="handleScanbara">
- <span class="fuhe-wenzi">复核扫码</span>
- </button>
- </view>
- </template>
- <script setup>
- import NavBar from "@/components/nav-bar/nav-bar.vue"
- import OrderCard from "@/components/order-card/order-card.vue"
- import { onMounted,ref, getCurrentInstance } from 'vue'
- import { onLoad, onPullDownRefresh } from "@dcloudio/uni-app"
- import {receiveOrderList, selectDepartment, getIp } from "@/static/js/api.js"
- import {releaseOrder} from "@/static/js/request.js"
- import debounce from 'lodash.debounce'
- import {updateWorkStatus, updateOnlineStatus, saveReview } from "@/static/js/api.js"
- // import { ID_INJECTION_KEY } from 'element-plus'
- const trigger = ref(false)
- const userInfo = ref({
- ip:'',
- port:'9100'
- })
- const workStatus = ref('0')
- const tabList = ref([
- {title:"今日待完成", status: '0', leng:0},
- {title:"历史处方", status: '1'},
- ])
- const currentStatus = ref(0)
- const tabActive = ref(0)
- const tabName = ref('今日待完成')
- // const tags = ref([])
- const orderList = ref([])
- const isBottom = ref(false)
- const officeArr = ref(['全部'])
- const officeIndex = ref(0)
- const typeArr = ref(['姓名:','处方号:'])
- const typeIndex = ref(0)
- const searchVal = ref('')
- const searchTime =ref([])
- const searchDepartment = ref('')
- const searchName = ref('')
- const searchPreNo = ref('')
- const searchSex = ref('')
- const searchPreMzZy = ref('')
- const searchStatus = ref('')
- const searchTags = ref([])
- const tags = ref(['全部','门诊','住院','男','女','煎煮','发药'])
- const deployArr = ref([
- {name:'抓药', id: '1' },
- {name:'复核', id: '2' },
- {name:'浸泡', id: '3' },
- {name:'煎煮', id: '4' },
- {name:'打包', id: '5' },
- ])
- const page = ref(1)
- const pageSize = ref(10)
- const total = ref(0)
- const status = ref('')
- const s = ref('1')
- const ccc = ref('一键释放')
- const ids = ref([])
- const today =ref({
- leng: 0,
- })
- // 新增的三个统计字段
- const tongji = ref({
- dtpcfs:'',
- ytpcfs:'',
- ytpcfjs: ''
- })
- const plug= uni.requireNativePlugin('Html5app-Gprinter')
- const {proxy} = getCurrentInstance()
- onMounted(async() => {
- userInfo.value.ip = uni.getStorageSync('printerIp')
- userInfo.value.username = uni.getStorageSync('username')
- if (userInfo.value.ip =='') {
- const {data: res} = await getIp({
- token:uni.getStorageSync('token'),
- data:JSON.stringify({
- userId: uni.getStorageSync('userId')+''
- })
- })
- if(res.code === 200){
-
- userInfo.value.ip = res.data.ip || ''
- userInfo.value.port = res.data.port || ''
-
- }
- }
-
- const ipReg = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
- if(ipReg.test(userInfo.value.ip)){
- if(RegExp.$1<256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256){
-
- plug.connectIP({"ip":userInfo.value.ip,"port":userInfo.value.port},ret=>{
-
- const res = JSON.parse(JSON.stringify(ret))
-
- if(res.code==3){
- // initPrint.value = true
- uni.setStorageSync('hasPrinter', '1')
-
- uni.setStorageSync('printerIp', userInfo.value.ip)
-
- // _this.tip=JSON.stringify(ret);
- // console.log(_this.tip);
- // 关闭配置页操作
- }
- })
- }
- }
- })
- onLoad(async (option) => {
- console.log('>>>>>666',option)
- if(option.tips == '1') {
- console.log('>>>>>777',option)
- // plus.nativeUI.toast("I'am toast information!");
-
- }
- const token = uni.getStorageSync('token')
- uni.$on('notf',(data)=>{
- console.log('index get notfi>>>>')
- // proxy.$refs.message.open()
- })
- // userInfo.value.username = uni.getStorageSync('username')
- userInfo.value.nickName = uni.getStorageSync('nickName')
- userInfo.value.ip = uni.getStorageSync('printerIp') || ''
- workStatus.value = uni.getStorageSync('workStatus') || '0'
- const params = {
- token: token,
- data:JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- pageNum: page.value,
- pageSize: pageSize.value,
- status: '0'
- })
- }
-
- const {data:res} = await receiveOrderList(params)
- if (res.code === 200) {
-
- total.value = res.total
- orderList.value = res.rows
- console.log("orderList---",orderList)
- console.log('测试列表----',res)
- console.log("cetongji---------------",res.extra)
- // 新增三个统计
- tongji.value.dtpcfs = res.extra.dtpcfs
- tongji.value.ytpcfs = res.extra.ytpcfs
- tongji.value.ytpcfjs = res.extra.ytpcfjs
-
- console.log('res20231222',orderList.value.length)
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive.value ==0){
- tabList.value[0].leng = orderList.value.length
- if(tabList.value[0].leng>0){
- tabList.value[0].title = tabName.value //+ '(' + tabList.value[0].leng + ')'
- }
- }
- }
- })
- const reset = ()=>{
- searchTime.value =[]
- officeIndex.value =0
- searchName.value =''
- searchPreNo.value =''
- searchSex.value =''
- searchPreMzZy.value =''
- searchStatus.value =''
- searchVal.value = ''
- officeArr.value = ['全部']
- }
- // 子传父,更新userInfo
- const updateUser = (v)=>{
-
- workStatus.value = v+''
-
- }
- const emitSelect = (v)=>{
-
-
- const index1 = orderList.value.findIndex(x=>x.id==v.id)
- if (index1>-1){
- orderList.value[index1].selected = v.selected
- }
- // 查在ids中查找v,如果存在就删除,如果不存在就添加
- const index = ids.value.findIndex(x=>x==v.id)
-
-
- if (index>-1){
- ids.value.splice(index, 1)
- } else {
- ids.value.push(v.id)
- }
- }
- const handleSearch = debounce(async()=>{
-
- if(tabActive.value ===0) {
- const params = {
- token: uni.getStorageSync('token'),
- data: JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- name: searchVal.value.trim(),
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status,
-
- })
- }
- const {data:res} = await receiveOrderList(params)
- if (res.code === 200) {
- total.value = res.total
- orderList.value = res.rows
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- }
- }
- if(tabActive.value==1){
- const params = {
- token: uni.getStorageSync('token'),
- data: JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- startTime: searchTime.value[0] || '',
- endTime: searchTime.value[1] || '',
- name: searchName.value.trim() || '',
- preNo: searchPreNo.value || '',
- department: searchDepartment.value || '',
- prescriptionStatus: searchStatus.value || '',//煎煮发药
- sex: searchSex.value || '',
- preMzZy: searchPreMzZy.value || '',//门诊住院
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status
- })
- }
-
- const {data:res} = await receiveOrderList(params)
- if (res.code === 200) {
- total.value = res.total
- orderList.value = res.rows
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive.value ==0){
- tabList.value[0].leng = orderList.value.length
- }
- }
- }
- },500)
- const handleRefresh = async()=>{
-
-
-
- const params = {
- token: uni.getStorageSync('token'),
- data: JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- name: searchVal.value.trim(),
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status,
-
- })
- }
- const {data:res} = await receiveOrderList(params)
- if (res.code === 200) {
- total.value = res.total
- orderList.value = res.rows
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- }
-
- s.value = '0'
-
- ids.value = []
- orderList.value.forEach((x,i)=>{
- orderList.value[i].selected = false
- })
-
-
- }
-
- const handleRelease = async()=>{
-
-
- const params = {
- token: uni.getStorageSync('token'),
- data:{ids:ids.value.toString()}
- }
-
- const {data:res} = await releaseOrder(params)
-
- if (res.code === 200) {
-
- uni.$showMsg(res.msg, 2000)
- }
- if(ids.value.length==0){
- uni.$showMsg('尚未释放处方',2000)
- s.value = '1'
- return
- } else {
- uni.$showMsg(res.msg, 2000)
- }
-
- ids.value = []
- const paramss = {
- token: uni.getStorageSync('token'),
- data:JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')),
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status
- })
- }
-
- const {data:ress} = await receiveOrderList(paramss)
- if (ress.code === 200) {
- total.value = ress.total
- orderList.value = ress.rows
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive.value ==0){
- tabList.value[0].leng = orderList.value.length
- }
- }
- s.value = '1'
-
- }
- const handleGetOffice = (e)=>{
-
- if(e.detail.value==0){
- searchDepartment.value = ''
- officeIndex.value = e.detail.value
- } else {
- officeIndex.value = e.detail.value
- searchDepartment.value = officeArr.value[officeIndex.value]
- }
- }
- const handleGetType = (e)=>{
-
- typeIndex.value = e.detail.value
- if(typeIndex.value ===1 ){
- searchName.value = ''
- } else {
- searchPreNo.value = ''
- }
- }
- const handleGetTags = (v)=>{
-
- if(!searchTags.value.includes(v)) {
- searchTags.value.push(v)
- } else {
- searchTags.value.splice(searchTags.value.indexOf(v), 1)
- if(v=='门诊' || v=='住院'){
- searchPreMzZy.value = ''
-
- }
- if(v=='男' || v=='女'){
- searchSex.value = ''
-
- }
- if(v=='煎煮' || v=='发药'){
- searchStatus.value = ''
-
- }
- }
- switch (v) {
- case '全部':
- if(searchTags.value.includes(v)){
- searchTags.value = ['全部']
- searchTime.value = []
- searchDepartment.value = ''
- searchName.value = ''
- searchPreNo.value = ''
- searchSex.value = ''
- searchPreMzZy.value = ''
- searchStatus.value = ''
- officeIndex.value = 0
- }
- break
- case '门诊':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('住院')){
- searchTags.value.splice(searchTags.value.indexOf('住院'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchPreMzZy.value = '1'
- }
- break
- case '住院':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('门诊')){
- searchTags.value.splice(searchTags.value.indexOf('门诊'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchPreMzZy.value = '2'
- }
- break
- case '男':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('女')){
- searchTags.value.splice(searchTags.value.indexOf('女'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchSex.value = '男'
- }
- break
- case '女':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('男')){
- searchTags.value.splice(searchTags.value.indexOf('男'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchSex.value = '女'
- }
- break
- case '煎煮':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('发药')){
- searchTags.value.splice(searchTags.value.indexOf('发药'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchStatus.value = '2'
- }
-
- break
- case '发药':
- if(searchTags.value.includes(v)){
- if(searchTags.value.includes('煎煮')){
- searchTags.value.splice(searchTags.value.indexOf('煎煮'), 1)
- }
- if(searchTags.value.includes('全部')){
- searchTags.value.splice(searchTags.value.indexOf('全部'), 1)
- }
- searchStatus.value = '3'
- }
- break
- default:
- searchTags.value = ['全部']
- }
- }
- // 更新处方列表
- const checkIndex = async(index) => {
- tabActive.value = index
- page.value= 1
-
- ids.value = []
- reset()
- // tabName.value = tabList.value[index].title
- currentStatus.value = parseInt(tabList.value[index].status)
- const token = uni.getStorageSync('token')
- const paramss = {
- token: uni.getStorageSync('token'),
- data:JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')),
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status
- })
- }
-
- const {data:res} = await receiveOrderList(paramss)
- if (res.code === 200) {
- total.value = res.total
- orderList.value = res.rows
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive.value ==0){
- tabList.value[0].leng = orderList.value.length
- }
- }
- if(tabActive.value==1) {
- const param = {
- token: uni.getStorageSync('token'),
- }
-
- const {data:res} = await selectDepartment(param)
- if (res.code === 200) {
- officeArr.value.push(...res.data)
-
- }
- } else {
- if(orderList.value.length>0){
- tabList.value[0].leng = orderList.value.length
- tabList.value[0].title = tabName.value //+ '(' + tabList.value[0].leng + ')'
- }
- }
- }
- const loadMoreList = async()=>{
-
- if(isBottom.value){
- return
- }
- page.value = page.value +1
- const params = {
- token: uni.getStorageSync('token'),
- data: JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- startTime: searchTime.value[0] || '',
- endTime: searchTime.value[1] || '',
- name: searchName.value.trim() || '',
- preNo: searchPreNo.value || '',
- department: searchDepartment.value || '',
- prescriptionStatus: searchStatus.value || '',
- sex: searchSex.value || '',
- preMzZy: searchPreMzZy.value || '',
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status
- })
- }
-
- const {data:res} = await receiveOrderList(params)
-
- if (res.code === 200) {
- total.value = res.total
-
-
-
- orderList.value.push(...res.rows)
-
-
- if(total.value == orderList.value.length){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive.value ==0){
-
- tabList.value[0].leng = orderList.value.length
- tabList.value[0].title = tabName.value + '(' + tabList.value[0].leng + ')'
- }
- }
- }
-
- const loadPreList = async()=>{
-
- trigger.value = true;
- page.value = 1
- const params = {
- token: uni.getStorageSync('token'),
- data: JSON.stringify({
- currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
- startTime: searchTime.value[0] || '',
- endTime: searchTime.value[1] || '',
- name: searchName.value.trim() || '',
- preNo: searchPreNo.value || '',
- department: searchDepartment.value || '',
- prescriptionStatus: searchStatus.value || '',//煎煮发药
- sex: searchSex.value || '',
- preMzZy: searchPreMzZy.value || '',//门诊住院
- pageNum: page.value,
- pageSize: pageSize.value,
- status: tabList.value[tabActive.value].status
- })
- }
- const {data:res} = await receiveOrderList(params)
- if (res.code === 200) {
- total.value = res.total
- orderList.value = res.rows
- if(orderList.value.length < pageSize.value){
- isBottom.value = true
- } else {
- isBottom.value = false
- }
- if(tabActive ==0){
- tabList.value[0].leng = orderList.value.length
- }
- }
- setTimeout(() => {
- trigger.value = false;
- }, 1000)
- }
- // 调配扫码
- const handletiaopei = ()=>{
- uni.scanCode({
- // scanType: ['barCode'],
- // success: async(res) => {
- // const data = JSON.stringify({
- // userId:uni.getStorageSync('userId'),
- // preNo: parseInt(res.result)
- // })
- // console.log('res.charSet--------' + res.charSet);
- // console.log('res.result--------------------' + res.result);
- // uni.navigateTo({
- // url:`/pages/edit/edit?preNo=${res.result}&depolyStatus=1`
- // })
- // },
- scanType: ['barCode'],
- success: function (res) {
- // const data = JSON.stringify({
- // userId:uni.getStorageSync('userId'),
- // preNo: parseInt(res.result)
- // })
- console.log('扫码信息res.result--------' + res.result);
- // 舟山项目扫描有时候会出现结果为8位数的数字,当扫描为8位数数字时提示用户
- // if(res.result.length==8){
- // uni.$showMsg('请重新扫描', 2000)
- // }else{
- // uni.navigateTo({
- // url:`/pages/edit/edit?preNo=${res.result}&depolyStatus=1`
- // })
- // }
- uni.navigateTo({
- url:`/pages/edit/edit?preNo=${res.result}&depolyStatus=1`
- })
-
- },
- fail: (res) => {
- console.log('扫码结果:' + res);
- // uni.navigateBack()
- // uni.$showMsg(res, 2000)
- }
- });
- }
- // 复核扫码
- const handleScanbara = ()=>{
-
- uni.scanCode({
- scanType: ['barCode'],
- success: async(res) => {
-
- const data = JSON.stringify({
- userId:uni.getStorageSync('userId'),
- preNo: parseInt(res.result)
- })
-
- const {data:res1} = await saveReview({
- token: uni.getStorageSync('token'),
- data: data
- })
- if(res1.code===500){
- if(res1.msg=='未查询到有效数据'){
- uni.$showMsg(res1.msg, 2000)
- }
- else if(res1.msg=='处方已复核,无需重复操作!'){
- uni.$showMsg(res1.msg, 2000)
- } else {
- uni.navigateTo({
- url:`/pages/review/review?preNo=${res.result}&depolyStatus=2`
- })
- }
- }
- },
- fail: (res) => {
- console.log('扫码结果:' + res);
- }
- });
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction:column;
- justify-content:flex-start;
- // height: 2000px;
- width: 750rpx;
- .nav{
- display: flex;
- height: 75rpx;
- width: 750rpx;
-
- }
- .body{
- display: flex;
- height:calc(100% - 74.34rpx);
- flex-direction:column;
- justify-content:flex-start;
- .tab-box {
- display: flex;
- position: sticky;
- flex-direction:column;
- z-index: 100;
- .tab-bar{
- height: 62.5rpx;
- display: flex;
- justify-content:center;
- width: 100%;
- // border: 1px solid #000;
- .tab_item{
- display: flex;
- flex:1;
- justify-content:center;
- align-items: center;
- font-size: 17.5rpx;
- background-color: #fff;
- color: #000;
- }
- .active{
- border-bottom: 5rpx solid #18C7B0;
- }
- }
- .search-bar{
- display: flex;
- background-color: #fff;
- border-radius: 4rpx;
- // 外框
- .today{
- display: flex;
- flex-direction:row;
- justify-content: flex-start;
- // background-color: #DEDEDE;
- // padding-bottom: 10rpx;
- // 搜索姓名框注销
- // .search{
- // width: 453.75rpx;
- // margin: 13.75rpx 10.1rpx;
- // :deep(.uni-easyinput__placeholder-class){
- // font-size: 15rpx;
- // }
- // }
- .tongji{
- font-size: 17rpx;
- display: flex;
- justify-content:center;
- align-items: center;
- // padding: 0 10rpx;
- margin-left: 30rpx;
- // background-color: #e1e5f1;
- .tongji-kongxi{
- margin-right: 30rpx;
- }
-
- }
- .search-button{
- display: flex;
- justify-content:center;
- align-items: center;
- width:112.5rpx;
- margin: 13.75rpx 10.1rpx;
- font-size: 15rpx;
- background-color: #18C7B0;
- }
- .refresh {
- display: flex;
- justify-content:center;
- align-items: center;
- width:120rpx;
- margin: 13.75px 8rpx;
- font-size: 15rpx;
- background-color: #18C7B0;
- }
- .active{
- background-color:#DEDEDE;
- }
-
- }
- .history{
- // display: flex;
- // width: 100%;
- display: flex;
- flex-direction:row;
- justify-content: flex-start;
- .searchchoice{
- padding: 0 10rpx;
- display: flex;
- width: 100%;
- flex-direction:column;
- font-size: 24rpx;
- .row1{
- display: flex;
- width: 100%;
- justify-content:flex-start;
- align-items: center;
- margin: 10rpx 0 10rpx;
- font-size: 15rpx;
- .timequan{
- display: flex;
- justify-content:center;
- align-items: center;
- :deep(.uni-date__x-input){
- font-size: 15rpx;
- }
- .datepick {
- z-index: 999;
- width: 300rpx;
- margin:0 10rpx;
- }
- }
-
- }
- .row2{
- display: flex;
- width: 100%;
- justify-content:flex-start;
- align-items: center;
- margin: 0 0 10rpx;
- .office{
- display: flex;
- justify-content:center;
- align-items: center;
- font-size: 15rpx;
- .uni-input{
- display: flex;
- justify-content:center;
- align-items: center;
- border:1px solid #e1e5f1;
- // font-size: 15rpx;
- width:190rpx;
- // height: 40rpx;
- border-radius: 5rpx;
- background-color: #e1e5f1;
- margin-right: 10rpx;
- }
- }
- .uni-input{
- display: flex;
- justify-content:center;
- align-items: center;
- border:1px solid #e1e5f1;
- font-size: 15rpx;
- width:100rpx;
- height: 40rpx;
- border-radius: 5rpx;
- background-color: #e1e5f1;
- margin-right: 10rpx;
- }
- .search{
- width: 187.5rpx;
- // height: 40rpx;
- // :deep(.easyinput__content-input){
- // // height: 40rpx!important;
- // }
- :deep(.uni-easyinput__placeholder-class){
- font-size: 14rpx;
- }
- }
- .search-button{
- display: flex;
- justify-content:center;
- align-items: center;
- width:120rpx;
- margin: 8rpx 12rpx;
- font-size: 14rpx;
- height: 40rpx!important;
- color: #fff;
- background-color: #18C7B0;
- }
- }
- .row3{
- display: flex;
- width: 100%;
- justify-content:flex-start;
- align-items: center;
- margin: 0 0 18rpx;
- .tag-view:deep(.uni-tag){
- display: inline;
- font-size: 15rpx;
- font-weight:500;
- margin-right: 16.67rpx;
- // height: 40px;
- width: 120rpx;
- padding: 6rpx 20rpx;
- }
- }
-
- }
-
- }
- }
- }
- .tab-content{
- display: flex;
- margin: 8rpx 0;
- border-radius: 4rpx;
- background-color: #fff;
- width: calc(100%);
- height: 980rpx;//980rpx
- z-index:10;
- .order-list{
- padding: 8rpx;
- display: flex;
- width: 100%;
- // height: 100%;
- .text{
- display: flex;
- width: 750rpx;
- justify-content:center;
- align-items: flex-start;
- .zwsj {
- margin-top: 103.13rpx;
- width: 640.63rpx;
- height: 310rpx;
- }
- }
- .order-list-wrap{
- display: flex;
- .order-card{
- display: flex;
- width: 100%;
- // border-bottom: 1px solid #e6e8ee;;
- }
- }
- }
- }
- }
- .tiaopei{
- position: fixed;
- width: 110rpx;
- height: 110rpx;
- border-radius: 50%;
- top: 47%;
- right: 3%;
- z-index: 100;
- background-color: #18C7B0;
- color: #fff;
- align-items: center;
- .tiaopei-wenzi{
- display: flex;
- margin-top: 30rpx;
- }
- }
- .fuhe{
- position: fixed;
- width: 110rpx;
- height: 110rpx;
- border-radius: 50%;
- top: 60%;
- right: 3%;
- z-index: 100;
- background-color: #E7B140;
- color: #fff;
- align-items: center;
- .fuhe-wenzi{
- display: flex;
- margin-top: 30rpx;
- }
- }
- }
- </style>
|