| | |
| | | <el-table-column label="企业名称" prop="companyName" align="center" v-if="data.isAdmin" /> |
| | | <el-table-column label="名称" align="center"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.recordName}}</span> |
| | | <span>{{scope.row.year}}年度质量体系改进计划</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160"> |
| | |
| | | import {delTable, getTable} from "@/api/qualityObjectives/table"; |
| | | import {delNeedDiscren, getNeedDiscren} from "@/api/need/need"; |
| | | import {delCustomerNeed, getCustomerNeed} from "@/api/customerNeed"; |
| | | import {delInside, getInside} from "@/api/continuousImprovement"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const noticeRef = ref(); |
| | |
| | | } |
| | | }); |
| | | const getList = async () => { |
| | | // loading.value = true; |
| | | // const res = await getCustomerNeed(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 getInside(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 = () => { |
| | |
| | | const startGeneration = async () => { |
| | | const data = JSON.parse(JSON.stringify(choosedData.value)) |
| | | data.forEach(item => { |
| | | |
| | | // item.tableData = item.customerRecordNeeds.map((i,index) => { |
| | | // return{ |
| | | // ...i, |
| | | // expectContentMesses: i.expectContentMesses.map((q,qindex) => { |
| | | // return{ |
| | | // ...q, |
| | | // first: qindex == 0, |
| | | // num: index+1, |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | item.tableData = item.plans.map((i,index) => { |
| | | return{ |
| | | ...i, |
| | | num: index+1, |
| | | } |
| | | }) |
| | | console.log('xxx',item.tableData) |
| | | try { |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_顾客需求登记表.docx`); |
| | | generateWordDocument(templatePath.value, item, item.companyName + `_${item.year}年度体系改进计划.docx`); |
| | | } catch (error){ |
| | | ElMessage({ |
| | | type: 'warning', |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delCustomerNeed(val.id); |
| | | const res = await delInside(val.id); |
| | | if(res.code === 200){ |
| | | ElMessage({ |
| | | type: 'success', |
| | |
| | | const handleChangeNum = (value) => { |
| | | if (!/^\d+$/.test(value)) { // 验证是否为数字 |
| | | ElMessage.warning('只能输入数字') |
| | | state.form.year = '' // 重置选择,避免非法值被添加到options中 |
| | | } else if (!state.yearList.some(option => option.label === value)) { // 确保不是已存在的选项 |
| | | state.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同) |
| | | data.queryParams.year = '' // 重置选择,避免非法值被添加到options中 |
| | | } else if (!data.yearList.some(option => option.label === value)) { // 确保不是已存在的选项 |
| | | data.yearList.push({ value, label: value }); // 添加新选项(这里简单地将值和标签设为相同) |
| | | } |
| | | } |
| | | </script> |