Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
This commit is contained in:
commit
38b905400e
|
|
@ -92,6 +92,7 @@ const saveRetail = () => {
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
close()
|
||||||
emit('confirm')
|
emit('confirm')
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
@ -179,7 +180,6 @@ const addTraceAbilityCodeHandler = (item: any, code: any) => {
|
||||||
addTraceabilityCodeDo(item, code)
|
addTraceabilityCodeDo(item, code)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.header {
|
.header {
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,7 @@ const completeSettlement = () => {
|
||||||
changeOrderCode: orderInfo.value.changeOrderCode,
|
changeOrderCode: orderInfo.value.changeOrderCode,
|
||||||
}
|
}
|
||||||
post("charge/socialRealPay", {...params}).then((res: any) => {
|
post("charge/socialRealPay", {...params}).then((res: any) => {
|
||||||
show.value = false;
|
orderCompleted()
|
||||||
emit('orderCompleted')
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,6 +147,7 @@ const openPsnPayment = (payInfo: any, orderInfo: any) => {
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = () => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
emit('orderCompleted')
|
||||||
}
|
}
|
||||||
const orderCanceled = () => {
|
const orderCanceled = () => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ const socialCard = ref<any>({
|
||||||
});
|
});
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const printReceipt = ref(false);
|
const printReceipt = ref(true);
|
||||||
const payType = ref(null);
|
const payType = ref(null);
|
||||||
const retailOrder = ref<any>(null);
|
const retailOrder = ref<any>(null);
|
||||||
const close = () => {
|
const close = () => {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,11 @@ const openSettlement =()=>{
|
||||||
<div class="btn-group" v-if="status">
|
<div class="btn-group" v-if="status">
|
||||||
<span class="default-btn" @click="openCheckOut">追溯码</span>
|
<span class="default-btn" @click="openCheckOut">追溯码</span>
|
||||||
<span class="default-btn" @click="openSettlement" style="margin-left: 24px">收费</span>
|
<span class="default-btn" @click="openSettlement" style="margin-left: 24px">收费</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="btn-group" v-else>
|
||||||
|
<span class="default-btn" @click="">打印</span>
|
||||||
|
<span class="default-btn" @click="" style="margin-left: 24px">退款</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Panel>
|
</Panel>
|
||||||
|
|
|
||||||
|
|
@ -414,12 +414,20 @@ const removeTableRow = (row: any) => {
|
||||||
table_list.value.splice(index, 1);
|
table_list.value.splice(index, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const init = () => {
|
const init = (orderInfo: any,goodList: any) => {
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
getSupplierList()
|
getSupplierList()
|
||||||
getManagerUserList()
|
getManagerUserList()
|
||||||
getUserInfo()
|
getUserInfo()
|
||||||
|
|
||||||
|
if (orderInfo){
|
||||||
|
inventory_order_data.value = orderInfo
|
||||||
|
}
|
||||||
|
if (goodList){
|
||||||
|
table_list.value = goodList
|
||||||
|
}
|
||||||
|
getTotalPrice()
|
||||||
|
|
||||||
}
|
}
|
||||||
const managerUserList: any = ref([])
|
const managerUserList: any = ref([])
|
||||||
const getManagerUserList = () => {
|
const getManagerUserList = () => {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<Mask :width="400" :height="240" :is-show="isShow" @close="isShow=false" :show-footer="true" title="选择模板范围">
|
<Mask :width="400" :height="240" :is-show="isShow" @close="close" :show-footer="true" title="选择模板范围">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<el-form style="height: 100%">
|
<el-form style="height: 100%">
|
||||||
|
|
@ -13,12 +13,14 @@
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<div class="default-btn" @click="isShow=false">上传数据</div>
|
<input ref="fileInput" type="file" @change="handleFileChange" style="display: none"/>
|
||||||
|
<div class="default-btn" @click="selectFile" style="margin-left: 24px">上传数据</div>
|
||||||
<div class="default-btn" @click="toExcel" style="margin-left: 24px">下载模板</div>
|
<div class="default-btn" @click="toExcel" style="margin-left: 24px">下载模板</div>
|
||||||
<div class="default-btn" @click="isShow=false" style="margin-left: 24px">取消</div>
|
<div class="default-btn" @click="close" style="margin-left: 24px">取消</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
@ -26,9 +28,13 @@ import Mask from "@/components/common/Mask.vue";
|
||||||
import {defineModel, onMounted, ref} from "vue";
|
import {defineModel, onMounted, ref} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import {loadConfig} from "@/utils/config.ts";
|
import {loadConfig} from "@/utils/config.ts";
|
||||||
|
import {Plus} from "@element-plus/icons-vue";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
const isShow = defineModel()
|
const isShow = defineModel()
|
||||||
const props = {multiple: true}
|
const props = {multiple: true}
|
||||||
|
const baseUrl = ref("")
|
||||||
|
const file = ref([])
|
||||||
|
|
||||||
interface CateOption {
|
interface CateOption {
|
||||||
value: string;
|
value: string;
|
||||||
|
|
@ -44,18 +50,19 @@ const typeList = {
|
||||||
}
|
}
|
||||||
const cateIds = ref<number[]>([]);
|
const cateIds = ref<number[]>([]);
|
||||||
const allCateList = ref<CateOption[]>([]);
|
const allCateList = ref<CateOption[]>([]);
|
||||||
const toExcel=()=>{
|
const toExcel = () => {
|
||||||
let cateIdsVal=cateIds.value
|
let cateIdsVal = cateIds.value
|
||||||
let cateIdList=[]
|
let cateIdList = []
|
||||||
for(let i=0;i<cateIdsVal.length;i++){
|
for (let i = 0; i < cateIdsVal.length; i++) {
|
||||||
let item:any=cateIdsVal[i];
|
let item: any = cateIdsVal[i];
|
||||||
if(item.length>1){
|
if (item.length > 1) {
|
||||||
cateIdList.push(item[1])
|
cateIdList.push(item[1])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post("inventory/order/toExcel",{cateIdList:cateIdList}).then((token:any)=>{
|
post("inventory/order/toExcel", {cateIdList: cateIdList}).then((token: any) => {
|
||||||
loadConfig().then((res: any) => {
|
loadConfig().then((res: any) => {
|
||||||
window.open(res.base_url+"file/download/"+token)
|
console.log(res.base_url + "file/download/" + token)
|
||||||
|
window.open(res.base_url + "file/download/" + token)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
@ -91,9 +98,54 @@ const uploadCateIds = () => {
|
||||||
})
|
})
|
||||||
console.log(ids)
|
console.log(ids)
|
||||||
}
|
}
|
||||||
|
const fromExcel = () => {
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getAllCate()
|
getAllCate()
|
||||||
|
loadConfig().then((res: any) => {
|
||||||
|
baseUrl.value = res.base_url
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
const selectedFile = ref(null);
|
||||||
|
|
||||||
|
const handleFileChange = (event: any) => {
|
||||||
|
selectedFile.value = event.target.files[0];
|
||||||
|
uploadFile();
|
||||||
|
};
|
||||||
|
|
||||||
|
const fileInput = ref<HTMLInputElement | null>(null); // 声明或已通过 ref 获取
|
||||||
|
|
||||||
|
const selectFile = () => {
|
||||||
|
if (fileInput.value) {
|
||||||
|
fileInput.value.click(); // 触发文件选择框弹出
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const emit = defineEmits(['initAddOrderData'])
|
||||||
|
const uploadFile = async () => {
|
||||||
|
if (!selectedFile.value) {
|
||||||
|
alert('请先选择一个文件');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('file', selectedFile.value);
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await axios.post(baseUrl.value + 'file/uploadToTemp', formData, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
let excelData = await post("inventory/order/fromExcel", {token: response.data})
|
||||||
|
close()
|
||||||
|
emit('initAddOrderData',excelData)
|
||||||
|
} catch (error) {
|
||||||
|
console.error('上传失败:', error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const close = () => {
|
||||||
|
isShow.value = false
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
import Panel from "@/components/common/Panel.vue";
|
import Panel from "@/components/common/Panel.vue";
|
||||||
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
import ChargeQueue from "@/components/charge/ChargeQueue.vue";
|
||||||
import {nextTick, onMounted, ref} from "vue";
|
import {nextTick, onMounted, onUnmounted, ref} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
import ServiceDetail from "@/components/common/service/ServiceDetail.vue";
|
||||||
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
import GoodsDetail from "@/components/common/goods/GoodsDetail.vue";
|
||||||
|
|
@ -95,6 +95,9 @@ import PatientCard from "@/components/charge/PatientCard.vue";
|
||||||
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
import {apiConfig} from "@/assets/config/apiConfig.ts";
|
||||||
import CheckoutDetail from "@/components/charge/CheckoutDetail.vue";
|
import CheckoutDetail from "@/components/charge/CheckoutDetail.vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import {medTypeJson} from "@/assets/config/constants.ts";
|
||||||
|
import {useWsStore} from "@/stores/wsStore.ts";
|
||||||
|
import type {Request, Response} from "@/utils/ws.ts";
|
||||||
|
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({
|
||||||
patientInfo: {},
|
patientInfo: {},
|
||||||
|
|
@ -103,6 +106,16 @@ const formData = ref<any>({
|
||||||
itemDetail: [],
|
itemDetail: [],
|
||||||
patientRegistration: {}
|
patientRegistration: {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const initFormData = () => {
|
||||||
|
formData.value = {
|
||||||
|
patientInfo: {},
|
||||||
|
diagnosisMedicalRecord: {},
|
||||||
|
goodsDetail: [],
|
||||||
|
itemDetail: [],
|
||||||
|
patientRegistration: {}
|
||||||
|
}
|
||||||
|
}
|
||||||
const statusDisabled = ref(0)
|
const statusDisabled = ref(0)
|
||||||
const diagnosisKeyword = ref("")
|
const diagnosisKeyword = ref("")
|
||||||
const chargeQueueRef = ref()
|
const chargeQueueRef = ref()
|
||||||
|
|
@ -212,11 +225,65 @@ const getDockerList = () => {
|
||||||
dockerList.value = res
|
dockerList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = (printReceipt: any) => {
|
||||||
|
if (printReceipt) {
|
||||||
|
//打印小票
|
||||||
|
printReceiptDo()
|
||||||
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.init()
|
||||||
|
})
|
||||||
|
initFormData()
|
||||||
|
}
|
||||||
|
|
||||||
|
type MedTypeKey = keyof typeof medTypeJson;
|
||||||
|
const wsStore = useWsStore()
|
||||||
|
const printReceiptDo = () => {
|
||||||
|
if (!formData.value.code) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let code = formData.value.code;
|
||||||
|
|
||||||
|
const printConfig = {} as any;
|
||||||
|
post("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) => {
|
||||||
|
res.printerName = printConfig.printName
|
||||||
|
res.pageType = printConfig.pageType
|
||||||
|
if (res.chargeSocialPayLog) {
|
||||||
|
res.chargeSocialPayLog.medTypeStr = medTypeJson[res.chargeSocialPayLog.medType as MedTypeKey];
|
||||||
|
}
|
||||||
|
console.log(res)
|
||||||
|
wsStore.sendMessage({
|
||||||
|
type: "PrintReceipt",
|
||||||
|
config: null,
|
||||||
|
data: res
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let request: Request = {
|
||||||
|
type: "getPrintList",
|
||||||
|
config: null,
|
||||||
|
data: null
|
||||||
|
}
|
||||||
|
wsStore.sendMessage(request);
|
||||||
|
const reciceMessage = (response: Response) => {
|
||||||
|
}
|
||||||
|
onMounted(async () => {
|
||||||
|
wsStore.setMessageCallback(reciceMessage)
|
||||||
|
})
|
||||||
|
onUnmounted(() => {
|
||||||
|
wsStore.removeAllMessageCallback()
|
||||||
|
})
|
||||||
|
|
||||||
const orderCanceled = () => {
|
const orderCanceled = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.getOrderList()
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@
|
||||||
</div>
|
</div>
|
||||||
<AddOrder ref="addOrderRef" @close="closeAddOrder"/>
|
<AddOrder ref="addOrderRef" @close="closeAddOrder"/>
|
||||||
<EditOrder ref="editOrderRef" @close="closeEditOrder" @updateOrderDetail="init"/>
|
<EditOrder ref="editOrderRef" @close="closeEditOrder" @updateOrderDetail="init"/>
|
||||||
<UpLoad v-model="show"></UpLoad>
|
<UpLoad v-model="show" @initAddOrderData =initAddOrderData></UpLoad>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ onMounted(() => {
|
||||||
const addOrderRef = ref<any>('')
|
const addOrderRef = ref<any>('')
|
||||||
const openAdd = () => {
|
const openAdd = () => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
addOrderRef.value.init()
|
addOrderRef.value.init(null)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const editOrderRef = ref<any>('')
|
const editOrderRef = ref<any>('')
|
||||||
|
|
@ -249,6 +249,36 @@ const show = ref(false)
|
||||||
const openUpload= ()=>{
|
const openUpload= ()=>{
|
||||||
show.value=true
|
show.value=true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const initAddOrderData = (initData:any)=>{
|
||||||
|
const data = {
|
||||||
|
invoiceCode:initData.tag.invoice_code,
|
||||||
|
shippingCode:initData.tag.shipping_code,
|
||||||
|
remark:initData.tag.remark,
|
||||||
|
purchaseDate: initData.tag.purchase_date,
|
||||||
|
}
|
||||||
|
let goodsList = []
|
||||||
|
for (let i=0;i<initData.list.length;i++){
|
||||||
|
let item = initData.list[i]
|
||||||
|
let goodsInfo = {
|
||||||
|
productionBatchCode:item.info.production_batch_code,
|
||||||
|
wholeNumber:item.info.whole_number,
|
||||||
|
productionDate:item.info.production_date,
|
||||||
|
expiryDate:item.info.expiry_date,
|
||||||
|
purchaseUnitPrice:item.info.purchase_unit_price,
|
||||||
|
goodId:item.id,
|
||||||
|
name:item.goods.name,
|
||||||
|
packagingUnit:item.goods.packagingUnit,
|
||||||
|
unitPrice:item.goods.unitPrice,
|
||||||
|
}
|
||||||
|
goodsList.push(goodsInfo)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
nextTick(()=>{
|
||||||
|
addOrderRef.value?.init(data,goodsList)
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@use "@/assets/scss/base.scss";
|
@use "@/assets/scss/base.scss";
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="save">保存</el-button>
|
<el-button type="primary" @click="save">保存</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue