This commit is contained in:
LiJianZhao 2025-05-13 11:31:26 +08:00
parent 1aabf6a82a
commit 31473b7f44
4 changed files with 41 additions and 10 deletions

View File

@ -110,6 +110,14 @@ const checkTraceCode = () => {
const inputIdCode = ref()
const associationIdCodeRef = ref()
const openAssociationIdCode = () => {
if(!inputIdCode.value || inputIdCode.value.length <20){
ElMessage({
message: '追溯码长度不足20位',
type: 'info',
})
return
}
if (addTraceAbilityCode()) {
return
}
@ -136,6 +144,13 @@ const addTraceabilityCodeDo = (item: any, inputStr: any) => {
item.traceAbilityCodeList = []
}
let traceAbilityCodeListList = item.traceAbilityCodeList.length
if(!inputStr || inputStr.length <20){
ElMessage({
message: '追溯码长度不足20位',
type: 'info',
})
return
}
if (traceAbilityCodeListList == item.shouldNumber) {
ElMessage({

View File

@ -68,11 +68,13 @@ const show = ref(false)
const printReceipt = ref(false);
const payType = ref(null);
const retailOrder = ref<any>(null);
const init = (code: any) => {
post('charge/getByCode', {code: code}).then((res: any) => {
retailOrder.value = res;
const init = async (code: any, psnNo: any) => {
retailOrder.value = await post("charge/getByCode", {code: code});
if (psnNo != null){
socialCard.value = await post("social/person/getSocialInfoByPsnNo", {psnNo: psnNo});
}
show.value = true;
})
}
defineExpose({init})

View File

@ -18,6 +18,7 @@
<script setup lang="ts">
import {ref, unref, watch} from "vue";
import {post} from "@/utils/request.ts";
import {ElMessage} from "element-plus";
const keyword = ref("");
const popoverRef = ref();
@ -81,10 +82,23 @@ const changeInput = (inputStr: string) => {
}
const emit = defineEmits(['selectedCallBack', 'focus'])
const clickRow = (row: any) => {
if (selectList.value && selectList.value.length >=3){
ElMessage({
message: '诊断最多三个',
type: 'info',
})
return
}
if (selectList.value.some((item: any) => item.id === row.id)) {
ElMessage({
message: '诊断已存在',
type: 'info',
})
return
}
selectList.value.push(row)
nameList.value.push(row.name)
keyword.value = nameList.value.join(",") + ","
searchList.value = []
popoverRef.value.hide()
}

View File

@ -54,7 +54,7 @@
@totalPriceChange="getOrderTotalPrice" :statusDisabled="statusDisabled==1"></GoodsDetail>
</div>
<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,formData.patientRegistration.psnNo)"></TotalPrice>
</div>
</el-scrollbar>
</div>
@ -120,7 +120,7 @@ const charge = () => {
saveAndCharge()
} else {
//
openCheckoutDetail(formData.value.goodsDetail)
openCheckoutDetail(formData.value.goodsDetail,formData.value.patientRegistration.psnNo)
}
}
@ -141,7 +141,7 @@ const checkTraceCode = (goodsList: any[]) => {
}
const checkoutDetailRef = ref()
const openCheckoutDetail = (goodsList: any[]) => {
const openCheckoutDetail = (goodsList: any[],psnNo:string) => {
if (!goodsList || goodsList.length == 0) {
ElMessage({
message: '没有商品信息,请先选择需要售卖的商品',
@ -151,7 +151,7 @@ const checkTraceCode = (goodsList: any[]) => {
return
}
nextTick(() => {
checkoutDetailRef.value.init(goodsList);
checkoutDetailRef.value.init(goodsList,psnNo);
})
}