瀏覽代碼

修改船舶动态的航次信息

caojunjie 4 年之前
父節點
當前提交
a6c1f49492

+ 9 - 1
src/api/kaihe/shipDynamics/vesselDetail.js

@@ -24,10 +24,18 @@ export function getCorps(fId) {
   })
 }
 
+// // 原新增
+// export function addyard(data) {
+//   return request({
+//     url: '/shipping/voyage',
+//     method: 'post',
+//     data: data
+//   })
+// }
 // 新增
 export function addyard(data) {
   return request({
-    url: '/shipping/voyage',
+    url: '/shipping/voyage/insertMessage',
     method: 'post',
     data: data
   })

+ 1 - 0
src/views/index.vue

@@ -155,6 +155,7 @@
                 "
                 v-for="(item, index) in tableData"
                 :key="index"
+                v-if="index<5"
               >
                 <div class="home_stock_table"> <p>{{ item.refno1 }}</p></div>
                 <div class="home_stock_table">

+ 24 - 0
src/views/kaihe/shipDynamics/oceanFreightRate/index.vue

@@ -599,6 +599,30 @@
               </template>
             </el-table-column>
             <el-table-column
+                prop="fDates"
+                header-align="center"
+                align="center"
+                label="船期">
+              <template slot-scope="scope">
+                <el-select
+                    v-model="scope.row.fDates"
+                    style="width: 80%"
+                    :disabled="doNot"
+                    clearable
+                    multiple
+                    placeholder="请输入航期"
+                >
+                  <el-option label="周一" value="周一"/>
+                  <el-option label="周二" value="周二"/>
+                  <el-option label="周三" value="周三"/>
+                  <el-option label="周四" value="周四"/>
+                  <el-option label="周五" value="周五"/>
+                  <el-option label="周六" value="周六"/>
+                  <el-option label="周天" value="周天"/>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
               prop="fStatus"
               header-align="center"
               align="center"

+ 203 - 1
src/views/kaihe/shipDynamics/vesselDetail/index.vue

@@ -219,6 +219,17 @@
           v-hasPermi="['basicdata:yard:list']"
         >取消</el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          :disabled="single"
+          @click="copyAdded"
+          v-hasPermi="['basicdata:yard:list']"
+        >克隆</el-button>
+      </el-col>
       <el-col  style="position: absolute;left:75%" :span="5" >
         <el-button  size="small" @click="queryParamsHidden ? (queryParamsHidden = false) : (queryParamsHidden = true)">{{ queryParamsHidden ? '隐藏' : '更多' }}</el-button>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -688,6 +699,141 @@
           </el-col>
         </el-row>
       </el-form>
+      <el-collapse v-model="activeNames">
+        <el-collapse-item name="1">
+          <template slot="title" >
+            <i class="el-icon-s-home"></i>海运运价
+          </template>
+          <div>
+            <el-button
+                :disabled="doNot"
+                type="primary"
+                @click.prevent="addRelevant()"
+                size="small"
+            >新行
+            </el-button>
+          </div>
+          <el-table
+              :data="dataList"
+              tooltip-effect="dark"
+              ref="checkout"
+              border
+              stripe
+              @selection-change="Selectinventory"
+          >
+            <el-table-column type="selection" width="55" align="center" />
+            <el-table-column label="序号" type="index" width="80" />
+            <el-table-column prop="fCntrid" header-align="center" align="center"  label="集装箱">
+              <template slot-scope="scope">
+                <el-select
+                    v-model="scope.row.fCntrid"
+                    :disabled="doNot"
+                    size="small"
+                    clearable>
+                  <el-option
+                      v-for="item in cntrOptions"
+                      :key="item.fId"
+                      :label="item.fNo"
+                      :value="item.fId"/>
+                </el-select>
+
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="fPrice"
+                header-align="center"
+                align="center"
+                label="单价"
+            >
+              <template slot-scope="scope">
+                <el-input
+                    oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                    v-model="scope.row.fPrice"
+                    :disabled="doNot"
+                    placeholder="单价"
+                    clearable
+                    show-word-limit
+                />
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="remark"
+                header-align="center"
+                width="140px"
+                align="center"
+                label="备注"
+            >
+              <template slot-scope="scope">
+                <el-input
+                    v-model="scope.row.remark"
+                    size="small"
+                    :disabled="doNot"
+                    clearable
+                    placeholder=""
+                >
+                </el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="fDates"
+                header-align="center"
+                align="center"
+                label="船期">
+              <template slot-scope="scope">
+                <el-select
+                    v-model="scope.row.fDates"
+                    style="width: 80%"
+                    :disabled="doNot"
+                    clearable
+                    multiple
+                    placeholder="请输入航期"
+                >
+                  <el-option label="周一" value="周一"/>
+                  <el-option label="周二" value="周二"/>
+                  <el-option label="周三" value="周三"/>
+                  <el-option label="周四" value="周四"/>
+                  <el-option label="周五" value="周五"/>
+                  <el-option label="周六" value="周六"/>
+                  <el-option label="周天" value="周天"/>
+                </el-select>
+              </template>
+            </el-table-column>
+            <el-table-column
+                prop="fStatus"
+                header-align="center"
+                align="center"
+                label="状态"
+            >
+              <template slot-scope="scope">
+                <el-select
+                    :disabled="doNot"
+                    v-model="scope.row.fStatus"
+                >
+                  <el-option label="正常" value="T" />
+                  <el-option label="停用" value="F" />
+                </el-select>
+              </template>
+            </el-table-column>
+
+            <el-table-column
+                header-align="center"
+                align="center"
+                label="操作"
+            >
+              <template slot-scope="scope">
+                <el-button
+                    :disabled="doNot"
+                    @click.native.prevent="wDeleteRow(scope.$index, dataList)"
+                    size="small"
+                >移除</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+
+
+        </el-collapse-item>
+      </el-collapse>
       <div slot="footer" class="dialog-footer">
         <el-button type="info" round @click="doNot = false">修 改</el-button>
         <el-button type="success" round @click="submitForm" :disabled="doNot">保 存</el-button>
@@ -703,6 +849,7 @@
   import Vue from 'vue'
   import Cookies from 'js-cookie'
   import { addSet, resetModule, select } from '@/api/system/set'
+  import {getcntrName} from "@/api/kaihe/shipDynamics/oceanFreightRate";
 
   Vue.directive('dialogDrag', {
     bind(el, binding, vnode, oldVnode) {
@@ -767,6 +914,7 @@
     data() {
       return {
         setRowList: [],
+        dataList: [],
         rouTe: [],
         getRowList: [],
         tableDate: [
@@ -932,6 +1080,7 @@
         queryParamsHidden:false,
         //查看置灰
         doNot:true,
+        activeNames: ['1'],
         //模糊查询港口名称
         portNameOptions:[],
         //港口类型字典表
@@ -999,6 +1148,7 @@
           fCutoffdate:null,
           fTeu:null
         },
+        cntrOptions:[],
         // 表单校验
         rules: {
           fPid: [{ required: true, message: "船名不能为空", trigger: "blur" }],
@@ -1023,6 +1173,11 @@
       this.getList()
     },
     created() {
+      let queryParams = { pageNum: 1,};
+      getcntrName(queryParams).then(response=>{
+        // console.log(response)
+        this.cntrOptions = response.rows
+      })
       routeSelection().then(res =>{
         this.rouTe = res.rows;
       })
@@ -1128,6 +1283,10 @@
           this.vesselOptions = response.rows
         })
       },
+      //海运价选中
+      Selectinventory(selection) {
+        console.log(selection)
+      },
       //模糊查询港口名称
       portRemoteMethod(){
         let queryParams = { pageNum: 1,};
@@ -1181,8 +1340,13 @@
           fCutoffdate:null,
           fTeu:null
         };
+        this.dataList = []
         this.resetForm("form");
       },
+      //海运价移除
+      wDeleteRow(index, rows) {
+        rows.splice(index, 1);
+      },
       // 状态修改
       handleStatusChange(row) {
         let text = row.fStatus === "0" ? "启用" : "停用";
@@ -1228,15 +1392,37 @@
         const fId = row.fId || this.ids
         getCorps(fId).then(response => {
           this.form = response.data;
+          this.dataList = response.data.tCtnpriceItemsList
+          this.dataList.forEach(item =>item.fDates = JSON.parse(item.fDates))
+          delete this.form.tCtnpriceItemsList
+          console.log(this.form)
           this.open = true;
           this.title = "修改客户详情";
         });
       },
+      //海运价新行
+      addRelevant(){
+        this.$refs["form"].validate((valid) => {
+          if (valid) {
+            this.dataList.push({
+              fPid:null,
+              fCntrid:null,
+              fPrice:null,
+              remarks:null,
+              fStatus:'T',
+              fDates:null
+            })
+          }
+        })
+      },
       /** 提交按钮 */
       submitForm() {
         this.$refs["form"].validate(valid => {
           if (valid) {
-              addyard(this.form).then(response => {
+            let formData = new window.FormData();
+            formData.append("tVoyage", JSON.stringify(this.form));
+            formData.append("tCtnpriceItems", JSON.stringify(this.dataList));
+              addyard(formData).then(response => {
                 this.msgSuccess("操作成功");
                 this.open = false;
                 this.getList();
@@ -1258,6 +1444,22 @@
           this.msgSuccess("删除成功");
         })
       },
+      /** 复制新增*/
+      copyAdded(){
+        getCorps(this.ids[0]).then(response => {
+          this.form = response.data;
+          this.dataList = response.data.tCtnpriceItemsList
+          this.dataList.forEach(item =>{
+            item.fDates = JSON.parse(item.fDates)
+            delete item .fId
+          })
+          delete this.form.tCtnpriceItemsList
+          this.form.fId = ''
+          this.open = true;
+          this.doNot = false
+          this.title = "新增";
+        });
+      },
       /** 导出按钮操作 */
       handleExport() {
         const queryParams = this.queryParams;

+ 15 - 15
src/views/track/costModification/index.vue

@@ -962,21 +962,21 @@ export default {
       this.fMblnoOptions = response.rows;
     });
     this.getRow();
-    if (this.$route.query.id) {
-      this.reset();
-      const data = { id: this.$route.query.id, billStatus: 1060 };
-      selectDriverFtmsorderbillscars(data).then((response) => {
-        if (response.data.cars.billType) {
-          response.data.cars.billType = response.data.cars.billType.toString();
-        }
-        this.title = "查看详情页";
-        this.form = response.data.cars;
-        // this.relevantAttachments = response.data.attachs;
-        console.log(this.addOrUpdateVisible)
-        if (this.addOrUpdateVisible !== false) this.addOrUpdateVisible = !this.addOrUpdateVisible
-        this.feesList = [];
-      });
-    }
+    // if (this.$route.query.id) {
+    //   this.reset();
+    //   const data = { id: this.$route.query.id, billStatus: 1060 };
+    //   selectDriverFtmsorderbillscars(data).then((response) => {
+    //     if (response.data.cars.billType) {
+    //       response.data.cars.billType = response.data.cars.billType.toString();
+    //     }
+    //     this.title = "查看详情页";
+    //     this.form = response.data.cars;
+    //     // this.relevantAttachments = response.data.attachs;
+    //     console.log(this.addOrUpdateVisible)
+    //     if (this.addOrUpdateVisible !== false) this.addOrUpdateVisible = !this.addOrUpdateVisible
+    //     this.feesList = [];
+    //   });
+    // }
   },
   activated() {
     if (this.$route.query.id) {

+ 3 - 2
vue.config.js

@@ -34,7 +34,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.1.177:9030/`,
+        target: `http://192.168.1.177:9010/`,
         // target: `https://test.fms.tubaosoft.com/prod-api/`,
         // target: `https://test.wms.tubaosoft.com/prod-api/`,
         // target: `https://test.tms.tubaosoft.com/prod-api/`,
@@ -44,9 +44,10 @@ module.exports = {
         // target: `https://jianqiao.tubaosoft.com/prod-api/`,
         // target: `https://jiyong.tubaosoft.com/prod-api/`,
         // target: `https://dmu.tubaosoft.com/prod-api/`,
-        // target: `http://jingang.tubaosoft.com/prod-api/`,
+        // target: `https://jingang.tubaosoft.com/prod-api/`,
 
         // target: `https://jingrun.tubaosoft.com/prod-api/`,
+        // target: `https://ke.khzclogistics.com/prod-api/`,
         // target: `https://op.khzclogistics.com/prod-api/`,
         // 华为10M
         // target: `http://121.36.212.131:9010/`,