diff --git a/src/views/health/medicineStockIn/index.vue b/src/views/health/medicineStockIn/index.vue index 99085f9..8b47801 100644 --- a/src/views/health/medicineStockIn/index.vue +++ b/src/views/health/medicineStockIn/index.vue @@ -74,21 +74,31 @@ - - - + + + + + + + + + - - - + + + + - - + + + + + @@ -103,17 +113,6 @@ - - - - - - - - - - - @@ -123,12 +122,6 @@ - - - - - - @@ -139,6 +132,12 @@ + + + + + + @@ -226,6 +225,23 @@ const handleOperate = (operate, row) => { const { queryParams, form, rules, queryMedicineParams } = toRefs(data) +const handleQuantityChange = (val) => { + getMedicineBasic(form.value.medicineId).then((response) => { + form.value.totalCount = response.data.specifications * val + }) +} + +const handleMedicineChange = (medicineId) => { + getMedicineBasic(medicineId).then((response) => { + form.value.packageUnit = response.data.packageUnit + form.value.unit = response.data.unit + form.value.totalCount = response.data.specifications + if (form.value.quantity != null) { + form.value.totalCount = response.data.specifications * form.value.quantity + } + }) +} + /** 查询药品入库清单列表 */ function getList() { loading.value = true @@ -254,7 +270,7 @@ function reset() { form.value = { id: null, medicineId: null, - quantity: null, + quantity: 1, productionDate: null, expiringDate: null, purchaseDate: null,