Parcourir la source

ToDo 投标详情:已中标/未中标

wzg il y a 1 an
Parent
commit
c2728e49ab
1 fichiers modifiés avec 16 ajouts et 15 suppressions
  1. 16 15
      src/views/tenderManage/tenderDetail.vue

+ 16 - 15
src/views/tenderManage/tenderDetail.vue

@@ -124,13 +124,17 @@
                 placeholder="请选择船舶"
                 @selectItem="selectShip($event, index)"
                 @clearSelect="clearSelect(index)"
+                :disabled="!!item.id"
               ></RemoteSelect>
             </div>
           </div>
           <div class="df aic mb10">
             <div class="info-title">MMSI:</div>
             <div class="info-text">
-              <el-input v-model="item.shipMmsi"></el-input>
+              <el-input
+                v-model="item.shipMmsi"
+                :disabled="!!item.id"
+              ></el-input>
             </div>
           </div>
           <div class="df aic mb10">
@@ -182,27 +186,19 @@
               </el-image>
             </div>
           </div>
-          <div class="df aic jcfe mt20">
+          <div class="df aic jcfe mt20" v-if="item.status !== 2">
             <el-button type="danger" size="small" @click="deleteTender(index)">
               删除
             </el-button>
             <el-button
-              v-if="item.proxyBidId"
               type="primary"
               size="small"
-              @click="tenderShip(index, 0)"
+              @click="tenderShip(index, item.id && item.status === 1 ? 1 : 0)"
             >
-              修改
-            </el-button>
-            <el-button
-              v-else
-              type="primary"
-              size="small"
-              @click="tenderShip(index, 0)"
-            >
-              暂存
+              {{ item.id && item.status === 1 ? "修改" : "暂存" }}
             </el-button>
             <el-button
+              v-if="item.status === 0"
               type="primary"
               size="small"
               @click="tenderShip(index, 1)"
@@ -268,6 +264,9 @@ async function getTenderDetail() {
     tenderId: route.query.id,
   });
   tenderData.value = data.result;
+  for (let i of tenderData.value.proxyBids) {
+    i.viewUrl = i.certificates?.[0]?.viewUrl;
+  }
   if (tenderData.value.proxyBids.length) {
     bidStatus.value = 1;
   } else {
@@ -322,7 +321,9 @@ function giveupTender() {
 }
 
 function showAddShip() {
-  tenderData.value.proxyBids.push({});
+  tenderData.value.proxyBids.push({
+    status: 0,
+  });
 }
 
 function selectShip({ item }, index) {
@@ -337,7 +338,7 @@ function selectShip({ item }, index) {
 }
 
 function clearSelect(index) {
-  let { proxyBidId } = tenderData.value.proxyBids[index];
+  let { id: proxyBidId } = tenderData.value.proxyBids[index];
   tenderData.value.proxyBids[index] = { proxyBidId };
 }