Browse Source

更新 航次列表/详情 操作功能隐藏

wzh 3 years ago
parent
commit
331d65cfef
3 changed files with 54 additions and 21 deletions
  1. 10 0
      src/components/Aside.vue
  2. 42 19
      src/views/voyage/voyageDetail.vue
  3. 2 2
      src/views/voyage/voyageList.vue

+ 10 - 0
src/components/Aside.vue

@@ -32,6 +32,16 @@ export default {
       defaultActive.value = path;
     }
     let menu = [
+      {
+        icon: "el-icon-s-unfold",
+        title: "航次管理",
+        items: [
+          {
+            path: "/voyage/voyageList",
+            name: "航次列表",
+          },
+        ],
+      },
       {
         icon: "el-icon-s-unfold",
         title: "货主信息",

+ 42 - 19
src/views/voyage/voyageDetail.vue

@@ -134,7 +134,7 @@
           disabled
         ></el-input>
       </div>
-      <div v-if="voyage.voyageStatus != 2">
+      <!-- <div v-if="voyage.voyageStatus != 2">
         <div
           class="info-line"
           v-if="!insertDiscPortVisable"
@@ -160,7 +160,7 @@
             >取消添加</el-button
           >
         </div>
-      </div>
+      </div> -->
     </div>
     <div class="line">
       <div class="info-line">
@@ -191,7 +191,7 @@
     </div>
     <div class="container-second-title df aic jcsb mt40">
       <div>船舶运输记录详情</div>
-      <div class="df aic">
+      <!-- <div class="df aic">
         <div v-if="voyage.voyageStatus == 1">
           <el-button
             class="mr20"
@@ -224,7 +224,7 @@
         >
           下载船舶跟踪表
         </el-button>
-      </div>
+      </div> -->
     </div>
     <div class="line">
       <div class="info-line">
@@ -486,11 +486,11 @@
 
     <div class="container-second-title df aic jcsb mt40">
       <div>提单信息</div>
-      <div>
+      <!-- <div>
         <el-button type="primary" @click="showAddLab()">
           新增提单记录
         </el-button>
-      </div>
+      </div> -->
     </div>
     <el-table :data="labTableData" stripe style="width: 1200px">
       <el-table-column
@@ -605,7 +605,7 @@
     <div class="container-second-title df aic jcsb">
       <div>卸货记录</div>
       <div>
-        <el-button
+        <!-- <el-button
           class="mr20"
           type="primary"
           @click="isAddPoundVisable = true"
@@ -618,7 +618,7 @@
           type="primary"
           :loading="isDischargeLoadingExcel"
           >下载卸货信息</el-button
-        >
+        > -->
       </div>
     </div>
     <el-table
@@ -801,9 +801,9 @@
     <div class="container-second-title df aic jcsb mt40">
       <div>汽车装货记录详情</div>
       <div>
-        <el-button type="primary" @click="showAddTruckRecord()">
+        <!-- <el-button type="primary" @click="showAddTruckRecord()">
           新增汽车装货记录
-        </el-button>
+        </el-button> -->
       </div>
     </div>
     <el-table :data="truckTableData" stripe>
@@ -921,7 +921,7 @@
         @current-change="truckPageChange"
       ></el-pagination>
     </div>
-    <div class="hr mt20"></div>
+    <!-- <div class="hr mt20"></div>
     <div class="df aic jcfe mt20" v-if="voyage.voyageStatus == 1">
       <el-button type="primary" class="mr20" @click="cancelVoyage">
         取消航次
@@ -933,7 +933,7 @@
       >
         完成航次
       </el-button>
-    </div>
+    </div> -->
     <el-dialog
       v-model="isAddTruckRecordVisable"
       :title="truckRecordModalType"
@@ -1065,7 +1065,14 @@
     <div class="line">
       <div class="info-line">
         <div class="info-line-title">保险单</div>
-        <el-upload
+        <el-image
+          style="height: 200px; width: 200px; object-fit: contain"
+          v-for="item in policyFileList"
+          :src="item.viewUrl"
+          :preview-src-list="prePolicyFileList"
+        ></el-image>
+
+        <!-- <el-upload
           drag
           multiple
           :action="store.state.wayBillUrl"
@@ -1078,13 +1085,19 @@
         >
           <div class="upload-plus-icon">+</div>
           <div class="upload-text">拖拽或点击上传</div>
-        </el-upload>
+        </el-upload> -->
       </div>
     </div>
     <div class="line">
       <div class="info-line">
         <div class="info-line-title">运单</div>
-        <el-upload
+        <el-image
+          style="height: 200px; width: 200px; object-fit: contain"
+          v-for="item in voyageBill"
+          :src="item.viewUrl"
+          :preview-src-list="preVoyageBill"
+        ></el-image>
+        <!-- <el-upload
           drag
           multiple
           :action="store.state.wayBillUrl"
@@ -1097,7 +1110,7 @@
         >
           <div class="upload-plus-icon">+</div>
           <div class="upload-text">拖拽或点击上传</div>
-        </el-upload>
+        </el-upload> -->
       </div>
     </div>
   </div>
@@ -1151,7 +1164,7 @@
   </div> -->
   <div class="container-title df aic jcsb">
     <div @click="getVoyageDetail()">单据图片分配</div>
-    <div>
+    <!-- <div>
       <el-checkbox
         v-model="isCheckAll"
         @change="checkAll"
@@ -1167,7 +1180,7 @@
       >
         分配单据
       </el-button>
-    </div>
+    </div> -->
   </div>
   <div class="line-container-p24">
     <div v-show="shipownerUploadFiles.length" class="df aic fww">
@@ -1488,11 +1501,13 @@
                 @change="auditMedia(item.id, 1, index, item.mediaType)"
                 :model-value="item.audit == 1"
                 label="通过"
+                disabled
               ></el-checkbox>
               <el-checkbox
                 @change="auditMedia(item.id, 2, index, item.mediaType)"
                 :model-value="item.audit == 2"
                 label="未通过"
+                disabled
               ></el-checkbox>
             </div>
             <div class="checkbox-group df aic jcsa">
@@ -1500,11 +1515,13 @@
                 @change="markMedia(item.id, 1, index, item.mediaType)"
                 :model-value="item.type == 1"
                 label="验仓"
+                disabled
               ></el-checkbox>
               <el-checkbox
                 @change="markMedia(item.id, 2, index, item.mediaType)"
                 :model-value="item.type == 2"
                 label="清仓"
+                disabled
               ></el-checkbox>
             </div>
           </div>
@@ -1561,12 +1578,16 @@ let coordinates = ref([]);
 let previewSrcList = ref([]);
 let shipAudits = ref([]);
 let shipownerUploadFiles = ref([]);
+let prePolicyFileList = ref([]);
+let preVoyageBill = ref([]);
 async function getVoyageDetail(isInit) {
   previewList.value = [];
   policyFileList.value = [];
   voyageBill.value = [];
   previewSrcList.value = [];
   shipownerUploadFiles.value = [];
+  prePolicyFileList.value = [];
+  preVoyageBill.value = [];
   let res = await api.getVoyageDetail({
     type: localStorage.userType,
     voyageId: route.query.id,
@@ -1584,7 +1605,7 @@ async function getVoyageDetail(isInit) {
     currentDiscPortId.value = voyage.value.voyageDetails[0].portId + "";
     medias.value = res.data.result.medias;
     shipAudits.value = res.data.result.shipAudits;
-    shipownerUploadFiles.value = res.data.result.shipownerUploadFiles;
+    shipownerUploadFiles.value = res.data.result.shipownerUploadFiles || [];
     for (let i of shipownerUploadFiles.value || []) {
       previewList.value.push(i.viewUrl);
     }
@@ -1593,12 +1614,14 @@ async function getVoyageDetail(isInit) {
         ...i,
         url: i.viewUrl,
       });
+      prePolicyFileList.value.push(i.viewUrl);
     }
     for (let i of res.data.result.waybills) {
       voyageBill.value.push({
         ...i,
         url: i.viewUrl,
       });
+      preVoyageBill.value.push(i.viewUrl);
     }
     for (let i of medias.value) {
       previewSrcList.value.push(i.downloadUrl);

+ 2 - 2
src/views/voyage/voyageList.vue

@@ -62,7 +62,7 @@
         ></el-input>
         <div class="search-btn" @click="getVoyageList()">查询</div>
       </div>
-      <div class="df aic">
+      <!-- <div class="df aic">
         <el-button
           @click="FYDIModalVisable = true"
           class="mr20"
@@ -115,7 +115,7 @@
           @click="voyageAddDialogVisible = true"
           >添加航次</el-button
         >
-      </div>
+      </div> -->
     </div>
     <el-dialog
       v-model="voyageAddDialogVisible"