Sfoglia il codice sorgente

1.集装箱管理 箱管调箱 恢复代码 把箱明细加上并且加几个新字段
2.集装箱管理 箱管调箱 联调导入和模板接口
3.集装箱管理 箱管调箱 主表新加字段
4.OW拿 根据起运港场站 目的港场站 查询联系人信息
5.海运出口 订舱代理 查询传值新加客户类型
6.基础资料 新加代理费设置模块 联调接口
7.海运进出口 修改业务锁业务编号传值

Qukatie 1 settimana fa
parent
commit
0a21173d5d

+ 5 - 1
src/App.vue

@@ -34,10 +34,14 @@ export default {
   color: #000000 !important;
   background-color: #fafafa !important;
 }
+.el-range-editor.is-disabled input {
+  color: #000000 !important;
+  background-color: #fafafa !important;
+}
 .el-dialog__headerbtn {
   top: 9px !important;
 }
-.el-dialog__headerbtn{
+.el-dialog__headerbtn {
   margin-top: 5px !important;
 }
 </style>

+ 38 - 0
src/api/iosBasicData/agencyFeeSetting.js

@@ -0,0 +1,38 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/agencyfeesetting/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+//详情
+export const detail = (params) => {
+  return request({
+    url: '/api/blade-los/agencyfeesetting/detail',
+    method: 'get',
+    params: params
+  })
+}
+//保存
+export const submit = (data) => {
+  return request({
+    url: '/api/blade-los/agencyfeesetting/submit',
+    method: 'post',
+    data: data
+  })
+}
+//删除
+export const remove = (data) => {
+  return request({
+    url: '/api/blade-los/agencyfeesetting/remove',
+    method: 'post',
+    params: data
+  })
+}

+ 3 - 0
src/enums/column-name.js

@@ -2249,6 +2249,9 @@ const columnName = [{
 },{
   code: 532,
   name: '货代-进口换单-进口换单列表页'
+},{
+  code: 533,
+  name: '货代-基础资料-代理费设置列表页'
 }
 ]
 export const getColumnName = (key) => {

+ 65 - 34
src/views/boxManagement/boxAdjustment/detailsPage.vue

@@ -20,8 +20,8 @@
         <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small" :disabled="editDisabled" @click="submit"
           >保 存
         </el-button>
-        <el-button type="success" size="small" v-if="form.approvalStatus == 3&&form.buxStaus == '录入'" @click.stop="confirm">调箱确认</el-button>
-        <el-button type="danger" size="small" v-if="form.approvalStatus == 3&&form.buxStaus == '已确认'" @click.stop="revoke">调箱撤销</el-button>
+        <el-button type="success" size="small" v-if="form.approvalStatus == 3 && form.buxStaus == '录入'" @click.stop="confirm">调箱确认</el-button>
+        <el-button type="danger" size="small" v-if="form.approvalStatus == 3 && form.buxStaus == '已确认'" @click.stop="revoke">调箱撤销</el-button>
         <el-button
           v-if="form.id && form.approvalStatus == 0"
           class="el-button--small-yh"
@@ -236,7 +236,7 @@
               </template>
             </avue-crud>
           </trade-card> -->
-          <!-- <trade-card title="箱明细">
+          <trade-card title="箱明细">
             <avue-crud
               :option="option"
               :data="form.tradingBoxItemsList"
@@ -276,7 +276,7 @@
                   @click="allClick('批量删除')"
                   >批量删除</el-button
                 >
-                <el-button type="success" size="small" :disabled="!form.id">导入</el-button>
+                <el-button type="success" size="small" :disabled="!form.id" @click="allClick('导入')">导入</el-button>
                 <el-button size="small" style="margin-right: 8px" :disabled="!form.id || true" @click="$refs.print.openDialog()">打印报表 </el-button>
               </template>
               <template slot="indexHeader" slot-scope="{ row, index }">
@@ -319,7 +319,7 @@
                 ></el-input>
                 <span v-else>{{ row.code }}</span>
               </template>
-              <tempalte slot="boxEastNameForm" slot-scope="{ row }">
+              <!-- <tempalte slot="boxEastNameForm" slot-scope="{ row }">
                 <dic-select
                   v-if="row.$cellEdit"
                   v-model="row.boxEastName"
@@ -337,7 +337,7 @@
                 >
                 </dic-select>
                 <span v-else>{{ row.boxEastName }}</span>
-              </tempalte>
+              </tempalte> -->
               <tempalte slot="corpNameForm" slot-scope="{ row }">
                 <dic-select
                   v-if="row.$cellEdit"
@@ -375,7 +375,7 @@
                 <span v-else>{{ row.shipCname }}</span>
               </tempalte>
             </avue-crud>
-          </trade-card> -->
+          </trade-card>
           <trade-card title="操作记录">
             <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
           </trade-card>
@@ -792,7 +792,7 @@ export default {
               res: "data"
             },
             tip: "请上传 .xls,.xlsx 标准格式文件",
-            action: "/api/blade-los/baccelements/importBAccElements"
+            action: "/api/blade-los/tradingBoxItem/importBoxItem"
           }
         ]
       },
@@ -995,11 +995,16 @@ export default {
             ]
           },
           {
+            label: "进场数量",
+            prop: "actualBoxNumber",
+            disabled: true
+          },
+          {
             label: "备注",
             prop: "remarks",
             type: "textarea",
             minRows: 2,
-            span: 12
+            span: 6
           }
         ]
       },
@@ -1119,22 +1124,22 @@ export default {
               }
             ]
           },
-          {
-            label: "箱东",
-            prop: "boxEastName",
-            cell: true,
-            slot: true,
-            formslot: true,
-            overHidden: true,
-            width: 100,
-            rules: [
-              {
-                required: true,
-                message: "请输入箱东",
-                trigger: "blur"
-              }
-            ]
-          },
+          // {
+          //   label: "箱东",
+          //   prop: "boxEastName",
+          //   cell: true,
+          //   slot: true,
+          //   formslot: true,
+          //   overHidden: true,
+          //   width: 100,
+          //   rules: [
+          //     {
+          //       required: true,
+          //       message: "请输入箱东",
+          //       trigger: "blur"
+          //     }
+          //   ]
+          // },
           {
             label: "放箱号类型",
             prop: "boxCategory",
@@ -1207,6 +1212,26 @@ export default {
             ]
           },
           {
+            label: "进场日期",
+            prop: "polPickUpDate",
+            width: 150,
+            type: "date",
+            cell:true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            overHidden: true
+          },
+          {
+            label: "出场日期",
+            prop: "polStationEmptyContainerExitDate",
+            width: 150,
+            type: "date",
+            cell:true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00",
+            overHidden: true
+          },
+          {
             label: "箱动态",
             prop: "boxDynamics",
             width: 100,
@@ -1740,17 +1765,18 @@ export default {
     },
     // 上传成功
     onSuccess(res, done, loading, column) {
-      if (res == "操作成功") {
+      if (res.length > 0) {
         this.$message.success("上传成功!");
       }
       this.excelBox = false;
-      this.$message.success("导入成功!");
+      // this.$message.success("导入成功!");
+      this.getDetail(this.form.id);
       loading = false;
       done();
     },
     // 下载模板
     handleGet() {
-      window.open(`/api/blade-los/baccelements/exportBAccElements/template?${this.website.tokenHeader}=${getToken()}`);
+      window.open(`/api/blade-los/tradingBoxItem/boxItemTemplate?${this.website.tokenHeader}=${getToken()}&type=5`);
     },
     async dicChange(name, row) {
       if (name == "purchaseCompanyName") {
@@ -2243,6 +2269,11 @@ export default {
         });
       }
       if (name == "导入") {
+        this.excelOption.column.forEach(item => {
+          if (item.prop == "excelFile") {
+            item.action = "/api/blade-los/tradingBoxItem/importBoxItem?type=5&id=" + this.form.id;
+          }
+        });
         this.excelBox = true;
       }
       if (name == "费用一键保存") {
@@ -2474,12 +2505,12 @@ export default {
           //     return this.$message.error("请完善箱型箱量");
           //   }
           // }
-          // for (let row of this.form.tradingBoxItemsList) {
-          //   if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
-          //     this.$refs.crud.rowCell(row, row.$index);
-          //     return this.$message.error("请完善箱明细信息");
-          //   }
-          // }
+          for (let row of this.form.tradingBoxItemsList) {
+            if (!row.code || !row.boxType || !row.boxCategory || !row.boxStatus || !row.boxCondition) {
+              this.$refs.crud.rowCell(row, row.$index);
+              return this.$message.error("请完善箱明细信息");
+            }
+          }
           for (let row of this.form.feeCenterList) {
             row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD;
             if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {

+ 6 - 0
src/views/boxManagement/boxAdjustment/index.vue

@@ -343,6 +343,12 @@ export default {
         };
         this.isShow = false;
       }
+      if (this.$route.query.billId) {
+        this.detailData = {
+          id: this.$route.query.billId
+        };
+        this.isShow = false;
+      }
     }, 100);
   },
   methods: {

+ 7 - 7
src/views/iosBasicData/OceanFreightImport/bills/billsDetails.vue

@@ -1009,13 +1009,13 @@ export default {
         tableName: "SI_order",
         billId: this.form.id,
         no: localStorage.getItem("browserID"),
-        billNo: this.form.mblno
+        billNo: this.form.billNo
       };
       this.inDetailsKey(this.$route.name, {
         moduleName: "SI",
         tableName: "SI_order",
         billId: this.form.id,
-        billNo: this.form.mblno
+        billNo: this.form.billNo
       });
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
@@ -1038,7 +1038,7 @@ export default {
             moduleName: "SI",
             tableName: "SI_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         const lastIndex = index - 1;
@@ -1057,7 +1057,7 @@ export default {
             moduleName: "SI",
             tableName: "SI_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         const nextIndex = index + 1;
@@ -2239,7 +2239,7 @@ export default {
                 moduleName: "SI",
                 tableName: "SI_order",
                 billId: this.form.id,
-                billNo: this.form.mblno
+                billNo: this.form.billNo
               });
             }
             this.$emit("goBack");
@@ -2250,7 +2250,7 @@ export default {
             moduleName: "SI",
             tableName: "SI_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         this.$emit("goBack");
@@ -2753,7 +2753,7 @@ export default {
                 moduleName: "SI",
                 tableName: "SI_order",
                 billId: this.form.id,
-                billNo: this.form.mblno
+                billNo: this.form.billNo
               });
             }
             this.$emit("goBack");

+ 1 - 1
src/views/iosBasicData/SeafreightExportF/bills/assembly/EntrustmentLnformation.vue

@@ -3272,7 +3272,7 @@ export default {
     },
     // 订舱代理
     bookingAgentBcorpsListfun(cnName) {
-      let corpTypeName = "国内直接客户,国内同行及代理,国外直接客户,国外同行及代理";
+      let corpTypeName = "国内直接客户,国内同行及代理,国外直接客户,国外同行及代理,订舱代理";
       getBcorpslistByType(1, 10, { cnName, status: 0, corpTypeName }).then(res => {
         this.bookingAgentData = res.data.data.records;
       });

+ 7 - 7
src/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue

@@ -1153,13 +1153,13 @@ export default {
         tableName: "SE_order",
         billId: this.form.id,
         no: localStorage.getItem("browserID"),
-        billNo: this.form.mblno
+        billNo: this.form.billNo
       };
       this.inDetailsKey(this.$route.name, {
         moduleName: "SE",
         tableName: "SE_order",
         billId: this.form.id,
-        billNo: this.form.mblno
+        billNo: this.form.billNo
       });
       this.checkLock(data).then(res => {
         if (res.data.code == 200) {
@@ -1183,7 +1183,7 @@ export default {
             moduleName: "SE",
             tableName: "SE_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         this.pageLoading = true;
@@ -1202,7 +1202,7 @@ export default {
             moduleName: "SE",
             tableName: "SE_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         this.pageLoading = true;
@@ -2328,7 +2328,7 @@ export default {
                 moduleName: "SE",
                 tableName: "SE_order",
                 billId: this.form.id,
-                billNo: this.form.mblno
+                billNo: this.form.billNo
               });
             }
             this.$emit("goBack");
@@ -2339,7 +2339,7 @@ export default {
             moduleName: "SE",
             tableName: "SE_order",
             billId: this.form.id,
-            billNo: this.form.mblno
+            billNo: this.form.billNo
           });
         }
         this.$emit("goBack");
@@ -2887,7 +2887,7 @@ export default {
                 moduleName: "SE",
                 tableName: "SE_order",
                 billId: this.form.id,
-                billNo: this.form.mblno
+                billNo: this.form.billNo
               });
             }
             this.$emit("goBack");

+ 9 - 2
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -1390,11 +1390,11 @@ export default {
             dicData: [
               {
                 label: "未发送",
-                value: '0'
+                value: "0"
               },
               {
                 label: "已发送",
-                value: '1'
+                value: "1"
               }
             ],
             width: "120",
@@ -1604,6 +1604,13 @@ export default {
         }, 200);
       }
     }
+    if (this.$route.query.billId) {
+      if (!this.$store.getters.seaFEStatus) {
+        setTimeout(() => {
+          this.rowCellfun(this.$route.query.billId);
+        }, 200);
+      }
+    }
   },
   methods: {
     summaryMethod({ columns, data }) {

+ 463 - 0
src/views/iosBasicData/agencyFeeSetting/detailsPage.vue

@@ -0,0 +1,463 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton" @click="inEdit"
+          >编 辑
+        </el-button>
+        <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small" :disabled="editDisabled" @click="submit"
+          >保 存
+        </el-button>
+      </div>
+    </div>
+    <div style="margin-top: 50px">
+      <trade-card title="基本信息">
+        <avue-form :option="optionForm" v-model="form" ref="form">
+          <tempalte slot="polCnName">
+            <dic-select
+              v-model="form.polCnName"
+              placeholder="港口"
+              label="cnName"
+              res="records"
+              :disabled="editDisabled"
+              url="/blade-los/bports/list?status=0&current=1&size=5"
+              :filterable="true"
+              :remote="true"
+              dataName="cnName"
+              @selectChange="dicChange('polCnName', $event)"
+              :slotRight="true"
+              rightLabel="code"
+            ></dic-select>
+          </tempalte>
+          <tempalte slot="podCnName">
+            <dic-select
+              v-model="form.podCnName"
+              placeholder="港口"
+              label="cnName"
+              res="records"
+              :disabled="editDisabled"
+              url="/blade-los/bports/list?status=0&current=1&size=5"
+              :filterable="true"
+              :remote="true"
+              dataName="cnName"
+              @selectChange="dicChange('podCnName', $event)"
+              :slotRight="true"
+              rightLabel="code"
+            ></dic-select>
+          </tempalte>
+        </avue-form>
+      </trade-card>
+      <trade-card title="基本港">
+        <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
+      </trade-card>
+      <trade-card title="非基本港">
+        <avue-form :option="optionForm3" v-model="form" ref="form3"> </avue-form>
+      </trade-card>
+      <trade-card title="操作记录">
+        <avue-form :option="optionForm4" v-model="form" ref="form4"> </avue-form>
+      </trade-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import { detail, submit } from "@/api/iosBasicData/agencyFeeSetting.js";
+import dicSelect from "@/components/dicSelect/main";
+import { getToken } from "@/util/auth";
+import _ from "lodash";
+import { Header } from "element-ui";
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+      editButton: false,
+      editDisabled: false,
+      form: {
+        billNoFormat: "DLF",
+        businessTypeCode: "DLF",
+        validityPeriodDate: []
+      },
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        column: [
+          {
+            label: "装货港",
+            prop: "polCnName",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+            disabled: false
+          },
+          {
+            label: "卸货港",
+            prop: "podCnName",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+            disabled: false
+          },
+          {
+            label: "有效日期",
+            prop: "validityPeriodDate",
+            type: "daterange",
+            defaultTime: ["00:00:00", "00:00:00"],
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+            disabled: false
+          }
+        ]
+      },
+      optionForm2: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        group: [
+          {
+            label: "DF自营",
+            prop: "group1",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "basicDfSelfOperatedOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "basicDfSelfOperatedAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "basicDfSelfOperatedInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          },
+          {
+            label: "DF合营",
+            prop: "group2",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "basicDfJointVentureOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "basicDfJointVentureAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "basicDfJointVentureInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          },
+          {
+            label: "OPEN/CSA",
+            prop: "group3",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "basicOpenCsaOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "basicOpenCsaAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "basicOpenCsaInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          }
+        ]
+      },
+      optionForm3: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        group: [
+          {
+            label: "DF自营",
+            prop: "group1",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "notBasicDfSelfOperatedOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "notBasicDfSelfOperatedAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "notBasicDfSelfOperatedInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          },
+          {
+            label: "DF合营",
+            prop: "group2",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "notBasicDfJointVentureOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "notBasicDfJointVentureAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "notBasicDfJointVentureInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          },
+          {
+            label: "OPEN/CSA",
+            prop: "group3",
+            arrow: false,
+            column: [
+              {
+                label: "自有箱费率",
+                prop: "notBasicOpenCsaOwn",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "代理箱费率",
+                prop: "notBasicOpenCsaAgent",
+                type: "number",
+                controls: false,
+                precision: 2
+              },
+              {
+                label: "空箱调用费率",
+                prop: "notBasicOpenCsaInvoke",
+                type: "number",
+                controls: false,
+                precision: 2
+              }
+            ]
+          }
+        ]
+      },
+      optionForm4: {
+        menuBtn: false,
+        span: 6,
+        disabled: true,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            disabled: true
+          },
+          {
+            label: "制单人",
+            prop: "createUserName",
+            disabled: true
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            disabled: true
+          }
+        ]
+      }
+    };
+  },
+  components: {
+    dicSelect
+  },
+  props: {
+    detailData: Object
+  },
+  async created() {
+    if (this.detailData.id) {
+      this.editButton = true;
+      this.editDisabled = true;
+      this.optionForm.disabled = true;
+      this.optionForm2.disabled = true;
+      this.optionForm3.disabled = true;
+      this.getDetail(this.detailData.id);
+    }
+  },
+  methods: {
+    async dicChange(name, row) {
+      if (name == "polCnName") {
+        if (row) {
+          this.form.polId = row.id;
+          this.form.polCode = row.code;
+          this.form.polEnName = row.enName;
+        } else {
+          this.form.polId = null;
+          this.form.polCode = null;
+          this.form.polEnName = null;
+          this.form.polCnName = null;
+        }
+      }
+      if (name == "podCnName") {
+        if (row) {
+          this.form.podId = row.id;
+          this.form.podCode = row.code;
+          this.form.podEnName = row.enName;
+        } else {
+          this.form.podId = null;
+          this.form.podCode = null;
+          this.form.podEnName = null;
+          this.form.podCnName = null;
+        }
+      }
+    },
+    getDetail(id) {
+      const loading = this.$loading({
+        lock: true,
+        text: "加载中",
+        spinner: "el-icon-loading",
+        background: "rgba(255,255,255,0.7)"
+      });
+      detail({ id: id })
+        .then(res => {
+          if (res.data.data.validityPeriodStart || res.data.data.validityPeriodEnd)
+            res.data.data.validityPeriodDate = [res.data.data.validityPeriodStart, res.data.data.validityPeriodEnd];
+          this.form = res.data.data;
+        })
+        .finally(() => {
+          loading.close();
+        });
+    },
+    inEdit() {
+      this.editButton = false;
+      this.editDisabled = false;
+      this.optionForm.disabled = false;
+      this.optionForm2.disabled = false;
+      this.optionForm3.disabled = false;
+    },
+    allClick(name, row) {},
+    submit(type) {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          if (this.form.validityPeriodDate.length) {
+            this.form.validityPeriodStart = this.form.validityPeriodDate[0];
+            this.form.validityPeriodEnd = this.form.validityPeriodDate[1];
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: "加载中",
+            spinner: "el-icon-loading",
+            background: "rgba(255,255,255,0.7)"
+          });
+          submit(this.form)
+            .then(res => {
+              this.$message.success("保存成功");
+              this.getDetail(res.data.data.id);
+            })
+            .finally(() => {
+              loading.close();
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    goBack(type) {
+      this.$emit("goBack");
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .avue-group__header {
+  height: 30px !important;
+  line-height: 30px !important;
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+
+::v-deep .el-card__body {
+  padding: 3px 10px;
+}
+
+::v-deep .box-card .el-card__body {
+  padding: 4px !important;
+}
+</style>

+ 303 - 0
src/views/iosBasicData/agencyFeeSetting/index.vue

@@ -0,0 +1,303 @@
+<template>
+  <div>
+    <basic-container v-if="isShow">
+      <avue-crud
+        :option="option"
+        :table-loading="loading"
+        :data="data"
+        :page.sync="page"
+        :search.sync="query"
+        v-model="form"
+        id="out-table"
+        :header-cell-class-name="headerClassName"
+        ref="crud"
+        @row-del="rowDel"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @selection-change="selectionChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @resetColumn="resetColumn('crud', 'option', 'optionBack', 533)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 533)"
+        @on-load="onLoad"
+      >
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">新建代理费</el-button>
+        </template>
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button size="small" icon="el-icon-edit" type="text" @click="rowEdit(row)">编辑</el-button>
+          <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)">删 除</el-button>
+        </template>
+        <template slot="sysNo" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.sysNo }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
+  </div>
+</template>
+
+<script>
+import { getList, remove } from "@/api/iosBasicData/agencyFeeSetting.js";
+import detailsPage from "./detailsPage";
+import _ from "lodash";
+export default {
+  data() {
+    return {
+      isShow: true,
+      form: {},
+      query: {  },
+      loading: false,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: "auto",
+        calcHeight: 30,
+        menuWidth: 140,
+        searchLabelWidth: 90,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 6,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchIcon: true,
+        align: "center",
+        searchIndex: 3,
+        column: [
+          {
+            label: "系统号",
+            prop: "sysNo",
+            search: true,
+            overHidden: true
+          },
+          {
+            label: "装货港",
+            prop: "polCnName",
+            overHidden: true,
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bports/list?status=0&size=5&current=1&cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              desc: "code",
+              res: "data.records"
+            },
+          },
+          {
+            label: "卸货港",
+            prop: "podCnName",
+            overHidden: true,
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bports/list?status=0&size=5&current=1&cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              desc: "code",
+              res: "data.records"
+            },
+          },
+          {
+            label: "有效期启",
+            prop: "validityPeriodStart",
+            type: "date",
+            overHidden: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          },
+           {
+            label: "有效期止",
+            prop: "validityPeriodEnd",
+            type: "date",
+            overHidden: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          },
+          {
+            label: "制单人",
+            prop: "createUserName",
+            overHidden: true,
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            type: "date",
+            overHidden: true,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  components: {
+    detailsPage
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(533), this.optionBack);
+  },
+  activated() {
+    // setTimeout(() => {
+    // }, 100);
+  },
+  methods: {
+    addButton() {
+      this.isShow = false;
+    },
+    rowEdit(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false;
+    },
+    // 删除
+    rowDel(row, index) {
+      if (row.item == 1) {
+        return this.$message.error("存在明细不允许删除");
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        remove({ ids: row.id }).then(res => {
+          this.onLoad(this.page, this.query);
+          this.$message.success("成功删除");
+        });
+      });
+    },
+    searchReset() {
+      this.query = this.$options.data().query;
+      this.onLoad(this.page);
+    },
+    // 搜索按钮点击
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    onLoad(page, params = {}) {
+      let obj = {};
+      obj = {
+        ...Object.assign(params, this.query)
+      };
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, obj)
+        .then(res => {
+          this.data = res.data.data.records;
+          this.page.total = res.data.data.total;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+            this.$refs.crud.dicInit();
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      if (JSON.stringify(this.$route.query) != "{}") {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: "/iosBasicData/agencyFeeSetting/index"
+        });
+      }
+      this.detailData = {};
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.selectionList = [];
+        this.searchReset();
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+        this.selectionList = [];
+        this.searchReset();
+      }
+    },
+    // 更改表格颜色
+    headerClassName(tab) {
+      //颜色间隔
+      let back = "";
+      if (tab.columnIndex >= 0 && tab.column.level === 1) {
+        if (tab.columnIndex % 2 === 0) {
+          back = "back-one";
+        } else if (tab.columnIndex % 2 === 1) {
+          back = "back-two";
+        }
+      }
+      return back;
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep #out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+::v-deep #out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+}
+
+.pointerClick {
+  cursor: pointer;
+  color: #1e9fff;
+}
+
+::v-deep .el-col-md-8 {
+  width: 24.33333%;
+}
+</style>

File diff suppressed because it is too large
+ 668 - 237
src/views/ow/owTask/detailsPage.vue


Some files were not shown because too many files changed in this diff