dev
This commit is contained in:
parent
4638683b01
commit
243d5ced2c
|
|
@ -18,7 +18,7 @@
|
||||||
@selectedCallBack="diagnosisSelect"
|
@selectedCallBack="diagnosisSelect"
|
||||||
ref="diagnosisSearchRef"
|
ref="diagnosisSearchRef"
|
||||||
:show-header="false"
|
:show-header="false"
|
||||||
:disabled="statusDisabled==1||formData.status==1"
|
:disabled="statusDisabled==1"
|
||||||
|
|
||||||
>
|
>
|
||||||
</DiagnosisSearchInput>
|
</DiagnosisSearchInput>
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
@change="handleChange"
|
@change="handleChange"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="statusDisabled==1||formData.status==1"
|
:disabled="formData.status == 1"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in doctorList"
|
v-for="item in doctorList"
|
||||||
|
|
@ -47,11 +47,11 @@
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0"
|
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0"
|
||||||
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></ServiceDetail>
|
@totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0"
|
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0"
|
||||||
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></GoodsDetail>
|
@totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<TotalPrice v-model="formData.totalPrice" @save="charge" :status="formData.status" @openCheckOut ="openCheckoutDetail(formData.goodsDetail)"></TotalPrice>
|
<TotalPrice v-model="formData.totalPrice" @save="charge" :status="formData.status" @openCheckOut ="openCheckoutDetail(formData.goodsDetail)"></TotalPrice>
|
||||||
|
|
@ -139,89 +139,21 @@ const checkTraceCode = (goodsList: any[]) => {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
const checkoutDetailRef = ref()
|
const checkoutDetailRef = ref()
|
||||||
const openCheckoutDetail = (goodsList: any[]) => {
|
const openCheckoutDetail = (goodsList: any[]) => {
|
||||||
if (!goodsList || goodsList.length == 0) {
|
if (!goodsList || goodsList.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '没有商品信息,请先选择需要售卖的商品',
|
message: '没有商品信息,请先选择需要售卖的商品',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
plain: true,
|
plain: true,
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
|
||||||
nextTick(() => {
|
|
||||||
checkoutDetailRef.value.init(goodsList);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
checkoutDetailRef.value.init(goodsList);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
const saveAndCharge = () => {
|
|
||||||
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
|
|
||||||
formData.value.code = res
|
|
||||||
nextTick(() => {
|
|
||||||
settlementRef.value?.init(res)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const diagnosisSearchRef = ref()
|
|
||||||
const diagnosisSearchApi = "social/diagnose/search"
|
|
||||||
const diagnosisShowConfig = [
|
|
||||||
{
|
|
||||||
label: "诊断名称",
|
|
||||||
prop: "name",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "诊断编码",
|
|
||||||
prop: "code",
|
|
||||||
}
|
|
||||||
]
|
|
||||||
const diagnosisSelect = (list: any) => {
|
|
||||||
const diagnosisNames = list.map((item: any) => item.name).join(',')
|
|
||||||
formData.value.diagnosisMedicalRecord.diagnosisDetail = JSON.stringify(list)
|
|
||||||
formData.value.diagnosisMedicalRecord.diagnosisSummary = diagnosisNames
|
|
||||||
}
|
|
||||||
const recordsConsumptionRef = ref<any>("")
|
|
||||||
const patientCardRef = ref()
|
|
||||||
const clickItem = async (item: any, status: any) => {
|
|
||||||
statusDisabled.value = status
|
|
||||||
formData.value = await post('medical/record/getByDiagnosisCode', {diagnosisCode: item.code})
|
|
||||||
//添加追溯码应采字段
|
|
||||||
for (let i =0;i<formData.value.goodsDetail.length;i++){
|
|
||||||
let goodsItem =formData.value.goodsDetail[i]
|
|
||||||
if (goodsItem.packagingUnit == goodsItem.selectedUnit){
|
|
||||||
goodsItem.shouldNumber = goodsItem.selectedNum;
|
|
||||||
}else {
|
|
||||||
goodsItem.shouldNumber = Math.ceil(goodsItem.selectedNum / goodsItem.minPackagingNumber);
|
|
||||||
}
|
|
||||||
goodsItem.idCode = goodsItem.idCode?.split(",")
|
|
||||||
}
|
|
||||||
|
|
||||||
getOrderTotalPrice()
|
|
||||||
nextTick(() => {
|
|
||||||
let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail)
|
|
||||||
let nList = formData.value.diagnosisMedicalRecord.diagnosisSummary.split(',')
|
|
||||||
diagnosisSearchRef.value?.init(list, nList);
|
|
||||||
recordsConsumptionRef.value?.init(formData.value.patientInfo.id);
|
|
||||||
patientCardRef.value?.init(formData.value.registrationId);
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const dockerList = ref<any[]>([])
|
|
||||||
const getDockerList = () => {
|
|
||||||
let query = {
|
|
||||||
role: 1
|
|
||||||
}
|
|
||||||
post('organization/member/search', {query: query}).then((res: any) => {
|
|
||||||
dockerList.value = res
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const orderCompleted = () => {
|
|
||||||
nextTick(() => {
|
|
||||||
chargeQueueRef.value?.getOrderList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
const orderCanceled = () => {
|
|
||||||
nextTick(() => {
|
|
||||||
chargeQueueRef.value?.getOrderList()
|
|
||||||
})
|
|
||||||
const saveAndCharge = () => {
|
const saveAndCharge = () => {
|
||||||
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
|
post('charge/save', {data: {...formData.value, doctorId: doctorId.value}}).then((res: any) => {
|
||||||
formData.value.code = res
|
formData.value.code = res
|
||||||
|
|
@ -252,7 +184,17 @@ const patientCardRef = ref()
|
||||||
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('medical/record/getByDiagnosisCode', {diagnosisCode: item.code})
|
||||||
formData.value.doctorId = formData.value.patientRegistration.organizationDoctorId
|
//添加追溯码应采字段
|
||||||
|
for (let i =0;i<formData.value.goodsDetail.length;i++){
|
||||||
|
let goodsItem =formData.value.goodsDetail[i]
|
||||||
|
if (goodsItem.packagingUnit == goodsItem.selectedUnit){
|
||||||
|
goodsItem.shouldNumber = goodsItem.selectedNum;
|
||||||
|
}else {
|
||||||
|
goodsItem.shouldNumber = Math.ceil(goodsItem.selectedNum / goodsItem.minPackagingNumber);
|
||||||
|
}
|
||||||
|
goodsItem.idCode = goodsItem.idCode?.split(",")
|
||||||
|
}
|
||||||
|
|
||||||
getOrderTotalPrice()
|
getOrderTotalPrice()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail)
|
let list = JSON.parse(formData.value.diagnosisMedicalRecord.diagnosisDetail)
|
||||||
|
|
@ -272,8 +214,6 @@ const getDockerList = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = () => {
|
||||||
getDockerList()
|
|
||||||
list()
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.getOrderList()
|
||||||
})
|
})
|
||||||
|
|
@ -283,46 +223,46 @@ const orderCanceled = () => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.getOrderList()
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDockerList()
|
getDockerList()
|
||||||
list()
|
list()
|
||||||
|
})
|
||||||
|
const getOrderTotalPrice = () => {
|
||||||
|
let totalPrice = 0
|
||||||
|
formData.value.itemDetail?.forEach((item: any) => {
|
||||||
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
})
|
})
|
||||||
const getOrderTotalPrice = () => {
|
formData.value.goodsDetail.forEach((item: any) => {
|
||||||
let totalPrice = 0
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
formData.value.itemDetail?.forEach((item: any) => {
|
})
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
formData.value.preTotalPrice = totalPrice
|
||||||
})
|
formData.value.totalPrice = totalPrice
|
||||||
formData.value.goodsDetail.forEach((item: any) => {
|
}
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
|
||||||
})
|
|
||||||
formData.value.preTotalPrice = totalPrice
|
|
||||||
formData.value.totalPrice = totalPrice
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
expandTrigger: 'hover' as const,
|
expandTrigger: 'hover' as const,
|
||||||
}
|
}
|
||||||
|
|
||||||
const doctorId = ref<any>('')
|
const doctorId = ref<any>('')
|
||||||
const handleChange = (value: any) => {
|
const handleChange = (value: any) => {
|
||||||
doctorId.value = value[value.length - 1]
|
doctorId.value = value[value.length - 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
const cardTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})))
|
const cardTypeList = ref<any>(Object.entries(psnCertTypes).map(([id, name]) => ({id, name})))
|
||||||
const doctorList = ref<any>([])
|
const doctorList = ref<any>([])
|
||||||
const sectionDoctorOption = ref<any>('')
|
const sectionDoctorOption = ref<any>('')
|
||||||
const list = () => {
|
const list = () => {
|
||||||
post(apiConfig.OrganizationMemberSearch, {query: {role: 1}}).then((res: any) => {
|
post(apiConfig.OrganizationMemberSearch, {query: {role: 1}}).then((res: any) => {
|
||||||
doctorList.value = res
|
doctorList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getStatus=(status:any)=>{
|
const getStatus=(status:any)=>{
|
||||||
statusDisabled.value = status
|
console.log(111)
|
||||||
formData.value = {
|
formData.value = {
|
||||||
patientInfo: {},
|
patientInfo: {},
|
||||||
diagnosisMedicalRecord: {},
|
diagnosisMedicalRecord: {},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue