From 21eaf20767aee0db24b679b798398dc735b50118 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: 星期四, 18 九月 2025 15:52:26 +0800
Subject: [PATCH] 修改
---
src/views/work/procurementPlatform/warehouseManagement/monthlyInspectionRecord/index.vue | 61 +++++++-----------------------
1 files changed, 14 insertions(+), 47 deletions(-)
diff --git a/src/views/work/procurementPlatform/warehouseManagement/monthlyInspectionRecord/index.vue b/src/views/work/procurementPlatform/warehouseManagement/monthlyInspectionRecord/index.vue
index 96654b2..e92382f 100644
--- a/src/views/work/procurementPlatform/warehouseManagement/monthlyInspectionRecord/index.vue
+++ b/src/views/work/procurementPlatform/warehouseManagement/monthlyInspectionRecord/index.vue
@@ -36,9 +36,10 @@
<el-table v-loading="loading" :data="dataList" :border="true" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
+ <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" />
<el-table-column label="名称" align="center">
<template #default="scope">
- <span>{{scope.row.deptName}}登记</span>
+ <span>{{scope.row.recordName}}登记</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
@@ -74,6 +75,7 @@
import {generateWordDocument} from "@/utils/exportWord";
import {delTable, getTable} from "@/api/qualityObjectives/table";
import {delNeedDiscren, getNeedDiscren} from "@/api/need/need";
+import {delMonthlyRecord, getMonthlyRecord} from "@/api/monthlyInspectionRecord";
const { proxy } = getCurrentInstance();
const loading = ref(false);
const noticeRef = ref();
@@ -112,16 +114,15 @@
}
});
const getList = async () => {
- // loading.value = true;
- // const res = await getNeedDiscren(data.queryParams);
- // if(res.code === 200){
- // dataList.value = res.data.list
- // total.value = res.data.total
- // }else{
- // ElMessage.warning(res.message)
- // }
- // loading.value = false;
- dataList.value = [{}]
+ loading.value = true;
+ const res = await getMonthlyRecord(data.queryParams);
+ if(res.code === 200){
+ dataList.value = res.data.list
+ total.value = res.data.total
+ }else{
+ ElMessage.warning(res.message)
+ }
+ loading.value = false;
}
const searchClick = () => {
@@ -189,41 +190,7 @@
const startGeneration = async () => {
const data = JSON.parse(JSON.stringify(choosedData.value))
data.forEach(item => {
- item.expectContents = [
- {
- name: '张三',
- expectContentMesses: [
- {
- need: 'xxx',
- personName: 'x',
- visit:true,
- network: true,
- other: false
-
- },
- {
- need: '22',
- personName: '2',
- visit:false,
- network: false,
- other: true
-
- },
- ]
- }
- ]
- item.tableData = item.expectContents.map((i,index) => {
- return{
- ...i,
- expectContentMesses: i.expectContentMesses.map((q,qindex) => {
- return{
- ...q,
- first: qindex == 0,
- num: index+1,
- }
- })
- }
- })
+ item.tableData = item.inspectionMesses
console.log('xxx',item.tableData)
try {
generateWordDocument(templatePath.value, item, item.companyName + `_月度检查记录表.docx`);
@@ -248,7 +215,7 @@
type: 'warning',
})
.then( async() => {
- const res = await delNeedDiscren(val.id);
+ const res = await delMonthlyRecord(val.id);
if(res.code === 200){
ElMessage({
type: 'success',
--
Gitblit v1.9.2