fix(Feed Views): 页面样式修改

修改了两个页面的查询显示错误
This commit is contained in:
HashMap 2025-10-19 16:24:08 +08:00
parent fa3629fbe7
commit 476daa4760
2 changed files with 26 additions and 20 deletions

View File

@ -2,7 +2,10 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="配方编码" prop="formulaId">
<el-input v-model="queryParams.formulaId" placeholder="请输入配方编码" clearable @keyup.enter="handleQuery" />
<!-- <el-input v-model="queryParams.formulaId" placeholder="请输入配方编码" clearable @keyup.enter="handleQuery" /> -->
<el-select v-model="queryParams.formulaId" filterable placeholder="请选择配方编码" style="width: 100%">
<el-option v-for="item in formulaIdDict" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="羊舍" prop="sheepHouseId">
<el-input v-model="queryParams.sheepHouseId" placeholder="请输入羊舍" clearable @keyup.enter="handleQuery" />
@ -36,7 +39,7 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="创建日期" align="center" prop="createDate" />
<el-table-column label="配方编码" align="center" prop="formulaId" />
<el-table-column label="批号" align="center" prop="batchId" />
<!-- <el-table-column label="批号" align="center" prop="batchId" /> -->
<el-table-column label="羊舍" align="center" prop="sheepHouseId">
<template #default="scope">
{{ getSheepHouseName(scope.row.sheepHouseId) }}
@ -54,15 +57,15 @@
<!-- <el-table-column label="计划总量" align="center" prop="planMorningTotal" /> -->
<el-table-column label="实际量" align="center" prop="actualMorningSize" />
</el-table-column>
<el-table-column label="中午" prop="materialId" align="center">
<!-- <el-table-column label="中午" prop="materialId" align="center">
<el-table-column label="计划量" align="center" prop="planNoonSize">
<template #default="{ row }">
{{ row.planNoonSize ? row.planNoonSize.toFixed(2) : '0.00' }}
</template>
</el-table-column>
<!-- <el-table-column label="计划总量" align="center" prop="planNoonTotal" /> -->
<el-table-column label="计划总量" align="center" prop="planNoonTotal" />
<el-table-column label="实际量" align="center" prop="actualNoonSize" />
</el-table-column>
</el-table-column> -->
<el-table-column label="下午" prop="materialId" align="center">
<el-table-column label="计划量" align="center" prop="planAfternoonSize">
<template #default="{ row }">
@ -72,18 +75,18 @@
<!-- <el-table-column label="计划总量" align="center" prop="planAfternoonTotal" /> -->
<el-table-column label="实际量" align="center" prop="actualAfternoonSize" />
</el-table-column>
<el-table-column label="饲喂比例(%)" align="center" prop="ratioTotal">
<!-- <el-table-column label="饲喂比例(%)" align="center" prop="ratioTotal">
<el-table-column label="上午" align="center" prop="ratioMorning" />
<el-table-column label="中午" align="center" prop="ratioNoon" />
<el-table-column label="下午" align="center" prop="ratioAfternoon" />
</el-table-column>
</el-table-column> -->
<el-table-column label="计划饲喂总量" align="center" prop="planFeedTotal" />
<el-table-column label="饲草班人员" align="center" prop="zookeeper" />
<el-table-column label="饲喂计划日期" align="center" prop="planDate" width="180">
<template #default="scope">
<!-- <span>{{ parseTime(scope.row.planDate, '{y}-{m}-{d}') }}</span> -->
<span>{{ scope.row.planDate ? parseTime(scope.row.planDate, '{y}-{m}-{d}') : '' }}</span>
<span>{{ scope.row.planDate ? parseTime(scope.row.planDate, '{y}-{m}-{d}') : '' }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
@ -128,7 +131,7 @@
<el-form-item label="比例 (%)">
<div style="display: flex; gap: 10px;">
<el-input v-model="form.ratioMorning" placeholder="早上比例" style="width: 100px;" />
<el-input v-model="form.ratioNoon" placeholder="中午比例" style="width: 100px;" />
<el-input v-model="form.ratioNoon" placeholder="中午比例" style="width: 100px;" disabled />
<el-input v-model="form.ratioAfternoon" placeholder="下午比例" style="width: 100px;" />
</div>
</el-form-item>
@ -210,7 +213,7 @@
const formulaBatchDict = ref([]) // ()
const sheepFolderDict = ref([]) //
//
const sheepNameDict = ref({})
const sheepNameDict = ref({})
// &
function getFormulaDict() {
@ -274,19 +277,19 @@
}
// ID ID
function getSheepHouseId(inputValue, sheepNameDict) {
if (!inputValue) return '';
function getSheepHouseId(inputValue, sheepNameDict) {
if (!inputValue) return '';
//
if (/^\d+$/.test(inputValue)) {
return inputValue;
//
if (/^\d+$/.test(inputValue)) {
return inputValue;
}
// id
const match = sheepNameDict.find(item => item.value === inputValue);
return match ? match.label : '';
}
// id
const match = sheepNameDict.find(item => item.value === inputValue);
return match ? match.label : '';
}
/** 查询饲喂计划列表 */
function getList() {
@ -375,6 +378,8 @@ function getSheepHouseId(inputValue, sheepNameDict) {
/** 提交按钮 */
function submitForm() {
proxy.$refs["FeedPlanRef"].validate(valid => {
// 0 ()
form.value.ratioNoon = 0
if (valid) {
if (form.value.createDate != null) {
updateFeedPlan(form.value).then(response => {

View File

@ -42,6 +42,7 @@
<!-- <el-table-column label="青贮损耗比例" align="center" prop="silageLossRate" /> -->
<el-table-column label="总饲喂量" align="center" prop="feedTotalSize" />
<el-table-column label="日均饲喂量" align="center" prop="feedDailySize" />
<el-table-column label="时间" align="center" prop="createTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleMaterialView(scope.row)"