Compare commits
No commits in common. "8e73cedda79a638c08884782e3c50312b7cbab03" and "035e715bda5b330ca6693ffa61aabb9606b078d5" have entirely different histories.
8e73cedda7
...
035e715bda
|
|
@ -157,7 +157,7 @@ const goodsSelect = (row: any) => {
|
||||||
row.selectedUnit = row.packagingUnit
|
row.selectedUnit = row.packagingUnit
|
||||||
row.selectedPrice = row.unitPrice
|
row.selectedPrice = row.unitPrice
|
||||||
row.shouldNumber = 1;
|
row.shouldNumber = 1;
|
||||||
row.idCode = row.idCode?.split(",")
|
row.idCode = row.idCode.split(",")
|
||||||
|
|
||||||
|
|
||||||
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
|
if (goodsDetail.value.find((i: any) => i.id == row.id)) {
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,7 @@ let confirm = async () => {
|
||||||
}
|
}
|
||||||
//生产批号
|
//生产批号
|
||||||
for (let i = 0; i < table_list.value.length; i++) {
|
for (let i = 0; i < table_list.value.length; i++) {
|
||||||
|
debugger
|
||||||
if (!table_list.value[i].productionBatchCode) {
|
if (!table_list.value[i].productionBatchCode) {
|
||||||
ElMessage.error('生产批号不能为空')
|
ElMessage.error('生产批号不能为空')
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,7 @@ const close = () => {
|
||||||
}
|
}
|
||||||
const form = ref()
|
const form = ref()
|
||||||
const save = () => {
|
const save = () => {
|
||||||
|
debugger
|
||||||
let data = {
|
let data = {
|
||||||
...edit_data.value,
|
...edit_data.value,
|
||||||
psnNo: socialCard.value?.data?.baseinfo.psn_no,
|
psnNo: socialCard.value?.data?.baseinfo.psn_no,
|
||||||
|
|
|
||||||
|
|
@ -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" @save="charge" :status="formData.status" @openCheckOut ="openCheckoutDetail(formData.goodsDetail)"></TotalPrice>
|
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="!(statusDisabled)&&formData.status==0"></TotalPrice>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -67,7 +67,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<CheckoutDetail ref="checkoutDetailRef" @confirm ="saveAndCharge"></CheckoutDetail>
|
|
||||||
<Settlement
|
<Settlement
|
||||||
ref="settlementRef"
|
ref="settlementRef"
|
||||||
v-model="socialCard"
|
v-model="socialCard"
|
||||||
|
|
@ -93,8 +92,6 @@ 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>({
|
||||||
|
|
@ -113,48 +110,6 @@ 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 = () => {
|
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
|
||||||
|
|
@ -185,17 +140,7 @@ const checkTraceCode = (goodsList: any[]) => {
|
||||||
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)
|
||||||
|
|
@ -215,6 +160,8 @@ const checkTraceCode = (goodsList: any[]) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const orderCompleted = () => {
|
const orderCompleted = () => {
|
||||||
|
getDockerList()
|
||||||
|
list()
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
chargeQueueRef.value?.getOrderList()
|
chargeQueueRef.value?.getOrderList()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue