dev
This commit is contained in:
parent
1aabf6a82a
commit
31473b7f44
|
|
@ -110,6 +110,14 @@ const checkTraceCode = () => {
|
||||||
const inputIdCode = ref()
|
const inputIdCode = ref()
|
||||||
const associationIdCodeRef = ref()
|
const associationIdCodeRef = ref()
|
||||||
const openAssociationIdCode = () => {
|
const openAssociationIdCode = () => {
|
||||||
|
if(!inputIdCode.value || inputIdCode.value.length <20){
|
||||||
|
ElMessage({
|
||||||
|
message: '追溯码长度不足20位',
|
||||||
|
type: 'info',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (addTraceAbilityCode()) {
|
if (addTraceAbilityCode()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
@ -136,6 +144,13 @@ const addTraceabilityCodeDo = (item: any, inputStr: any) => {
|
||||||
item.traceAbilityCodeList = []
|
item.traceAbilityCodeList = []
|
||||||
}
|
}
|
||||||
let traceAbilityCodeListList = item.traceAbilityCodeList.length
|
let traceAbilityCodeListList = item.traceAbilityCodeList.length
|
||||||
|
if(!inputStr || inputStr.length <20){
|
||||||
|
ElMessage({
|
||||||
|
message: '追溯码长度不足20位',
|
||||||
|
type: 'info',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (traceAbilityCodeListList == item.shouldNumber) {
|
if (traceAbilityCodeListList == item.shouldNumber) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
|
|
|
||||||
|
|
@ -68,11 +68,13 @@ const show = ref(false)
|
||||||
const printReceipt = ref(false);
|
const printReceipt = ref(false);
|
||||||
const payType = ref(null);
|
const payType = ref(null);
|
||||||
const retailOrder = ref<any>(null);
|
const retailOrder = ref<any>(null);
|
||||||
const init = (code: any) => {
|
const init = async (code: any, psnNo: any) => {
|
||||||
post('charge/getByCode', {code: code}).then((res: any) => {
|
retailOrder.value = await post("charge/getByCode", {code: code});
|
||||||
retailOrder.value = res;
|
if (psnNo != null){
|
||||||
show.value = true;
|
socialCard.value = await post("social/person/getSocialInfoByPsnNo", {psnNo: psnNo});
|
||||||
})
|
}
|
||||||
|
|
||||||
|
show.value = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
defineExpose({init})
|
defineExpose({init})
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {ref, unref, watch} from "vue";
|
import {ref, unref, watch} from "vue";
|
||||||
import {post} from "@/utils/request.ts";
|
import {post} from "@/utils/request.ts";
|
||||||
|
import {ElMessage} from "element-plus";
|
||||||
|
|
||||||
const keyword = ref("");
|
const keyword = ref("");
|
||||||
const popoverRef = ref();
|
const popoverRef = ref();
|
||||||
|
|
@ -81,10 +82,23 @@ const changeInput = (inputStr: string) => {
|
||||||
}
|
}
|
||||||
const emit = defineEmits(['selectedCallBack', 'focus'])
|
const emit = defineEmits(['selectedCallBack', 'focus'])
|
||||||
const clickRow = (row: any) => {
|
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)
|
selectList.value.push(row)
|
||||||
nameList.value.push(row.name)
|
nameList.value.push(row.name)
|
||||||
keyword.value = nameList.value.join(",") + ","
|
keyword.value = nameList.value.join(",") + ","
|
||||||
|
|
||||||
searchList.value = []
|
searchList.value = []
|
||||||
popoverRef.value.hide()
|
popoverRef.value.hide()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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" @save="charge" :status="formData.status" @openCheckOut ="openCheckoutDetail(formData.goodsDetail,formData.patientRegistration.psnNo)"></TotalPrice>
|
||||||
</div>
|
</div>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -120,7 +120,7 @@ const charge = () => {
|
||||||
saveAndCharge()
|
saveAndCharge()
|
||||||
} else {
|
} 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 checkoutDetailRef = ref()
|
||||||
const openCheckoutDetail = (goodsList: any[]) => {
|
const openCheckoutDetail = (goodsList: any[],psnNo:string) => {
|
||||||
if (!goodsList || goodsList.length == 0) {
|
if (!goodsList || goodsList.length == 0) {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '没有商品信息,请先选择需要售卖的商品',
|
message: '没有商品信息,请先选择需要售卖的商品',
|
||||||
|
|
@ -151,7 +151,7 @@ const checkTraceCode = (goodsList: any[]) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
checkoutDetailRef.value.init(goodsList);
|
checkoutDetailRef.value.init(goodsList,psnNo);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue