Browse Source

全合格才检验打分

zzs 2 months ago
parent
commit
3b1e4a402f
1 changed files with 50 additions and 34 deletions
  1. 50 34
      ruoyi-ui/src/views/expert/tender/components/excelContent.vue

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

@@ -34,12 +34,7 @@
         </template>
       </el-descriptions-item>
     </el-descriptions>
-    <div class="margin-top">
-      <span class="describe">专家意见</span>
-      <div v-if="!isEdit||!isLeader" class="pre-text">{{ idea }}</div>
-      <el-input v-else type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请输入专家意见" v-model="idea">
-      </el-input>
-    </div>
+
     <div class="margin-top">
       <span class="describe">资格审查表</span>
 
@@ -142,7 +137,12 @@
         </el-table-column>
       </el-table>
     </div>
-
+    <div class="margin-top">
+      <span class="describe">专家意见</span>
+      <div v-if="!isEdit || !isLeader" class="pre-text">{{ idea }}</div>
+      <el-input v-else type="textarea" :autosize="{ minRows: 2, maxRows: 6 }" placeholder="请输入专家意见" v-model="idea">
+      </el-input>
+    </div>
     <!--    底部按钮  -->
     <div slot="footer" style="margin-top: 12px;">
       <div v-if="isEdit">
@@ -287,51 +287,67 @@ export default {
         this.$message.error('请填写专家意见')
         return
       }
-      for (let item of this.jishuList) {
-        if (item.value != item.score) {
-          if (!item.reason) {
-            this.$message.error(`【${item.content}】请填写扣分原因`)
-            return
-          }
-        }
-      }
-   
-      const 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,
-        }
-      })
+
       let bidExpertExamines = []
       let bidExpertResponds = []
-      if(this.isLeader){
-         bidExpertExamines = this.zigeList.map(item => {
-          return {
+      let bidExpertTeches = []
+
+      let isOk = true
+      for (let item of this.zigeList) {
+        if (item.isOk === '不合格') {
+          isOk = false
+        }
+        if (this.isLeader) {
+          bidExpertExamines.push({
             id: item.oid,
             sid: this.tender.sid,
             eid: item.id,
             hid: this.hid,
             hName: this.hName,
             isOk: item.isOk,
-          }
-        })
+          })
+        }
+      }
 
-         bidExpertResponds = this.xiangyingList.map(item => {
-          return {
+      for (let item of this.xiangyingList) {
+        if (item.isOk === '不合格') {
+          isOk = false
+        }
+        if (this.isLeader) {
+          bidExpertResponds.push({
             id: item.oid,
             sid: this.tender.sid,
             rid: item.id,
             hid: this.hid,
             hName: this.hName,
             isOk: item.isOk,
+          })
+        }
+
+      }
+
+      if (isOk) {
+        for (let item of this.jishuList) {
+          if (item.value != item.score) {
+            if (!item.reason) {
+              this.$message.error(`【${item.content}】请填写扣分原因`)
+              return
+            }
+          }
+        }
+        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 = {
         sid: this.tender.sid,
         idea: this.idea,