diff --git a/src/api/embryo/flush.js b/src/api/embryo/flush.js new file mode 100644 index 0000000..1c24cfc --- /dev/null +++ b/src/api/embryo/flush.js @@ -0,0 +1,61 @@ +import request from '@/utils/request' + +// 查询冲胚记录列表 +export function listFlush(query) { + return request({ + url: '/embryo/flush/list', + method: 'get', + params: query + }) +} + +// 查询冲胚记录详细 +export function getFlush(id) { + return request({ + url: '/embryo/flush/' + id, + method: 'get' + }) +} + +// 新增冲胚记录 +export function addFlush(data) { + return request({ + url: '/embryo/flush', + method: 'post', + data: data + }) +} + +// 修改冲胚记录 +export function updateFlush(data) { + return request({ + url: '/embryo/flush', + method: 'put', + data: data + }) +} + +// 删除冲胚记录 +export function delFlush(id) { + return request({ + url: '/embryo/flush/' + id, + method: 'delete' + }) +} + +// 根据供体母羊耳号获取关联信息 +export function getDonorInfo(donorFemaleNo) { + return request({ + url: '/embryo/flush/getDonorInfo', + method: 'get', + params: { donorFemaleNo } + }) +} + +// 获取供体母羊下拉列表 +export function getDonorFemaleList() { + return request({ + url: '/embryo/flush/donorFemaleList', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/frozen/embryo.js b/src/api/frozen/embryo.js new file mode 100644 index 0000000..3e1c36c --- /dev/null +++ b/src/api/frozen/embryo.js @@ -0,0 +1,70 @@ +import request from '@/utils/request' + +// 查询冻胚库存列表 +export function listEmbryo(query) { + return request({ + url: '/frozen/embryo/list', + method: 'get', + params: query + }) +} + +// 查询冻胚库存详细 +export function getEmbryo(id) { + return request({ + url: '/frozen/embryo/' + id, + method: 'get' + }) +} + +// 新增冻胚库存 +export function addEmbryo(data) { + return request({ + url: '/frozen/embryo', + method: 'post', + data: data + }) +} + +// 修改冻胚库存 +export function updateEmbryo(data) { + return request({ + url: '/frozen/embryo', + method: 'put', + data: data + }) +} + +// 删除冻胚库存 +export function delEmbryo(id) { + return request({ + url: '/frozen/embryo/' + id, + method: 'delete' + }) +} + +// 根据供体母羊耳号回显冲胚信息(冻胚新增页面用) +export function getFlushInfoByEwe(eweNo) { + return request({ + url: '/frozen/embryo/getFlushInfoByEwe/' + eweNo, + method: 'get' + }) +} + +// 根据母羊+等级获取数量 +export function getQtyByGrade(eweNo, grade) { + return request({ + url: '/frozen/embryo/getQtyByGrade', + method: 'get', + params: { eweNo, grade } + }) +} + +// 废弃冻胚 +export function discardEmbryo(data) { + return request({ + url: '/frozen/embryo/discard', + method: 'put', + data + }) +} \ No newline at end of file diff --git a/src/api/frozen/sale.js b/src/api/frozen/sale.js new file mode 100644 index 0000000..588170b --- /dev/null +++ b/src/api/frozen/sale.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询销售主单列表 +export function listSale(query) { + return request({ + url: '/sale/sale/list', + method: 'get', + params: query + }) +} + +// 查询销售主单详细 +export function getSale(id) { + return request({ + url: '/sale/sale/' + id, + method: 'get' + }) +} + +// 新增销售主单 +export function addSale(data) { + return request({ + url: '/sale/sale', + method: 'post', + data: data + }) +} + +// 修改销售主单 +export function updateSale(data) { + return request({ + url: '/sale/sale', + method: 'put', + data: data + }) +} + +// 删除销售主单 +export function delSale(id) { + return request({ + url: '/sale/sale/' + id, + method: 'delete' + }) +} diff --git a/src/api/frozen/sperm.js b/src/api/frozen/sperm.js new file mode 100644 index 0000000..4841dc6 --- /dev/null +++ b/src/api/frozen/sperm.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询冻精库存列表 +export function listSperm(query) { + return request({ + url: '/sperm/sperm/list', + method: 'get', + params: query + }) +} + +// 查询冻精库存详细 +export function getSperm(id) { + return request({ + url: '/sperm/sperm/' + id, + method: 'get' + }) +} + +// 新增冻精库存 +export function addSperm(data) { + return request({ + url: '/sperm/sperm', + method: 'post', + data: data + }) +} + +// 修改冻精库存 +export function updateSperm(data) { + return request({ + url: '/sperm/sperm', + method: 'put', + data: data + }) +} + +// 删除冻精库存 +export function delSperm(id) { + return request({ + url: '/sperm/sperm/' + id, + method: 'delete' + }) +} diff --git a/src/views/Breeding_records/Breeding_records/index.vue b/src/views/Breeding_records/Breeding_records/index.vue index 7ca9f3e..b74850c 100644 --- a/src/views/Breeding_records/Breeding_records/index.vue +++ b/src/views/Breeding_records/Breeding_records/index.vue @@ -37,6 +37,8 @@ + + @@ -132,7 +134,7 @@ :default-sort="{prop: 'createTime', order: 'descending'}" > - + - + @@ -259,6 +261,8 @@ + + @@ -337,7 +341,7 @@ - + 孕检信息 @@ -452,6 +456,8 @@ const {queryParams, form, rules} = toRefs(data) function getBreedTypeText(breedType) { if (breedType === 1) return '同期发情' if (breedType === 2) return '本交' + if (breedType === 3) return '冲胚' + if (breedType === 4) return '自然发情人工授精' return '-' } @@ -549,7 +555,7 @@ function handleUpdate(row) { open.value = true title.value = "修改配种记录" - // 如果有母羊耳号,加载母羊信息 + // 如果有母羊耳号,加载母羊信息 if (form.value.eweManageTags) { getEweInfoAndPlan() } @@ -573,11 +579,11 @@ function getEweInfoAndPlan() { eweInfo.value = null }) - // 获取配种计划信息(使用最新的获取方法) + // 获取配种计划信息(使用最新的获取方法) getLatestBreedPlanByEweTags(form.value.eweManageTags).then(response => { if (response.data) { breedPlan.value = response.data - // 自动填充公羊耳号和配种方式(但允许用户修改) + // 自动填充公羊耳号和配种方式(但允许用户修改) if (!form.value.ramManageTags) { form.value.ramManageTags = response.data.ram_manage_tags } @@ -585,13 +591,13 @@ function getEweInfoAndPlan() { form.value.breedType = response.data.breed_type } - proxy.$modal.msgSuccess("已自动匹配配种计划信息,可手动调整") + proxy.$modal.msgSuccess("已自动匹配配种计划信息,可手动调整") } else { breedPlan.value = null - proxy.$modal.msgWarning("未找到该母羊的配种计划,请手动输入配种信息") + proxy.$modal.msgWarning("未找到该母羊的配种计划,请手动输入配种信息") } }).catch(() => { - proxy.$modal.msgWarning("查询配种计划失败,请手动输入配种信息") + proxy.$modal.msgWarning("查询配种计划失败,请手动输入配种信息") breedPlan.value = null }) } @@ -636,7 +642,7 @@ function submitForm() { /** 删除按钮操作 */ function handleDelete(row) { const _ids = row.id || ids.value - proxy.$modal.confirm('是否确认删除配种记录编号为"' + _ids + '"的数据项?').then(function () { + proxy.$modal.confirm('是否确认删除配种记录编号为"' + _ids + '"的数据项?').then(function () { return delBreeding_records(_ids) }).then(() => { getList() diff --git a/src/views/dairyProducts/dryMatterCorrection/index.vue b/src/views/dairyProducts/dryMatterCorrection/index.vue index b689612..4e76b4b 100644 --- a/src/views/dairyProducts/dryMatterCorrection/index.vue +++ b/src/views/dairyProducts/dryMatterCorrection/index.vue @@ -1,17 +1,18 @@ - - - + + + @@ -102,16 +100,15 @@ - - @@ -140,7 +137,6 @@ - @@ -156,7 +152,6 @@ \ No newline at end of file diff --git a/src/views/dairyProducts/milkProdclasses/milkProdclasses/index.vue b/src/views/dairyProducts/milkProdclasses/milkProdclasses/index.vue index bd6527f..11aa3be 100644 --- a/src/views/dairyProducts/milkProdclasses/milkProdclasses/index.vue +++ b/src/views/dairyProducts/milkProdclasses/milkProdclasses/index.vue @@ -1,26 +1,23 @@ - + \ No newline at end of file diff --git a/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue b/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue index f37b226..215579c 100644 --- a/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue +++ b/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue @@ -1,13 +1,15 @@ - @@ -236,9 +239,7 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/dairyProducts/yogurtTest/yogurtTest/index.vue b/src/views/dairyProducts/yogurtTest/yogurtTest/index.vue index 41137a7..9959ffa 100644 --- a/src/views/dairyProducts/yogurtTest/yogurtTest/index.vue +++ b/src/views/dairyProducts/yogurtTest/yogurtTest/index.vue @@ -9,13 +9,15 @@ @keyup.enter="handleQuery" /> - - + - + type="daterange" + range-separator="-" + start-placeholder="开始日期" + end-placeholder="结束日期" + > 搜索 @@ -85,71 +87,86 @@ align="center" prop="datetime" width="180" - v-if="selectedColumns.includes('datetime')"> + v-if="selectedColumns.includes('datetime')" + sortable> + + v-if="selectedColumns.includes('fat')" + sortable /> + v-if="selectedColumns.includes('protein')" + sortable /> + v-if="selectedColumns.includes('nonFat')" + sortable /> + v-if="selectedColumns.includes('acidity')" + sortable /> + v-if="selectedColumns.includes('bacterialColony1')" + sortable /> + v-if="selectedColumns.includes('bacterialClony2')" + sortable /> + v-if="selectedColumns.includes('bacterialClony3')" + sortable /> + v-if="selectedColumns.includes('bacterialClony4')" + sortable /> + v-if="selectedColumns.includes('bacterialClony5')" + sortable /> + v-if="selectedColumns.includes('yeast')" + sortable /> + v-if="selectedColumns.includes('mould')" + sortable /> + v-if="selectedColumns.includes('lacto')" + sortable /> + + v-if="selectedColumns.includes('createTime')" + sortable> @@ -183,6 +201,7 @@ :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" + :page-sizes="[20, 50, 100, 200, 500, 1000, 2000]" @pagination="getList" /> @@ -284,13 +303,14 @@ \ No newline at end of file diff --git a/src/views/frozen/embryo/index.vue b/src/views/frozen/embryo/index.vue new file mode 100644 index 0000000..f09cc89 --- /dev/null +++ b/src/views/frozen/embryo/index.vue @@ -0,0 +1,530 @@ + + + + \ No newline at end of file diff --git a/src/views/frozen/sale/index.vue b/src/views/frozen/sale/index.vue new file mode 100644 index 0000000..c3843f4 --- /dev/null +++ b/src/views/frozen/sale/index.vue @@ -0,0 +1,416 @@ + + + diff --git a/src/views/frozen/sperm/index.vue b/src/views/frozen/sperm/index.vue new file mode 100644 index 0000000..4026b6d --- /dev/null +++ b/src/views/frozen/sperm/index.vue @@ -0,0 +1,534 @@ + + + + \ No newline at end of file diff --git a/src/views/produce/bodyManage/body_measure/index.vue b/src/views/produce/bodyManage/body_measure/index.vue index 2928dce..51731fd 100644 --- a/src/views/produce/bodyManage/body_measure/index.vue +++ b/src/views/produce/bodyManage/body_measure/index.vue @@ -18,7 +18,7 @@ - + @@ -39,10 +39,10 @@ 新增 - + 删除 @@ -56,284 +56,55 @@ - - - + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + - + - + @@ -372,10 +143,10 @@ - - - + + + @@ -399,8 +170,8 @@ - - + + @@ -426,7 +197,6 @@ import { getSheepByManageTags } from "@/api/produce/manage_sheep/changeVariety" import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management' import { getVarietyOptions } from '@/api/produce/other/fixHoof' import { getCurrentInstance } from 'vue' -import { ArrowUp, ArrowDown } from '@element-plus/icons-vue' const { proxy } = getCurrentInstance() @@ -478,19 +248,6 @@ const data = reactive({ const { queryParams, form, rules } = toRefs(data) -const [smFields, bsFields] = [ - // sc_body_measure 表字段 - ['height', 'bust', 'bodyLength', 'pipeLength', 'chestDepth', 'hipHeight', 'rumpWidth', 'rumpHeignt', 'hipWidth', 'hipCrossHeight'], - // bas_sheep 表字段 - ['parity', 'birthWeight', 'weaningWeight', 'currentWeight', 'lactationDay', 'gestationDay', 'postMatingDay'] -]; - -// 排序状态 -const sortStates = reactive({ - ...smFields.reduce((obj, field) => ({ ...obj, [field]: { isSorting: false, isAsc: true } }), {}), - ...bsFields.reduce((obj, field) => ({ ...obj, [field]: { isSorting: false, isAsc: true } }), {}) -}); - //查询体尺测量列表 function getList() { loading.value = true @@ -510,23 +267,6 @@ function getList() { }) } -/** - * 通用排序方法(所有需要排序的列共用) - * @param {String} prop - 排序字段 - */ -function handleSort(prop) { - Object.keys(sortStates).forEach(key => { - sortStates[key].isSorting = false; - }); - const current = sortStates[prop]; - current.isSorting = true; - current.isAsc = !current.isAsc; - queryParams.value.orderBy = prop; - queryParams.value.sortDirection = current.isAsc ? 'ASC' : 'DESC'; - queryParams.value.pageNum = 1; - getList(); -} - // 耳号脱焦验证 function onManageTagsBlur() { const tag = form.value.manageTags?.trim(); @@ -597,12 +337,6 @@ function resetQuery() { data.varietyName = ''; daterangeMeasureDate.value = []; proxy.resetForm("queryRef"); - Object.keys(sortStates).forEach(key => { - sortStates[key].isSorting = false - sortStates[key].isAsc = true - }) - queryParams.value.orderBy = null; - queryParams.value.sortDirection = null; handleQuery(); } diff --git a/src/views/produce/bodyManage/body_score/index.vue b/src/views/produce/bodyManage/body_score/index.vue index 3bad899..453f0cd 100644 --- a/src/views/produce/bodyManage/body_score/index.vue +++ b/src/views/produce/bodyManage/body_score/index.vue @@ -1,10 +1,6 @@ - - - - + @@ -141,7 +120,6 @@ import { listBody_score, getBody_score, delBody_score, addBody_score, updateBody import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management' import { checkSheepByManageTags, getVarietyOptions } from "@/api/produce/other/fixHoof" import { getCurrentInstance, ref, reactive, toRefs } from 'vue' -import { ArrowUp, ArrowDown } from '@element-plus/icons-vue' const { proxy } = getCurrentInstance() @@ -158,8 +136,6 @@ const daterangeDatetime = ref([]) const daterangeCreateTime = ref([]) const sheepfoldList = ref([]) const isAdd = ref(false) -const sortByScore = ref(false) -const sortScoreAsc = ref(true) const data = reactive({ form: { @@ -210,13 +186,6 @@ function getList() { queryParams.value.params["beginCreateTime"] = daterangeCreateTime.value[0] queryParams.value.params["endCreateTime"] = daterangeCreateTime.value[1] } - if (sortByScore.value) { - queryParams.value.orderBy = "score"; - queryParams.value.sortDirection = sortScoreAsc.value ? "ASC" : "DESC"; - } else { - queryParams.value.orderBy = null; - queryParams.value.sortDirection = null; - } listBody_score(queryParams.value).then(response => { body_scoreList.value = response.rows total.value = response.total @@ -254,18 +223,6 @@ function onManageTagsBlur() { }); } -//体况评分排序 -function handleScoreSort() { - if (sortByScore.value) { - sortScoreAsc.value = !sortScoreAsc.value; - } else { - sortByScore.value = true; - sortScoreAsc.value = true; - } - queryParams.value.pageNum = 1; - getList(); -} - //加载羊舍数据 const sheepfoldOptions = ref([]) function getSheepfoldOptions() { @@ -308,8 +265,6 @@ function resetQuery() { daterangeCreateTime.value = [] queryParams.value.varietyId = null; proxy.resetForm("queryRef") - sortByScore.value = false; - sortScoreAsc.value = true; handleQuery() } diff --git a/src/views/produce/bodyManage/breast_rating/index.vue b/src/views/produce/bodyManage/breast_rating/index.vue index e0a7d27..aa96a91 100644 --- a/src/views/produce/bodyManage/breast_rating/index.vue +++ b/src/views/produce/bodyManage/breast_rating/index.vue @@ -59,51 +59,12 @@ - - - - - - - - + + - - - - + @@ -177,7 +138,6 @@ import { listBreast_rating, getBreast_rating, delBreast_rating, addBreast_rating import { checkSheepByManageTags, getVarietyOptions } from "@/api/produce/other/fixHoof" import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management' import { getCurrentInstance, reactive, ref } from "vue" -import { ArrowUp, ArrowDown } from '@element-plus/icons-vue' const { proxy } = getCurrentInstance() @@ -193,15 +153,7 @@ const title = ref("") const daterangeCreateTime = ref([]) const daterangeEventDate = ref([]); const isAdd = ref(false) -// 乳房深度排序 -const sortByDepth = ref(false) -const sortDepthAsc = ref(true) -// 乳房长度排序 -const sortByLength = ref(false) -const sortLengthAsc = ref(true) -// 乳房评分排序 -const sortByScore = ref(false) -const sortScoreAsc = ref(true) + const data = reactive({ form: { id: null, @@ -251,19 +203,6 @@ function getList() { queryParams.value.params["beginCreateTime"] = daterangeCreateTime.value[0] queryParams.value.params["endCreateTime"] = daterangeCreateTime.value[1] } - if (sortByDepth.value) { - queryParams.value.orderBy = "depth"; - queryParams.value.sortDirection = sortDepthAsc.value ? "ASC" : "DESC"; - } else if (sortByLength.value) { - queryParams.value.orderBy = "length"; - queryParams.value.sortDirection = sortLengthAsc.value ? "ASC" : "DESC"; - } else if (sortByScore.value) { - queryParams.value.orderBy = "score"; - queryParams.value.sortDirection = sortScoreAsc.value ? "ASC" : "DESC"; - } else { - queryParams.value.orderBy = null; - queryParams.value.sortDirection = null; - } listBreast_rating(queryParams.value).then(response => { breast_ratingList.value = response.rows @@ -296,49 +235,6 @@ function onManageTagsBlur() { form.value.comment = null; }); } -//乳房深度排序 -function handleDepthSort() { - console.log("sortByDepth before:", sortByDepth.value); - sortByLength.value = false; - sortByScore.value = false; - if (sortByDepth.value) { - sortDepthAsc.value = !sortDepthAsc.value; - } else { - sortByDepth.value = true; - sortDepthAsc.value = true; - } - queryParams.value.pageNum = 1; - console.log("sortByDepth after:", sortByDepth.value); - getList(); -} - -//乳头长度排序 -function handleLengthSort() { - sortByDepth.value = false; - sortByScore.value = false; - if (sortByLength.value) { - sortLengthAsc.value = !sortLengthAsc.value; - } else { - sortByLength.value = true; - sortLengthAsc.value = true; - } - queryParams.value.pageNum = 1; - getList(); -} - -//乳况评分排序 -function handleScoreSort() { - sortByDepth.value = false; - sortByLength.value = false; - if (sortByScore.value) { - sortScoreAsc.value = !sortScoreAsc.value; - } else { - sortByScore.value = true; - sortScoreAsc.value = true; - } - queryParams.value.pageNum = 1; - getList(); -} // 取消按钮 function cancel() { @@ -377,12 +273,6 @@ function resetQuery() { daterangeCreateTime.value = [] daterangeEventDate.value = []; proxy.resetForm("queryRef") - sortByDepth.value = false - sortByLength.value = false - sortByScore.value = false - sortDepthAsc.value = true - sortLengthAsc.value = true - sortScoreAsc.value = true handleQuery() } diff --git a/src/views/sale/customer/index.vue b/src/views/sale/customer/index.vue index e0b9132..564900e 100644 --- a/src/views/sale/customer/index.vue +++ b/src/views/sale/customer/index.vue @@ -57,10 +57,10 @@ - + - + + \ No newline at end of file diff --git a/src/views/sale/saleRecord/saleRecord/index.vue b/src/views/sale/saleRecord/saleRecord/index.vue index b28a0fc..412c4d0 100644 --- a/src/views/sale/saleRecord/saleRecord/index.vue +++ b/src/views/sale/saleRecord/saleRecord/index.vue @@ -1,27 +1,15 @@