Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web

# Conflicts:
#	src/views/charge/index.vue
This commit is contained in:
LiJianZhao 2025-05-12 17:05:40 +08:00
commit 8e73cedda7
3 changed files with 70 additions and 34 deletions

View File

@ -25,9 +25,10 @@ const handleSelect = (item: any) => {
unitPrice: goods.unitPrice,
packagingUnit: goods.packagingUnit,
minPackagingUnit: goods.minPackagingUnit,
idCode: (goods.idCode&&goods.idCode != "")?goods.idCode.split(","):[],
goodId: goods.id,
name: goods.name,
traceabilityCodeList:[],
wholeNumber: 0,
purchaseUnitPrice: goods.purchaseUnitPrice,
disassemblyPrice : goods.disassemblyPrice

View File

@ -133,8 +133,19 @@
size="small" style="width: 100px;"/>
</template>
</el-table-column>
<el-table-column label="操作" width="100">
<el-table-column label="商品追溯码" width="150">
<template #default="scope">
<el-input
v-model="scope.row.traceabilityCode"
placeholder="商品追溯码"
style="width: 100px"
size="small"/>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<template #default="scope">
<el-button size="small" @click="openCheckoutDetail(scope.row)" type="danger" plain>溯源码</el-button>
<el-button size="small" @click="removeTableRow(scope.row)" type="danger" plain>移除</el-button>
</template>
</el-table-column>
@ -157,7 +168,7 @@
<!-- <Mask :is-show="is_add" :top="100">-->
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
<!-- </Mask>-->
<CheckoutDetail ref="checkoutDetailRef" @confirm="confirmTrace"></CheckoutDetail>
</template>
<script lang="ts" setup>
@ -167,9 +178,11 @@ import Edit from "@/components/inventory/goods/Edit.vue";
import Mask from "@/components/common/Mask.vue";
import {ElMessage} from "element-plus";
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
import {Search} from "@element-plus/icons-vue";
const orderForm = ref()
const checkoutDetailRef = ref<any>(false);
const formRules = ref({
shippingCode: [{required: true, message: '请输入货单号', trigger: 'blur'}],
purchaseDate: [{required: true, message: '请选择采购日期', trigger: 'change'}],
@ -264,6 +277,7 @@ function getFormattedDate() {
}
let confirm = async () => {
console.log('table_list.value++++++++++++++',table_list.value)
//
try {
await orderForm.value.validate()
@ -358,6 +372,26 @@ const init = () => {
getSupplierList()
getUserInfo()
}
//
const openCheckoutDetail = (row: any) => {
let goodlist = []
goodlist.push(row)
nextTick(() => {
checkoutDetailRef.value.init(goodlist);
})
}
//
const confirmTrace = (data: any) => {
let index = findIndexForTableList(data[0].goodId);
table_list.value[index] = data[0]
checkoutDetailRef.value.close();
// table_list.value.forEach((item: any) => {
// if(item.goodId === data[0].goodId){
// item = data[0]
// table_list.value.
// }
// })
}
defineExpose({init})
</script>
<style scoped lang="scss">

View File

@ -88,6 +88,8 @@ import DiagnosisSearchInput from "@/components/outpatient/DiagnosisSearchInput.v
import Settlement from "@/components/charge/Settlement.vue";
import TotalPrice from "@/components/charge/TotalPrice.vue";
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 PatientCard from "@/components/charge/PatientCard.vue";
import {apiConfig} from "@/assets/config/apiConfig.ts";
@ -232,10 +234,10 @@ const checkTraceCode = (goodsList: any[]) => {
const getOrderTotalPrice = () => {
let totalPrice = 0
formData.value.itemDetail?.forEach((item: any) => {
totalPrice += (item.selectedPrice*100 * item.selectedNum*100)/10000
totalPrice += item.selectedPrice * item.selectedNum
})
formData.value.goodsDetail.forEach((item: any) => {
totalPrice += (item.selectedPrice*100 * item.selectedNum*100)/10000
totalPrice += item.selectedPrice * item.selectedNum
})
formData.value.preTotalPrice = totalPrice
formData.value.totalPrice = totalPrice
@ -259,7 +261,6 @@ const checkTraceCode = (goodsList: any[]) => {
doctorList.value = res
})
}
const getStatus=(status:any)=>{
statusDisabled.value = status
formData.value = {