Browse Source

提交生成表单逻辑

fan0987 2 weeks ago
parent
commit
537155bcf2

+ 4 - 0
bidding-ui/src/components/zhuanjiaLogin/register.vue

@@ -31,6 +31,10 @@
         <el-row style="text-align: center">
           <el-button @click="turnLogin" style="width: 75%;margin-bottom: -10px">已有账号,去登陆</el-button>
         </el-row>
+        <h1 style="margin: 0 auto;display: flex; justify-content: center;">
+          <a href="/专家注册操作手册.docx" target="_blank" 
+            style="text-decoration: underline;font-size: 16px;color: #409EFF;line-height: 38px">专家注册操作手册下载</a>
+        </h1>
       </el-form>
     </div>
 </template>

+ 9 - 0
ruoyi-ui/src/api/bank/depositdesc.js

@@ -76,4 +76,13 @@ export function refundBankUnclearInfo(query) {
     method: 'get',
     params: query
   })
+}
+
+// 不明保证金退款状态更新
+export function updateUnclearInfo(data) {
+  return request({
+    url: '/bank/deposit/updateUnclearInfo',
+    method: 'put',
+    data: data
+  })
 }

+ 2 - 2
ruoyi-ui/src/api/system/tender/committee.js

@@ -52,9 +52,9 @@ export function delComBySid(sid) {
 }
 
 // 查询已抽取专家列表
-export function findCommitAndExpert(sid, query) {
+export function findCommitAndExpert(query) {
   return request({
-    url: "/bidding/committee/findCommitAndExpert/" + sid,
+    url: "/bidding/committee/findCommitAndExpert",
     method: "get",
     params: query,
   });

+ 3 - 1
ruoyi-ui/src/components/tender/expert.vue

@@ -405,7 +405,9 @@ export default {
     /** 查询评标委员会列表 */
     getExerpt (sid) {
       this.loading = true;
-      findCommitAndExpert(sid).then(response => {
+      findCommitAndExpert({
+        sid
+      }).then(response => {
 
         this.committeeList = response.rows;
         this.total = response.total;

+ 16 - 1
ruoyi-ui/src/utils/index.js

@@ -387,4 +387,19 @@ export function camelCase(str) {
 export function isNumberStr(str) {
   return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
 }
- 
+
+
+export function toChineseCapital(num) {
+  var strOutput = "";
+  var strUnit = '仟佰拾亿仟佰拾万仟佰拾元角分';
+  num += "00";
+  var intPos = num.indexOf('.');
+  if (intPos >= 0) {
+      num = num.substring(0, intPos) + num.substr(intPos + 1, 2);
+  }
+  strUnit = strUnit.substr(strUnit.length - num.length);
+  for (var i=0; i < num.length; i++) {
+      strOutput += '零壹贰叁肆伍陆柒捌玖'.substr(num.substr(i,1),1) + strUnit.substr(i,1);
+  }
+  return strOutput.replace(/零角零分$/, '整').replace(/零[仟佰拾]/g, '零').replace(/零{2,}/g, '零').replace(/零([亿|万])/g, '$1').replace(/零+元/, '元').replace(/亿零{0,3}万/, '亿').replace(/^元零{0,3}万/, '零');
+}

+ 11 - 0
ruoyi-ui/src/utils/toBlob.js

@@ -0,0 +1,11 @@
+import axios from "axios";
+
+export async function toBlob(url) {
+    let response = ''
+    await axios.get(url, { responseType: 'blob' })
+    .then(res => {
+        response = res.data;
+    })
+
+    return response
+}

+ 11 - 9
ruoyi-ui/src/views/expert/ewh/index.vue

@@ -10,12 +10,12 @@
                     <el-row :gutter="20">
                         <el-col :span="12">
                             <el-form-item label="姓名" prop="jName" class="form-input">
-                                <el-input v-model="form.jName" placeholder="请输入姓名" style="width: 340px" clearable :disabled="noEdit || jShState == 2" />
+                                <el-input v-model="form.jName" placeholder="请输入姓名" style="width: 340px" clearable :disabled="noEdit" />
                             </el-form-item>
                         </el-col>
                         <el-col :span="12">
                         <el-form-item label="性别" prop="jSex" class="form-input">
-                            <el-radio-group v-model="form.jSex"  :disabled="noEdit || jShState == 2">
+                            <el-radio-group v-model="form.jSex"  :disabled="noEdit">
                                 <el-radio :label="0">男</el-radio>
                                 <el-radio :label="1">女</el-radio>
                             </el-radio-group>
@@ -26,14 +26,14 @@
                         <el-col :span="12">
                             <el-form-item label="出生年月" prop="jBirth" class="form-input">
                                 <el-date-picker v-model="form.jBirth" type="date" placeholder="选择日期" 
-                                    style="width: 340px" clearable :disabled="noEdit || jShState == 2"
+                                    style="width: 340px" clearable :disabled="noEdit"
                                     format="yyyy-MM-dd" value-format="yyyy-MM-dd"></el-date-picker>
                             </el-form-item>
                         </el-col>
                         <el-col :span="12">
                         <el-form-item label="学历" prop="jEducation" class="form-input">
                             <el-select style="width: 340px" v-model="form.jEducation" placeholder="请选择所学专业"
-                                clearable :disabled="noEdit || jShState == 2">
+                                clearable :disabled="noEdit">
                                 <el-option v-for="(dict, key) in dict.type.expert_education" :key="key" :label="dict.label"
                                     :value="dict.value"></el-option>
                             </el-select>
@@ -44,7 +44,7 @@
                         <el-col :span="12">
                         <el-form-item label="身份证号" prop="jIdentity" class="form-input">
                             <el-input v-model="form.jIdentity" placeholder="请输入身份证号" 
-                                style="width: 340px" clearable :disabled="noEdit || jShState == 2" /> </el-form-item>
+                                style="width: 340px" clearable :disabled="noEdit" /> </el-form-item>
                         </el-col>
                         <el-col :span="12">
                         <el-form-item label="政治面貌" prop="jPolitics" class="form-input">
@@ -56,7 +56,7 @@
                         <el-col :span="12">
                             <el-form-item label="毕业院校" prop="jSchool" class="form-input">
                                 <el-input v-model="form.jSchool" placeholder="请输入毕业院校" 
-                                    style="width: 340px" clearable :disabled="noEdit || jShState == 2" /> </el-form-item>
+                                    style="width: 340px" clearable :disabled="noEdit" /> </el-form-item>
                             </el-col>
                         <el-col :span="12">
                         <el-form-item label="毕业时间" prop="jTime" class="form-input">
@@ -70,7 +70,7 @@
                         <el-col :span="12">
                             <el-form-item label="所学专业" prop="jSubject" class="form-input">
                                 <el-input v-model="form.jSubject" placeholder="请输入所学专业" 
-                                    style="width: 340px" clearable :disabled="noEdit || jShState == 2" />
+                                    style="width: 340px" clearable :disabled="noEdit" />
                             </el-form-item>
                         </el-col>
                         <el-col :span="12">
@@ -142,10 +142,10 @@
                     </el-row>
                 </el-form>
                 
-                <template v-if="jShState == 0 || jShState == 2">
+                <template v-if="jShState == 0 || jShState == 3">
                     <div v-if="noEdit" class="dialog-footer" style="text-align: center; padding-bottom: 50px">
                         <el-button type="primary" @click="noEdit = false">修改</el-button>
-                        <el-button type="primary" @click="submitReview('exportForm')">提交审核</el-button>
+                        <el-button v-if="jShState == 0" type="primary" @click="submitReview('exportForm')">提交审核</el-button>
                     </div>
                     <div v-else class="dialog-footer" style="text-align: center; padding-bottom: 50px">
                         <el-button type="primary" @click="handleSetExpertInfo('exportForm')">保存</el-button>
@@ -410,6 +410,8 @@ export default {
                         } else {
                             this.$message.error(res.msg)
                         }
+
+                        this.jShState = 0
                     })
                 } else {
                     return false;

+ 1 - 1
ruoyi-ui/src/views/expert/ewh/list.vue

@@ -46,7 +46,7 @@
             </el-table-column>
             <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
                 <template slot-scope="scope">
-                    <el-button v-if="scope.row.jShState == 3 || (checkRole(['centerAdjunct']) && scope.row.jShState == 1) || (checkRole(['operate', 'commander']) && scope.row.jShState == 2)" 
+                    <el-button v-if="scope.row.jShState == 3 || (checkRole(['centerAdjunct', 'commander']) && scope.row.jShState == 1) || (checkRole(['operate', 'commander']) && scope.row.jShState == 2)" 
                         @click="turnExpertDetail(scope.row)" size="small" type="primary">查看</el-button>
                     <el-popconfirm :title="`确定要删除专家【${scope.row.jName}】吗?`" @confirm="handleDelete(scope.row.jid)">
                         <el-button v-if="scope.row.jShState == 3" size="small" slot="reference" 

+ 23 - 7
ruoyi-ui/src/views/guarantee/defeat/components/bank.vue

@@ -26,8 +26,9 @@
   </template>
   
 <script>
-import { refundBankUnclearInfo } from "@/api/bank/depositdesc";
+import { refundBankUnclearInfo, updateUnclearInfo } from "@/api/bank/depositdesc";
 import { checkRole } from "@/utils/permission"; // 权限判断函数
+import { backBankFile } from './exportFile';
   
 export default {
     data () {
@@ -63,10 +64,10 @@ export default {
             this.data = []
     
             refundBankUnclearInfo(this.queryParams).then(response => {
-            this.data = response.rows;
-    
-            this.total = response.total;
-            this.loading = false;
+              this.data = response.rows;
+      
+              this.total = response.total;
+              this.loading = false;
             });
         },
     
@@ -77,8 +78,23 @@ export default {
             this.getList()
         },
 
-        handleBackGuarantee() {
-            
+        handleBackGuarantee(row) {
+          backBankFile(row)
+          .then(res => {
+            const params = {
+              uncleardepositid: row.uncleardepositid,
+              isApply: 4
+            }
+
+            updateUnclearInfo(params)
+            .then(res => {
+              this.$message({
+                type: 'success',
+                message: '已提交'
+              });
+              this.getList()
+            })
+          })
         }
     }
 }

+ 19 - 3
ruoyi-ui/src/views/guarantee/defeat/components/custom.vue

@@ -5,7 +5,6 @@
             <el-table-column label="采购公告" align="center" prop="cggg"/>
             <el-table-column label="标段名称" align="center" prop="rtnSgtnm"/>
             <el-table-column label="项目编号" align="center" prop="rtnPrjno"/>
-            <!-- <el-table-column label="项目名称" align="center" prop="rtnPrjnm"/> -->
             <el-table-column label="退款状态" align="center" prop="rtnRfndst">
                 <template slot-scope="scope">
                     <el-tag type="info" v-if="scope.row.rtnRfndst === '5'">退款成功</el-tag>
@@ -40,8 +39,9 @@
 </template>
 
 <script>
-import { listRefund } from "@/api/bank/refund";
+import { listRefund, updateRefund } from "@/api/bank/refund";
 import { checkRole } from "@/utils/permission"; // 权限判断函数
+import { backCustomFile } from './exportFile';
 
 export default {
     data () {
@@ -110,8 +110,24 @@ export default {
             return dateStr.substring(0, 4) + "-" + dateStr.substring(4, 6) + "-" + dateStr.substring(6, 8) + " " + timeStr.substring(0, 2) + ":" + timeStr.substring(2, 4) + ":" + timeStr.substring(4, 6)
         },
 
-        handleBackGuarantee() {
+        handleBackGuarantee(row) {
+            backCustomFile(row)
+            .then(res => {
+                const params = {
+                    refundid: row.refundid,
+                    status: '6'
+                }
 
+                updateRefund(params)
+                .then(res => {
+                    this.$message({
+                        type: 'success',
+                        message: '已提交'
+                    });
+                    
+                    this.getList()
+                })
+            })
         }
     }
 }

+ 212 - 0
ruoyi-ui/src/views/guarantee/defeat/components/exportFile.js

@@ -0,0 +1,212 @@
+import { saveAs } from 'file-saver';
+import ExcelJS from 'exceljs';
+import dayjs from "dayjs";
+
+export const backCustomFile = async (backInfo) => {
+    // 创建工作簿和工作表
+    const workbook = new ExcelJS.Workbook();
+    const worksheet = workbook.addWorksheet("Sheet1", {
+        pageSetup: { 
+            paperSize: 9, 
+            orientation: "landscape",
+            printArea: "A1:G9"
+        },
+    });
+
+    worksheet.columns = [
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 }
+    ];
+
+    // 批量调整行高
+    const rowsToAdjust = [1, 2, 3, 4, 5, 6, 7, 8, 9]; // 要调整的行号
+    rowsToAdjust.forEach((rowNumber, index) => {
+        const row = worksheet.getRow(rowNumber);
+        row.height = 25; // 每行高度递增
+    });
+
+    // 设置首个单元格内容
+    worksheet.getCell("A1").value = "《集采中心代理项目投标人汇总及投标保证金审收/退审批表》";
+    worksheet.getCell("A1").font = {
+        name: "宋体",
+        size: 11,
+        bold: true,
+    };
+
+    worksheet.mergeCells(`A1:G1`);
+    worksheet.getCell("F2").value = "填表日期:";
+    worksheet.getCell("G2").value = dayjs().format('YYYY-MM-DD');;
+
+    worksheet.mergeCells(`A3:B3`);
+    worksheet.mergeCells(`C3:G3`);
+    worksheet.mergeCells(`A4:B4`);
+    worksheet.mergeCells(`C4:G4`);
+    worksheet.mergeCells(`B5:E5`);
+    worksheet.mergeCells(`F5:G5`);
+    worksheet.mergeCells(`B6:E6`);
+    worksheet.mergeCells(`F6:G6`);
+    worksheet.mergeCells(`B7:E7`);
+    worksheet.mergeCells(`F7:G7`);
+    worksheet.mergeCells(`B8:E8`);
+    worksheet.mergeCells(`F8:G8`);
+
+    worksheet.getCell("A3").value = "工程名称"
+    worksheet.getCell("C3").value = backInfo.cggg
+    // 将单元格设置为自动换行
+    worksheet.getCell("C3").alignment = { wrapText: true };
+
+    worksheet.getCell("A4").value = "投标保证金金额"
+    worksheet.getCell("C4").value = backInfo.rtnRfndamt + "元"
+    worksheet.getCell("A5").value = "报名"
+    worksheet.getCell("B5").value = "投标申请人名称"
+    worksheet.getCell("F5").value = "退款原因"
+    worksheet.getCell("A6").value = "1"
+    worksheet.getCell("B6").value = backInfo.rtnTdracctnm
+    worksheet.getCell("F6").value = "批量退款失败"
+    worksheet.getCell("A9").value = "主管副总:"
+    worksheet.getCell("D9").value = "财务负责人:"
+    worksheet.getCell("F9").value = "制表人:"
+    
+    // 添加边框到 A3:G9 的每个单元格
+    for (let row = 3; row <= 8; row++) {
+        for (let col = 1; col <= 7; col++) {
+            const cell = worksheet.getCell(row, col);
+            cell.border = {
+                top: { style: 'thin' }, // 上边框
+                left: { style: 'thin' }, // 左边框
+                bottom: { style: 'thin' }, // 下边框
+                right: { style: 'thin' }, // 右边框
+            };
+            cell.alignment = {
+                horizontal: 'center', // 水平居中
+                vertical: 'middle',   // 垂直居中
+            };
+            cell.height = 22
+        }
+    }
+
+    const centerCell = ['A1', 'A2', 'F2', 'G2', 'A9', 'D9', 'F9']
+    // 批量设置居中对齐
+    centerCell.forEach((cellAddress) => {
+        const cell = worksheet.getCell(cellAddress);
+        cell.alignment = {
+            horizontal: 'center', // 水平居中
+            vertical: 'middle',   // 垂直居中
+        };
+    });
+
+    // 将工作簿写入 Blob
+    const buffer = await workbook.xlsx.writeBuffer();
+
+    // 使用 FileSaver 触发下载
+    const blob = new Blob([buffer], {
+      type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+    });
+    saveAs(blob, `${backInfo.rtnTdracctnm}手动退款.xlsx`);
+}
+
+export const backBankFile = async (backInfo) => {
+    // 创建工作簿和工作表
+    const workbook = new ExcelJS.Workbook();
+    const worksheet = workbook.addWorksheet("Sheet1", {
+        pageSetup: { 
+            paperSize: 9, 
+            orientation: "landscape",
+            printArea: "A1:G8"
+        },
+    });
+
+    worksheet.columns = [
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 },
+        { width: 18 }
+    ];
+
+    // 批量调整行高
+    const rowsToAdjust = [1, 2, 3, 4, 5, 6, 7, 8, 9]; // 要调整的行号
+    rowsToAdjust.forEach((rowNumber, index) => {
+        const row = worksheet.getRow(rowNumber);
+        row.height = 25; // 每行高度递增
+    });
+
+    // 设置首个单元格内容
+    worksheet.getCell("A1").value = "《集采中心代理项目投标人汇总及投标保证金审收/退审批表》";
+    worksheet.getCell("A1").font = {
+        name: "宋体",
+        size: 11,
+        bold: true,
+    };
+
+    worksheet.mergeCells(`A1:G1`);
+    worksheet.getCell("F2").value = "填表日期:";
+    worksheet.getCell("G2").value = dayjs().format('YYYY-MM-DD');
+
+    worksheet.mergeCells(`A3:B3`);
+    worksheet.mergeCells(`C3:G3`);
+    worksheet.mergeCells(`B4:D4`);
+    worksheet.mergeCells(`E4:G4`);
+    worksheet.mergeCells(`B5:D5`);
+    worksheet.mergeCells(`E5:G5`);
+    worksheet.mergeCells(`B6:D6`);
+    worksheet.mergeCells(`E6:G6`);
+    worksheet.mergeCells(`B7:D7`);
+    worksheet.mergeCells(`E7:G7`);
+
+    worksheet.getCell("A3").value = "投标保证金金额"
+    worksheet.getCell("C3").value = backInfo.rtnSelfbal + "元"
+    worksheet.getCell("A4").value = "报名"
+    worksheet.getCell("B4").value = "投标申请人名称"
+    worksheet.getCell("E4").value = "不明原因"
+    worksheet.getCell("A5").value = "1"
+    worksheet.getCell("B5").value = backInfo.rtnOppassetname
+    worksheet.getCell("E5").value = backInfo.rtnAdjustreason
+    worksheet.getCell("A8").value = "主管副总:"
+    worksheet.getCell("D8").value = "财务负责人:"
+    worksheet.getCell("F8").value = "制表人:"
+    
+    // 添加边框到 A3:G9 的每个单元格
+    for (let row = 3; row <= 7; row++) {
+        for (let col = 1; col <= 7; col++) {
+            const cell = worksheet.getCell(row, col);
+            cell.border = {
+                top: { style: 'thin' }, // 上边框
+                left: { style: 'thin' }, // 左边框
+                bottom: { style: 'thin' }, // 下边框
+                right: { style: 'thin' }, // 右边框
+            };
+            cell.alignment = {
+                horizontal: 'center', // 水平居中
+                vertical: 'middle',   // 垂直居中
+            };
+            cell.height = 22
+        }
+    }
+
+    const centerCell = ['A1', 'A2', 'F2', 'G2', 'A8', 'D8', 'F8']
+    // 批量设置居中对齐
+    centerCell.forEach((cellAddress) => {
+        const cell = worksheet.getCell(cellAddress);
+        cell.alignment = {
+            horizontal: 'center', // 水平居中
+            vertical: 'middle',   // 垂直居中
+        };
+    });
+
+    // 将工作簿写入 Blob
+    const buffer = await workbook.xlsx.writeBuffer();
+
+    // 使用 FileSaver 触发下载
+    const blob = new Blob([buffer], {
+      type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+    });
+    saveAs(blob, `${backInfo.rtnOppassetname}手动退款.xlsx`);
+}

+ 88 - 2
ruoyi-ui/src/views/tender/tender1/components/CompEval.vue

@@ -8,6 +8,9 @@
       <el-tag v-if="pingshenState">评审状态:评审已完成</el-tag>
       <el-tag v-else type="info">评审状态:未评完</el-tag>
     </div>
+    
+    <el-button type="primary" icon="el-icon-download" size="mini" style="margin-left: 12px"
+      @click="handleDownloadCost" :loading="loading">评审费制表</el-button>
 
     <div class="app-container">
       <el-descriptions class="margin-top" title="" :column="2" border>
@@ -80,14 +83,18 @@
 <script>
 import { listQuote } from '@/api/system/quote'
 import { updateTender, getTender } from '@/api/system/tender/tender'
-import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
 import { getMarkAll, getQuoteScore, getTotal, getReviewTotal } from '@/api/mark/mark'
+import { findCommitAndExpert } from "@/api/system/tender/committee";
 import ExcelJS from 'exceljs'
 import JSZip from 'jszip'
 import { saveAs } from 'file-saver'
 import htmlDocx from 'html-docx-js/dist/html-docx';
 import { genExamineExcel, genRespondExcel, genTechExcel, genBidScoreExcel, 
   genTotalScoreExcel, genIdeaExcel, genEvaluationDocx } from '@/utils/markExcel'
+import { toBlob } from '@/utils/toBlob'
+import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
+import { downloadCostFile } from './exportCost'
+
 export default {
   name: "Candidate",
   props: {
@@ -139,7 +146,9 @@ export default {
       techs: [],
 
       // 评审状态
-      pingshenState: false
+      pingshenState: false,
+      // 评标委员会
+      committeeList: []
     };
   },
   created () {
@@ -161,6 +170,83 @@ export default {
     }
   },
   methods: {
+    async insertImagesInExcel() {
+        // 创建工作簿和工作表
+        const workbook = new ExcelJS.Workbook();
+        const worksheet = workbook.addWorksheet('MySheet');
+
+        worksheet.addRow(["评审小组成员签字:"]);
+        worksheet.mergeCells(`A1:B1`);
+        worksheet.getCell(`A1`).alignment = { vertical: "middle" };
+      
+        // 添加图片到工作簿
+        const response = toBlob('http://pmsstatic.harbinxiaoshi.cn/static/2024/11/21/1212_20241121155545A013.jpg');
+        const response1 = toBlob('http://pmsstatic.harbinxiaoshi.cn/static/2024/11/21/sign_20241121153459A010.png');
+        
+        const imageId1 = workbook.addImage({
+          buffer: response,
+          extension: 'png',
+        });
+      
+        worksheet.addImage(imageId1, {
+          tl: { col: 0, row: 0 },
+          ext: { width: 120, height: 80 }
+        });
+
+        const imageId2 = workbook.addImage({
+          buffer: response1,
+          extension: 'png',
+        });
+      
+        worksheet.addImage(imageId2, {
+          tl: { col: 0, row:1 },
+          ext: { width: 120, height: 80 }
+        });
+
+        const buffer = await workbook.xlsx.writeBuffer();
+
+        saveAs(new Blob([buffer], { type: 'application/octet-stream' }), "test.xlsx");
+    },
+    testExcel() {
+      this.insertImagesInExcel();
+    },
+
+    /** 查询评标委员会列表 */
+    async getExerptList() {
+      this.loading = true;
+      const sid = this.$route.query.sid
+      await findCommitAndExpert({
+        sid,
+        status: 3
+      })
+      .then(response => {
+        console.log(response);
+        this.committeeList = response.rows.filter(item => item.bsExpert.jPhone != null);
+        this.loading = false;
+      });
+    },
+
+    // 评审费制表
+    async handleDownloadCost() {
+      const tender = this.tender
+      console.log(tender);
+      this.$prompt('请输入评审费', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputValue: 300,
+        inputPattern: /^[1-9]\d*$/,
+        inputErrorMessage: '金额格式不正确'
+      }).then(async ({ value }) => {
+        await this.getExerptList()
+        await downloadCostFile(this.committeeList, value, this.sName, this.uKaiTime)
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消输入'
+        });
+      })
+    },
+
     checkRole,
 
     async getData () {

+ 3 - 1
ruoyi-ui/src/views/tender/tender1/components/CompExpert copy.vue

@@ -482,7 +482,9 @@ export default {
     /** 查询评标委员会列表 */
     async getExerpt(sid) {
       this.loading = true;
-      await findCommitAndExpert(sid)
+      await findCommitAndExpert({
+        sid
+      })
       .then(response => {
         this.committeeList = response.rows;
         this.total = response.total;

+ 4 - 1
ruoyi-ui/src/views/tender/tender1/components/CompExpert.vue

@@ -271,7 +271,10 @@ export default {
     async getExerptList () {
       this.loading = true;
       const sid = this.queryParams.sid
-      await findCommitAndExpert(sid, this.pageOption)
+      await findCommitAndExpert({
+        sid,
+        ...this.pageOption
+      })
         .then(response => {
           this.committeeList = response.rows;
           this.total = response.total;

+ 143 - 0
ruoyi-ui/src/views/tender/tender1/components/exportCost.js

@@ -0,0 +1,143 @@
+import { saveAs } from 'file-saver';
+import ExcelJS from 'exceljs';
+import dayjs from "dayjs";
+import { toChineseCapital } from '@/utils/index'
+
+export const downloadCostFile = async (committeeList, price, sName, uKaiTime) => {
+    // 创建工作簿和工作表
+    const workbook = new ExcelJS.Workbook();
+    const worksheet = workbook.addWorksheet("Sheet1", {
+        pageSetup: { 
+            paperSize: 9, 
+            orientation: "landscape",
+            printArea: "A1:I12"
+        },
+    });
+
+    worksheet.columns = [
+        { width: 10 },
+        { width: 15 },
+        { width: 15 },
+        { width: 15 },
+        { width: 16 },
+        { width: 16 },
+        { width: 16 },
+        { width: 15 },
+        { width: 15 }
+    ];
+    // 批量调整行高
+    const rowsToAdjust = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; // 要调整的行号
+    rowsToAdjust.forEach((rowNumber, index) => {
+        const row = worksheet.getRow(rowNumber);
+        row.height = 25; // 每行高度递增
+    });
+
+    // 设置首个单元格内容
+    worksheet.getCell("A1").value = "评审费领收表";
+    worksheet.getCell("A1").font = {
+        name: "宋体",
+        size: 12,
+        bold: true,
+    };
+
+    worksheet.mergeCells(`A1:I1`);
+    worksheet.mergeCells(`H2:I2`);
+    worksheet.getCell("H2").value = "日期:" + dayjs().format('YYYY年MM月DD日');
+    worksheet.getCell("H2").alignment = {
+        horizontal: 'right', // 水平居中
+    };
+
+    worksheet.mergeCells(`A3:I3`);
+    worksheet.getCell("A3").value = `项目名称:${sName}`
+
+    worksheet.mergeCells(`A4:I4`);
+    worksheet.getCell("A4").value = `开标时间:${uKaiTime}`
+
+    worksheet.mergeCells(`C5:D5`);
+    worksheet.mergeCells(`F5:G5`);
+    worksheet.mergeCells(`C6:D6`);
+    worksheet.mergeCells(`F6:G6`);
+    worksheet.mergeCells(`C7:D7`);
+    worksheet.mergeCells(`F7:G7`);
+    worksheet.mergeCells(`C8:D8`);
+    worksheet.mergeCells(`F8:G8`);
+    worksheet.mergeCells(`C9:D9`);
+    worksheet.mergeCells(`F9:G9`);
+    worksheet.mergeCells(`C10:D10`);
+    worksheet.mergeCells(`F10:G10`);
+
+    worksheet.getCell("A5").value = '序号'
+    worksheet.getCell("B5").value = '专家姓名'
+    worksheet.getCell("C5").value = '身份证号'
+    worksheet.getCell("E5").value = '联系方式'
+    worksheet.getCell("F5").value = '开户行'
+    worksheet.getCell("H5").value = '金额'
+    worksheet.getCell("I5").value = '领收人'
+
+    committeeList.forEach((item, key) => {
+        worksheet.getCell(`A${key+6}`).value = key + 1
+        worksheet.getCell(`B${key+6}`).value = item?.bsExpert?.jName
+        worksheet.getCell(`C${key+6}`).value = item?.bsExpert?.jIdentity
+        worksheet.getCell(`E${key+6}`).value = item?.bsExpert?.jPhone
+        worksheet.getCell(`F${key+6}`).value = item?.bsExpert?.jBank
+        worksheet.getCell(`H${key+6}`).value = price
+        worksheet.getCell(`I${key+6}`).value = ''
+    })
+
+    const committeePrice = committeeList.length * price
+
+    worksheet.mergeCells(`A11:G11`);
+    worksheet.getCell("A11").value = `费用合计(大写)${toChineseCapital(committeePrice)}`
+    worksheet.getCell("H11").value = committeePrice
+
+    worksheet.getCell("A12").value = '分管副总'
+    worksheet.getCell("C12").value = '财务审核人'
+    worksheet.getCell("E12").value = '部门负责人'
+    worksheet.getCell("G12").value = '制表人'
+
+    // 添加边框到 A3:G9 的每个单元格
+    for (let row = 3; row <= 11; row++) {
+        for (let col = 1; col <= 9; col++) {
+            const cell = worksheet.getCell(row, col);
+            cell.border = {
+                top: { style: 'thin' }, // 上边框
+                left: { style: 'thin' }, // 左边框
+                bottom: { style: 'thin' }, // 下边框
+                right: { style: 'thin' }, // 右边框
+            };
+            cell.alignment = {
+                horizontal: 'center', // 水平居中
+                vertical: 'middle',   // 垂直居中
+            };
+        }
+    }
+
+    const centerCell = ['A1', 'H2', 'I2']
+    // 批量设置居中对齐
+    centerCell.forEach((cellAddress) => {
+        const cell = worksheet.getCell(cellAddress);
+        cell.alignment = {
+            horizontal: 'center', // 水平居中
+            vertical: 'middle',   // 垂直居中
+        };
+    });
+
+    const leftCell = ['A3', 'A4', 'A11']
+    // 批量设置居中对齐
+    leftCell.forEach((cellAddress) => {
+        const cell = worksheet.getCell(cellAddress);
+        cell.alignment = {
+            horizontal: 'left', // 水平居中
+            vertical: 'middle',   // 垂直居中
+        };
+    });
+
+    // 将工作簿写入 Blob
+    const buffer = await workbook.xlsx.writeBuffer();
+
+    // 使用 FileSaver 触发下载
+    const blob = new Blob([buffer], {
+      type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
+    });
+    saveAs(blob, `手动退款.xlsx`);
+}