Compare commits
No commits in common. "035e715bda5b330ca6693ffa61aabb9606b078d5" and "7facb0adc2f1e9fe02c3ae05ab348227d6cd2ca2" have entirely different histories.
035e715bda
...
7facb0adc2
|
|
@ -54,7 +54,7 @@
|
||||||
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></GoodsDetail>
|
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></GoodsDetail>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="!(statusDisabled)&&formData.status==0"></TotalPrice>
|
<TotalPrice v-model="formData.totalPrice" @save="charge" :status="formData.status" @openCheckOut ="openCheckoutDetail(formData.goodsDetail)"></TotalPrice>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -67,6 +67,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<CheckoutDetail ref="checkoutDetailRef" @confirm ="saveAndCharge"></CheckoutDetail>
|
||||||
<Settlement
|
<Settlement
|
||||||
ref="settlementRef"
|
ref="settlementRef"
|
||||||
v-model="socialCard"
|
v-model="socialCard"
|
||||||
|
|
@ -87,11 +88,11 @@ import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.v
|
||||||
import Settlement from "@/components/charge/Settlement.vue";
|
import Settlement from "@/components/charge/Settlement.vue";
|
||||||
import TotalPrice from "@/components/charge/TotalPrice.vue";
|
import TotalPrice from "@/components/charge/TotalPrice.vue";
|
||||||
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
|
import psnCertTypes from "@/assets/config/directory/psnCertTypes.json"
|
||||||
import {getKey} from "@/utils/discrotyUtil.ts";
|
|
||||||
import antys from "@/assets/config/directory/antys.json"
|
|
||||||
import RecordsLog from "@/components/charge/RecordsLog.vue";
|
import RecordsLog from "@/components/charge/RecordsLog.vue";
|
||||||
import PatientCard from "@/components/charge/PatientCard.vue";
|
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 {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const socialCard = ref<any>({payInfo: {}})
|
const socialCard = ref<any>({payInfo: {}})
|
||||||
const formData = ref<any>({
|
const formData = ref<any>({
|
||||||
|
|
@ -110,6 +111,116 @@ const delDraft = () => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const settlementRef = ref()
|
const settlementRef = ref()
|
||||||
|
const charge = () => {
|
||||||
|
|
||||||
|
if (checkTraceCode(formData.value.goodsDetail)) {
|
||||||
|
//保存订单
|
||||||
|
saveAndCharge()
|
||||||
|
} else {
|
||||||
|
//打开追溯码详情页
|
||||||
|
openCheckoutDetail(formData.value.goodsDetail)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const checkTraceCode = (goodsList: any[]) => {
|
||||||
|
|
||||||
|
for (let i = 0; i < goodsList.length; i++) {
|
||||||
|
const item = goodsList[i];
|
||||||
|
if (!item.traceAbilityCodeList || item.shouldNumber != item.traceAbilityCodeList.length) {
|
||||||
|
ElMessage({
|
||||||
|
message: `${item.name}的追溯码采集未完成`,
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
const checkoutDetailRef = ref()
|
||||||
|
const openCheckoutDetail = (goodsList: any[]) => {
|
||||||
|
if (!goodsList || goodsList.length == 0) {
|
||||||
|
ElMessage({
|
||||||
|
message: '没有商品信息,请先选择需要售卖的商品',
|
||||||
|
type: 'info',
|
||||||
|
plain: true,
|
||||||
|
});
|
||||||
|
return
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
@ -181,10 +292,10 @@ onMounted(() => {
|
||||||
const getOrderTotalPrice = () => {
|
const getOrderTotalPrice = () => {
|
||||||
let totalPrice = 0
|
let totalPrice = 0
|
||||||
formData.value.itemDetail?.forEach((item: any) => {
|
formData.value.itemDetail?.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += (item.selectedPrice*100 * item.selectedNum*100)/10000
|
||||||
})
|
})
|
||||||
formData.value.goodsDetail.forEach((item: any) => {
|
formData.value.goodsDetail.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += (item.selectedPrice*100 * item.selectedNum*100)/10000
|
||||||
})
|
})
|
||||||
formData.value.preTotalPrice = totalPrice
|
formData.value.preTotalPrice = totalPrice
|
||||||
formData.value.totalPrice = totalPrice
|
formData.value.totalPrice = totalPrice
|
||||||
|
|
@ -208,6 +319,7 @@ const list = () => {
|
||||||
doctorList.value = res
|
doctorList.value = res
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const getStatus=(status:any)=>{
|
const getStatus=(status:any)=>{
|
||||||
statusDisabled.value = status
|
statusDisabled.value = status
|
||||||
formData.value = {
|
formData.value = {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue