diff --git a/package.json b/package.json index a50909e..bb90147 100644 --- a/package.json +++ b/package.json @@ -21,9 +21,11 @@ "@vueuse/core": "10.11.0", "axios": "0.28.1", "clipboard": "2.0.11", + "date-fns": "^4.1.0", "echarts": "5.5.1", + "element-china-area-data": "^6.1.0", "element-plus": "^2.7.6", - "file-saver": "2.0.5", + "file-saver": "^2.0.5", "fuse.js": "6.6.2", "js-beautify": "1.14.11", "js-cookie": "3.0.5", @@ -35,7 +37,8 @@ "vue-cropper": "1.1.1", "vue-router": "4.4.0", "vuedraggable": "4.1.0", - "vuex": "^4.0.2" + "vuex": "^4.0.2", + "xlsx": "^0.18.5" }, "devDependencies": { "@vitejs/plugin-vue": "5.0.5", diff --git a/src/api/Breeding_records/Breeding_records.js b/src/api/Breeding_records/Breeding_records.js new file mode 100644 index 0000000..42a430a --- /dev/null +++ b/src/api/Breeding_records/Breeding_records.js @@ -0,0 +1,85 @@ +import request from '@/utils/request' + +// 查询配种记录列表 +export function listBreeding_records(query) { + return request({ + url: '/Breeding_records/Breeding_records/list', + method: 'get', + params: query + }) +} + +// 查询配种记录详细 +export function getBreeding_records(id) { + return request({ + url: '/Breeding_records/Breeding_records/' + id, + method: 'get' + }) +} + +// 新增配种记录 +export function addBreeding_records(data) { + return request({ + url: '/Breeding_records/Breeding_records', + method: 'post', + data: data + }) +} + +// 修改配种记录 +export function updateBreeding_records(data) { + return request({ + url: '/Breeding_records/Breeding_records', + method: 'put', + data: data + }) +} + +// 删除配种记录 +export function delBreeding_records(id) { + return request({ + url: '/Breeding_records/Breeding_records/' + id, + method: 'delete' + }) +} + +// 根据耳号查询羊只信息 +export function getSheepInfoByTags(manageTags) { + return request({ + url: '/Breeding_records/Breeding_records/getSheepByTags/' + manageTags, + method: 'get' + }) +} + +// 根据母羊耳号获取配种计划信息 +export function getBreedPlanByEweTags(manageTags) { + return request({ + url: '/Breeding_records/Breeding_records/getBreedPlan/' + manageTags, + method: 'get' + }) +} + +// 根据母羊耳号获取最新配种计划信息(优先从配种计划生成表获取) +export function getLatestBreedPlanByEweTags(manageTags) { + return request({ + url: '/Breeding_records/Breeding_records/getLatestBreedPlan/' + manageTags, + method: 'get' + }) +} + +// 同步孕检结果到配种记录 +export function syncPregnancyResult(data) { + return request({ + url: '/Breeding_records/Breeding_records/syncPregnancyResult', + method: 'post', + data: data + }) +} + +// 根据羊只ID和时间范围查询配种记录 +export function getBreedRecordsByTimeRange(sheepId, startDate, endDate) { + return request({ + url: `/Breeding_records/Breeding_records/getByTimeRange/${sheepId}/${startDate}/${endDate}`, + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/Pregnancy_Test/Pregnancy_Test.js b/src/api/Pregnancy_Test/Pregnancy_Test.js index 8547e00..da354f4 100644 --- a/src/api/Pregnancy_Test/Pregnancy_Test.js +++ b/src/api/Pregnancy_Test/Pregnancy_Test.js @@ -52,4 +52,15 @@ export function getSheepByManageTags(manageTags) { manageTags: manageTags } }) +} + +// 根据耳号获取配种信息 +export function getBreedInfoByManageTags(manageTags) { + return request({ + url: '/Pregnancy_Test/Pregnancy_Test/getBreedInfoByManageTags', + method: 'get', + params: { + manageTags: manageTags + } + }) } \ No newline at end of file diff --git a/src/api/Sperm/Sperm.js b/src/api/Sperm/Sperm.js new file mode 100644 index 0000000..f19d0d9 --- /dev/null +++ b/src/api/Sperm/Sperm.js @@ -0,0 +1,61 @@ +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' + }) +} + +// 根据耳号查询羊只信息 +export function getSheepByManageTags(manageTags) { + return request({ + url: '/Sperm/Sperm/getSheepByManageTags/' + manageTags, + method: 'get' + }) +} + +// 查询羊只耳号列表(用于下拉选择) +export function getSheepManageTagsList(query) { + return request({ + url: '/Sperm/Sperm/sheepManageTagsList', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/breed/lambing_records.js b/src/api/breed/lambing_records.js index d28f266..1f40c1a 100644 --- a/src/api/breed/lambing_records.js +++ b/src/api/breed/lambing_records.js @@ -17,6 +17,14 @@ export function getLambing_records(id) { }) } +// 根据母羊耳号查询最新配种记录 +export function getBreedingInfo(earNumber) { + return request({ + url: '/breed/lambing_records/breeding_info/' + earNumber, + method: 'get' + }) +} + // 新增产羔记录(包含羔羊信息) export function addLambing_records(data) { return request({ diff --git a/src/api/dairyProducts/parityCorrection/parityCorrection.js b/src/api/dairyProducts/parityCorrection/parityCorrection.js index 0d2488b..98e592f 100644 --- a/src/api/dairyProducts/parityCorrection/parityCorrection.js +++ b/src/api/dairyProducts/parityCorrection/parityCorrection.js @@ -1,56 +1,44 @@ -// import request from '@/utils/request' - -// // 查询胎次校正列表 -// export function listParityCorrection(query) { -// return request({ -// url: '/parityCorrection/parityCorrection/list', -// method: 'get', -// params: query -// }) -// } - -// // 查询胎次校正详细 -// export function getParityCorrection(id) { -// return request({ -// url: '/parityCorrection/parityCorrection/' + id, -// method: 'get' -// }) -// } - -// // 新增胎次校正 -// export function addParityCorrection(data) { -// return request({ -// url: '/parityCorrection/parityCorrection', -// method: 'post', -// data: data -// }) -// } - -// // 修改胎次校正 -// export function updateParityCorrection(data) { -// return request({ -// url: '/parityCorrection/parityCorrection', -// method: 'put', -// data: data -// }) -// } - -// // 删除胎次校正 -// export function delParityCorrection(id) { -// return request({ -// url: '/parityCorrection/parityCorrection/' + id, -// method: 'delete' -// }) -// } -// 可以保留空文件或删除此文件 -// 因为前端不再需要调用后端API import request from '@/utils/request' // 查询胎次校正列表 export function listParityCorrection(query) { return request({ - url: '/parityCorrection/parityCorrection/listAll', + url: '/parityCorrection/parityCorrection/list', method: 'get', params: query }) -} \ No newline at end of file +} + +// 查询胎次校正详细 +export function getParityCorrection(id) { + return request({ + url: '/parityCorrection/parityCorrection/' + id, + method: 'get' + }) +} + +// 新增胎次校正 +export function addParityCorrection(data) { + return request({ + url: '/parityCorrection/parityCorrection', + method: 'post', + data: data + }) +} + +// 修改胎次校正 +export function updateParityCorrection(data) { + return request({ + url: '/parityCorrection/parityCorrection', + method: 'put', + data: data + }) +} + +// 删除胎次校正 +export function delParityCorrection(id) { + return request({ + url: '/parityCorrection/parityCorrection/' + id, + method: 'delete' + }) +} diff --git a/src/api/dairyProducts/sheepMilkAnalysis/sheepMilkAnalysis.js b/src/api/dairyProducts/sheepMilkAnalysis/sheepMilkAnalysis.js index 8e90017..03ee763 100644 --- a/src/api/dairyProducts/sheepMilkAnalysis/sheepMilkAnalysis.js +++ b/src/api/dairyProducts/sheepMilkAnalysis/sheepMilkAnalysis.js @@ -1,44 +1,18 @@ import request from '@/utils/request' -// 查询羊奶出入库列表 -export function listMilkInOutStore(query) { +// 查询羊奶产量分析列表(分页 + 条件) +export function listSheepMilkAnalysis(query) { return request({ - url: '/milkInOutStore/milkInOutStore/list', + url: '/dairyProducts/sheepMilkAnalysis/list', method: 'get', params: query }) } -// 查询羊奶出入库详细 -export function getMilkInOutStore(id) { +// 查询单个羊奶产量分析详细信息 +export function getSheepMilkAnalysis(sheepId) { return request({ - url: '/milkInOutStore/milkInOutStore/' + id, + url: '/dairyProducts/sheepMilkAnalysis/' + sheepId, method: 'get' }) -} - -// 新增羊奶出入库 -export function addMilkInOutStore(data) { - return request({ - url: '/milkInOutStore/milkInOutStore', - method: 'post', - data: data - }) -} - -// 修改羊奶出入库 -export function updateMilkInOutStore(data) { - return request({ - url: '/milkInOutStore/milkInOutStore', - method: 'put', - data: data - }) -} - -// 删除羊奶出入库 -export function delMilkInOutStore(id) { - return request({ - url: '/milkInOutStore/milkInOutStore/' + id, - method: 'delete' - }) -} +} \ No newline at end of file diff --git a/src/api/feed/FeedList.js b/src/api/feed/FeedList.js new file mode 100644 index 0000000..50e8a9d --- /dev/null +++ b/src/api/feed/FeedList.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配料清单列表 +export function listFeedList(query) { + return request({ + url: '/feed/FeedList/list', + method: 'get', + params: query + }) +} + +// 查询配料清单详细 +export function getFeedList(id) { + return request({ + url: '/feed/FeedList/' + id, + method: 'get' + }) +} + +// 新增配料清单 +export function addFeedList(data) { + return request({ + url: '/feed/FeedList', + method: 'post', + data: data + }) +} + +// 修改配料清单 +export function updateFeedList(data) { + return request({ + url: '/feed/FeedList', + method: 'put', + data: data + }) +} + +// 删除配料清单 +export function delFeedList(id) { + return request({ + url: '/feed/FeedList/' + id, + method: 'delete' + }) +} diff --git a/src/api/feed/FeedPlan.js b/src/api/feed/FeedPlan.js new file mode 100644 index 0000000..b452daa --- /dev/null +++ b/src/api/feed/FeedPlan.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询饲喂计划列表 +export function listFeedPlan(query) { + return request({ + url: '/feed/FeedPlan/list', + method: 'get', + params: query + }) +} + +// 查询饲喂计划详细 +export function getFeedPlan(createDate) { + return request({ + url: '/feed/FeedPlan/' + createDate, + method: 'get' + }) +} + +// 新增饲喂计划 +export function addFeedPlan(data) { + return request({ + url: '/feed/FeedPlan', + method: 'post', + data: data + }) +} + +// 修改饲喂计划 +export function updateFeedPlan(data) { + return request({ + url: '/feed/FeedPlan', + method: 'put', + data: data + }) +} + +// 删除饲喂计划 +export function delFeedPlan(createDate) { + return request({ + url: '/feed/FeedPlan/' + createDate, + method: 'delete' + }) +} diff --git a/src/api/feed/FeedStatistic.js b/src/api/feed/FeedStatistic.js new file mode 100644 index 0000000..9ba9f49 --- /dev/null +++ b/src/api/feed/FeedStatistic.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询饲喂量统计列表 +export function listFeedStatistic(query) { + return request({ + url: '/feed/FeedStatistic/list', + method: 'get', + params: query + }) +} + +// 查询饲喂量统计详细 +export function getFeedStatistic(id) { + return request({ + url: '/feed/FeedStatistic/' + id, + method: 'get' + }) +} + +// 新增饲喂量统计 +export function addFeedStatistic(data) { + return request({ + url: '/feed/FeedStatistic', + method: 'post', + data: data + }) +} + +// 修改饲喂量统计 +export function updateFeedStatistic(data) { + return request({ + url: '/feed/FeedStatistic', + method: 'put', + data: data + }) +} + +// 删除饲喂量统计 +export function delFeedStatistic(id) { + return request({ + url: '/feed/FeedStatistic/' + id, + method: 'delete' + }) +} + +// 查询饲喂量统计列表 +export function initFeedStatistic(query) { + return request({ + url: '/feed/FeedStatistic/init', + method: 'get', + params: query + }) +} diff --git a/src/api/feed/FormulaList.js b/src/api/feed/FormulaList.js new file mode 100644 index 0000000..13621a4 --- /dev/null +++ b/src/api/feed/FormulaList.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配方列表列表 +export function listFormulaList(query) { + return request({ + url: '/feed/FormulaList/list', + method: 'get', + params: query + }) +} + +// 查询配方列表详细 +export function getFormulaList(code) { + return request({ + url: '/feed/FormulaList/' + code, + method: 'get' + }) +} + +// 新增配方列表 +export function addFormulaList(data) { + return request({ + url: '/feed/FormulaList', + method: 'post', + data: data + }) +} + +// 修改配方列表 +export function updateFormulaList(data) { + return request({ + url: '/feed/FormulaList', + method: 'put', + data: data + }) +} + +// 删除配方列表 +export function delFormulaList(code) { + return request({ + url: '/feed/FormulaList/' + code, + method: 'delete' + }) +} diff --git a/src/api/feed/FormulaManagement.js b/src/api/feed/FormulaManagement.js new file mode 100644 index 0000000..558673b --- /dev/null +++ b/src/api/feed/FormulaManagement.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询配方管理列表 +export function listFormulaManagement(query) { + return request({ + url: '/feed/FormulaManagement/list', + method: 'get', + params: query + }) +} + +// 查询配方管理详细 +export function getFormulaManagement(formulaId) { + return request({ + url: '/feed/FormulaManagement/' + formulaId, + method: 'get' + }) +} + +// 新增配方管理 +export function addFormulaManagement(data) { + return request({ + url: '/feed/FormulaManagement', + method: 'post', + data: data + }) +} + +// 修改配方管理 +export function updateFormulaManagement(data) { + return request({ + url: '/feed/FormulaManagement', + method: 'put', + data: data + }) +} + +// 删除配方管理 +export function delFormulaManagement(formulaIdAndBatchId) { + return request({ + url: '/feed/FormulaManagement/' + formulaIdAndBatchId, + method: 'delete' + }) +} diff --git a/src/api/feed/Material.js b/src/api/feed/Material.js new file mode 100644 index 0000000..b3ec4df --- /dev/null +++ b/src/api/feed/Material.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询原料列表 +export function listMaterial(query) { + return request({ + url: '/feed/material/list', + method: 'get', + params: query + }) +} + +// 查询原料详细 +export function getMaterial(materialId) { + return request({ + url: '/feed/material/' + materialId, + method: 'get' + }) +} + +// 新增原料 +export function addMaterial(data) { + return request({ + url: '/feed/material', + method: 'post', + data: data + }) +} + +// 修改原料 +export function updateMaterial(data) { + return request({ + url: '/feed/material', + method: 'put', + data: data + }) +} + +// 删除原料 +export function delMaterial(materialId) { + return request({ + url: '/feed/material/' + materialId, + method: 'delete' + }) +} diff --git a/src/api/mating_plan/generate.js b/src/api/mating_plan/generate.js index c224fbb..abee51a 100644 --- a/src/api/mating_plan/generate.js +++ b/src/api/mating_plan/generate.js @@ -60,11 +60,20 @@ export function updateBreedPlanGenerate(data) { }) } -// 审批配种计划 -export function approveBreedPlan(id) { +// 获取审批配种计划详情 +export function getApproveBreedPlan(id) { return request({ url: '/mating_plan/generate/approve/' + id, - method: 'put' + method: 'get' + }) +} + +// 确认审批配种计划 +export function confirmApproveBreedPlan(data) { + return request({ + url: '/mating_plan/generate/approve/confirm', + method: 'put', + data: data }) } @@ -76,6 +85,24 @@ export function viewBreedPlan(id) { }) } +// 导出配种计划详情 +export function exportBreedPlanDetails(id) { + return request({ + url: '/mating_plan/generate/export/' + id, + method: 'get', + responseType: 'blob' + }) +} + +// 修改配种计划详情 +export function updateBreedPlan(data) { + return request({ + url: '/mating_plan/generate/update', + method: 'put', + data: data + }) +} + // 删除配种计划生成 export function delBreedPlanGenerate(id) { return request({ diff --git a/src/api/mating_plan/mating_plan.js b/src/api/mating_plan/mating_plan.js index f856817..7d46169 100644 --- a/src/api/mating_plan/mating_plan.js +++ b/src/api/mating_plan/mating_plan.js @@ -41,4 +41,4 @@ export function delMating_plan(id) { url: '/mating_plan/mating_plan/' + id, method: 'delete' }) -} +} \ No newline at end of file diff --git a/src/api/miscarriage/miscarriage.js b/src/api/miscarriage/miscarriage.js new file mode 100644 index 0000000..117bba5 --- /dev/null +++ b/src/api/miscarriage/miscarriage.js @@ -0,0 +1,60 @@ +import request from '@/utils/request' + +// 查询流产记录列表 +export function listMiscarriage(query) { + return request({ + url: '/miscarriage/miscarriage/list', + method: 'get', + params: query + }) +} + +// 查询流产记录详细 +export function getMiscarriage(id) { + return request({ + url: '/miscarriage/miscarriage/' + id, + method: 'get' + }) +} + +// 根据耳号查询羊只信息 +export function getSheepInfo(manageTags) { + return request({ + url: '/miscarriage/miscarriage/sheep/' + manageTags, + method: 'get' + }) +} + +// 获取流产原因选项 +export function getReasonOptions() { + return request({ + url: '/miscarriage/miscarriage/reasonOptions', + method: 'get' + }) +} + +// 新增流产记录 +export function addMiscarriage(data) { + return request({ + url: '/miscarriage/miscarriage', + method: 'post', + data: data + }) +} + +// 修改流产记录 +export function updateMiscarriage(data) { + return request({ + url: '/miscarriage/miscarriage', + method: 'put', + data: data + }) +} + +// 删除流产记录 +export function delMiscarriage(id) { + return request({ + url: '/miscarriage/miscarriage/' + id, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/api/produce/bodyManage/body_measure.js b/src/api/produce/bodyManage/body_measure.js index 66862eb..99226d2 100644 --- a/src/api/produce/bodyManage/body_measure.js +++ b/src/api/produce/bodyManage/body_measure.js @@ -42,3 +42,10 @@ export function delBody_measure(id) { method: 'delete' }) } +//获取羊只类别列表 +export function getSheepTypeList() { + return request({ + url: '/base/base/list', + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/produce/manage_sheep/trans_group.js b/src/api/produce/manage_sheep/trans_group.js index 0f0bba6..af75f5b 100644 --- a/src/api/produce/manage_sheep/trans_group.js +++ b/src/api/produce/manage_sheep/trans_group.js @@ -60,3 +60,12 @@ export function approveScTransGroup(data) { data }) } + +// 获取所有牧场列表 +export function listRanch() { + return request({ + url: '/ranch/ranch/list', + method: 'get', + params: { pageNum: 1, pageSize: 9999 } + }); +} \ No newline at end of file diff --git a/src/api/ram_file/breed_ram_file.js b/src/api/ram_file/breed_ram_file.js new file mode 100644 index 0000000..0784f82 --- /dev/null +++ b/src/api/ram_file/breed_ram_file.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询种公羊档案列表 +export function listBreedRamFile(query) { + return request({ + url: '/ram_file/bas_ram_file/list', + method: 'get', + params: query + }) +} + +// 查询种公羊档案详细 +export function getBreedRamFile(id) { + return request({ + url: '/ram_file/bas_ram_file/' + id, + method: 'get' + }) +} + +// 新增种公羊档案 +export function addBreedRamFile(data) { + return request({ + url: '/ram_file/bas_ram_file', + method: 'post', + data: data + }) +} + +// 修改种公羊档案 +export function updateBreedRamFile(data) { + return request({ + url: '/ram_file/bas_ram_file', + method: 'put', + data: data + }) +} + +// 删除种公羊档案 +export function delBreedRamFile(id) { + return request({ + url: '/ram_file/bas_ram_file/' + id, + method: 'delete' + }) +} + +// 导出种公羊档案 +export function exportBreedRamFile(query) { + return request({ + url: '/ram_file/bas_ram_file/export', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/sale/customer/customer.js b/src/api/sale/customer/customer.js new file mode 100644 index 0000000..3fe02fd --- /dev/null +++ b/src/api/sale/customer/customer.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +export function listCustomer(query) { + return request({ + url: '/customer/customer/list', + method: 'get', + params: query + }) +} + +export function getCustomer(id) { + return request({ + url: '/customer/customer/' + id, + method: 'get' + }) +} + +export function addCustomer(data) { + return request({ + url: '/customer/customer', + method: 'post', + data: data + }) +} + +export function updateCustomer(data) { + return request({ + url: '/customer/customer', + method: 'put', + data: data + }) +} + +export function delCustomer(id) { + return request({ + url: '/customer/customer/' + id, + method: 'delete' + }) +} \ No newline at end of file diff --git a/src/api/sale/saleRecord/saleRecord.js b/src/api/sale/saleRecord/saleRecord.js new file mode 100644 index 0000000..5eb4513 --- /dev/null +++ b/src/api/sale/saleRecord/saleRecord.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询羊只销售记录列表 +export function listSaleRecord(query) { + return request({ + url: '/saleRecord/saleRecord/list', + method: 'get', + params: query + }) +} + +// 查询羊只销售记录详细 +export function getSaleRecord(id) { + return request({ + url: '/saleRecord/saleRecord/' + id, + method: 'get' + }) +} + +// 新增羊只销售记录 +export function addSaleRecord(data) { + return request({ + url: '/saleRecord/saleRecord', + method: 'post', + data: data + }) +} + +// 修改羊只销售记录 +export function updateSaleRecord(data) { + return request({ + url: '/saleRecord/saleRecord', + method: 'put', + data: data + }) +} + +// 删除羊只销售记录 +export function delSaleRecord(ids) { + return request({ + url: '/saleRecord/saleRecord/' + ids, + method: 'delete' + }) +} + +// 导出羊只销售记录 +export function exportSaleRecord(query) { + return request({ + url: '/saleRecord/saleRecord/export', + method: 'post', + data: query + }) +} + +// 根据耳号查询羊只信息 +export function getSheepInfo(bsManageTags) { + return request({ + url: '/saleRecord/saleRecord/getSheepInfo', + method: 'get', + params: { bsManageTags } + }) +} diff --git a/src/api/sheep_death/death.js b/src/api/sheep_death/death.js new file mode 100644 index 0000000..6f85df7 --- /dev/null +++ b/src/api/sheep_death/death.js @@ -0,0 +1,52 @@ +import request from '@/utils/request' + +// 查询羊只死淘记录列表 +export function listDeath(query) { + return request({ + url: '/sheep_death/death/list', + method: 'get', + params: query + }) +} + +// 查询羊只死淘记录详细 +export function getDeath(id) { + return request({ + url: '/sheep_death/death/' + id, + method: 'get' + }) +} + +// 新增羊只死淘记录 +export function addDeath(data) { + return request({ + url: '/sheep_death/death', + method: 'post', + data: data + }) +} + +// 修改羊只死淘记录 +export function updateDeath(data) { + return request({ + url: '/sheep_death/death', + method: 'put', + data: data + }) +} + +// 删除羊只死淘记录 +export function delDeath(id) { + return request({ + url: '/sheep_death/death/' + id, + method: 'delete' + }) +} + +// 根据管理耳号查询羊只信息 +export function getSheepInfo(manageTags) { + return request({ + url: '/sheep_death/death/sheepInfo/' + manageTags, + method: 'get' + }) +} \ No newline at end of file diff --git a/src/api/stock/in.js b/src/api/stock/in.js new file mode 100644 index 0000000..a16d659 --- /dev/null +++ b/src/api/stock/in.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询入库记录列表 +export function listIn(query) { + return request({ + url: '/stock/in/list', + method: 'get', + params: query + }) +} + +// 查询入库记录详细 +export function getIn(stockInCode) { + return request({ + url: '/stock/in/' + stockInCode, + method: 'get' + }) +} + +// 新增入库记录 +export function addIn(data) { + return request({ + url: '/stock/in', + method: 'post', + data: data + }) +} + +// 修改入库记录 +export function updateIn(data) { + return request({ + url: '/stock/in', + method: 'put', + data: data + }) +} + +// 删除入库记录 +export function delIn(stockInCode) { + return request({ + url: '/stock/in/' + stockInCode, + method: 'delete' + }) +} diff --git a/src/api/stock/management.js b/src/api/stock/management.js new file mode 100644 index 0000000..da53806 --- /dev/null +++ b/src/api/stock/management.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询物资管理列表 +export function listManagement(query) { + return request({ + url: '/stock/management/list', + method: 'get', + params: query + }) +} + +// 查询物资管理详细 +export function getManagement(materialManagementCode) { + return request({ + url: '/stock/management/' + materialManagementCode, + method: 'get' + }) +} + +// 新增物资管理 +export function addManagement(data) { + return request({ + url: '/stock/management', + method: 'post', + data: data + }) +} + +// 修改物资管理 +export function updateManagement(data) { + return request({ + url: '/stock/management', + method: 'put', + data: data + }) +} + +// 删除物资管理 +export function delManagement(materialManagementCode) { + return request({ + url: '/stock/management/' + materialManagementCode, + method: 'delete' + }) +} diff --git a/src/api/stock/out.js b/src/api/stock/out.js new file mode 100644 index 0000000..8f78f86 --- /dev/null +++ b/src/api/stock/out.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询出库记录列表 +export function listOut(query) { + return request({ + url: '/stock/out/list', + method: 'get', + params: query + }) +} + +// 查询出库记录详细 +export function getOut(stockOutCode) { + return request({ + url: '/stock/out/' + stockOutCode, + method: 'get' + }) +} + +// 新增出库记录 +export function addOut(data) { + return request({ + url: '/stock/out', + method: 'post', + data: data + }) +} + +// 修改出库记录 +export function updateOut(data) { + return request({ + url: '/stock/out', + method: 'put', + data: data + }) +} + +// 删除出库记录 +export function delOut(stockOutCode) { + return request({ + url: '/stock/out/' + stockOutCode, + method: 'delete' + }) +} diff --git a/src/views/Breeding_records/Breeding_records/index.vue b/src/views/Breeding_records/Breeding_records/index.vue new file mode 100644 index 0000000..7ca9f3e --- /dev/null +++ b/src/views/Breeding_records/Breeding_records/index.vue @@ -0,0 +1,663 @@ + + + + + \ No newline at end of file diff --git a/src/views/Pregnancy_Test/Pregnancy_Test/index.vue b/src/views/Pregnancy_Test/Pregnancy_Test/index.vue index 9b423b9..61148e8 100644 --- a/src/views/Pregnancy_Test/Pregnancy_Test/index.vue +++ b/src/views/Pregnancy_Test/Pregnancy_Test/index.vue @@ -89,6 +89,12 @@ + + + + @@ -96,12 +102,13 @@ 孕检 - + - @@ -110,6 +117,13 @@ {{ parseTime(scope.row.matingDate, '{y}-{m}-{d}') }} + + + + @@ -154,12 +168,13 @@ /> - + - + + - + @@ -168,15 +183,17 @@ v-model="form.datetime" type="date" value-format="YYYY-MM-DD" - placeholder="请选择孕检日期"> + placeholder="请选择孕检日期" + style="width: 100%"> - + + - + @@ -185,11 +202,18 @@ - + - + + @@ -197,7 +221,7 @@ - + @@ -205,48 +229,42 @@ - + + - + - - 羊只信息 - + + 配种信息 + - - + + - - + + - - + + - - - - - - - - - - - - - - - + + + + @@ -261,7 +279,7 @@ \ No newline at end of file diff --git a/src/views/Weaning/weaning_record/index.vue b/src/views/Weaning/weaning_record/index.vue index e65629f..8f668e7 100644 --- a/src/views/Weaning/weaning_record/index.vue +++ b/src/views/Weaning/weaning_record/index.vue @@ -130,14 +130,15 @@ - - - - + + + + + diff --git a/src/views/bas_ram_file/bas_ram_file/index.vue b/src/views/bas_ram_file/bas_ram_file/index.vue new file mode 100644 index 0000000..1da76b0 --- /dev/null +++ b/src/views/bas_ram_file/bas_ram_file/index.vue @@ -0,0 +1,1204 @@ + + + + + \ No newline at end of file diff --git a/src/views/biosafety/deworm/index.vue b/src/views/biosafety/deworm/index.vue index 5ef0111..bda6153 100644 --- a/src/views/biosafety/deworm/index.vue +++ b/src/views/biosafety/deworm/index.vue @@ -2,13 +2,13 @@
- - - + + + @@ -29,6 +29,9 @@ + + + @@ -40,9 +43,6 @@ - - - @@ -191,7 +191,7 @@ - + @@ -225,7 +225,7 @@ diff --git a/src/views/biosafety/diagnosis/add.vue b/src/views/biosafety/diagnosis/add.vue index c5c3997..c9a1c0e 100644 --- a/src/views/biosafety/diagnosis/add.vue +++ b/src/views/biosafety/diagnosis/add.vue @@ -3,7 +3,7 @@
-

添加治疗记录

+

羊只诊疗

@@ -95,14 +95,14 @@ - - - + @@ -139,7 +139,7 @@ import { listSheepfold_management } from "@/api/fileManagement/sheepfold_managem import { addDiagnosis } from "@/api/biosafety/diagnosis" const { proxy } = getCurrentInstance() -const { diag_status } = proxy.useDict( "diag_status") +const { diag_result } = proxy.useDict( "diag_result") diff --git a/src/views/biosafety/diagnosis/index.vue b/src/views/biosafety/diagnosis/index.vue index f1b64c7..90db5f7 100644 --- a/src/views/biosafety/diagnosis/index.vue +++ b/src/views/biosafety/diagnosis/index.vue @@ -2,14 +2,13 @@
- - - - - + + + + - + @@ -83,19 +82,19 @@ - + - + - - + + \ No newline at end of file diff --git a/src/views/biosafety/treatment/add.vue b/src/views/biosafety/treatment/add.vue index 1fd2571..c10d79d 100644 --- a/src/views/biosafety/treatment/add.vue +++ b/src/views/biosafety/treatment/add.vue @@ -147,7 +147,17 @@ - + + + - + + + + - + @@ -182,6 +201,13 @@ + + + + + + + @@ -199,7 +225,7 @@ - + @@ -261,14 +287,14 @@ - + @@ -313,23 +339,29 @@ - + + + + - + @@ -347,6 +379,13 @@ + + + + + + + @@ -354,6 +393,7 @@ + + + + + + {{ no }} + + + + + + + + + + + + + + + + + +
@@ -369,6 +435,7 @@ import { ref, reactive, onMounted, getCurrentInstance } from 'vue' import { listTreatment, getTreatment, delTreatment, addTreatment, updateTreatment } from '@/api/biosafety/treatment' import { listDisease } from '@/api/biosafety/disease' +import { listSheepfold_management } from "@/api/fileManagement/sheepfold_management" import { listPrescription, getPrescription } from '@/api/biosafety/prescription' import { listUnit } from '@/api/biosafety/unit' import { listUsage } from '@/api/biosafety/usage' @@ -379,7 +446,8 @@ import { useRouter } from 'vue-router' const router = useRouter() const { proxy } = getCurrentInstance() -const { sheep_gender } = proxy.useDict("sheep_gender") +const { sheep_gender, diag_result, treat_status } = proxy.useDict("sheep_gender", "diag_result", "treat_status") + /* ---------- 列表区域 ---------- */ const treatmentList = ref([]) @@ -390,6 +458,7 @@ const single = ref(true) const multiple = ref(true) const total = ref(0) const daterangeDatetime = ref([]) +const sheepfolds = ref([]) const queryParams = reactive({ pageNum: 1, @@ -421,6 +490,7 @@ const addForm = reactive({ diseasePid: null, diseaseId: null, veterinarian: '', + stats: '', comment: '' }) @@ -438,6 +508,7 @@ const editForm = reactive({ sheepType: '', monthAge: '', gender: '', + status: '', parity: '', breed: '', lactDay: '', @@ -451,9 +522,44 @@ const rules = { } const swPresDetailList = ref([ - { mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: '', batchNumber: '' } + { mediId: null, dosage: 0, unit: null, usageId: null, usetime: new Date().toISOString().slice(0, 10), manufacturer: '', batchNumber: '' } ]) +/* ---------- 新增诊疗 ---------- */ +const diagnosisDialog = ref(false) +const selectedSheepNos = ref([]) +const addDia = reactive({ + sheepfoldId: null, + result: null, + datetime: new Date().toISOString().slice(0, 10) +}) + + +function handleAddDiagnosis() { + if (!ids.value.length) { + proxy.$modal.msgWarning('请至少选择一条治疗记录') + return + } + selectedSheepNos.value = treatmentList.value + .filter(item => ids.value.includes(item.id)) + .map(item => item.sheepNo) + diagnosisDialog.value = true +} + +function submitDiagnosis() { + const data = { + treatIds: ids.value, + result: addDia.result, + datetime: addDia.datetime, + sheepfoldId: addDia.sheepfoldId + } + request.post('/diagnosis/diagnosis/adds', data).then(() => { + proxy.$modal.msgSuccess('诊疗成功') + diagnosisDialog.value = false + getList() + }) +} + /* ---------- 列表查询 ---------- */ function getList() { loading.value = true @@ -498,7 +604,15 @@ function handleSelectPrescription(id) { /* ---------- 药品明细 ---------- */ function handleAddSwPresDetail() { - swPresDetailList.value.push({ mediId: null, dosage: 0, unit: null, usageId: null, manufacturer: '', batchNumber: '' }) + swPresDetailList.value.push({ + mediId: null, + dosage: 0, + unit: null, + usageId: null, + usetime: new Date().toISOString().slice(0, 10), + manufacturer: '', + batchNumber: '' + }) } function deletePresDetail(row) { swPresDetailList.value.splice(swPresDetailList.value.indexOf(row), 1) @@ -572,6 +686,7 @@ function handleUpdate(row) { gender: res.data.gender, parity: res.data.parity, breed: res.data.breed, + status: res.data.status, lactDay: res.data.lactDay, gestDay: res.data.gestDay }) @@ -614,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, { @@ -668,6 +783,8 @@ onMounted(() => { listMedicine().then(res => { medicines.value = res.rows.map(item => ({ value: item.id, label: item.name })) }) + listSheepfold_management().then(res => { + sheepfolds.value = res.rows.map(item => ({ id: item.id, name: item.sheepfoldName })) + }) }) - diff --git a/src/views/biosafety/usageInfo/index.vue b/src/views/biosafety/usageInfo/index.vue index 2798caf..ddb9c8d 100644 --- a/src/views/biosafety/usageInfo/index.vue +++ b/src/views/biosafety/usageInfo/index.vue @@ -1,117 +1,217 @@ \ No newline at end of file + +// 表单重置 +function reset() { + form.value = { + id: null, + parity: null, + coef: null + } + proxy.resetForm("parityCorrectionRef") +} + +/** 搜索按钮操作 */ +function handleQuery() { + queryParams.value.pageNum = 1 + getList() +} + +/** 重置按钮操作 */ +function resetQuery() { + proxy.resetForm("queryRef") + handleQuery() +} + +// 多选框选中数据 +function handleSelectionChange(selection) { + ids.value = selection.map(item => item.id) + single.value = selection.length != 1 + multiple.value = !selection.length +} + +/** 新增按钮操作 */ +function handleAdd() { + reset() + open.value = true + title.value = "添加胎次校正" +} + +/** 修改按钮操作 */ +function handleUpdate(row) { + reset() + const _id = row.id || ids.value + getParityCorrection(_id).then(response => { + form.value = response.data + open.value = true + title.value = "修改胎次校正" + }) +} + +/** 提交按钮 */ +function submitForm() { + proxy.$refs["parityCorrectionRef"].validate(valid => { + if (valid) { + if (form.value.id != null) { + updateParityCorrection(form.value).then(() => { + proxy.$modal.msgSuccess("修改成功") + open.value = false + getList() + }) + } else { + addParityCorrection(form.value).then(() => { + proxy.$modal.msgSuccess("新增成功") + open.value = false + getList() + }) + } + } + }) +} + +/** 删除按钮操作 */ +function handleDelete(row) { + const _ids = row.id || ids.value + proxy.$modal.confirm('是否确认删除胎次校正编号为"' + _ids + '"的数据项?').then(function() { + return delParityCorrection(_ids) + }).then(() => { + getList() + proxy.$modal.msgSuccess("删除成功") + }).catch(() => {}) +} + +getList() + diff --git a/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue b/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue index cc368f9..f37b226 100644 --- a/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue +++ b/src/views/dairyProducts/rawMilkTest/rawMilkTest/index.vue @@ -236,6 +236,10 @@ diff --git a/src/views/feed/FeedPlan/index.vue b/src/views/feed/FeedPlan/index.vue new file mode 100644 index 0000000..aee8781 --- /dev/null +++ b/src/views/feed/FeedPlan/index.vue @@ -0,0 +1,419 @@ + + + diff --git a/src/views/feed/FeedStatistic/index.vue b/src/views/feed/FeedStatistic/index.vue new file mode 100644 index 0000000..77c5252 --- /dev/null +++ b/src/views/feed/FeedStatistic/index.vue @@ -0,0 +1,636 @@ + + + diff --git a/src/views/feed/FormulaList/index.vue b/src/views/feed/FormulaList/index.vue new file mode 100644 index 0000000..aff1df4 --- /dev/null +++ b/src/views/feed/FormulaList/index.vue @@ -0,0 +1,229 @@ + + + diff --git a/src/views/feed/FormulaManagement/index.vue b/src/views/feed/FormulaManagement/index.vue new file mode 100644 index 0000000..a55708a --- /dev/null +++ b/src/views/feed/FormulaManagement/index.vue @@ -0,0 +1,770 @@ + + + diff --git a/src/views/mating_plan/mating_plan/generate/index.vue b/src/views/mating_plan/mating_plan/generate/index.vue index a81af82..39509a1 100644 --- a/src/views/mating_plan/mating_plan/generate/index.vue +++ b/src/views/mating_plan/mating_plan/generate/index.vue @@ -9,6 +9,24 @@ @keyup.enter="handleQuery" />
+ + + + + + + + + @@ -48,6 +66,13 @@ + + + + + + + + + {{ approveData.planInfo.planName }} + + 同期发情配种计划 + 本交配种计划 + + {{ approveData.planInfo.planDate }} + {{ approveData.planInfo.totalEweCount }} + {{ approveData.planInfo.totalRamCount }} + {{ approveData.planInfo.breedRatio }} + + + 配种计划详情(可编辑) + + + + + + + + + + + + + + + + + + + + + + + + + + + - + {{ planInfo.planName }} + + 同期发情配种计划 + 本交配种计划 + {{ planInfo.planDate }} 待审批 @@ -193,29 +325,90 @@ {{ planInfo.approver }} + + + + 导出配种计划详情 + + + 配种计划详情 - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + {{ sheepDetail.manage_tags }} + {{ sheepDetail.variety }} + {{ sheepDetail.family }} + {{ sheepDetail.sheep_type }} + {{ sheepDetail.breed_status }} + {{ sheepDetail.birthday }} + {{ sheepDetail.month_age }} + {{ sheepDetail.current_weight }}kg + {{ sheepDetail.parity }} + + + + + + + + + {{ sheepDetail.sheepfold_name }} + {{ sheepDetail.comment }} + {{ sheepDetail.reproduction_info }} + +
-// 初始加载数据 -getList() - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/mating_plan/mating_plan/index.vue b/src/views/mating_plan/mating_plan/mating_plan/index.vue similarity index 66% rename from src/views/mating_plan/mating_plan/index.vue rename to src/views/mating_plan/mating_plan/mating_plan/index.vue index ab78192..c84f453 100644 --- a/src/views/mating_plan/mating_plan/index.vue +++ b/src/views/mating_plan/mating_plan/mating_plan/index.vue @@ -3,18 +3,18 @@ @@ -26,40 +26,40 @@ 新增 修改 删除 导出 @@ -67,10 +67,17 @@ - + - + + + \ No newline at end of file diff --git a/src/views/produce/manage_sheep/transition_info/index.vue b/src/views/produce/manage_sheep/transition_info/index.vue index 7538b49..1ced6d2 100644 --- a/src/views/produce/manage_sheep/transition_info/index.vue +++ b/src/views/produce/manage_sheep/transition_info/index.vue @@ -2,14 +2,36 @@
+ + + + + + - + + + + + + + + + + + + + + @@ -25,10 +47,6 @@ - - - 搜索 重置 @@ -41,10 +59,10 @@ 新增 - + 删除 @@ -59,9 +77,21 @@ - + + + + + + + + + - + - - - - + - + + + @@ -94,33 +125,51 @@ - - - +
+ + + + + 已选 {{ form.manageTags.length }} 个 + +
- + - + + + + + + + + + + + + @@ -143,6 +192,9 @@ + + + @@ -161,6 +213,12 @@ + + + + +
\ No newline at end of file + + + \ No newline at end of file diff --git a/src/views/produce/other/castrate/index.vue b/src/views/produce/other/castrate/index.vue index 4a74ec7..873e55b 100644 --- a/src/views/produce/other/castrate/index.vue +++ b/src/views/produce/other/castrate/index.vue @@ -2,27 +2,24 @@
- - + + + + + - - - - - - - 搜索 重置 @@ -55,17 +52,18 @@ + + + - + + - - - - +