123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287 |
- <template>
- <view class="main">
- <uni-nav-bar dark :fixed="true" background-color="#18C7B0" status-bar left-icon="left" height="62.5rpx" width="750rpx"
- title="调配详情" @clickLeft="handleBack"
- />
-
- <scroll-view class="content" scroll-y="true">
- <view class="header">
- <view class="ti">
- <view class="left">
- <view class="baracode">
- <w-barcode :options="preseObjtou"></w-barcode>
- <view class="barnum">{{v.preNo}}</view>
- </view>
- </view>
- <view class="mid">
- <!-- <text class="title">{{v.preName}}</text> -->
- <text class="title">中药处方笺</text>
- </view>
- <view class="rig"><text class="title">{{v.type=='1'?"中药处方":v.type=='1'?"中药制剂":""}}</text></view>
- </view>
- <view class="patiinfo">
- <view class="r1">
- <view class="row"><span class="we">姓名:</span>{{v.name}}</view>
- <view class="row"><span class="we">性别:</span>{{v.sex}}</view>
- <view class="row"><span class="we">年龄:</span>{{v.age}}岁</view>
- <view class="row"><span class="we">电话:</span>{{v.contactNumber}}</view>
- <!-- 20231222隐藏,因为处方状态后端返回state数据不对 -->
- <!-- <view class="row"><span class="we">当前处方状态:</span>{{v.state}}</view> -->
- </view>
- <view class="r2">
- <view class="row"><span class="we">就诊科室:</span>{{v.department}}</view>
- <!-- <view class="row"><span class="we">临床诊断:</span>{{v.disName}}—{{v.symName}}</view> -->
- <view class="row"><span class="we">临床诊断:</span>{{v.disName}}</view>
- <view class="row"><span class="we">开方时间:</span>{{v.prescriptionTime}}</view>
- </view>
- <view class="r3"><span class="we">联系地址:</span>{{v.address}}</view>
- </view>
- </view>
- <view class="rp">
- <view class="title">
- <text class="text">Rp:</text>
- </view>
- <view class="lists">
- <view class="item" v-for="(x, i) in v.rp" :key="i">
- <view class="le tag-view" @click="handleGetRps(x)">
- <!-- <uni-tag :inverted="!selectRps.includes(x)" :text="(!x.yphjh?'':x.yphjh)+' '+x.matName+' '+x.matDose+x.matUnitName" /> -->
-
- <!-- <uni-tag :inverted="!selectRps.includes(x)" :text="x.yphjh" style="width: 24rpx;color: #1393CF;font-size: 22rpx;"/>
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.matName" style="width: 170rpx;" />
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.matDose+x.matUnitName" style="width: 42rpx;color: #E7B140;font-size: 22rpx;" /> -->
-
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.yphjh" style="width: 24rpx;color: #daa255;font-size: 22rpx;"/>
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.matName" style="width: 170rpx;" />
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.matDose+x.matUnitName" style="width: 50rpx;font-size: 22rpx;color: #9E8B8E" />
- <!-- <uni-tag :inverted="!selectRps.includes(x)" :text="" /> -->
- <!-- <text>{{x.yphjh}}</text>
- <text>{{x.matName}}</text>
- <text>{{x.matDose}}</text>
- <text>{{x.matUnitName}}</text> -->
- </view>
-
- <view class="rig">
- <view class="up"> {{x.matUsageName}}</view>
- <!-- <view class="up"> 先煎(久建)邵丽丽</view> -->
- <!-- <view class="do"> {{x.sign}}</view> -->
- <!-- {{x.matUsageName}} -->
- </view>
- </view>
- </view>
- <view class="footer">
- <view class="js">
- 剂数:{{v.number}}
-
- </view>
-
- <view class="js">{{v.frequency}}</view>
- <view class="freque">{{v.medicationTime}}</view>
- </view>
- <view class="rp-tips">{{v.entrust}}</view>
- </view>
- <view class="amountarea">
- <view class="amount">
- <view class="r1">
- <view class="pijw">药品金额:{{v.prescriptionSum}}</view>
- </view>
- <view class="r2">
- <view class="jyf">煎药费:{{v.daijianCost}}</view>
- <view class="psf">配送费:{{v.distributionCost}}</view>
- </view>
- <view class="r3">
- 总金额:{{v.prescriptionTotalSum}}
- </view>
- </view>
- <view class="service">
- <view class="kf"><span class="we">开方:</span>{{v.operateList[0].operater || ''}}</view>
- <view class="kf"><span class="we">审核:</span>{{v.operateList[1].operater || ''}}</view>
- <view class="kf"><span class="we">调配:</span>{{v.operateList[2].operater || ''}}</view>
- <!-- <view class="kf"><span class="we">复核:</span>{{v.operateList[3].operater || ''}}</view> -->
- <!-- <view class="kf"><span class="we">浸泡:</span>{{v.operateList[4].operater || ''}}</view>
- <view class="kf"><span class="we">煎煮:</span>{{v.operateList[5].operater || ''}}</view>
- <view class="kf"><span class="we">打包:</span>{{v.operateList[6].operater || ''}}</view> -->
- <!-- <view class="kf"><span class="we">发药:</span>{{v.operateList[7].operater || ''}}</view> -->
- </view>
- </view>
- <view class="comment">
- <view class="z">注:</view>
- <text>{{v.entrust1111}}</text>
- </view>
- <view class="upload">
- <view class="title">上传照片</view>
- <uni-file-picker
- :image-styles = "imageStyles"
- fileMediatype="image"
- mode="grid"
- :limit="3"
- :del-icon="false"
- :auto-upload="false"
- @select="selectUpload"
- />
- </view>
- <view class="cooment">
- <view class="title">备注内容</view>
- <view class="tex">
- <input placeholder="请输入备注内容" v-model="editForm.comments" placeholder-style="font-size: 15rpx;" height="60rpx" @input="bindTextInput" class="input" />
- </view>
- </view>
- <!-- 先注销上传时直接打印标签功能20241223 -->
- <!-- <view class="radio">
- <label for="">
- <switch :checked="isPrint" style="transform:scale(0.7)" @change="handleChange" /> 上传时直接打印标签
- </label>
- </view> -->
- </scroll-view>
- <view class="submit">
- <button type="primary" class="bu" @click="handleSubmit">上传</button>
- </view>
- <view class="popup">
- <uni-popup ref="alertDialog" type="dialog">
- <uni-popup-dialog type="center" cancelText="不打印" confirmText="打印" title="打印标签" @confirm="dialogConfirm" @close="dialogClose">
- <view class="cotent" id="printMe">
- <view class="title">{{v.yljgName+'(中医院)' || '某中医院取药标签打印(门诊)'}}</view>
- <view class="hzxx">
- <view class="hzxx_left">{{v.name}},{{v.sex}},{{v.birth}}</view>
- <view class="hzxx_right">{{v.preMzZy==1 ? '门诊' : '住院'}}</view>
- </view>
- <view class="body">
- <view class="lef">
- <view class="baracode">
- <w-barcode class="cav" :options="preseObj"></w-barcode>
- <view class="barnum">{{v.preNo}}</view>
- </view>
- </view>
- <view class="rig">
-
- <view class="hz">手机号:<view class="bold">{{v.contactNumber}}</view></view>
- <view class="hz">处方用法:<view class="bold">{{v.prescriptionusage}}</view></view>
- <view class="hz" style="font-size: 20rpx;">
- 剂数:<view class="bold">{{v.number}}</view>
- <view> 是否代煎:{{v.isBehalf=='0'?'否':'是'}}</view>
- </view>
- </view>
- </view>
- <view style="font-size: 18rpx;width: 400rpx;">科室/病房:{{v.department}}{{v.bed_no}}</view>
- <view style="font-size: 18rpx;width: 400rpx;">药师备注:{{v.pharmacistsremarks}}</view>
- <view style="display: flex;justify-content:center;font-size: 20rpx;margin-top: 10rpx;">打印时间:<view>{{v.printTime}}</view></view>
- </view>
- </uni-popup-dialog>
- </uni-popup>
- </view>
- <view class="popup">
- <uni-popup ref="printerDialog" type="dialog">
- <uni-popup-dialog type="center" cancelText="取消" confirmText="确认" title="设置打印机" @confirm="connectThenPrint" @close="cancelConfig">
- <view class="printconfig">
- <view style="font-size: 20rpx;">使用须知</view>
- <view style="font-size: 16rpx;color:brown;margin-bottom: 20rpx;">*使用前先连接wifi打印机</view>
- <uni-easyinput class="input" confirm-type="done" v-model="printInfo.ip" placeholder="请输入打印机ip地址" @confirm="connectThenPrint"></uni-easyinput>
- </view>
- </uni-popup-dialog>
- </uni-popup>
- <uni-popup ref="message" type="message">
- <uni-popup-message type="warn" message="您有一个新的处方" :duration="2000"></uni-popup-message>
- </uni-popup>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: ''
- }
- </script>
- <script setup>
- import { onMounted, ref, getCurrentInstance } from 'vue'
- import { selectOrderDetail, upload, sendToUser, updateOrderStatus } from "@/static/js/request.js"
- import { saveDepoly, setIp } from '@/static/js/api.js'
- import debounce from 'lodash.debounce'
- import { onLoad } from '@dcloudio/uni-app'
- const printInfo = ref({
- ip: '',
- port: '9100',
- })
- // 演示环境地址
- // const urlConfig = ref('http://47.118.22.101:8005')
- // 铜陵地址
- // const urlConfig = ref('http://10.250.11.48:2020')
- // 阜南地址
- // const urlConfig = ref('http://124.112.64.166:2020')
- //重药代煎中心
- const urlConfig = ref('https://wx.hzliuzhi.com:4433/manager/yfc-admin')
- // #ifdef APP-PLUS
- const plug= uni.requireNativePlugin('Html5app-Gprinter');
- // #endif
- const connectThenPrint = ()=>{
- const ipReg = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/
- if(ipReg.test(printInfo.value.ip)){
- if(RegExp.$1<256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256){
- uni.$showMsg('打印机连接成功!', 500)
- plug.connectIP({'ip':printInfo.value.ip,'port':printInfo.value.port},ret=>{
- const res = JSON.parse(JSON.stringify(ret))
- if(res.code==3){
- uni.setStorageSync('hasPrinter', '1')
- uni.setStorageSync('printerIp', printInfo.value.ip)
- proxy.$refs.printerDialog.close()
- printerTsc()
- if(uni.getStorageSync('hasPrinter') == '1'){
- deploy()
- }
- } else{
- uni.$showMsg('打印机连接失败,请重试!', 500)
- }
- });
- } else{
- uni.$showMsg('ip地址有误,请重试!', 2000)
- }
- }
- }
- const preseObjtou = ref({
- code: '',
- color:['#000'],
- bgColor: '#FFFFFF',
- width: 150,
- height: 50
- })
- const preseObj = ref({
- code: '',
- color:['#000'],
- bgColor: '#FFFFFF',
- width: 150,
- height: 80
- })
- const statusArr = ref([
- {name:'配药',id:'1'},
- {name:'煎药',id:'2'},
- {name:'发药',id:'3'},
- {name:'配送',id:'4'}
- ])
- const typeArr = ref([
- {name:'中药处方',id:'1'},
- {name:'中药制剂',id:'2'}
- ])
- const {proxy} = getCurrentInstance()
- const imageStyles =ref({
- width:112.5,
- height:112.5,
- border:{
- color:"#DDDDDD",
- width:1,
- style:'solid',
- radius:'4px'
- }
- })
- const depolyImage = ref([])
- const barOpations = ref({
- height: 80,
- displayValue: false
- })
- const selectRps = ref([])
- const isPrint = ref(true)
- const initPrint =ref(uni.getStorageSync('initPrint'))
- const photos = ref([])
- const v=ref({
- preNo:'11220822134401',
- preMzZy:'',
- pharmacistsremarks:'药师备注',
- presType:'普通处方',
- name:'李某',
- sex:'男',
- age:35,
- contactNumber:'13888888888',
- preName:'',
- state: '发药',
- department:'中医内科',
- bed_no:'床位号',
- disName:'胃脘痛病',
- symName:'脾胃虚寒证',
- prescriptionTime:'',
- address:'浙江省某某事某某去某某事中医院门诊楼三楼302是',
- birth:'',
- printTime:'',
- rp:[],
- number:3,
- isBehalf:'',
- pies_tips:'待见',
- dosageForm:'汤剂',
- prescriptionusage:'煎服',
- concentration:'200ml',
- frequency:'一日三次',
- medicationTime:'饭后服',
- entrust:'注意多休息,饮食清单。',
-
- prescriptionSum: '187.00',
- daijianCost:'30.00',
- distributionCost:'10.00',
- prescriptionTotleSum: '227.00',
-
- yljgName:'杭州某某高级中医院',
- operateList:[
- {py:'kf',title:'开方',operater:''},
- {py:'sh',title:'审核',operater:''},
- {py:'tp',title:'调配',operater:''},
- {py:'fh',title:'复核',operater:''},
- {py:'jp',title:'浸泡',operater:''},
- {py:'jz',title:'煎煮',operater:''},
- {py:'db',title:'打包',operater:''},
- {py:'fy',title:'发药',operater:''},
- ],
- entrust1111:'1、本处方当日有效\n 2、取药时请您当面核对药品名称、规格、数量 \n 3、延长处方用量时间原因:慢性病 其他老年病 外地 其他'
- })
- const editForm =ref({
- urls:[],
- userId:uni.getStorageSync('userId'),
- comments:'',
- weight:'',
- coreId: ''
- })
- onMounted(() => {
- printInfo.value.ip = uni.getStorageSync('printerIp')
- })
- const handleRemove = (file, uploadFiles) => {
- console.log(file, uploadFiles)
- }
- const handlePreview = (uploadFile) => {
- console.log(uploadFile)
- }
- const bindTextInput = (e)=>{
- console.log(e.detail.value)
- }
- onLoad(async(options) => {
- const userId = uni.getStorageSync('userId')
- console.log("preNo有没有收到>>>",options.preNo)
- const params = {
- token: uni.getStorageSync('token'),
- data: {
- id: options.id || '',
- preNo: options.preNo || '',
- depolyStatus: options.depolyStatus || ''
- }
- }
- const {data:res} = await selectOrderDetail(params)
-
- if (res.code === 200) {
- console.log("处方详情res赋值>>>",res)
- v.value.prescriptionTime = res.data.prescriptionTime,
- v.value.name = res.data.name,
- v.value.sex = res.data.sex,
- v.value.age = res.data.age,
- v.value.contactNumber = res.data.contactNumber
- v.value.preName = res.data.preName
- v.value.address = res.data.address
- v.value.concentration = res.data.concentration
- v.value.frequency = res.data.frequency
- v.value.medicationTime = res.data.medicationTime
- editForm.value.coreId = v.value.id = res.data.id
- v.value.disName = res.data.disName,
- v.value.symName = res.data.symName,
- v.value.preNo = res.data.preNo,
- v.value.preMzZy = res.data.preMzZy
- v.value.pharmacistsremarks = res.data.pharmacistsremarks
- preseObj.value.code = v.value.preNo
- preseObjtou.value.code = v.value.preNo
- v.value.department = res.data.department,
- v.value.bed_no = res.data.bedNo
- v.value.dosageForm = res.data.dosageForm,
- v.value.prescriptionusage = res.data.prescriptionusage,
- v.value.number = res.data.number,
- v.value.isBehalf = res.data.isBehalf,
-
- v.value.prescriptionSum = res.data.prescriptionSum,
- v.value.prescriptionTotalSum = res.data.prescriptionTotalSum,
- v.value.daijianCost = res.data.daijianCost,
- v.value.distributionCost = res.data.distributionCost,
- v.value.prescriptionTotleSum = res.data.prescriptionTotleSum,
-
- v.value.entrust = res.data.entrust
- v.value.rp = res.data.detailList
- v.value.yljgName = res.data.yljgName || ''
- v.value.birth = res.data.patientBirthday || ''
- v.value.printTime = res.data.printTime
- v.value.state = res.data.state
- console.log('res.data.state',res.data)
- switch (res.data.state) {
- case '1':
- v.value.state = '配药'
- break
- case '2':
- v.value.state = '煎药'
- break
- case '3':
- v.value.state = '发药'
- break
- case '4':
- v.value.state = '配送'
- break
- case '5':
- v.value.state = '已分配'
- break
- case '6':
- v.value.state = '已传送'
- break
- default:
- v.value.state = '配药'
- }
-
- v.value.operateList[0].operater = res.data.doctor || ''
- // v.value.operateList[1].operater = res.data.checkBy || ''
- // v.value.operateList[2].operater = res.data.tiaopeiName || ''
- // 循环operateList
- const length = res.data.operateList.length
- if(length > 0){
- res.data.operateList.forEach((item)=>{
- switch(item.type){
- case '1':
- v.value.operateList[1].operater = item.createBy
- break
- case '2':
- v.value.operateList[2].operater = item.createBy
- break
- case '3':
- v.value.operateList[3].operater = item.createBy
- break
- case '16':
- v.value.operateList[4].operater = item.createBy
- break
- case '5':
- v.value.operateList[6].operater = item.createBy
- break
- case '6':
- v.value.operateList[7].operater = item.createBy
- break
- defalut:console.log('处方签res.data.operateList数据异常',item.type)
- }
- })
- }
- }
- })
- const handleGetRps = (v)=>{
- console.log('handleGetRps', v)
- if(!selectRps.value.includes(v)) {
- selectRps.value.push(v)
- } else {
- selectRps.value.splice(selectRps.value.indexOf(v), 1)
- }
- }
- const handleChange = ()=>{
- isPrint.value = !isPrint.value
-
- }
- const handleBack =()=>{
- uni.navigateBack({
- delta: 1
- })
- }
- const cancelConfig = () => {
-
- proxy.$refs.printerDialog.close()
- }
- const handleSubmit = debounce(async()=>{
- console.log('handleSubmit>>>',editForm.value)
- console.log('isPrint.value>>', isPrint.value)
- // 先注销上传时直接打印标签功能20241223
- // if(isPrint.value){
- // if(uni.getStorageSync('hasPrinter') == '1'){
- // printerTsc()
- // const tmp = await deploy()
- // uni.redirectTo({
- // url:"/pages/index/index"
- // })
- // } else {
- // proxy.$refs.printerDialog.open('center')
- // }
- // } else {
- // proxy.$refs.alertDialog.open('center')
- // }
-
- const tmp = await deploy()
- uni.redirectTo({
- url:"/pages/index/index"
- })
-
- },500)
- const dialogConfirm = debounce(async()=>{
-
-
- if(uni.getStorageSync('hasPrinter') == '1'){
- printerTsc()
-
- const ret1 = await deploy()
- uni.redirectTo({
- url:"/pages/index/index"
- })
- } else {
-
- proxy.$refs.alertDialog.close()
- proxy.$refs.printerDialog.open('center')
-
- }
- },500)
- const dialogClose = debounce(async()=>{
-
- const {data:res} = await saveDepoly({
- token: uni.getStorageSync('token'),
- data: JSON.stringify(editForm.value)
- })
- if(res.code===200){
-
- }
- const res1 = await sendToUser({
- token: uni.getStorageSync('token'),
- data: JSON.stringify({id:uni.getStorageSync('userId')})
- })
- const ret = await updateOrderStatus({
- token: uni.getStorageSync('token'),
- data: {
- id:v.value.id,
- status:'1',
- }
- })
- uni.redirectTo({
- url:"/pages/index/index"
- })
- },500)
- const deploy = async() => {
- const {data:res} = await saveDepoly({
- token: uni.getStorageSync('token'),
- data: JSON.stringify(editForm.value)
- })
- if(res.code===200){
-
- }
- const res1 = await sendToUser({
- token: uni.getStorageSync('token'),
- data: JSON.stringify({id:uni.getStorageSync('userId')})
- })
- const ret2 = await updateOrderStatus({
- token: uni.getStorageSync('token'),
- data: {
- id:v.value.id,
- status:'1',
- }
- })
-
-
- const res2 = await setIp({
- token: uni.getStorageSync('token'),
- data: JSON.stringify({userId:uni.getStorageSync('userId'),ip:printInfo.value.ip,port:printInfo.value.port})
- })
-
- if (res2.data.code !== 200){
-
- }
- uni.redirectTo({
- url:"/pages/index/index"
- })
- }
- const selectUpload = debounce((e)=>{
- uni.showLoading({
- title: "上传中"
- });
- const tempFilePaths = e.tempFilePaths;
- for (var i = 0; i < tempFilePaths.length; i++) {
- const tempFile = e.tempFiles[i];
- uni.uploadFile({
- url: urlConfig.value + '/common/upload',
- header: {
- 'Authorization': 'Bearer '+uni.getStorageSync('token')
- },
- formData: {
- secretFlag: 'N',
- fileLocation: 5
- },
- filePath: tempFilePaths[i],
- name: 'file',
- success: (uploadFileRes) => {
- uni.hideLoading();
-
- const back = JSON.parse(uploadFileRes.data);
-
- if (back.code == 200) {
- editForm.value.urls.push(back.url)
- }
- },
- fail: () => {
-
- },
- complete: function() {
- uni.hideLoading();
- }
- });
- }
- },500)
- const printerTsc = ()=>{
-
- let data=[];
- let line={};
-
-
- line={};
- line.width=80;
- line.height=50;
- line.gap=2;
- line.page=1;
- line.direction=0,
- data.push(line);
-
- let filePath=plus.io.convertLocalFileSystemURL("static/OpenSans-Bold.ttf")
-
- line={};
- line.customText=v.value.yljgName+'(中药房)';
- line.x=120;
- line.y=10;
- line.fontSize=14;
- line.fontPath='';
- data.push(line);
-
- // 患者姓名性别出生年月
- line={};
- line.customText=v.value.name+', '+v.value.sex+', '+v.value.birth;
- line.x=10;
- line.y=70;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- // 门诊住院
- line={};
- line.customText=v.value.preMzZy==1 ? '门诊' : '住院';
- line.x=500;
- line.y=70;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- // 条形码
- line={};
- line.barcode=v.value.preNo;
- line.x=15;
- line.y=110;
- line.type="CODE128";
- line.height=115;
- line.width=180;
- line.readable=true;
- line.rotation=0;
- data.push(line);
-
- line={};
- line.customText=v.value.preNo;
- line.x=15;
- line.y=225;
- line.fontSize=8;
- line.fontPath='';
- data.push(line);
-
- // 手机号
- line={};
- line.customText='手机号:'+v.value.contactNumber;
- line.x=250;
- line.y=110;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- // 处方用法
- line={};
- line.customText='处方用法:'+v.value.prescriptionusage;
- line.x=250;
- line.y=150;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
-
- line={};
- line.customText='剂数:'+v.value.number;
- line.x=250;
- line.y=190;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- line={};
- if (v.value.isBehalf=='0') {
- line.customText='是否代煎:否';
- } else{
- line.customText='是否代煎:是';
- }
- line.x=385;
- line.y=190;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- // 科室病房
- line={};
- if(v.value.bed_no!=null){
- line.customText='科室/病房:'+v.value.department+v.value.bed_no;
- }else{
- line.customText='科室/病房:'+v.value.department
- }
- line.x=15;
- line.y=260;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- // 药师备注
- line={};
- if(v.value.pharmacistsremarks != null){
- line.customText='药师备注:'+v.value.pharmacistsremarks;
- }else{
- line.customText='药师备注:';
- }
- line.x=15;
- line.y=300;
- line.fontSize=10;
- line.fontPath='';
- data.push(line);
-
- line={};
- line.customText='打印时间:'+v.value.printTime;
- line.x=145;
- line.y=345;
- line.fontSize=8;
- line.fontPath='';
- data.push(line);
-
- // #ifdef APP-PLUS
- plug.printer({TSC:data}, (ret) => {
- const tip = JSON.stringify(ret);
- })
- // #endif
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction:column;
- justify-content:flex-start;
- width: 750rpx;
- :deep(.uni-nav-bar-text){
- font-size: 20px;
- }
- :deep(.uni-navbar-btn-text){
- font-size: 16px;
- }
- .content{
- margin: 5rpx;
- background-color: #fff;
- flex-direction:column;
- align-items: center;
- height:1050rpx;
- .header{
- display: flex;
- flex-direction:column;
- margin:16rpx 16rpx 0;
- .ti{
- display: flex;
- flex-direction:row;
- justify-content: space-between;
- margin-top: 15.22rpx;
- .left{
- align-items: flex-start;
- .baracode{
- display: flex;
- flex-direction:column;
- .barnum{
- font-size: 15rpx;
- display: flex;
- justify-content:center;
- align-items: center;
- letter-spacing: 0.3em;
- }
- }
- }
- .mid{
- display: flex;
- margin-right: 160rpx;
- .title{
- font-size: 23.75rpx;
- font-weight: 800;
- }
- }
- .rig{
- display: flex;
- .title{
- font-size: 16rpx;
- width: 40rpx;
- font-weight: 300;
- }
- }
- }
- .patiinfo{
- display: flex;
- flex-direction:column;
- margin-top: 25.2rpx;
- padding-bottom: 21.45rpx;
- border-bottom: 1px solid #979797;
- .r1{
- display: flex;
- flex-direction:row;
- margin-bottom:15rpx;
- .row{
- font-size: 15rpx;
- font-weight: 400;
- margin-right: 30rpx;
- }
- .we{
- color:#999999;
- }
- }
- .r2{
- display: flex;
- flex-direction:row;
- margin-bottom:15rpx;
- .row{
- font-size: 15rpx;
- font-weight: 400;
- margin-right: 30rpx;
- }
- .we{
- color:#999999;
- }
- }
- .r3{
- display: flex;
- flex-direction:row;
- font-size: 15rpx;
- .we{
- color:#999999;
- }
- }
- }
- }
- .rp{
- display: flex;
- flex-direction:column;
- margin:22.39rpx 17.36rpx 0;
- border-bottom: 1px solid #979797;
- .title{
- font-size: 22rpx;
- margin-bottom: 10rpx;
- }
- // 处方明细外框
- .lists{
- display: flex;
- flex-wrap: wrap;
- flex-direction: row;
- justify-content:flex-start;
- align-content:flex-start;
- margin-left:15rpx;
- // background-color: #999999;
- // height: 545rpx;
- // 处方明细单个小框
- .item{
- display: flex;
- // justify-content:center;
- // align-items: center;
- width: 345rpx;
- margin: 0 1rpx 20rpx 0;
- // background-color: yellow;
- // position: relative;
- // 药品内容
- .le{
- display: flex;
- // font-size: 24rpx;
- // width: 500rpx;
- // word-wrap: break-word;
- // z-index: 100;
- // position: absolute;
-
- }
- .tag-view:deep(.uni-tag){
- display: flex;
- // justify-content:center;
- align-items: center;
- font-size: 25rpx;
- // height: 22rpx;
- // line-height: 22rpx;
- font-weight:500;
- // width: 250rpx;
- padding: 6rpx 6rpx;
- }
- .rig{
- display: flex;
- // flex-direction:column;
- align-items: center;
- margin-left: 2rpx;
- // width: 200rpx;
- // z-index: 200;
- // position: absolute;
- // left:120rpx;
- .up{
- // margin-bottom:8rpx;
- font-size: 14rpx;
- // height: 12.5rpx;
- }
- .do{
-
- font-size: 12rpx;
- height: 12.5rpx;
- }
- }
- }
- }
- .footer{
- margin: 0 10rpx 8rpx;
- display: flex;
- font-size: 22rpx;
- .js{
- display: flex;
- margin-right: 54.4rpx;
- .pies_tips{
- }
- }
- .freque{
- }
- }
- .rp-tips{
- display: flex;
- justify-content:flex-end;
- font-size: 15rpx;
- margin-right: 10rpx;
- font-size: 22rpx;
- }
- }
- .amountarea{
- display: flex;
- margin: 21.3rpx 19.38px 0;
- padding-bottom: 20.94rpx;
- border-bottom: 1px solid #979797;
- .amount{
- display: flex;
- flex-direction:column;
- .r1{
- border: 1px solid #979797;
- font-size: 15rpx;
- width: 287.5rpx;
- display: flex;
- justify-content:center;
- align-items: center;
- height: 33.75rpx;
- }
- .r2{
- display: flex;
- justify-content:center;
- align-items: center;
- font-size: 15rpx;
- height: 33.75rpx;
- width: 287.5rpx;
- border-left: 1px solid #979797;
- border-right: 1px solid #979797;
- .jyf{
-
- width: 143.93rpx;
- display: flex;
- justify-content:center;
- align-items: center;
- }
- .psf{
- border-left: 1px solid #979797;
- width: 143.93rpx;
- display: flex;
- justify-content:center;
- align-items: center;
- }
- }
- .r3{
- display: flex;
- justify-content:center;
- align-items: center;
- height: 33.75rpx;
- font-size: 15rpx;
- border: 1px solid #979797;
- }
- }
- .service{
- display: flex;
- flex-wrap: wrap;
- margin-left: 50rpx;
- .kf{
- font-size: 15rpx;
- margin-right: 60rpx;
- width:115rpx;
- .we{
- font-size: 15rpx;
- color:#999999;
- }
- }
- }
- }
-
- .comment{
- margin: 10rpx 16rpx 10rpx;
- font-size: 15rpx;
- display: flex;
- }
- }
- .upload{
- margin: 0 5rpx 5rpx;
- background-color: #fff;
- flex-direction:column;
- align-items: center;
- padding: 20rpx;
-
- .title{
- font-size: 15rpx;
- margin-bottom:20px;
- color: #333333;
- }
- // :deep(.file-picker__box){
- // width: 112.5rpx;
- // height: 112.5rpx;
- // .file-picker__box-content{
- // width: 112.5rpx;
- // height: 112.5rpx;
- // }
- // }
- }
- .cooment{
- margin: 0 5rpx;
- background-color: #fff;
- flex-direction:column;
- align-items: center;
- padding: 5rpx 10rpx;
- .title{
- font-size: 15rpx;
- margin-bottom:20rpx;
- }
- .tex{
- display: flex;
- justify-content:flex-start;
- align-items: center;
- margin-bottom:12.7rpx;
- border: 1px solid #979797;
- // height: 74.38rpx;
- border-radius: 5rpx;
- .input{
- // height: 74.38rpx;
- // font-size: 15rpx;
- padding: 10rpx;
- // border-radius: 5rpx;
- :deep(.uni-textarea-placeholder){
- font-size: 15rpx;
- }
- }
- }
- }
- .radio{
- display: flex;
- margin: 0 5rpx;
- background-color: #fff;
- // padding: 0 20px 100px;
- flex-direction:column;
- // align-items: center;
- font-size: 15rpx!important;
- :deep(.uni-switch-input.uni-switch-input-checked){
- border-color: #18C7B0;
- background-color: #18C7B0;
- }
- }
- .submit{
- display: flex;
- // position: fixed;
- // top: 1rpx;
- // bottom: 0rpx;
- background-color: #fff;
- align-items: center;
- width: 750rpx;
- height: 80rpx;
- .bu{
- display: flex;
- justify-content:center;
- align-items: center;
- height: 60rpx;
- width: 671.25rpx;
- font-size: 17.5rpx;
- border-radius: 3.75rpx;
- background-color: #18c7b0;
- color:#fff;
- }
- }
-
- :deep(.uni-popup-dialog){
- width: 500rpx;
- // height: 268.75rpx;
- display: flex;
- flex-direction: column;
- background-color: #ffffff;
-
- // justify-content:center;
- // align-items: center;
- .uni-dialog-title-text{
- display: flex;
- font-size: 20rpx;
- // padding-top: 20px;
- }
- .uni-dialog-content{
- display: flex;
- margin: 10rpx 20rpx;
- background-color: #fff;
- box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.15);
- // 标签外框
- .cotent{
- display: flex;
- flex-direction: column;
- width:400rpx;
- height: 250rpx;
- // background-color: yellow;
- // 标题
- .title{
- font-size: 20rpx;
- font-weight: 500;
- // margin-top: 10rpx;
- // margin-bottom: 10rpx;
- display: flex;
- align-items: center;
- justify-content:center;
- }
- // 患者信息
- .hzxx{
- display: flex;
- justify-content: left;
- align-items: center;
- margin-top: 10rpx;
- width: 400rpx;
- font-size: 18rpx;
- .hzxx_left{
- display: flex;
- flex-direction: column;
- width: 350rpx;
- margin-left: 5rpx;
- }
- .hzxx_right{
- width: 50rpx;
- }
- }
- // 内容
- .body{
- display: flex;
- // flex-direction: column;
- justify-content:center;
- // background-color: #999999;
- width: 400rpx;
- // height: 180rpx;
- // 条码大框
- .lef{
- display: flex;
- flex-direction: column;
- // width: 150rpx;
- // justify-content:center;
- margin-top: 5rpx;
- // margin-top: 40rpx;
- // 条码小框
- .baracode{
- display: flex;
- flex-direction:column;
- // width: 80rpx;
- // height: 100rpx;
- .cav{
- // width:150rpx;
- // height: 100rpx;
- }
- .barnum{
- // width:150rpx;
- font-size: 15rpx;
- font-weight: bold;
- display: flex;
- color: #333333;
- justify-content:center;
- align-items: center;
- // letter-spacing: 0.7em;
- }
- }
- }
- .rig{
- display: flex;
- flex-direction: column;
- // justify-content:center;
- // margin-top: 15rpx;
- margin-left: 10rpx;
- width: 300px;
- // background-color: #18C7B0;
- // margin-left: 13.75rpx;
- .hz{
- display: flex;
- margin-bottom: 10rpx;
- font-size: 20rpx;
- }
- .bold{
- font-weight: 500;
- }
- }
- }
- }
- }
- .uni-dialog-button-group{
- display: flex;
- font-size: 17.5rpx;
- .uni-dialog-button{
- display: flex;
- .uni-dialog-button-text{
- }
- }
- .uni-border-left{
- .uni-dialog-button-text{
- color: #18c7b0;
- }
- }
- }
- }
- }
- .printconfig{
- background-color: #fff;
- width: 500rpx;
- height: 100rpx;
- padding: 20rpx;
- .initPrint{
- .title{
- font-size: 20rpx;
- }
- .tips{
- font-size: 16rpx;
- }
- .input{
- width: 300rpx;
- }
- }
- }
- </style>
|