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