diff --git a/sub-government-affairs-service/src/apis/trace/products.js b/sub-government-affairs-service/src/apis/trace/products.js
index 06b7c88..006fcb0 100644
--- a/sub-government-affairs-service/src/apis/trace/products.js
+++ b/sub-government-affairs-service/src/apis/trace/products.js
@@ -27,3 +27,31 @@ export function deleteTraceCompany(ids) {
method: 'GET',
});
}
+
+// 原材料质检管理 - 列表
+export function getQualityManageList(params) {
+ return request('/trace/code/qualityManage/page', {
+ method: 'GET',
+ params,
+ });
+}
+// 原材料质检管理 - 详情
+export function getQualityInfo(ids) {
+ return request('/trace/code/qualityManage/qualityInfo/' + ids, {
+ method: 'GET',
+ });
+}
+
+// 包装赋码管理 - 列表
+export function getTraceMangePageList(params) {
+ return request('/trace/traceMange/traceMangePage', {
+ method: 'GET',
+ params,
+ });
+}
+// 包装赋码管理 - 详情
+export function getTraceProductInfo(ids) {
+ return request('/trace/traceMange/traceProductInfo/' + ids, {
+ method: 'GET',
+ });
+}
diff --git a/sub-government-affairs-service/src/assets/images/trace/testReport.png b/sub-government-affairs-service/src/assets/images/trace/testReport.png
new file mode 100644
index 0000000..69f9336
Binary files /dev/null and b/sub-government-affairs-service/src/assets/images/trace/testReport.png differ
diff --git a/sub-government-affairs-service/src/views/output-products/output-info/index.vue b/sub-government-affairs-service/src/views/output-products/output-info/index.vue
index 22ec01c..ecb6d7f 100644
--- a/sub-government-affairs-service/src/views/output-products/output-info/index.vue
+++ b/sub-government-affairs-service/src/views/output-products/output-info/index.vue
@@ -239,15 +239,9 @@ const dialogFormRules = ref({
yield: [{ required: true, message: '请输入亩产量', trigger: ['change', 'blur'] }],
detectionTime: [{ required: true, message: '请选择使用时间', trigger: 'blur' }],
});
-watch(
- () => dialogForm.yield,
- (val) => {
- console.log(val);
- console.log(dialogForm.area);
- console.log(val * dialogForm.area);
- dialogForm.totalYield = val * dialogForm.area;
- }
-);
+watch([() => dialogForm.yield, () => dialogForm.area], ([newYield, newArea], [oldYield, oldArea]) => {
+ dialogForm.totalYield = (newYield * newArea).toFixed(2);
+});
const addItem = async () => {
// ElMessage.success('点击新增!');
restDialogForm();
diff --git a/sub-government-affairs-service/src/views/trace/products/inspection/index.vue b/sub-government-affairs-service/src/views/trace/products/inspection/index.vue
index d1db47a..cf9ce96 100644
--- a/sub-government-affairs-service/src/views/trace/products/inspection/index.vue
+++ b/sub-government-affairs-service/src/views/trace/products/inspection/index.vue
@@ -14,17 +14,17 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
查询
@@ -50,10 +50,8 @@
@page-change="handlePaginationChange"
>
-
-
-
+
+
@@ -142,6 +140,8 @@
+
+
@@ -152,23 +152,25 @@ import { ElMessage } from 'element-plus';
import inputSuppliesApi from '@/apis/inputSuppliesApi';
const { getMaterailTypes } = inputSuppliesApi;
import {
- getFertilizeUseRegulatoryRecords,
fertilizeUseRegulatorySave,
editFertilizeUseRegulatory,
delFertilizeUseRegulatory,
getLandList,
} from '@/apis/inputSuppliesApi/supervisionOfInputs';
-import request from '@/utils/axios';
+import { getQualityManageList, getQualityInfo } from '@/apis/trace/products';
import { GetDictTypeInfo } from '@/apis/system/dictType';
import { useApp } from '@/hooks';
const app = useApp();
+import imgUrl from '@/assets/images/trace/testReport.png';
// 查询条件
const formInline = reactive({
harvestBatch: '',
- name: '',
+ productName: '',
seedTypeId: '',
- date1: '',
+ qualityTime: '',
+ countryOfOrigin: '',
+ businessEntity: '',
current: 1,
size: 10,
});
@@ -182,120 +184,21 @@ const resetForm = () => {
};
// 表格数据
-const tableData = ref([
- {
- batchCode: 'GM2025041201',
- productTypes: '黄皮甘蔗',
- name: '合格',
- purchaseDate: '质检报告1',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '李红梅',
- plotCode: '2025-04-13 00:00:00',
- plotName: '未检出农药残留,符合国家标准',
- },
- {
- batchCode: 'GM2025041802',
- productTypes: '圆茄',
- name: '合格',
- purchaseDate: '质检报告2',
- number: '微生物检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '大肠杆菌、沙门氏菌',
- baseName: '刀玉兰',
- plotCode: '2025-04-19 00:00:00',
- plotName: '未检出有害微生物,符合国家标准',
- },
- {
- batchCode: 'GM2025041503',
- productTypes: '小米辣',
- name: '合格',
- purchaseDate: '质检报告3',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '马晓芳',
- plotCode: '2025-04-16 00:00:00',
- plotName: '农药残留量低于国家标准',
- },
- {
- batchCode: 'GM2025042004',
- productTypes: '丝瓜',
- name: '合格',
- purchaseDate: '质检报告4',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '黄文斌',
- plotCode: '2025-04-21 00:00:00',
- plotName: '未检出农药残留,符合国家标准',
- },
- {
- batchCode: 'GM2025041705',
- productTypes: '苦瓜',
- name: '合格',
- purchaseDate: '质检报告5',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '李四',
- plotCode: '2025-04-18 00:00:00',
- plotName: '农药残留量低于国家标准',
- },
- {
- batchCode: 'GM2025042206',
- productTypes: '香蕉',
- name: '合格',
- purchaseDate: '质检报告6',
- number: '微生物检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '大肠杆菌、沙门氏菌',
- baseName: '杨志明',
- plotCode: '2025-04-23 00:00:00',
- plotName: '未检出有害微生物,符合国家标准',
- },
- {
- batchCode: 'GM2025041907',
- productTypes: '榴莲',
- name: '合格',
- purchaseDate: '质检报告7',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '张丽华',
- plotCode: '2025-04-20 00:00:00',
- plotName: '农药残留量低于国家标准',
- },
- {
- batchCode: 'GM2025042108',
- productTypes: '芒果',
- name: '合格',
- purchaseDate: '质检报告8',
- number: '农残检测',
- Unit: '耿马县农产品质检中心',
- baseCode: '农药残留量',
- baseName: '周建国',
- plotCode: '2025-04-22 00:00:00',
- plotName: '未检出农药残留,符合国家标准',
- },
-]);
+const tableData = ref();
const selectedIds = ref([]);
const tableLoading = ref(false);
const tableTotal = ref(0);
const columns = ref([
- { prop: 'batchCode', label: '采收批次编码' },
- { prop: 'productTypes', label: '原材料名称' },
- { prop: 'name', label: '质检结果' },
- { prop: 'purchaseDate', label: '质检报告', slotName: 'purchaseDate' },
- { prop: 'number', label: '质检类型' },
- { prop: 'Unit', label: '质检机构' },
- { prop: 'baseCode', label: '质检项目' },
- { prop: 'baseName', label: '质检人' },
- // { prop: 'baseAddress', label: '基地地址' },
- { prop: 'plotCode', label: '质检时间' },
- { prop: 'plotName', label: '质检说明', width: 200 },
- { prop: 'action', label: '操作', slotName: 'action', width: 100, fixed: 'right' },
+ { prop: 'harvestBatch', label: '采收批次编码' },
+ { prop: 'productName', label: '原材料名称' },
+ { prop: 'qualityReportUrl', label: '质检报告', slotName: 'qualityReportUrl' },
+ { prop: 'qualityTypeName', label: '质检类型' },
+ { prop: 'qualityUnit', label: '质检机构' },
+ { prop: 'qualityProject', label: '质检项目' },
+ { prop: 'qualityPerson', label: '质检人' },
+ { prop: 'qualityTime', label: '质检时间' },
+ { prop: 'qualityDescribe', label: '质检说明', width: 200 },
+ // { prop: 'action', label: '操作', slotName: 'action', width: 100, fixed: 'right' },
]);
const handlePaginationChange = ({ page, pageSize }) => {
formInline.current = page;
@@ -303,18 +206,18 @@ const handlePaginationChange = ({ page, pageSize }) => {
loadData();
};
const loadData = async () => {
- // tableLoading.value = true;
- // try {
- // let response = await getFertilizeUseRegulatoryRecords(formInline);
- // tableLoading.value = false;
- // if (response.code == 200) {
- // tableData.value = response.data.records;
- // tableTotal.value = response.data.total;
- // }
- // } catch (error) {
- // tableLoading.value = false;
- // console.error(error);
- // }
+ tableLoading.value = true;
+ try {
+ let response = await getQualityManageList(formInline);
+ tableLoading.value = false;
+ if (response.code == 200) {
+ tableData.value = response.data.records;
+ tableTotal.value = response.data.total;
+ }
+ } catch (error) {
+ tableLoading.value = false;
+ console.error(error);
+ }
};
const extractThirdLevelChildren = (dataArray) => {
@@ -383,6 +286,15 @@ const dialogFormRules = ref({
detectionUnit: [{ required: true, message: '请输入检测单位', trigger: 'blur' }],
});
+const srcList = ref([]);
+const showPreview = ref(false);
+
+const seeImg = (row) => {
+ console.log(row);
+ srcList.value = [row.qualityReportUrl ?? imgUrl];
+ showPreview.value = true;
+};
+
const addItem = async () => {
ElMessage.success('点击新增!');
// restDialogForm();
@@ -435,9 +347,7 @@ const setDialogForm2 = (row) => {
};
// 获取地块信息
const getDetails = async () => {
- let response = await request({
- url: `/land-resource/landManage/getLandInfo?landId=${dialogForm.landId}`,
- });
+ let response = await getQualityInfo(dialogForm.landId);
console.log(response);
if (response.code == 200) {
if (response.data) {
@@ -599,7 +509,7 @@ onMounted(() => {
onSubmit();
getLandsList();
getEntityOptions();
- // getSeedTypeList();
+ getSeedTypeList();
});