Bladeren bron

修改bug

QuKatie 3 jaren geleden
bovenliggende
commit
2fa4e7ad26

+ 9 - 1
src/api/finance/applyForInvoice/chargeInvoice.js

@@ -176,7 +176,7 @@ export function getVesselName(query) {
     params: query
   })
 }
-//获取船名
+//船名
 export function transship(data) {
   return request({
     url: '/transhipment/transship',
@@ -184,6 +184,14 @@ export function transship(data) {
     data:data
   })
 }
+//转航次
+export function transvoyage(data) {
+  return request({
+    url: '/transhipment/turnVoyage',
+    method: 'post',
+    data:data
+  })
+}
 // 查询费用信息列表
 export function listFees(query) {
   return request({

+ 3 - 4
src/views/finance/otherFinancial/index.vue

@@ -5,7 +5,6 @@
         :model="query"
         ref="queryForm"
         v-show="showSearch"
-        :inline="true"
         label-width="88px"
       >
         <el-row>
@@ -19,7 +18,7 @@
               />
             </el-form-item>
           </el-col>
-          <!-- <el-col :span="6">
+          <el-col :span="6">
             <el-form-item label="船名">
               <el-select
                 v-model="query.fVslid"
@@ -55,8 +54,8 @@
                 />
               </el-select>
             </el-form-item>
-          </el-col> -->
-          <el-col :span="18" style="display:flex;justify-content: flex-end;">
+          </el-col>
+          <el-col :span="6" style="display:flex;justify-content: flex-end;">
             <el-form-item>
               <el-button
                 type="cyan"

+ 108 - 0
src/views/kaihe/domesticTrade/myOrder/index.vue

@@ -341,6 +341,14 @@
           :disabled="selection.length == 0 ? true : false"
           >转船</el-button
         >
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="transvoyage(true)"
+          :disabled="selection.length == 0 ? true : false"
+          >转航次</el-button
+        >
       </div>
       <div class="tabSetting">
         <right-toolbar
@@ -617,6 +625,54 @@
         <el-button type="primary" @click="transship(false)">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="转船"
+      :visible.sync="transvoyageVisible"
+      width="50%"
+      @closed="transvoyageClosed"
+    >
+      <el-form :inline="true" :model="ship3" class="demo-form-inline">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="船名">
+              <el-select
+                size="small"
+                width="240px"
+                v-model="ship3.fVslid"
+                @change="voyageRemthods3"
+              >
+                <el-option
+                  v-for="item in vesselOptions"
+                  :key="item.fId"
+                  :label="item.fName"
+                  :value="item.fId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="航次">
+              <el-select
+                v-model="ship3.fVoyid"
+                size="small"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="item in voyageOptions3"
+                  :key="item.fId"
+                  :label="item.fNo"
+                  :value="item.fId"
+                />
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="transvoyageVisible = false">取 消</el-button>
+        <el-button type="primary" @click="transvoyage(false)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -641,6 +697,7 @@ import draggable from "vuedraggable";
 import {
   getVesselName,
   transship,
+  transvoyage
 } from "@/api/finance/applyForInvoice/chargeInvoice";
 import {
   getVoyageName,
@@ -712,9 +769,11 @@ export default {
   },
   data() {
     return {
+      transvoyageVisible: false,
       transshipVisible: false,
       voyageOptions: [],
       voyageOptions2: [],
+      voyageOptions3: [],
       vesselOptions: [],
       show: false,
       activeIndex: "0",
@@ -958,6 +1017,10 @@ export default {
         fVoyid: "",
         fVslid: "",
       },
+      ship3: {
+        fVoyid: "",
+        fVslid: "",
+      },
       serviceitems: [],
       container: [],
       // 遮罩层
@@ -1047,6 +1110,12 @@ export default {
         if (this.ship2.fVslid) this.ship2.fVoyid = "";
       });
     },
+    voyageRemthods3() {
+      getVoyageName2({ fPid: this.ship3.fVslid }).then((response) => {
+        this.voyageOptions3 = response.data;
+        if (this.ship3.fVslid) this.ship3.fVoyid = "";
+      });
+    },
     transship(Bool) {
       if (Bool) {
         for (let i = 0; i < this.selection.length; i++) {
@@ -1079,6 +1148,38 @@ export default {
       }
       this.transshipVisible = Bool;
     },
+    transvoyage(Bool) {
+      if (Bool) {
+        for (let i = 0; i < this.selection.length; i++) {
+          if (this.selection[i].fArrivalStatus != 2) {
+            return this.$message.error(
+              "订舱号:" + this.selection[i].fBillno + "未到港"
+            );
+          }
+          // if (this.selection[i].fShipTwoName && this.selection[i].fVoyTwoName) {
+          //   return this.$message.error(
+          //     "订舱号:" + this.selection[i].fBillno + "已转船"
+          //   );
+          // }
+        }
+      } else {
+        let ids = [];
+        this.selection.forEach((e) => {
+          ids.push(e.fId);
+        });
+        transvoyage({
+          fVslid: this.ship3.fVslid,
+          fVoyid: this.ship3.fVoyid,
+          orderList: ids,
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$message.success("转船成功");
+            this.getList();
+          }
+        });
+      }
+      this.transvoyageVisible = Bool;
+    },
     transshipClosed() {
       this.ship2 = {
         fVoyid: "",
@@ -1086,6 +1187,13 @@ export default {
       };
       this.voyageOptions2 = [];
     },
+    transvoyageClosed() {
+      this.ship3 = {
+        fVoyid: "",
+        fVslid: "",
+      };
+      this.voyageOptions3 = [];
+    },
     //获取船名
     vessleRemthod() {
       getVesselName().then((response) => {

+ 7 - 10
src/views/kaihe/domesticTrade/orderInformation/index.vue

@@ -1601,13 +1601,12 @@
           <i class="el-icon-circle-plus"></i>利润合计:
           {{
             this.amountDr != null && this.amountCr != null
-              ? this.amountDr - this.amountCr
+              ? Number(this.amountDr - this.amountCr).toFixed(2)
               : !this.amountDr && this.amountCr
-              ? 0 - this.amountCr
+              ? Number(0 - this.amountCr).toFixed(2)
               : !this.amountDr && !this.amountCr
               ? ""
-              : this.amountDr
-          |numFilter}}
+              : Number(this.amountDr).toFixed(2)}}
         </template>
       </el-collapse-item>
     </el-collapse>
@@ -1836,7 +1835,7 @@
       fullscreen
       :show-close="false"
       :close-on-press-escape="false"
-      :before-close="(dialogVisible = false)"
+      :before-close="beforeClose"
     >
       <div ref="print" style="width: 99%; margin: 1px auto auto">
         <div style="width: 100%">
@@ -2246,11 +2245,6 @@ export default {
       uploadLoading: false,
     };
   },
-  filters:{
-    numFilter(num){
-      return Number(num?num:0).toFixed(2)
-    }
-  },
   //页面跳转后传递参数
   activated() {
     this.jumpDonot = false;
@@ -3545,6 +3539,9 @@ export default {
         }
       });
     },
+    beforeClose(){
+      this.dialogVisible = false
+    },
     //新行
     addList() {
       this.dataList.push({