fix: 健康管理系统,自测问题修复及功能优化完善。

This commit is contained in:
tianyongbao
2024-12-20 15:48:05 +08:00
parent 775ab0b222
commit 0f75162f6b
24 changed files with 3200 additions and 171 deletions

View File

@@ -26,11 +26,11 @@
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="入库数量" prop="quantity" required >
<u--input v-model="form.quantity" placeholder="请填写入库数量"
<u--input v-model="form.quantity" @change="handleQuantityChange" placeholder="请填写入库数量"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="规格总数" prop="totalCount" required >
<u--input v-model="form.totalCount" placeholder="请填写规格总数"
<u--input v-model="form.totalCount" readonly placeholder="请填写规格总数"
inputAlign="right" border="none"></u--input>
</u-form-item>
<u-form-item label="使用状态" prop="stateName" required @click="handleState">
@@ -257,6 +257,14 @@ function dictStr(val, arr) {
return str
}
const handleQuantityChange = (val) => {
if(form.value.medicineId!=null){
getMedicineBasic(form.value.medicineId).then((response) => {
form.value.totalCount = response.data.specifications * val
})
}
}
function selectProductionDate() {
productionDateShow.value = true
proxy.$refs['productionDateRef'].innerValue = new Date().getTime()
@@ -373,11 +381,16 @@ function handleMedicalConfirm(e) {
form.value.unitName=dictStr( response.data.unit, result.data)
})
form.value.packageUnit = response.data.packageUnit
form.value.totalCount = response.data.specifications
if (form.value.quantity != null) {
form.value.totalCount = response.data.specifications * form.value.quantity
}
// 药品来源
getDicts('package_unit').then(result => {
form.value.packageUnitName=dictStr( response.data.packageUnit, result.data)
})
})
showMedical.value = false

View File

@@ -61,7 +61,7 @@
:closeOnClickOverlay="true"
:show="timeShow"
v-model="time"
mode="datetime"
mode="date"
@close="openOrCloseDate"
@cancel="openOrCloseDate"
@confirm="confirm"
@@ -104,15 +104,15 @@
</view>
<view class="item-row">
<text class="row-label">规格总数</text>
<text class="row-value">{{ item.totalCount }}</text>
<text class="row-value">{{ item.totalCount +dictStr(item.unit, unitList)}}</text>
</view>
<view class="item-row">
<!-- <view class="item-row">
<text class="row-label">规格单位</text>
<text class="row-value">{{ dictStr(item.unit, unitList) }}</text>
</view>
</view> -->
<view class="item-row">
<text class="row-label">剩余数量</text>
<text class="row-value">{{ item.leftCount }}</text>
<text class="row-value">{{ item.leftCount +dictStr(item.unit, unitList)}}</text>
</view>
<view class="item-row">
<text class="row-label">备注</text>