QuKatie před 3 roky
rodič
revize
1f461267f2

+ 8 - 0
src/api/finance/applyForInvoice/chargeInvoice.js

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

+ 8 - 0
src/api/finance/applyForInvoice/feeDetail.js

@@ -46,6 +46,14 @@ export function getVoyageName(query) {
     params: query
   })
 }
+//获取航次
+export function getVoyageName2(query) {
+  return request({
+    url: '/shipping/voyage/selectTVoyageListNew',
+    method: 'get',
+    params: query
+  })
+}
 //查看、修改
 export function listChange(fId) {
   return request({

+ 166 - 2
src/views/kaihe/domesticTrade/myOrder/index.vue

@@ -333,6 +333,14 @@
           "
           >取消扣货</el-button
         >
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="transship(true)"
+          :disabled="selection.length == 0 ? true : false"
+          >转船</el-button
+        >
       </div>
       <div class="tabSetting">
         <right-toolbar
@@ -461,6 +469,9 @@
             </p>
             <p v-else>{{ scope.row.fCaregoStatus }}</p>
           </span>
+          <span v-else-if="item.label == 'fArrivalStatus'">{{
+            scope.row.fArrivalStatus | transshipName
+          }}</span>
           <span v-else>{{ scope.row[item.label] }}</span>
         </template>
       </el-table-column>
@@ -558,6 +569,54 @@
         <el-button type="primary" @click="matchingShip(true)">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog
+      title="转船"
+      :visible.sync="transshipVisible"
+      width="50%"
+      @closed="transshipClosed"
+    >
+      <el-form :inline="true" :model="ship2" class="demo-form-inline">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="船名">
+              <el-select
+                size="small"
+                width="240px"
+                v-model="ship2.fVslid"
+                @change="voyageRemthods2"
+              >
+                <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="ship2.fVoyid"
+                size="small"
+                style="width: 200px"
+              >
+                <el-option
+                  v-for="item in voyageOptions2"
+                  :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="transshipVisible = false">取 消</el-button>
+        <el-button type="primary" @click="transship(false)">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -579,8 +638,14 @@ import Cookies from "js-cookie";
 import { addSet, resetModule, select } from "@/api/system/set";
 import Vue from "vue";
 import draggable from "vuedraggable";
-import { getVesselName } from "@/api/finance/applyForInvoice/chargeInvoice";
-import { getVoyageName } from "@/api/finance/applyForInvoice/feeDetail";
+import {
+  getVesselName,
+  transship,
+} from "@/api/finance/applyForInvoice/chargeInvoice";
+import {
+  getVoyageName,
+  getVoyageName2,
+} from "@/api/finance/applyForInvoice/feeDetail";
 import { portInquiry } from "@/api/kaihe/domesticTrade/orderInformation";
 import { defaultDate } from "@/utils/date";
 Vue.directive("dialogDrag", {
@@ -647,7 +712,9 @@ export default {
   },
   data() {
     return {
+      transshipVisible: false,
       voyageOptions: [],
+      voyageOptions2: [],
       vesselOptions: [],
       show: false,
       activeIndex: "0",
@@ -838,6 +905,41 @@ export default {
         },
         {
           surface: "27",
+          label: "fArrivalStatus",
+          name: "离港状态",
+          checked: 0,
+          width: 120,
+        },
+        {
+          surface: "28",
+          label: "fShipTwoName",
+          name: "二程船名",
+          checked: 0,
+          width: 120,
+        },
+        {
+          surface: "29",
+          label: "fVoyTwoName",
+          name: "二程航次",
+          checked: 0,
+          width: 120,
+        },
+        // {
+        //   surface: "30",
+        //   label: "fShipThreeName",
+        //   name: "三程船名",
+        //   checked: 0,
+        //   width: 120,
+        // },
+        // {
+        //   surface: "31",
+        //   label: "fVoyThreeName",
+        //   name: "三程航次",
+        //   checked: 0,
+        //   width: 120,
+        // },
+        {
+          surface: "32",
           label: "remark",
           name: "备注",
           checked: 0,
@@ -852,6 +954,10 @@ export default {
         fVoyid: "",
         fVslid: "",
       },
+      ship2: {
+        fVoyid: "",
+        fVslid: "",
+      },
       serviceitems: [],
       container: [],
       // 遮罩层
@@ -915,6 +1021,19 @@ export default {
     //   ? this.queryParams.timeInterval
     //   : defaultDate();
   },
+  filters: {
+    transshipName(row) {
+      if (row == 0) {
+        return "未离港";
+      } else if (row == 1) {
+        return "离港出运";
+      } else if (row == 2) {
+        return "到港卸船";
+      } else {
+        return "-";
+      }
+    },
+  },
   methods: {
     voyageRemthods() {
       getVoyageName({ fPid: this.ship.fVslid }).then((response) => {
@@ -922,6 +1041,51 @@ export default {
         if (this.ship.fVslid) this.ship.fVoyid = "";
       });
     },
+    voyageRemthods2() {
+      getVoyageName2({ fPid: this.ship2.fVslid }).then((response) => {
+        this.voyageOptions2 = response.data;
+        if (this.ship2.fVslid) this.ship2.fVoyid = "";
+      });
+    },
+    transship(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);
+        });
+        transship({
+          fVslid: this.ship2.fVslid,
+          fVoyid: this.ship2.fVoyid,
+          orderList: ids,
+        }).then((res) => {
+          if (res.code == 200) {
+            this.$message.success("转船成功");
+            this.getList();
+          }
+        });
+      }
+      this.transshipVisible = Bool;
+    },
+    transshipClosed() {
+      this.ship2 = {
+        fVoyid: "",
+        fVslid: "",
+      };
+      this.voyageOptions2 = [];
+    },
     //获取船名
     vessleRemthod() {
       getVesselName().then((response) => {

+ 103 - 5
src/views/kaihe/domesticTrade/orderInformation/index.vue

@@ -256,6 +256,53 @@
               </el-form-item>
             </el-col>
             <el-col :span="6">
+              <el-form-item label="二程船名" prop="fShipTwo">
+                <el-select
+                  v-model="form.fShipTwo"
+                  filterable
+                  remote
+                  style="width: 100%"
+                  :disabled="modify"
+                  class="elSelect"
+                  clearable
+                  @change="fvslChange2"
+                  @clear="fvslClear2"
+                  placeholder="请输入模糊查找目的船名"
+                >
+                  <el-scrollbar>
+                    <el-option
+                      v-for="dict in vslidList"
+                      :key="dict.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                    ></el-option>
+                  </el-scrollbar>
+                </el-select>
+              </el-form-item>
+            </el-col>
+             <el-col :span="6">
+              <el-form-item label="二程航次" prop="fVoyTwo">
+                <el-select
+                  v-model="form.fVoyTwo"
+                  filterable
+                  remote
+                  style="width: 100%"
+                  :disabled="modify"
+                  class="elSelect"
+                  placeholder="请输入模糊查找目的船名"
+                >
+                  <el-scrollbar>
+                    <el-option
+                      v-for="dict in voyidList2"
+                      :key="dict.fId"
+                      :label="dict.fNo"
+                      :value="dict.fId"
+                    ></el-option>
+                  </el-scrollbar>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
               <el-form-item label="航线" prop="fLaneid">
                 <el-select
                   v-model="form.fLaneid"
@@ -1325,6 +1372,34 @@
             </template>
           </el-table-column>
           <el-table-column
+            prop="fAddress"
+            header-align="center"
+            align="center"
+            width="180px"
+            label="付费地点"
+          >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.fAddress"
+              filterable
+              remote
+              style="width: 100%"
+              :disabled="modify || scope.row.fSrcTypeId != 0"
+              class="elSelect"
+              @change="fAddressChange(scope.row,scope.$index)"
+            >
+              <el-scrollbar>
+                <el-option
+                  v-for="dict in fMblnoOptions"
+                  :key="dict.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                ></el-option>
+              </el-scrollbar>
+            </el-select>
+          </template>
+          </el-table-column>
+          <el-table-column
             prop="fFeeUnitid"
             header-align="center"
             align="center"
@@ -2062,6 +2137,7 @@ export default {
       etentioncargo: [],
       vslidList: [],
       voyidList: [],
+      voyidList2: [],
       fLaneList: [],
       cEsign: [],
       transport: [],
@@ -2113,7 +2189,7 @@ export default {
       doNot: true,
       activeNames: ["1", "2", "3", "4", "5"],
       form: {
-        fVoyid:null
+        fVoyid: null,
       },
       fMblnoOptions: [],
       uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
@@ -2299,6 +2375,7 @@ export default {
     });
     voyageNumber().then((res) => {
       this.voyidList = res.rows;
+       this.voyidList2 = res.rows;
     });
     getfLaneName().then((res) => {
       this.fLaneList = res.rows;
@@ -2440,18 +2517,38 @@ export default {
     },
   },
   methods: {
+    fAddressChange(row,index){
+      this.fMblnoOptions.forEach(e=>{
+        if(e.fId==row.fAddress){
+          row.fAddressName=e.fName
+        }
+      })
+      console.log(this.warehouseCrList)
+    },
     fvslChange(id) {
-       voyageNumber({ fPid: id }).then((res) => {
+      voyageNumber({ fPid: id }).then((res) => {
         this.voyidList = res.rows;
-       });
+      });
       this.form.fVoyid = null;
     },
+    fvslChange2(id) {
+      voyageNumber({ fPid: id }).then((res) => {
+        this.voyidList2 = res.rows;
+      });
+      this.form.fVoyTwo = null;
+    },
     fvslClear() {
       voyageNumber().then((res) => {
         this.voyidList = res.rows;
       });
       this.form.fVoyid = null;
     },
+    fvslClear2() {
+      voyageNumber().then((res) => {
+        this.voyidList2 = res.rows;
+      });
+      this.form.fVoyTwo = null;
+    },
     rejectDeletion() {
       this.$confirm("驳回并删除, 是否继续?", "提示", {
         confirmButtonText: "确定",
@@ -2931,9 +3028,10 @@ export default {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);
               if (!isNaN(value)) {
-                return prev + curr;
+                let sum=Number(prev) + Number(curr)
+                return Number(sum).toFixed(2);
               } else {
-                return prev;
+                return Number(prev).toFixed(2);
               }
             }, 0);
           }