Merge branch 'main' of http://e19510c831.iok.la/admin/zhyc-sheep-ui
This commit is contained in:
commit
0ff9255150
@ -124,9 +124,29 @@
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="Breeding_recordsList" @selection-change="handleSelectionChange">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="Breeding_recordsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="耳号" align="center" prop="eweManageTags" width="120" fixed="left" />
|
||||
<!-- 创建日期作为第一列,支持排序 -->
|
||||
<el-table-column
|
||||
label="创建日期"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
width="180"
|
||||
fixed="left"
|
||||
sortable="custom"
|
||||
sort-by="createTime"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="eweManageTags" width="120" />
|
||||
<el-table-column label="品种" align="center" prop="eweVariety" width="100" />
|
||||
<el-table-column label="事件类型" align="center" width="100">
|
||||
<template #default="scope">
|
||||
@ -135,7 +155,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="配种公羊" align="center" prop="ramManageTags" width="120" />
|
||||
<el-table-column label="配种公羊品种" align="center" prop="ramVariety" width="120" />
|
||||
<el-table-column label="配种方式" align="center" prop="matingType" width="100" />
|
||||
<el-table-column label="配种方式" align="center" prop="matingType" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ getBreedTypeText(scope.row.breedType) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="月龄" align="center" prop="eweMonthAge" width="80" />
|
||||
<el-table-column label="配种时羊只类别" align="center" prop="sheepType" width="120" />
|
||||
<el-table-column label="胎次" align="center" prop="eweParity" width="80" />
|
||||
@ -197,11 +221,6 @@
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="创建人" align="center" prop="createBy" width="100" />
|
||||
<el-table-column label="创建日期" align="center" prop="createTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所在牧场" align="center" prop="ranchName" width="120" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160" fixed="right">
|
||||
<template #default="scope">
|
||||
@ -366,7 +385,15 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Breeding_records">
|
||||
import { listBreeding_records, getBreeding_records, delBreeding_records, addBreeding_records, updateBreeding_records, getSheepInfoByTags, getLatestBreedPlanByEweTags } from "@/api/Breeding_records/Breeding_records"
|
||||
import {
|
||||
listBreeding_records,
|
||||
getBreeding_records,
|
||||
delBreeding_records,
|
||||
addBreeding_records,
|
||||
updateBreeding_records,
|
||||
getSheepInfoByTags,
|
||||
getLatestBreedPlanByEweTags
|
||||
} from "@/api/Breeding_records/Breeding_records"
|
||||
|
||||
const {proxy} = getCurrentInstance()
|
||||
|
||||
@ -398,7 +425,10 @@ const data = reactive({
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
pregnancyResult: null,
|
||||
isPregnancyChecked: null
|
||||
isPregnancyChecked: null,
|
||||
// 添加排序参数
|
||||
orderByColumn: 'createTime',
|
||||
isAsc: 'desc'
|
||||
},
|
||||
rules: {
|
||||
eweManageTags: [
|
||||
@ -418,6 +448,21 @@ const data = reactive({
|
||||
|
||||
const {queryParams, form, rules} = toRefs(data)
|
||||
|
||||
/** 获取配种方式文字显示 */
|
||||
function getBreedTypeText(breedType) {
|
||||
if (breedType === 1) return '同期发情'
|
||||
if (breedType === 2) return '本交'
|
||||
return '-'
|
||||
}
|
||||
|
||||
/** 获取孕检结果标签类型 */
|
||||
function getPregnancyResultType(result) {
|
||||
if (result === '怀孕') return 'success'
|
||||
if (result === '空怀') return 'danger'
|
||||
if (result === '疑似怀孕') return 'warning'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
/** 查询配种记录列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
@ -428,6 +473,13 @@ function getList() {
|
||||
})
|
||||
}
|
||||
|
||||
// 表格排序变化处理
|
||||
function handleSortChange({column, prop, order}) {
|
||||
queryParams.value.orderByColumn = prop
|
||||
queryParams.value.isAsc = order === 'ascending' ? 'asc' : 'desc'
|
||||
getList()
|
||||
}
|
||||
|
||||
// 取消按钮
|
||||
function cancel() {
|
||||
open.value = false
|
||||
@ -589,7 +641,8 @@ function handleDelete(row) {
|
||||
}).then(() => {
|
||||
getList()
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
@ -599,33 +652,12 @@ function handleExport() {
|
||||
}, `配种记录_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
/** 获取孕检结果类型 */
|
||||
function getPregnancyResultType(result) {
|
||||
if (result === '怀孕') {
|
||||
return 'success'
|
||||
} else if (result === '空怀') {
|
||||
return 'danger'
|
||||
} else if (result === '疑似怀孕') {
|
||||
return 'warning'
|
||||
} else {
|
||||
return 'info'
|
||||
}
|
||||
}
|
||||
|
||||
// 页面初始化
|
||||
onMounted(() => {
|
||||
getList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.el-table {
|
||||
font-size: 13px;
|
||||
}
|
||||
.el-table .cell {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.el-divider {
|
||||
margin: 16px 0;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 16px 0;
|
||||
}
|
||||
/* 样式保持不变 */
|
||||
</style>
|
||||
@ -89,6 +89,12 @@
|
||||
|
||||
<el-table v-loading="loading" :data="Pregnancy_TestList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="孕检日期" align="center" prop="datetime" width="120" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="manageTags" width="120" />
|
||||
<el-table-column label="品种" align="center" prop="variety" width="100" />
|
||||
<el-table-column label="事件类型" align="center" width="80">
|
||||
@ -96,11 +102,6 @@
|
||||
<span>孕检</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="孕检日期" align="center" prop="datetime" width="120">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="孕检结果" align="center" prop="result" width="80">
|
||||
<template #default="scope">
|
||||
<el-tag :type="getResultTagType(scope.row.result)">
|
||||
|
||||
@ -75,10 +75,6 @@
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -125,14 +121,15 @@
|
||||
|
||||
<el-table v-loading="loading" :data="SpermList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="耳号" align="center" prop="manageTags" width="120" />
|
||||
<el-table-column label="电子耳号" align="center" prop="electronicTags" width="120" />
|
||||
<el-table-column label="月龄" align="center" prop="monthAge" width="80" />
|
||||
<el-table-column label="采精日期" align="center" prop="pickDate" width="120">
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="采精日期" align="center" prop="pickDate" width="120" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.pickDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="manageTags" width="120" />
|
||||
<el-table-column label="电子耳号" align="center" prop="electronicTags" width="120" />
|
||||
<el-table-column label="月龄" align="center" prop="monthAge" width="80" />
|
||||
<el-table-column label="采精量(ml)" align="center" prop="amount" width="100" />
|
||||
<el-table-column label="精液密度" align="center" prop="density" width="100" />
|
||||
<el-table-column label="精液活力" align="center" prop="vitallity" width="100" />
|
||||
@ -409,7 +406,8 @@ function handleDelete(row) {
|
||||
}).then(() => {
|
||||
getList()
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
||||
@ -130,14 +130,15 @@
|
||||
<!-- 数据表格 -->
|
||||
<el-table v-loading="loading" :data="weaning_recordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="耳号" align="center" prop="earNumber" width="100" />
|
||||
<el-table-column label="品种" align="center" prop="breed" width="100" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" width="100" />
|
||||
<el-table-column label="断奶日期" align="center" prop="datetime" width="120">
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="断奶日期" align="center" prop="datetime" width="120" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="earNumber" width="100" />
|
||||
<el-table-column label="品种" align="center" prop="breed" width="100" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" width="100" />
|
||||
<el-table-column label="性别" align="center" prop="gender" width="80" />
|
||||
<el-table-column label="父号" align="center" prop="fatherNumber" width="100" />
|
||||
<el-table-column label="母号" align="center" prop="motherNumber" width="100" />
|
||||
|
||||
@ -303,6 +303,7 @@ function reset() {
|
||||
id: null,
|
||||
treatId: null,
|
||||
sheepId: null,
|
||||
sheepNo: null,
|
||||
datetime: null,
|
||||
sheepType: null,
|
||||
gender: null,
|
||||
|
||||
@ -471,7 +471,7 @@ function handleDelete(row) {
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/disinfect/export', { ...queryParams }, `disinfect_${Date.now()}.xlsx`)
|
||||
proxy.download('biosafety/disinfect/export', { ...queryParams }, `消毒_${Date.now()}.xlsx`)
|
||||
}
|
||||
|
||||
/* ---------- 下拉数据 ---------- */
|
||||
|
||||
@ -490,7 +490,7 @@ function handleDelete(row) {
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/deworm/export', { ...queryParams }, `deworm_${Date.now()}.xlsx`)
|
||||
proxy.download('biosafety/health/export', { ...queryParams }, `保健_${Date.now()}.xlsx`)
|
||||
}
|
||||
|
||||
/* ------------------ 药品/处方/下拉 ------------------ */
|
||||
|
||||
@ -489,7 +489,7 @@ function handleDelete(row) {
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/deworm/export', { ...queryParams }, `deworm_${Date.now()}.xlsx`)
|
||||
proxy.download('biosafety/immunity/export', { ...queryParams }, `免疫_${Date.now()}.xlsx`)
|
||||
}
|
||||
|
||||
/* ------------------ 药品/处方/下拉 ------------------ */
|
||||
|
||||
@ -238,7 +238,7 @@ function handleDelete(row) {
|
||||
}
|
||||
|
||||
function handleExport() {
|
||||
proxy.download('system/medicine/export', { ...queryParams.value }, `medicine_${new Date().getTime()}.xlsx`)
|
||||
proxy.download('system/medicine/export', { ...queryParams.value }, `药品_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList()
|
||||
|
||||
@ -220,7 +220,7 @@ function handleDelete(row) {
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/type/export', {
|
||||
...queryParams.value
|
||||
}, `type_${new Date().getTime()}.xlsx`)
|
||||
}, `药品类型_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList()
|
||||
|
||||
@ -180,7 +180,7 @@ function handleDelete(row) {
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/unit/export', {
|
||||
...queryParams.value
|
||||
}, `unit_${new Date().getTime()}.xlsx`)
|
||||
}, `药品计量单位_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList()
|
||||
|
||||
@ -220,7 +220,7 @@ function handleDelete(row) {
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/usage/export', {
|
||||
...queryParams.value
|
||||
}, `usage_${new Date().getTime()}.xlsx`)
|
||||
}, `药品使用方法_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
|
||||
getList()
|
||||
|
||||
@ -504,7 +504,7 @@ function cancel() {
|
||||
* 调用后端通用导出接口,文件名带时间戳
|
||||
*/
|
||||
function handleExport() {
|
||||
proxy.download('biosafety/prescription/export', { ...queryParams.value }, `prescription_${Date.now()}.xlsx`)
|
||||
proxy.download('biosafety/prescription/export', { ...queryParams.value }, `处方_${Date.now()}.xlsx`)
|
||||
}
|
||||
|
||||
// 初始化:加载列表
|
||||
|
||||
@ -527,9 +527,9 @@ function handleDelete(row) {
|
||||
/* 导出 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
'bisosafety/quarantine/export',
|
||||
'/biosafety/quarantine/export',
|
||||
queryParams,
|
||||
`quarantine_${Date.now()}.xlsx`
|
||||
`检疫_${Date.now()}.xlsx`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -729,7 +729,7 @@ function handleDelete(row) {
|
||||
.then(() => { getList(); proxy.$modal.msgSuccess('删除成功') })
|
||||
}
|
||||
function handleExport() {
|
||||
proxy.download('treatment/treatment/export', { ...queryParams }, `treatment_${Date.now()}.xlsx`)
|
||||
proxy.download('treatment/treatment/export', { ...queryParams }, `治疗记录_${Date.now()}.xlsx`)
|
||||
}
|
||||
function resetForm(formObj) {
|
||||
Object.assign(formObj, {
|
||||
|
||||
@ -342,7 +342,7 @@ function handleExport() {
|
||||
proxy.download(
|
||||
'biosafety/usageInfo/export',
|
||||
{ ...queryParams.value },
|
||||
`usage_${new Date().getTime()}.xlsx`
|
||||
`药品使用记录_${new Date().getTime()}.xlsx`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -99,14 +99,15 @@
|
||||
|
||||
<el-table v-loading="loading" :data="drymilkList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="耳号" align="center" prop="manageTags" />
|
||||
<el-table-column label="品种" align="center" prop="variety" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" />
|
||||
<el-table-column label="干奶日期" align="center" prop="datetime" width="180">
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="干奶日期" align="center" prop="datetime" width="180" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="manageTags" />
|
||||
<el-table-column label="品种" align="center" prop="variety" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" />
|
||||
<el-table-column label="是否使用乳头封闭剂" align="center" prop="status">
|
||||
<template #default="scope">
|
||||
<span>{{ scope.row.status === 1 ? '是' : '否' }}</span>
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['feed:FeedList:add']">新增</el-button>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['feed:FeedList:edit']">修改</el-button>
|
||||
@ -49,11 +49,11 @@
|
||||
<span>{{ scope.row.rootPlan ? parseTime(scope.row.rootPlan.planDate, '{y}-{m}-{d}') : '' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="配料日期" align="center" prop="deployDate" width="180">
|
||||
<!-- <el-table-column label="配料日期" align="center" prop="deployDate" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.deployDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">详情</el-button>
|
||||
@ -75,11 +75,11 @@
|
||||
<el-form-item label="饲草班人员" prop="zookeeper">
|
||||
<el-input v-model="form.zookeeper" placeholder="请输入饲草班人员名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="配料日期" prop="deployDate">
|
||||
<!-- <el-form-item label="配料日期" prop="deployDate">
|
||||
<el-date-picker clearable v-model="form.deployDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择配料日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
@ -102,7 +102,7 @@
|
||||
|
||||
<el-divider content-position="left">配料列表</el-divider>
|
||||
|
||||
<el-table :data="showFeedList.formulaList" stripe border style="width: 100%" max-height="300">
|
||||
<el-table :data="showFeedList.rootFormula.sgFormulaList" stripe border style="width: 100%" max-height="300">
|
||||
<el-table-column label="序号" type="index" width="60" align="center" />
|
||||
<!-- <el-table-column label="原料编号" prop="materialId" align="center" /> -->
|
||||
<el-table-column label="原料" align="center">
|
||||
@ -186,6 +186,7 @@
|
||||
openModel.value = "view"
|
||||
title.value = "配料清单详情"
|
||||
console.log("查看配料清单", row)
|
||||
console.log("HandView", showFeedList.value)
|
||||
}
|
||||
|
||||
/** 查询配料清单列表 */
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
|
||||
<el-table v-loading="loading" :data="FeedStatisticList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="UUID" align="center" prop="id" />
|
||||
<el-table-column label="UID" align="center" prop="id" />
|
||||
<el-table-column label="配方编号" align="center" prop="formulaId" />
|
||||
<el-table-column label="配方批号" align="center" prop="formulaBatchId" />
|
||||
<el-table-column label="羊只数量" align="center" prop="sheepFoldCount" />
|
||||
@ -93,7 +93,7 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="日期" prop="planDate">
|
||||
<el-date-picker clearable v-model="showFeedStatistic.feedDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择时间">
|
||||
placeholder="请选择时间" @change="handleDeployDateChange(showFeedStatistic, $event)">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -102,7 +102,11 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="Plus" @click="handleAddMaterial()">添加</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAddMaterial()"
|
||||
:disabled="
|
||||
showFeedStatistic.feedDate == null
|
||||
|| showFeedStatistic.formulaId === null
|
||||
|| showFeedStatistic.formulaBatchId == null">添加</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
@ -152,7 +156,11 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="Plus" @click="handleAddSheep()">添加</el-button>
|
||||
<el-button type="primary" icon="Plus" @click="handleAddSheep()"
|
||||
:disabled ="
|
||||
showFeedStatistic.feedDate == null
|
||||
|| showFeedStatistic.formulaId == null
|
||||
|| showFeedStatistic.formulaBatchId == null">添加</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-table :data="showFeedStatistic.sheepFoldList" :rules="rules"
|
||||
@ -231,6 +239,7 @@
|
||||
const openModel = ref('')
|
||||
// 编辑状态
|
||||
const isEdit = ref(true)
|
||||
|
||||
const showFeedStatistic = ref({})
|
||||
|
||||
// 用于存储羊舍名称的字典
|
||||
@ -362,9 +371,10 @@
|
||||
|
||||
// 处理配方批号变化 & 当确定批号时加载初始数据
|
||||
function handleFormulaBatchIdChange(row, $event) {
|
||||
if (row.formulaId && row.formulaBatchId) {
|
||||
if (row.formulaId && row.formulaBatchId && row.feedDate) {
|
||||
queryParams.value.formulaId = row.formulaId
|
||||
queryParams.value.formulaBatchId = row.formulaBatchId
|
||||
queryParams.value.feedDate = row.feedDate
|
||||
queryParams.value.id = null // 清空 ID,防止影响查询
|
||||
// console.log("加载初始数据,查询参数:", queryParams.value)
|
||||
initFeedStatistic(queryParams.value).then(response => {
|
||||
@ -374,6 +384,13 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function handleDeployDateChange(showFeedStatistic, event) {
|
||||
// 日期改变时回调
|
||||
if (showFeedStatistic.feedDate) {
|
||||
handleFormulaBatchIdChange(showFeedStatistic, event);
|
||||
}
|
||||
}
|
||||
// 查看详情
|
||||
function handleMaterialView(row) {
|
||||
showFeedStatistic.value = row
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
<el-form-item label="饲养阶段" prop="feedStage">
|
||||
<el-input v-model="queryParams.feedStage" placeholder="请输入饲养阶段" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批号" prop="batchId">
|
||||
<!-- <el-form-item label="批号" prop="batchId">
|
||||
<el-input v-model="queryParams.batchId" placeholder="请输入批号" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
|
||||
@ -93,6 +93,12 @@
|
||||
|
||||
<el-table v-loading="loading" :data="miscarriageList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="流产日期" align="center" prop="datetime" width="100" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耳号" align="center" prop="bsManageTags" />
|
||||
<el-table-column label="品种" align="center" prop="variety" />
|
||||
<el-table-column label="事件类型" align="center">
|
||||
@ -100,11 +106,6 @@
|
||||
<span>流产</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流产日期" align="center" prop="datetime" width="100">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.datetime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="流产原因" align="center" prop="reason" />
|
||||
<el-table-column label="配种类型" align="center" prop="matingTypeName" />
|
||||
<el-table-column label="配种日期" align="center" prop="matingDate" width="100">
|
||||
@ -244,7 +245,15 @@
|
||||
</template>
|
||||
|
||||
<script setup name="Miscarriage">
|
||||
import { listMiscarriage, getMiscarriage, delMiscarriage, addMiscarriage, updateMiscarriage, getSheepInfo, getReasonOptions } from "@/api/miscarriage/miscarriage"
|
||||
import {
|
||||
listMiscarriage,
|
||||
getMiscarriage,
|
||||
delMiscarriage,
|
||||
addMiscarriage,
|
||||
updateMiscarriage,
|
||||
getSheepInfo,
|
||||
getReasonOptions
|
||||
} from "@/api/miscarriage/miscarriage"
|
||||
|
||||
const {proxy} = getCurrentInstance()
|
||||
|
||||
@ -432,7 +441,8 @@ function handleDelete(row) {
|
||||
}).then(() => {
|
||||
getList()
|
||||
proxy.$modal.msgSuccess("删除成功")
|
||||
}).catch(() => {})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
|
||||
/** 导出按钮操作 */
|
||||
|
||||
@ -70,7 +70,8 @@
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['sheep_death:death:add']"
|
||||
>新增</el-button>
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -80,7 +81,8 @@
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['sheep_death:death:edit']"
|
||||
>修改</el-button>
|
||||
>修改
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -90,7 +92,8 @@
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['sheep_death:death:remove']"
|
||||
>删除</el-button>
|
||||
>删除
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -99,22 +102,24 @@
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['sheep_death:death:export']"
|
||||
>导出</el-button>
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="deathList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="主键ID" align="center" prop="id" width="80" />
|
||||
<el-table-column label="管理耳号" align="center" prop="manageTags" width="120" />
|
||||
<el-table-column label="品种" align="center" prop="variety" width="100" />
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" width="100" />
|
||||
<el-table-column label="死亡日期" align="center" prop="deathDate" width="120">
|
||||
<!-- 日期作为第一列 -->
|
||||
<el-table-column label="死亡日期" align="center" prop="deathDate" width="120" fixed="left">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.deathDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="主键ID" align="center" prop="id" width="80"/>
|
||||
<el-table-column label="管理耳号" align="center" prop="manageTags" width="120"/>
|
||||
<el-table-column label="品种" align="center" prop="variety" width="100"/>
|
||||
<el-table-column label="事件类型" align="center" prop="eventType" width="100"/>
|
||||
<el-table-column label="死亡时羊只类别" align="center" prop="sheepType" width="130"/>
|
||||
<el-table-column label="性别" align="center" prop="gender" width="80">
|
||||
<template #default="scope">
|
||||
@ -143,8 +148,12 @@
|
||||
<el-table-column label="备注" align="center" prop="comment" width="150"/>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['sheep_death:death:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['sheep_death:death:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['sheep_death:death:edit']">修改
|
||||
</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['sheep_death:death:remove']">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -183,8 +192,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="疾病类型ID" prop="diseaseTypeId">
|
||||
|
||||
@ -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="docDate">
|
||||
<el-input v-model="queryParams.docDate" placeholder="请输入单据日期" clearable @keyup.enter="handleQuery" />
|
||||
<!-- <el-input v-model="queryParams.docDate" placeholder="请输入单据日期" clearable @keyup.enter="handleQuery" /> -->
|
||||
<el-date-picker clearable v-model="queryParams.docDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择时间" @change="handleQuery">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="businessType">
|
||||
<el-input v-model="queryParams.businessType" placeholder="请输入业务类型" clearable @keyup.enter="handleQuery" />
|
||||
@ -21,7 +24,8 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['stock:in:add']" v-show="false">新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['stock:in:add']"
|
||||
v-show="false">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
|
||||
@ -2,20 +2,13 @@
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="存货" prop="materialName">
|
||||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入存货"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<el-input v-model="queryParams.materialName" placeholder="请输入存货" clearable @keyup.enter="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="productionDate">
|
||||
<el-input
|
||||
v-model="queryParams.productionDate"
|
||||
placeholder="请输入生产日期"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
<!-- <el-input v-model="queryParams.productionDate" placeholder="请输入生产日期" clearable @keyup.enter="handleQuery" /> -->
|
||||
<el-date-picker clearable v-model="queryParams.productionDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请输入生产日期" @change="handleQuery">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||
@ -25,45 +18,24 @@
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['stock:management:add']"
|
||||
>新增</el-button>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
v-hasPermi="['stock:management:add']">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="Edit"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['stock:management:edit']"
|
||||
>修改</el-button>
|
||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate"
|
||||
v-hasPermi="['stock:management:edit']">修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="Delete"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['stock:management:remove']"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete"
|
||||
v-hasPermi="['stock:management:remove']">删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="Download"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['stock:management:export']"
|
||||
>导出</el-button>
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport"
|
||||
v-hasPermi="['stock:management:export']">导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport" v-hasPermi="['stock:management:import']">导入</el-button>
|
||||
<el-button type="info" plain icon="Upload" @click="handleImport"
|
||||
v-hasPermi="['stock:management:import']">导入</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
@ -83,19 +55,16 @@
|
||||
<el-table-column label="失效预警" align="center" prop="expirationAlarm" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['stock:management:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['stock:management:remove']">删除</el-button>
|
||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['stock:management:edit']">修改</el-button>
|
||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['stock:management:remove']">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
|
||||
<!-- 添加或修改饲喂计划对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
|
||||
@ -119,18 +88,12 @@
|
||||
<el-input v-model="form.currentStock" placeholder="请输入现存量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="productionDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.productionDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="form.productionDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择生产日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="失效日期" prop="expirationDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.expirationDate"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
<el-date-picker clearable v-model="form.expirationDate" type="date" value-format="YYYY-MM-DD"
|
||||
placeholder="请选择失效日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user