|
@@ -40,8 +40,8 @@
|
|
</view>
|
|
</view>
|
|
<view class="lists">
|
|
<view class="lists">
|
|
<view class="item" v-for="(x, i) in v.rp" :key="i">
|
|
<view class="item" v-for="(x, i) in v.rp" :key="i">
|
|
- <view class="le tag-view">
|
|
|
|
- <uni-tag :inverted="!selectRps.includes(x)" :text="x.matName+x.matDose+x.matUnitName" @click="handleGetRps(x)" />
|
|
|
|
|
|
+ <view class="le tag-view" @click="handleGetRps(x)">
|
|
|
|
+ <uni-tag :inverted="!selectRps.includes(x)" :text="x.matName+x.matDose+x.matUnitName" />
|
|
</view>
|
|
</view>
|
|
<view class="rig">
|
|
<view class="rig">
|
|
<view class="up"> {{x.matUsageName}}</view>
|
|
<view class="up"> {{x.matUsageName}}</view>
|
|
@@ -159,9 +159,9 @@ import { saveDepoly } from '@/static/js/api.js'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
|
|
|
const urlConfig = ref('http://zhongyao.fscuc.cn')
|
|
const urlConfig = ref('http://zhongyao.fscuc.cn')
|
|
-
|
|
|
|
|
|
+// #ifdef APP-PLUS
|
|
const plug= uni.requireNativePlugin('Html5app-Gprinter');
|
|
const plug= uni.requireNativePlugin('Html5app-Gprinter');
|
|
-
|
|
|
|
|
|
+// #endif
|
|
|
|
|
|
// const preseId = ref(11220822134401)
|
|
// const preseId = ref(11220822134401)
|
|
const preseObj = ref({
|
|
const preseObj = ref({
|
|
@@ -215,7 +215,7 @@ const v=ref({
|
|
sex:'男',
|
|
sex:'男',
|
|
age:35,
|
|
age:35,
|
|
contactNumber:'13888888888',
|
|
contactNumber:'13888888888',
|
|
- status: '发药',
|
|
|
|
|
|
+ state: '发药',
|
|
department:'中医内科',
|
|
department:'中医内科',
|
|
disName:'胃脘痛病',
|
|
disName:'胃脘痛病',
|
|
symName:'脾胃虚寒证',
|
|
symName:'脾胃虚寒证',
|
|
@@ -369,33 +369,33 @@ onLoad(async(options) => {
|
|
v.value.distributionCost = res.data.distributionCost,
|
|
v.value.distributionCost = res.data.distributionCost,
|
|
v.value.prescriptionTotleSum = res.data.prescriptionTotleSum,
|
|
v.value.prescriptionTotleSum = res.data.prescriptionTotleSum,
|
|
|
|
|
|
- v.value.entrust = res.data.entrust,
|
|
|
|
|
|
+ v.value.entrust = res.data.entrust
|
|
v.value.rp = res.data.detailList
|
|
v.value.rp = res.data.detailList
|
|
v.value.yljgName = res.data.yljgName || ''
|
|
v.value.yljgName = res.data.yljgName || ''
|
|
- v.value.birth = res.data.birth || ''
|
|
|
|
- v.value.status = res.data.status,
|
|
|
|
- console.log('res.data.status',res.data.status)
|
|
|
|
- switch (res.data.status) {
|
|
|
|
|
|
+ v.value.birth = res.data.patientBirthday.substring(0,10) || ''
|
|
|
|
+ v.value.state = res.data.state
|
|
|
|
+ console.log('res.data.state',res.data.state)
|
|
|
|
+ switch (res.data.state) {
|
|
case '1':
|
|
case '1':
|
|
- v.value.status = '配药'
|
|
|
|
|
|
+ v.value.state = '配药'
|
|
break
|
|
break
|
|
case '2':
|
|
case '2':
|
|
- v.value.status = '煎药'
|
|
|
|
|
|
+ v.value.state = '煎药'
|
|
break
|
|
break
|
|
case '3':
|
|
case '3':
|
|
- v.value.status = '发药'
|
|
|
|
|
|
+ v.value.state = '发药'
|
|
break
|
|
break
|
|
case '4':
|
|
case '4':
|
|
- v.value.status = '配送'
|
|
|
|
|
|
+ v.value.state = '配送'
|
|
break
|
|
break
|
|
case '5':
|
|
case '5':
|
|
- v.value.status = '已分配'
|
|
|
|
|
|
+ v.value.state = '已分配'
|
|
break
|
|
break
|
|
case '6':
|
|
case '6':
|
|
- v.value.status = '已传送'
|
|
|
|
|
|
+ v.value.state = '已传送'
|
|
break
|
|
break
|
|
default:
|
|
default:
|
|
- v.value.status = '配药'
|
|
|
|
|
|
+ v.value.state = '配药'
|
|
}
|
|
}
|
|
|
|
|
|
v.value.operateList[0].operater = res.data.doctor || ''
|
|
v.value.operateList[0].operater = res.data.doctor || ''
|
|
@@ -450,7 +450,7 @@ const handleBack =()=>{
|
|
|
|
|
|
const handleSubmit = async()=>{
|
|
const handleSubmit = async()=>{
|
|
console.log('handleSubmit>>>',editForm.value)
|
|
console.log('handleSubmit>>>',editForm.value)
|
|
- console.log('直接调用接口,然后打印')
|
|
|
|
|
|
+
|
|
const {data:res} = await saveDepoly({
|
|
const {data:res} = await saveDepoly({
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
data: JSON.stringify(editForm.value)
|
|
data: JSON.stringify(editForm.value)
|
|
@@ -463,7 +463,12 @@ const handleSubmit = async()=>{
|
|
// 直接调用接口,然后打印
|
|
// 直接调用接口,然后打印
|
|
// print("#printMe")
|
|
// print("#printMe")
|
|
// 打印成功后调用/userPrescription/sendToUser
|
|
// 打印成功后调用/userPrescription/sendToUser
|
|
|
|
+
|
|
|
|
+ // #ifdef APP-PLUS
|
|
const ret = printerTsc()
|
|
const ret = printerTsc()
|
|
|
|
+ console.log('直接调用接口,然后打印',ret)
|
|
|
|
+ // #endif
|
|
|
|
+
|
|
const res = await sendToUser({
|
|
const res = await sendToUser({
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
data: JSON.stringify({id:uni.getStorageSync('userId')})
|
|
data: JSON.stringify({id:uni.getStorageSync('userId')})
|
|
@@ -482,7 +487,12 @@ const handleSubmit = async()=>{
|
|
|
|
|
|
const dialogConfirm = async()=>{
|
|
const dialogConfirm = async()=>{
|
|
console.log('dialogConfirm直接调用接口,然后打印')
|
|
console.log('dialogConfirm直接调用接口,然后打印')
|
|
|
|
+
|
|
|
|
+ // #ifdef APP-PLUS
|
|
const ret = printerTsc()
|
|
const ret = printerTsc()
|
|
|
|
+ console.log('ret',ret)
|
|
|
|
+ // #endif
|
|
|
|
+
|
|
// 打印成功后调用/userPrescription/sendToUser
|
|
// 打印成功后调用/userPrescription/sendToUser
|
|
const res = await sendToUser({
|
|
const res = await sendToUser({
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
@@ -558,8 +568,8 @@ const printerTsc = ()=>{
|
|
line.customText=v.value.yljgName;
|
|
line.customText=v.value.yljgName;
|
|
line.x=100;
|
|
line.x=100;
|
|
line.y=40;
|
|
line.y=40;
|
|
- line.fontSize=30;
|
|
|
|
- line.fontPath=filePath;
|
|
|
|
|
|
+ line.fontSize=20;
|
|
|
|
+ line.fontPath='';
|
|
data.push(line); //每添加一个,代表一行字
|
|
data.push(line); //每添加一个,代表一行字
|
|
|
|
|
|
//添加图片
|
|
//添加图片
|
|
@@ -598,7 +608,7 @@ const printerTsc = ()=>{
|
|
line.x=50; //横坐标
|
|
line.x=50; //横坐标
|
|
line.y=150; //纵坐标
|
|
line.y=150; //纵坐标
|
|
line.type="CODE128"; //条型码类型
|
|
line.type="CODE128"; //条型码类型
|
|
- line.height=160; //条型码高度
|
|
|
|
|
|
+ line.height=80; //条型码高度
|
|
line.readable=true; //是否显示文字在条型下方
|
|
line.readable=true; //是否显示文字在条型下方
|
|
line.rotation=0; // 角度:有四个值:0,90,180,270
|
|
line.rotation=0; // 角度:有四个值:0,90,180,270
|
|
data.push(line)
|
|
data.push(line)
|
|
@@ -623,7 +633,7 @@ const printerTsc = ()=>{
|
|
|
|
|
|
// let _this=this;
|
|
// let _this=this;
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
plug.printer({TSC:data}, ret => {
|
|
plug.printer({TSC:data}, ret => {
|
|
// _this.tip = JSON.stringify(ret);
|
|
// _this.tip = JSON.stringify(ret);
|
|
console.log('print data', data)
|
|
console.log('print data', data)
|
|
@@ -756,14 +766,14 @@ const printerTsc = ()=>{
|
|
align-items: center;
|
|
align-items: center;
|
|
width: 161rpx;
|
|
width: 161rpx;
|
|
margin: 0 10rpx 20rpx 0;
|
|
margin: 0 10rpx 20rpx 0;
|
|
- position: relative;
|
|
|
|
|
|
+ // position: relative;
|
|
.le{
|
|
.le{
|
|
display: flex;
|
|
display: flex;
|
|
font-size: 12rpx;
|
|
font-size: 12rpx;
|
|
width: 100rpx;
|
|
width: 100rpx;
|
|
word-wrap: break-word;
|
|
word-wrap: break-word;
|
|
- z-index: 100;
|
|
|
|
- position: absolute;
|
|
|
|
|
|
+ // z-index: 100;
|
|
|
|
+ // position: absolute;
|
|
|
|
|
|
}
|
|
}
|
|
.tag-view:deep(.uni-tag){
|
|
.tag-view:deep(.uni-tag){
|
|
@@ -771,6 +781,7 @@ const printerTsc = ()=>{
|
|
justify-content:center;
|
|
justify-content:center;
|
|
align-items: center;
|
|
align-items: center;
|
|
font-size: 15rpx;
|
|
font-size: 15rpx;
|
|
|
|
+ font-weight:500;
|
|
width: 80rpx;
|
|
width: 80rpx;
|
|
padding: 6rpx 6rpx;
|
|
padding: 6rpx 6rpx;
|
|
}
|
|
}
|
|
@@ -779,8 +790,8 @@ const printerTsc = ()=>{
|
|
flex-direction:column;
|
|
flex-direction:column;
|
|
margin-left: 5.31rpx;
|
|
margin-left: 5.31rpx;
|
|
width: 200rpx;
|
|
width: 200rpx;
|
|
- z-index: 200;
|
|
|
|
- position: absolute;
|
|
|
|
|
|
+ // z-index: 200;
|
|
|
|
+ // position: absolute;
|
|
left:120rpx;
|
|
left:120rpx;
|
|
.up{
|
|
.up{
|
|
margin-bottom:8rpx;
|
|
margin-bottom:8rpx;
|