wangzhihui преди 4 години
родител
ревизия
0e93f1ab27
променени са 1 файла, в които са добавени 20 реда и са изтрити 12 реда
  1. 20 12
      src/views/voyage/voyageList.vue

+ 20 - 12
src/views/voyage/voyageList.vue

@@ -3,40 +3,48 @@
     <div style="display: flex; justify-content: space-between">
       <div class="df aic">
         <div
-          @click="changeVoyageType(1)"
+          @click="changeVoyageType(0)"
           :class="
-            currentbtn == 1
+            status == 0
               ? 'currentbtn radio-btns left-radius'
               : 'radio-btns left-radius'
           "
+        >
+          全部航次
+        </div>
+        <div
+          style="border-left: none"
+          @click="changeVoyageType(1)"
+          :class="status == 1 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
           装货中
         </div>
+
         <div
           style="border-left: none"
           @click="changeVoyageType(2)"
-          :class="currentbtn == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 2 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
           运输中
         </div>
         <div
           style="border-left: none"
           @click="changeVoyageType(3)"
-          :class="currentbtn == 3 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 3 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
           卸货中
         </div>
         <div
           style="border-left: none"
           @click="changeVoyageType(4)"
-          :class="currentbtn == 4 ? 'currentbtn radio-btns' : 'radio-btns'"
+          :class="status == 4 ? 'currentbtn radio-btns' : 'radio-btns'"
         >
           未签单
         </div>
         <div
           @click="changeVoyageType(5)"
           :class="
-            currentbtn == 5
+            status == 5
               ? 'currentbtn radio-btns right-radius'
               : 'radio-btns right-radius '
           "
@@ -51,7 +59,7 @@
           clearable
           style="width: 330px"
         ></el-input>
-        <div class="seach-btn" @click="getVoyageList()">查询</div>
+        <div class="search-btn" @click="getVoyageList()">查询</div>
       </div>
       <!-- <div class="cargo-owner-add" @click="voyageAddDialogVisible = true">
         添加航次
@@ -216,12 +224,11 @@ import api from "../../apis/fetch";
 
 export default {
   setup() {
-    let currentbtn = ref(true);
     let currentPage = ref(1);
     let term = ref();
     let tableData = ref();
     let total = ref();
-    let status = ref(1);
+    let status = ref(0);
     async function getVoyageList() {
       tableData.value = [];
       let res = await api.getVoyageList({
@@ -245,7 +252,6 @@ export default {
     function changeVoyageType(s) {
       term.value = "";
       currentPage.value = 1;
-      currentbtn.value = s;
       status.value = s;
       getVoyageList();
     }
@@ -393,7 +399,7 @@ export default {
       term,
       tableData,
       total,
-      currentbtn,
+      status,
       changeVoyageType,
       getVoyageList,
       voyageDetail,
@@ -481,7 +487,7 @@ export default {
 
 .radio-btns {
   height: 38px;
-  width: 103px;
+  width: 70px;
   border: 1px solid #1486f9;
   line-height: 38px;
   text-align: center;
@@ -495,11 +501,13 @@ export default {
 .left-radius {
   border-top-left-radius: 19px;
   border-bottom-left-radius: 19px;
+  width: 80px;
 }
 
 .right-radius {
   border-top-right-radius: 19px;
   border-bottom-right-radius: 19px;
+  width: 80px;
 }
 .currentbtn {
   background: #1486f9;