dev
This commit is contained in:
parent
26a429b41a
commit
a77eb5c4eb
|
|
@ -52,10 +52,9 @@
|
||||||
|
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import {ref} from "vue"
|
import {ref} from "vue"
|
||||||
import IdCodeListShow from "@/components/retail/IdCodeListShow.vue";
|
import IdCodeListShow from "./IdCodeListShow.vue";
|
||||||
import CloseBtn from "@/components/CloseBtn.vue";
|
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
interface TableItem {
|
interface TableItem {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -86,7 +85,7 @@ const addIdCode = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let idCode = traceabilityCode.value.slice(0, 7);
|
let idCode = traceabilityCode.value.slice(0, 7);
|
||||||
post("goods/goods/addIdCode", {goodsId: selected.value, idCode: idCode}).then((res: any) => {
|
post(API.Goods.Base.AddIdCode, {goodsId: selected.value, idCode: idCode}).then((res: any) => {
|
||||||
for (let subItem of tableData.value) {
|
for (let subItem of tableData.value) {
|
||||||
if (subItem.id === selected.value) {
|
if (subItem.id === selected.value) {
|
||||||
if (subItem.idCode == null) {
|
if (subItem.idCode == null) {
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,7 @@ const init = async () => {
|
||||||
query.value.endTime = getEndOfDay(selectedDate.value[1])
|
query.value.endTime = getEndOfDay(selectedDate.value[1])
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
let data: any = await post(API.Charge.Order.ListWithDetail, {query: query.value}, {catch_error: true})
|
let data: any = await post(API.Diagnosis.Base.ChargeQueueList, {query: query.value}, {catch_error: true})
|
||||||
ChargeQueueList.value = data.list
|
ChargeQueueList.value = data.list
|
||||||
} catch {
|
} catch {
|
||||||
ChargeQueueList.value = []
|
ChargeQueueList.value = []
|
||||||
|
|
@ -163,7 +163,7 @@ const tab = (item: any) => {
|
||||||
init()
|
init()
|
||||||
}
|
}
|
||||||
const getTipCount = () => {
|
const getTipCount = () => {
|
||||||
post(API.Statistics.GetQueueCount, {
|
post(API.Statistics.Base.GetQueueCount, {
|
||||||
beginTime: query.value.beginTime,
|
beginTime: query.value.beginTime,
|
||||||
endTime: query.value.endTime
|
endTime: query.value.endTime
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
|
|
|
||||||
|
|
@ -145,13 +145,14 @@ import {useWsStore} from "@/stores/wsStore.ts";
|
||||||
import type {Request, Response} from "@/utils/ws.ts";
|
import type {Request, Response} from "@/utils/ws.ts";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
import {medTypeJson} from "@/assets/config/constants.ts";
|
import {medTypeJson} from "@/assets/config/constants.ts";
|
||||||
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
const show = ref<boolean>(false);
|
const show = ref<boolean>(false);
|
||||||
const orderInfo = ref<any>({});
|
const orderInfo = ref<any>({});
|
||||||
|
|
||||||
const init = (code: any) => {
|
const init = (code: any) => {
|
||||||
show.value = true;
|
show.value = true;
|
||||||
post("charge/getByCode", {code: code}).then((res: any) => {
|
post(API.Charge.Order.GetByCode, {code: code}).then((res: any) => {
|
||||||
orderInfo.value = res;
|
orderInfo.value = res;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
@ -192,16 +193,10 @@ const close = () => {
|
||||||
defineExpose({init})
|
defineExpose({init})
|
||||||
const refund = () => {
|
const refund = () => {
|
||||||
console.log(orderInfo.value)
|
console.log(orderInfo.value)
|
||||||
post("charge/refund", {changeOrderCode: orderInfo.value.code}).then((res: any) => {
|
post(API.Charge.Order.Refund, {changeOrderCode: orderInfo.value.code}).then((res: any) => {
|
||||||
close()
|
close()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// const cancel = () => {
|
|
||||||
// post("retail/cancelOrder",{orderId:orderInfo.value.id}).then((res:any)=>{
|
|
||||||
// close()
|
|
||||||
// })
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
const wsStore = useWsStore();
|
const wsStore = useWsStore();
|
||||||
// 定义 medType 的合法键类型
|
// 定义 medType 的合法键类型
|
||||||
type MedTypeKey = keyof typeof medTypeJson;
|
type MedTypeKey = keyof typeof medTypeJson;
|
||||||
|
|
@ -213,14 +208,14 @@ const print = () => {
|
||||||
let code = orderInfo.value.code;
|
let code = orderInfo.value.code;
|
||||||
|
|
||||||
const printConfig = {} as any;
|
const printConfig = {} as any;
|
||||||
post("common/config/getPrintConfig").then((res: any) => {
|
post(API.Common.Config.GetPrintConfig).then((res: any) => {
|
||||||
printConfig.printName = res.printName
|
printConfig.printName = res.printName
|
||||||
printConfig.pageType = res.pageType
|
printConfig.pageType = res.pageType
|
||||||
if (!printConfig.printName || !printConfig.pageType) {
|
if (!printConfig.printName || !printConfig.pageType) {
|
||||||
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
post("charge/getPrintInfoByCode", {code}).then((res: any) => {
|
post(API.Charge.Order.GetPrintInfoByCode, {code}).then((res: any) => {
|
||||||
res.printerName = printConfig.printName
|
res.printerName = printConfig.printName
|
||||||
res.pageType = printConfig.pageType
|
res.pageType = printConfig.pageType
|
||||||
if (res.chargeSocialPayLog) {
|
if (res.chargeSocialPayLog) {
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,7 @@ import CloseBtn from "@/components/CloseBtn.vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import PaymentDetail from "@/components/charge/RecordsLog/PaymentDetail.vue";
|
import PaymentDetail from "@/components/charge/RecordsLog/PaymentDetail.vue";
|
||||||
|
import {API} from "@/assets/config/API.ts";
|
||||||
|
|
||||||
const socialPayInfo = ref<any>(null)
|
const socialPayInfo = ref<any>(null)
|
||||||
|
|
||||||
|
|
@ -112,27 +113,13 @@ const completeSettlement = () => {
|
||||||
insutype: orderInfo.value.insutype,
|
insutype: orderInfo.value.insutype,
|
||||||
changeOrderCode: orderInfo.value.changeOrderCode,
|
changeOrderCode: orderInfo.value.changeOrderCode,
|
||||||
}
|
}
|
||||||
post("charge/socialRealPay", {...params}).then((res: any) => {
|
post(API.Charge.Social.RealPay, {...params}).then((res: any) => {
|
||||||
orderCompleted()
|
orderCompleted()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const cecalOrder = () => {
|
const cecalOrder = () => {
|
||||||
// ElMessageBox.confirm(
|
|
||||||
// `取消后不能恢复,是否确定取消当前订单?`,
|
|
||||||
// 'Warning',
|
|
||||||
// {
|
|
||||||
// confirmButtonText: '确认取消',
|
|
||||||
// cancelButtonText: '取消',
|
|
||||||
// type: 'warning',
|
|
||||||
// }
|
|
||||||
// ).then(() => {
|
|
||||||
// post("retail/cancelOrder", {orderId: orderInfo.value.orderId}).then((res: any) => {
|
|
||||||
// show.value = false;
|
|
||||||
// emit('orderCancel')
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import {ElMessage, ElNotification} from 'element-plus'
|
import {ElMessage, ElNotification} from 'element-plus'
|
||||||
import {loadConfig} from './config.ts'
|
import {loadConfig} from './config.ts'
|
||||||
import {API} from "@/assets/config/API.ts";
|
|
||||||
let globalConfig: any = null
|
let globalConfig: any = null
|
||||||
let router;
|
let router;
|
||||||
// 添加初始化方法(在应用启动时调用)
|
// 添加初始化方法(在应用启动时调用)
|
||||||
|
|
@ -36,7 +35,7 @@ function post(path: string, data: any = {}, options: any = {}) {
|
||||||
resolve(data.data);
|
resolve(data.data);
|
||||||
}
|
}
|
||||||
else if (data.code == 301) {
|
else if (data.code == 301) {
|
||||||
router.push(API.Common.ManagerUser.Login)
|
router.push('/manager/login')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ const loginCore=async ()=>{
|
||||||
let token:any=await post(API.Common.ManagerUser.Login, {username: username.value, password: password.value},{catch_error: true})
|
let token:any=await post(API.Common.ManagerUser.Login, {username: username.value, password: password.value},{catch_error: true})
|
||||||
localStorage.setItem('token', token)
|
localStorage.setItem('token', token)
|
||||||
try{
|
try{
|
||||||
await post(API.Common.Sign.SignIn, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
|
await post(API.Common.Sign.In, {mac: netWork.value.mac, ip: netWork.value.ip}, {catch_error: true})
|
||||||
}catch (e){
|
}catch (e){
|
||||||
ElMessage.warning("签到失败,将以非签到状态访问本系统")
|
ElMessage.warning("签到失败,将以非签到状态访问本系统")
|
||||||
}finally {
|
}finally {
|
||||||
|
|
|
||||||
|
|
@ -205,7 +205,7 @@ const patientCardRef = ref()
|
||||||
const disabled = ref(false)
|
const disabled = ref(false)
|
||||||
const clickItem = async (item: any, status: any) => {
|
const clickItem = async (item: any, status: any) => {
|
||||||
statusDisabled.value = status
|
statusDisabled.value = status
|
||||||
formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code})
|
formData.value = await post(API.Charge.Order.GetByDiagnosisCode, {diagnosisCode: item.code})
|
||||||
//添加追溯码应采字段
|
//添加追溯码应采字段
|
||||||
for (let i = 0; i < formData.value.goodsDetail.length; i++) {
|
for (let i = 0; i < formData.value.goodsDetail.length; i++) {
|
||||||
let goodsItem = formData.value.goodsDetail[i]
|
let goodsItem = formData.value.goodsDetail[i]
|
||||||
|
|
@ -249,7 +249,7 @@ const orderCompleted = (printReceipt: any) => {
|
||||||
type MedTypeKey = keyof typeof medTypeJson;
|
type MedTypeKey = keyof typeof medTypeJson;
|
||||||
const wsStore = useWsStore()
|
const wsStore = useWsStore()
|
||||||
const printReceiptDo = async () => {
|
const printReceiptDo = async () => {
|
||||||
let chargeOrder: any = await post("charge/getOrderByDiagnosisCode", {
|
let chargeOrder: any = await post(API.Charge.Order.GetByDiagnosisCode, {
|
||||||
diagnosisCode: formData.value.code,
|
diagnosisCode: formData.value.code,
|
||||||
})
|
})
|
||||||
if (!chargeOrder) {
|
if (!chargeOrder) {
|
||||||
|
|
@ -257,14 +257,14 @@ const printReceiptDo = async () => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const printConfig = {} as any;
|
const printConfig = {} as any;
|
||||||
post("common/config/getPrintConfig").then((res: any) => {
|
post(API.Common.Config.GetPrintConfig).then((res: any) => {
|
||||||
printConfig.printName = res.printName
|
printConfig.printName = res.printName
|
||||||
printConfig.pageType = res.pageType
|
printConfig.pageType = res.pageType
|
||||||
if (!printConfig.printName || !printConfig.pageType) {
|
if (!printConfig.printName || !printConfig.pageType) {
|
||||||
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
ElMessage.error("打印机未设置,请先到设置-打印管理中设置")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
post("charge/getPrintInfoByCode", {code: chargeOrder.code}).then((res: any) => {
|
post(API.Charge.Order.GetPrintInfoByCode, {code: chargeOrder.code}).then((res: any) => {
|
||||||
res.printerName = printConfig.printName
|
res.printerName = printConfig.printName
|
||||||
res.pageType = printConfig.pageType
|
res.pageType = printConfig.pageType
|
||||||
if (res.chargeSocialPayLog) {
|
if (res.chargeSocialPayLog) {
|
||||||
|
|
@ -351,14 +351,14 @@ const refund = async () => {
|
||||||
ElMessage.error("请先选择要退费的订单")
|
ElMessage.error("请先选择要退费的订单")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let chargeOrder: any = await post("charge/getOrderByDiagnosisCode", {
|
let chargeOrder: any = await post(API.Charge.Order.GetByDiagnosisCode, {
|
||||||
diagnosisCode: formData.value.code,
|
diagnosisCode: formData.value.code,
|
||||||
})
|
})
|
||||||
if (!chargeOrder) {
|
if (!chargeOrder) {
|
||||||
ElMessage.error("该订单不存在")
|
ElMessage.error("该订单不存在")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await post("charge/refund", {changeOrderCode: chargeOrder.code})
|
await post(API.Charge.Order.Refund, {changeOrderCode: chargeOrder.code})
|
||||||
ElMessage.success("退费成功")
|
ElMessage.success("退费成功")
|
||||||
initFormData()
|
initFormData()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue