Browse Source

提交专家评分修改

fan0987 1 month ago
parent
commit
0632b38a6e

+ 29 - 34
ruoyi-ui/src/views/expert/tender/components/excelContent.vue

@@ -44,7 +44,6 @@
             <span>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-
         <el-table-column label="审查内容" prop="content">
           <template slot-scope="scope">
             <div class="pre-text">{{ scope.row.content }}</div>
@@ -55,7 +54,7 @@
             <div class="pre-text">{{ scope.row.standard }}</div>
           </template>
         </el-table-column>
-        <el-table-column v-if="isLeader" label="" align="center" :width="240">
+        <el-table-column v-if="isLeader" label="审查结果" align="center" :width="240">
           <template slot-scope="scope">
             <span v-if="!isEdit">{{ scope.row.isOk }}</span>
             <div v-else>
@@ -86,9 +85,9 @@
             <div class="pre-text">{{ scope.row.standard }}</div>
           </template>
         </el-table-column>
-        <el-table-column v-if="isLeader" label="得分" align="center" :width="240">
+        <el-table-column v-if="isLeader" label="审查结果" align="center" :width="240">
           <template slot-scope="scope">
-            <span v-if="!isEdit">{{ scope.row.score }}</span>
+            <span v-if="!isEdit">{{ scope.row.isOk }}</span>
             <div v-else>
               <el-radio v-model="scope.row.isOk" label="合格">合格</el-radio>
               <el-radio v-model="scope.row.isOk" label="不合格">不合格</el-radio>
@@ -167,7 +166,6 @@ import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函
 import ExcelJS from 'exceljs'
 import { saveAs } from 'file-saver'
 import { genExamineExcel, genRespondExcel, genTechExcel, genIdeaExcel } from '@/utils/markExcel'
-import dayjs from 'dayjs'
 export default {
   name: 'excelContent',
 
@@ -207,7 +205,6 @@ export default {
   },
 
   created () {
-
     this.isEdit = this.tender.sProjectState < 7
     this.getData();
   },
@@ -216,12 +213,10 @@ export default {
     checkRole,
     getData () {
       getMark({ sid: this.tender.sid, hid: this.hid }).then(response => {
-
         this.isLeader = response.data.isLeader === 1;
 
-
-        const examineList = response.data.examineList || [];
-        const bidExpertExamines = response.data.bidExpertExamines || [];
+        const examineList = response.data.examineList || []; // 资格审查表内容
+        const bidExpertExamines = response.data.bidExpertExamines || []; // 资格审查表分数
         if (bidExpertExamines.length > 0) {
           for (let examine of examineList) {
             examine.oid = '';
@@ -235,9 +230,8 @@ export default {
         }
         this.zigeList = examineList;
 
-
-        const xiangyingList = response.data.bidRespondList || [];
-        const bidExpertResponds = response.data.bidExpertResponds || [];
+        const xiangyingList = response.data.bidRespondList || []; // 响应审查表内容
+        const bidExpertResponds = response.data.bidExpertResponds || []; // 响应审查表分数
         if (bidExpertResponds.length > 0) {
           for (let xiangying of xiangyingList) {
             xiangying.isOk = '';
@@ -251,16 +245,14 @@ export default {
         }
         this.xiangyingList = xiangyingList;
 
-
-        const jishuList = response.data.bidTechList || [];
-        const bidExpertTeches = response.data.bidExpertTeches || [];
+        const jishuList = response.data.bidTechList || []; // 技术审查表内容
+        const bidExpertTeches = response.data.bidExpertTeches || []; // 技术审查表分数
         if (bidExpertTeches.length > 0) {
           for (let jishu of jishuList) {
             jishu.score = '';
             jishu.oid = '';
             jishu.reason = '';
             const expertTech = bidExpertTeches.find(item => item.tid == jishu.id)
-
             if (expertTech) {
               jishu.score = expertTech.score;
               jishu.oid = expertTech.id;
@@ -268,7 +260,6 @@ export default {
             }
           }
         }
-        
         this.jishuList = jishuList;
 
         if (response.data.uKaiTime) {
@@ -279,6 +270,7 @@ export default {
         }
       })
 
+      // 获取评委意见
       getIdea({ sid: this.tender.sid, hid: this.hid }).then(response => {
         this.idea = response?.data?.idea || ''
       })
@@ -290,9 +282,9 @@ export default {
         return
       }
 
-      let bidExpertExamines = []
-      let bidExpertResponds = []
-      let bidExpertTeches = []
+      let bidExpertExamines = [] // 资格
+      let bidExpertResponds = [] // 响应
+      let bidExpertTeches = []   // 技术
 
       let isOk = true
       for (let item of this.zigeList) {
@@ -348,6 +340,18 @@ export default {
             reason: item.reason,
           }
         })
+      } else {
+        bidExpertTeches = this.jishuList.map(item => {
+          return {
+            id: item.oid,
+            sid: this.tender.sid,
+            tid: item.id,
+            hid: this.hid,
+            hName: this.hName,
+            score: item.score,
+            reason: item.reason,
+          }
+        })
       }
 
       const formData = {
@@ -368,32 +372,23 @@ export default {
       }).finally(() => {
         this.fullscreenLoading = false;
       });
-
-      const pingfenRecordObj = JSON.parse(sessionStorage.getItem('pingfenRecord')) || {}
-      const pingfenRecord = pingfenRecordObj[this.tender.sid] || []
-      
-      if (!pingfenRecord.includes(this.hid)) {
-        pingfenRecord.push(this.hid);
-      }
-      pingfenRecordObj[this.tender.sid] = pingfenRecord
-      sessionStorage.setItem('pingfenRecord', JSON.stringify(pingfenRecordObj))
     },
 
-    handleDownloadExamine () {
+    handleDownloadExamine() {
       const workbook = new ExcelJS.Workbook()
       genExamineExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.zigeList)
       workbook.xlsx.writeBuffer().then(buffer => {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `资格审查表-${this.hName}.xlsx`)
       })
     },
-    handleDownloadRespond () {
+    handleDownloadRespond() {
       const workbook = new ExcelJS.Workbook()
       genRespondExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.xiangyingList)
       workbook.xlsx.writeBuffer().then(buffer => {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `响应性审查表-${this.hName}.xlsx`)
       })
     },
-    handleDownloadTech () {
+    handleDownloadTech() {
       const workbook = new ExcelJS.Workbook()
       genTechExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.jishuList, '技术标')
 
@@ -401,7 +396,7 @@ export default {
         saveAs(new Blob([buffer], { type: 'application/octet-stream' }), `技术审查表-${this.hName}.xlsx`)
       })
     },
-    handleDownloadIdea () {
+    handleDownloadIdea() {
       const workbook = new ExcelJS.Workbook()
       genIdeaExcel(workbook, this.tender.sName, this.excelForm.kaibiaoTime, this.excelForm.kaibiaoAddress, this.hName, this.idea)
       workbook.xlsx.writeBuffer().then(buffer => {

+ 7 - 16
ruoyi-ui/src/views/expert/tender/detail.vue

@@ -8,13 +8,11 @@
     </div>
     <div v-if="currentName === '招标'" class="div2">
       <tender-details v-if="caigou && caigou.aid" :caigou="caigou" :plan="plan"></tender-details>
-      <div style="padding: 0 20px;margin-top: -20px;">
-
+      <div style="padding: 0 20px; margin-top: -20px;">
         <h4 style="font-weight: bold;">招标文件</h4>
         <el-table :data="documentsList">
           <el-table-column label="序号" align="center" type="index" />
           <el-table-column label="文件标题" align="center" prop="wTitle" />
-          <!-- <el-table-column label="文件大小(kb)" align="center" prop="wSize" /> -->
           <el-table-column label="上传时间" align="center" prop="wUploadTime" width="180">
             <template slot-scope="scope">
               <span>{{ parseTime(scope.row.wUploadTime, "{y}-{m}-{d}") }}</span>
@@ -33,7 +31,6 @@
           :page.sync="documerntQueryParams.pageNum" :limit.sync="documerntQueryParams.pageSize"
           @pagination="getDocuments" />
       </div>
-
     </div>
     <div v-if="currentName === '投标'" class="div2">
       <el-descriptions style="margin-top: 20px;" title="" :column="3" border :labelStyle="{ width: '180px' }">
@@ -65,6 +62,7 @@
           {{ tender.enrollNumber }}
         </el-descriptions-item> -->
       </el-descriptions>
+
       <el-table v-if="isOverFirstTime" :data="quoteTableData" border style="width: 100%;margin-top: 20px;">
         <el-table-column label="供应商名称" prop="hName" align="center" />
         <el-table-column v-if="isOverFirstTime" label="报价" prop="quotePrice" align="center">
@@ -99,9 +97,6 @@
         </el-table-column>
       </el-table>
     </div>
-    <div v-if="currentName === '评分'" class="div2">
-      <ExcelContent v-if="tender && tender.sid" :tender="tender"></ExcelContent>
-    </div>
   </div>
 </template>
 
@@ -113,7 +108,6 @@ import { getPlanProfileByAid } from "@/api/system/planprofile"
 import { selectBidNoticeBySid } from "@/api/system/tender/tenderNotice";
 import { listQuote } from '@/api/system/quote';
 import TenderDetails from '@/components/tender/tenderDetails.vue'
-import ExcelContent from './components/excelContent.vue'
 
 import {
   listDocuments
@@ -123,9 +117,7 @@ export default {
   dicts: ['quote_mode', 'buying_mode'],
   name: "ExpertTenderDetail",
   components: {
-    'tender-details': TenderDetails,
-    ExcelContent
-    // 'device-details': DeviceDetails
+    'tender-details': TenderDetails
   },
   data () {
     return {
@@ -247,6 +239,10 @@ export default {
       let kaibiaoTime = moment(this.detail.firstTime);
 
       this.isOverFirstTime = currentTime.isAfter(kaibiaoTime)
+
+      if (this.quoteTableData && this.quoteTableData.length > 0) {
+        clearInterval(this.refreshQuoteTimer)
+      }
     },
 
     refreshPage () {
@@ -256,11 +252,6 @@ export default {
 
   activated () {
     this.refreshPage()
-
-    const pingfenRecordObj = sessionStorage.getItem('pingfenRecord') ? JSON.parse(sessionStorage.getItem('pingfenRecord')) : {}
-    this.pingfenRecord = pingfenRecordObj[this.sid]
-
-    console.log(this.pingfenRecord, '111');
   },
 
   deactivated () {

+ 3 - 2
ruoyi-ui/src/views/expert/tender/score.vue

@@ -6,10 +6,9 @@
 </template>
 
 <script>
-
 import { getTender } from '@/api/system/tender/tender'
-
 import ExcelContent from './components/excelContent.vue'
+
 export default {
   name: 'ExpertTenderScore',
   components: {
@@ -29,6 +28,8 @@ export default {
     getTender () {
       getTender(this.sid).then(response => {
         this.tender = response.data
+
+        console.log(this.tender);
       })
     }
   }