Merge branch 'bonus-jyy-smart-canteen' of http://192.168.0.75:3000/bonus/bonus-ui into bonus-jyy-smart-canteen
This commit is contained in:
commit
6e472bdd59
|
|
@ -157,6 +157,17 @@ export function delHealthInfoApi(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getHealthReportPageApi(data) {
|
||||||
|
return request({
|
||||||
|
url: '/smart-canteen/health_person_medical_report/list',
|
||||||
|
method: 'get',
|
||||||
|
headers: {
|
||||||
|
//"merchant-id":"378915229716713472",
|
||||||
|
},
|
||||||
|
params:data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 模板-列表
|
// 模板-列表
|
||||||
export function getModelListApi() {
|
export function getModelListApi() {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
var port = 18080;
|
var port = 18080;
|
||||||
var connectionMode = "ws:";
|
var connectionMode = "ws:";
|
||||||
var wsPrint = null;
|
var wsPrint = null;
|
||||||
let wsGetPrinterList = null;
|
var wsGetPrinterList = null;
|
||||||
var CHUNK_SIZE = 1024 * 64;
|
var CHUNK_SIZE = 1024 * 64;
|
||||||
|
|
||||||
const WebSocketPrint = function (serverURL, strPrinterName, request, callback) {
|
const WebSocketPrint = function (serverURL, strPrinterName, request, callback) {
|
||||||
|
|
@ -187,6 +187,7 @@ export {
|
||||||
requestPrint,
|
requestPrint,
|
||||||
getPrinterList,
|
getPrinterList,
|
||||||
wsPrint,
|
wsPrint,
|
||||||
|
wsGetPrinterList,
|
||||||
WebSocketPrint,
|
WebSocketPrint,
|
||||||
WebSocketGetPrinterList
|
WebSocketGetPrinterList
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,6 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
|
<el-table-column label="住院日期" align="center" prop="inpatientDate" :show-overflow-tooltip="true">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="慢性病" align="center" prop="chronicNames" :show-overflow-tooltip="true">
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
|
<el-table-column label="劳动强度" align="center" prop="labourIntensity" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
|
<span v-if="scope.row.labourIntensity==1">轻劳动</span>
|
||||||
|
|
@ -302,7 +300,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { deptTreeSelect } from '@/api/system/user'
|
import { deptTreeSelect } from '@/api/system/user'
|
||||||
import { dictHealthChronicApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi
|
import { dictHealthChronicApi,addHealthScienceApi,editHealthScienceApi,delHealthScienceApi,getHealthInfoPageApi,getHealthReportPageApi
|
||||||
,getModelListApi,getHealthInfoDetailApi,getModelByIdApi,addReportApi,getReportApi,delReportListApi,getReportByIdApi } from "@/api/healthCenter/index";
|
,getModelListApi,getHealthInfoDetailApi,getModelByIdApi,addReportApi,getReportApi,delReportListApi,getReportByIdApi } from "@/api/healthCenter/index";
|
||||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||||
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
import { decryptWithSM4,encryptWithSM4 } from '@/utils/sm';
|
||||||
|
|
@ -351,6 +349,7 @@ export default {
|
||||||
dateRange:[new Date(),new Date()],
|
dateRange:[new Date(),new Date()],
|
||||||
chronicOptions:[],
|
chronicOptions:[],
|
||||||
personData:{
|
personData:{
|
||||||
|
'nickName':''
|
||||||
},
|
},
|
||||||
reportDatas:[
|
reportDatas:[
|
||||||
{"medicalProjectName":"身体","medicalProjectDetailNames":[
|
{"medicalProjectName":"身体","medicalProjectDetailNames":[
|
||||||
|
|
@ -470,7 +469,7 @@ export default {
|
||||||
// }else{
|
// }else{
|
||||||
// this.queryParams.chronicIds = ""
|
// this.queryParams.chronicIds = ""
|
||||||
// }
|
// }
|
||||||
getHealthInfoPageApi(param).then(response => {
|
getHealthReportPageApi(param).then(response => {
|
||||||
this.tableListData = response.rows;
|
this.tableListData = response.rows;
|
||||||
this.tableListData.forEach(item=>{
|
this.tableListData.forEach(item=>{
|
||||||
if(item.mobile&&item.mobile!=""){
|
if(item.mobile&&item.mobile!=""){
|
||||||
|
|
@ -542,6 +541,7 @@ export default {
|
||||||
this.title = "新增";
|
this.title = "新增";
|
||||||
},
|
},
|
||||||
handleReport(row) {
|
handleReport(row) {
|
||||||
|
console.log("体检报告",)
|
||||||
this.form = Object.assign({}, row);
|
this.form = Object.assign({}, row);
|
||||||
this.selectUser=this.form.userId;
|
this.selectUser=this.form.userId;
|
||||||
this.openAddReport = true;
|
this.openAddReport = true;
|
||||||
|
|
@ -552,60 +552,64 @@ export default {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
getHealthInfoDetailApi(this.form).then(response => {
|
getHealthInfoDetailApi(this.form).then(response => {
|
||||||
|
if(response.data){
|
||||||
this.personData=response.data;
|
this.personData=response.data;
|
||||||
console.log("this.personData",this.personData)
|
|
||||||
if(this.personData.bloodType==1){
|
console.log("this.personData",this.personData)
|
||||||
this.personData.bloodType="A型";
|
if(this.personData.bloodType==1){
|
||||||
}else if(this.personData.bloodType==2){
|
this.personData.bloodType="A型";
|
||||||
this.personData.bloodType="B型";
|
}else if(this.personData.bloodType==2){
|
||||||
}else if(this.personData.bloodType==3){
|
this.personData.bloodType="B型";
|
||||||
this.personData.bloodType="AB型";
|
}else if(this.personData.bloodType==3){
|
||||||
}else if(this.personData.bloodType==4){
|
this.personData.bloodType="AB型";
|
||||||
this.personData.bloodType="O型";
|
}else if(this.personData.bloodType==4){
|
||||||
}else if(this.personData.bloodType==5){
|
this.personData.bloodType="O型";
|
||||||
this.personData.bloodType="Rh阳型";
|
}else if(this.personData.bloodType==5){
|
||||||
}else if(this.personData.bloodType==6){
|
this.personData.bloodType="Rh阳型";
|
||||||
this.personData.bloodType="Rh阴型";
|
}else if(this.personData.bloodType==6){
|
||||||
}
|
this.personData.bloodType="Rh阴型";
|
||||||
if(this.personData.doctorAdvice==1){
|
}
|
||||||
this.personData.doctorAdvice="禁食";
|
if(this.personData.doctorAdvice==1){
|
||||||
}else if(this.personData.doctorAdvice==2){
|
this.personData.doctorAdvice="禁食";
|
||||||
this.personData.doctorAdvice="流食";
|
}else if(this.personData.doctorAdvice==2){
|
||||||
}else if(this.personData.doctorAdvice==3){
|
this.personData.doctorAdvice="流食";
|
||||||
this.personData.doctorAdvice="半流食";
|
}else if(this.personData.doctorAdvice==3){
|
||||||
}else if(this.personData.doctorAdvice==4){
|
this.personData.doctorAdvice="半流食";
|
||||||
this.personData.doctorAdvice="治疗饮食";
|
}else if(this.personData.doctorAdvice==4){
|
||||||
}
|
this.personData.doctorAdvice="治疗饮食";
|
||||||
if(this.personData.weightControl==1){
|
}
|
||||||
this.personData.weightControl="减重";
|
if(this.personData.weightControl==1){
|
||||||
}else if(this.personData.weightControl==2){
|
this.personData.weightControl="减重";
|
||||||
this.personData.weightControl="增重";
|
}else if(this.personData.weightControl==2){
|
||||||
}
|
this.personData.weightControl="增重";
|
||||||
if(this.personData.ifHospitalized==1){
|
}
|
||||||
this.personData.ifHospitalized="是";
|
if(this.personData.ifHospitalized==1){
|
||||||
}else if(this.personData.ifHospitalized==2){
|
this.personData.ifHospitalized="是";
|
||||||
this.personData.ifHospitalized="否";
|
}else if(this.personData.ifHospitalized==2){
|
||||||
}
|
this.personData.ifHospitalized="否";
|
||||||
if(this.personData.pregnantStatus==0){
|
}
|
||||||
this.personData.pregnantStatus="保密";
|
if(this.personData.pregnantStatus==0){
|
||||||
}else if(this.personData.pregnantStatus==1){
|
this.personData.pregnantStatus="保密";
|
||||||
this.personData.pregnantStatus="未怀孕";
|
}else if(this.personData.pregnantStatus==1){
|
||||||
}else if(this.personData.pregnantStatus==2){
|
this.personData.pregnantStatus="未怀孕";
|
||||||
this.personData.pregnantStatus="孕妇(早期)";
|
}else if(this.personData.pregnantStatus==2){
|
||||||
}else if(this.personData.pregnantStatus==3){
|
this.personData.pregnantStatus="孕妇(早期)";
|
||||||
this.personData.pregnantStatus="孕妇(中期)";
|
}else if(this.personData.pregnantStatus==3){
|
||||||
}else if(this.personData.pregnantStatus==4){
|
this.personData.pregnantStatus="孕妇(中期)";
|
||||||
this.personData.pregnantStatus="孕妇(晚期)";
|
}else if(this.personData.pregnantStatus==4){
|
||||||
}else if(this.personData.pregnantStatus==5){
|
this.personData.pregnantStatus="孕妇(晚期)";
|
||||||
this.personData.pregnantStatus="乳母";
|
}else if(this.personData.pregnantStatus==5){
|
||||||
}
|
this.personData.pregnantStatus="乳母";
|
||||||
if(this.personData.labourIntensity==1){
|
}
|
||||||
this.personData.labourIntensity="轻劳动";
|
if(this.personData.labourIntensity==1){
|
||||||
}else if(this.personData.labourIntensity==2){
|
this.personData.labourIntensity="轻劳动";
|
||||||
this.personData.labourIntensity="中等强度劳动";
|
}else if(this.personData.labourIntensity==2){
|
||||||
}else if(this.personData.labourIntensity==3){
|
this.personData.labourIntensity="中等强度劳动";
|
||||||
this.personData.labourIntensity="重强度劳动";
|
}else if(this.personData.labourIntensity==3){
|
||||||
|
this.personData.labourIntensity="重强度劳动";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getReportList(){
|
getReportList(){
|
||||||
|
|
|
||||||
|
|
@ -117,14 +117,16 @@
|
||||||
</el-cascader>
|
</el-cascader>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="小票打印机" prop="deptIdList">-->
|
<!-- <el-form-item label="小票打印机" prop="deptIdList">-->
|
||||||
<!-- <el-select v-model="printerName" clearable collapse-tags style="width: 220px">-->
|
<!-- <el-input v-model="printerName" placeholder="请输入订单号" maxlength="20" clearable-->
|
||||||
<!-- <el-option-->
|
<!-- style="width: 220px"/>-->
|
||||||
<!-- v-for="item in printList"-->
|
<!--<!– <el-select v-model="printerName" placeholder="请选择小票打印机" clearable collapse-tags style="width: 220px">–>-->
|
||||||
<!-- :key="item.value"-->
|
<!--<!– <el-option–>-->
|
||||||
<!-- :label="item.name"-->
|
<!--<!– v-for="item in printList"–>-->
|
||||||
<!-- :value="item.value"-->
|
<!--<!– :key="item.value"–>-->
|
||||||
<!-- />-->
|
<!--<!– :label="item.name"–>-->
|
||||||
<!-- </el-select>-->
|
<!--<!– :value="item.value">–>-->
|
||||||
|
<!--<!– </el-option>–>-->
|
||||||
|
<!--<!– </el-select>–>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -537,16 +539,16 @@
|
||||||
|
|
||||||
<!-- 提醒对话框 -->
|
<!-- 提醒对话框 -->
|
||||||
<el-dialog :title="handleType+'提醒'" :visible.sync="openRemind" width="40%" append-to-body>
|
<el-dialog :title="handleType+'提醒'" :visible.sync="openRemind" width="40%" append-to-body>
|
||||||
<div>
|
<!-- <div>-->
|
||||||
<el-select v-model="printerName" clearable collapse-tags style="width: 220px">
|
<!-- <el-select v-model="printerName" clearable collapse-tags style="width: 220px">-->
|
||||||
<el-option
|
<!-- <el-option-->
|
||||||
v-for="item in printList"
|
<!-- v-for="item in printList"-->
|
||||||
:key="item.value"
|
<!-- :key="item.value"-->
|
||||||
:label="item.name"
|
<!-- :label="item.name"-->
|
||||||
:value="item.value"
|
<!-- :value="item.value"-->
|
||||||
/>
|
<!-- />-->
|
||||||
</el-select>
|
<!-- </el-select>-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="remind-question">请问是否对以下可{{ handleType }}订单进行{{ handleType }}操作?</div>
|
<div class="remind-question">请问是否对以下可{{ handleType }}订单进行{{ handleType }}操作?</div>
|
||||||
<div class="remind-title">可{{ handleType }}订单 {{ ableList.length }} 笔</div>
|
<div class="remind-title">可{{ handleType }}订单 {{ ableList.length }} 笔</div>
|
||||||
<div v-for="(item,index) in ableList" :key="item.orderId">{{ (index + 1) }}.
|
<div v-for="(item,index) in ableList" :key="item.orderId">{{ (index + 1) }}.
|
||||||
|
|
@ -694,38 +696,46 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
// this.printerName = ''
|
// this.printerName = ''
|
||||||
// this.printList = []
|
// this.printList = []
|
||||||
this.PosPrinter = new WebSDK.EscPosCommand()
|
|
||||||
this.refreshPrinterList()
|
|
||||||
this.getAreaTreeData()
|
this.getAreaTreeData()
|
||||||
this.getDeptTree()
|
this.getDeptTree()
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.PosPrinter = new WebSDK.EscPosCommand()
|
||||||
|
this.refreshPrinterList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refreshPrinterList() {
|
refreshPrinterList() {
|
||||||
setPort(18080)
|
setPort(18080)
|
||||||
const category = { 'category': 1 }
|
getPrinterList({ 'category': 1 },(printer) =>{
|
||||||
getPrinterList(category, this.updatePrinterList)
|
this.updatePrinterList(printer)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
updatePrinterList(printers) {
|
updatePrinterList(printers) {
|
||||||
// this.printList = printers
|
console.log("Printers from getPrinterList:", printers)
|
||||||
// console.log(this.printList)
|
if (!Array.isArray(printers)) {
|
||||||
// if (!Array.isArray(printers)) {
|
console.error('Expected an array of printers, but got:', typeof printers)
|
||||||
// console.error('Expected an array of printers, but got:', typeof printers)
|
return
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// console.log('Available printers:', this.printList)
|
|
||||||
this.printList = printers.map(item => ({
|
|
||||||
name: item.logicalName,
|
|
||||||
value: item.logicalName
|
|
||||||
}))
|
|
||||||
console.log('Available printers:', this.printList)
|
|
||||||
if (this.printList.length > 0) {
|
|
||||||
this.printerName = this.printList[0].name
|
|
||||||
}
|
}
|
||||||
|
this.printList = Array.isArray(printers)
|
||||||
|
? printers.map((item, index) => ({
|
||||||
|
name: item.logicalName,
|
||||||
|
value: index,
|
||||||
|
}))
|
||||||
|
: []
|
||||||
|
console.log('Available printers:', this.printList)
|
||||||
|
console.log('Available printers size:', this.printList.length)
|
||||||
|
if (this.printList.length > 0) {
|
||||||
|
console.log('Setting default printer to:', this.printList[0].value)
|
||||||
|
this.printerName = this.printList[0].value
|
||||||
|
}
|
||||||
|
console.log('this.printerName:', this.printerName)
|
||||||
|
console.log('this.printList:', this.printList)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
// 强制更新视图
|
||||||
|
this.$forceUpdate()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//区域树
|
//区域树
|
||||||
getAreaTreeData() {
|
getAreaTreeData() {
|
||||||
|
|
@ -1046,14 +1056,14 @@ export default {
|
||||||
this.$modal.msgSuccess('批量核销完成')
|
this.$modal.msgSuccess('批量核销完成')
|
||||||
}
|
}
|
||||||
if (this.handleType == '打印小票') {
|
if (this.handleType == '打印小票') {
|
||||||
if (this.printList.length === 0) {
|
// if (this.printList.length === 0) {
|
||||||
this.$modal.msgWarning('请先开启小票打印机服务!')
|
// this.$modal.msgWarning('请先开启小票打印机服务,获取打印机列表,可尝试强制刷新浏览器!')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (this.printerName === '') {
|
// if (this.printerName === '') {
|
||||||
this.$modal.msgWarning('请先选择小票打印机!')
|
// this.$modal.msgWarning('请先选择小票打印机!')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
const _titles = ['菜品名称', '数量', '单价', '总价']
|
const _titles = ['菜品名称', '数量', '单价', '总价']
|
||||||
const _columnWidths = [20, 10, 10, 8]
|
const _columnWidths = [20, 10, 10, 8]
|
||||||
console.log(this.ableList)
|
console.log(this.ableList)
|
||||||
|
|
@ -1082,7 +1092,8 @@ export default {
|
||||||
}) // 合计: 277 -> Total: 277; 应收: 277 -> Amount Due: 277; 水流单号: 1234567891011 -> Flow Number: 1234567891011; 谢谢光临!欢迎下次光临! -> Thank you for your visit! Welcome again next time!
|
}) // 合计: 277 -> Total: 277; 应收: 277 -> Amount Due: 277; 水流单号: 1234567891011 -> Flow Number: 1234567891011; 谢谢光临!欢迎下次光临! -> Thank you for your visit! Welcome again next time!
|
||||||
.printAndFeed(2)
|
.printAndFeed(2)
|
||||||
.feedAndCut(50)
|
.feedAndCut(50)
|
||||||
this.prepareAndPrint(this.printerName)
|
//TODO 当前打印机名称是写死的,后续需要改成动态选择 目前动态页面赋值有问题
|
||||||
|
this.prepareAndPrint('Printer1')
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$modal.msgSuccess('打印小票完成')
|
this.$modal.msgSuccess('打印小票完成')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue