Browse Source

修改bug

Qukatie 7 months ago
parent
commit
d8a1bc4985

+ 89 - 0
src/api/iosBasicData/businessCenter/customerLetter.js

@@ -0,0 +1,89 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (current, size, params) => {
+    return request({
+        url: '/api/blade-los/useboxplan/list',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
+}
+//查询明细
+export const detail = (params) => {
+    return request({
+        url: '/api/blade-los/useboxplan/detail',
+        method: 'get',
+        params: params
+    })
+}
+//删除
+export const remove = (data) => {
+    return request({
+        url: '/api/blade-los/useboxplan/remove',
+        method: 'post',
+        params: data
+    })
+}
+//删除明细
+export const itemRemove = (data) => {
+    return request({
+        url: '/api/blade-los/useboxplanitem/remove',
+        method: 'post',
+        params: data
+
+    })
+}
+// 批量保存
+export const submitItemList = (row) => {
+    return request({
+        url: '/api/blade-los/useboxplanitem/submitList',
+        method: 'post',
+        data: row
+    })
+}
+//保存
+export function submit(data) {
+    return request({
+        url: '/api/blade-los/useboxplan/submit',
+        method: 'post',
+        data
+    })
+}
+
+// 提交用箱计划
+export function submitUseBoxPlan(data) {
+    return request({
+        url: '/api/blade-los/useboxplan/submitUseBoxPlan',
+        method: 'post',
+        data: data
+    })
+}
+
+// 请核
+export function pleaseCheck(data) {
+    return request({
+        url: '/api/blade-los/bills/checkBills',
+        method: 'post',
+        data: data
+    })
+}
+
+// 撤销
+export function repealCancel(data) {
+    return request({
+        url: '/api/blade-los/bills/revokeCheckBills',
+        method: 'post',
+        data: data
+    })
+}
+//单据复制
+export const copyAgent = (data) => {
+    return request({
+        url: '/api/blade-los/bookingCabin/copyBillsBooking',
+        method: 'get',
+        params: data
+    })
+}

+ 1 - 1
src/components/dicSelect/main.vue

@@ -304,7 +304,7 @@ export default {
     },
     mounted() {
         if (this.activateCreated) {
-            this.getDicData()
+            // this.getDicData()
         } else {
             this.options = this.mockData
         }

+ 18 - 12
src/enums/column-name.js

@@ -2126,42 +2126,48 @@ const columnName = [{
 }, {
   code: 491,
   name: '永发-超期费标准(F)-详情页'
-},{
+}, {
   code: 492,
   name: '货代-财务管理-对账中心(F)明细表'
-},{
+}, {
   code: 493,
   name: '货代-财务管理-付款申请(F)明细表'
-},{
+}, {
   code: 494,
   name: '货代-财务管理-发票申请(F)费用明细表'
-},{
+}, {
   code: 495,
   name: '永发-商务中心-mkt&slot列表页'
-},{
+}, {
   code: 496,
   name: '永发-商务中心-mkt&slot明细成本价'
-},{
+}, {
   code: 497,
   name: '永发-商务中心-mkt&slot明细销售价'
-},{
+}, {
   code: 498,
   name: '永发-商务中心-预订舱列表页'
-},{
+}, {
   code: 499,
   name: '永发-商务中心-预订舱箱明细'
-},{
+}, {
   code: 500,
   name: '永发-基础资料-POD场站(F)列表页'
-},{
+}, {
   code: 501,
   name: '永发-商务中心-客户托书列表页'
-},{
+}, {
   code: 502,
   name: '永发-商务中心-客户托书集装箱明细'
-},{
+}, {
   code: 503,
   name: '永发-成本中心-RT&FD列表页'
+}, {
+  code: 504,
+  name: '永发-用箱计划-用箱计划列表页'
+}, {
+  code: 505,
+  name: '永发-用箱计划-用箱计划详情明细表'
 }
 ]
 export const getColumnName = (key) => {

+ 25 - 3
src/util/date.js

@@ -221,7 +221,6 @@ export function getWeekNumber() {
   while (firstDay.getDay() !== 1) {
     firstDay.setDate(firstDay.getDate() + 1);
   }
-
   // 计算当前日期与第一个星期一的差值
   const diff = date - firstDay;
   const oneDay = 1000 * 60 * 60 * 24;
@@ -233,8 +232,7 @@ export function getWeekNumber() {
   const sunday = new Date(monday);
   sunday.setDate(monday.getDate() + 6);
   // 计算周数(从0开始,所以+1)
-  const weekNumber = Math.ceil(diff / oneDay / 7) + 1;
-  console.log(weekNumber)
+  const weekNumber = Math.ceil(diff / oneDay / 7);
   return {
     year: date.getFullYear().toString(),
     weekNumber: weekNumber,
@@ -260,6 +258,30 @@ export function getWeeksInYear(year) {
   // 计算完整周数(向上取整)
   return Math.ceil(daysDiff / 7); // +1包含第一周
 }
+export function getWeekRange(year, week) {
+  // 获取当年1月1日的日期对象
+  const janFirst = new Date(year, 0, 1);
+  // 计算1月1日是星期几(0为周日,6为周六)
+  const firstDay = janFirst.getDay();
+
+  // 计算第一个星期一的日期偏移量
+  const firstMondayOffset = firstDay === 1 ? 0 : (8 - firstDay) % 7;
+  const firstMonday = new Date(year, 0, 1 + firstMondayOffset);
+
+  // 计算目标周的起始日期(周数-1乘以7天)
+  const weekStart = new Date(firstMonday);
+  console.log( dateFormat(weekStart, "yyyy-MM-dd"))
+  weekStart.setDate(firstMonday.getDate() + (week - 1) * 7);
+
+  // 计算目标周的结束日期(起始日期+6天)
+  const weekEnd = new Date(weekStart);
+  weekEnd.setDate(weekStart.getDate() + 6);
+
+  return {
+    start: dateFormat(weekStart, "yyyy-MM-dd"),
+    end: dateFormat(weekEnd, "yyyy-MM-dd")
+  };
+}
 /**
  * 获取 n 天后的日期
  * yyyy-MM-dd

+ 1 - 0
src/views/approveDataH/index.vue

@@ -33,6 +33,7 @@
         <span v-else-if="scope.row.checkType == 'YSQR-C'">贸易代理货款付费确认</span>
         <span v-else-if="scope.row.checkType == 'YSQR-D'">贸易代理货款收费确认</span>
         <span v-else-if="scope.row.checkType == 'FYSQ'">费用申请</span>
+        <span v-else-if="scope.row.checkType == 'KHTS'">客户托书</span>
       </template>
       <template slot-scope="scope" slot="billNo">
         <span style="color: #1e9fff;cursor: pointer;" @click="billNoDetails(scope.row)">{{ scope.row.billNo }}</span>

+ 5 - 4
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -582,7 +582,7 @@ export default {
                 calcHeight: 30,
                 tip: false,
                 searchShow: true,
-                searchMenuSpan: 6,
+                searchMenuSpan: 24,
                 searchLabelWidth: "100",
                 border: true,
                 index: true,
@@ -732,9 +732,10 @@ export default {
                         searchOrder: 4
                     },
                     {
-                        label: '预定舱单号',
+                        label: '来源单号',
                         prop: "temporaryNo",
                         width: "100",
+                        search: true,
                         overHidden: true,
                     },
                     {
@@ -1653,7 +1654,7 @@ export default {
             );
         }
         if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
-            this.optionBack.searchMenuSpan = 24
+            this.optionBack.searchMenuSpan = 18
             this.optionBack.column.forEach(item => {
                 if (item.prop == 'branchId') {
                     item.search = true
@@ -2703,7 +2704,7 @@ export default {
             this.optionBack = this.$options.data().optionBack;
             localStorage.removeItem(this.getColumnName(code));
             if (this.saberUserInfo.role_name.indexOf('admin') != -1 || this.saberUserInfo.role_name.indexOf('总部') != -1) {
-                this.optionBack.searchMenuSpan = 24
+                this.optionBack.searchMenuSpan = 18
                 this.optionBack.column.forEach(item => {
                     if (item.prop == 'branchId') {
                         item.search = true

+ 114 - 410
src/views/iosBasicData/boxPlan/detailsPage.vue

@@ -14,6 +14,9 @@
         <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
           :disabled="isSaveBtn" @click="submit">保 存
         </el-button>
+        <el-button class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
+          :disabled="isSaveBtn" @click="submitUseBoxPlan">提 交
+        </el-button>
         <!-- <el-button v-if="form.status == '审核提交'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
           size="small" @click="revokeApplication">撤销单据请核
         </el-button> -->
@@ -32,27 +35,33 @@
     <div style="margin-top: 50px">
       <trade-card title="基础信息">
         <avue-form :option="optionForm" v-model="form" ref="form">
+          <tempalte slot="branchName">
+            <dic-select v-model="form.branchName" placeholder="所属公司" key="id" label="deptName"
+              url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
+              @selectChange="dicChange('branchName', $event)" :default="true"
+              :disabled="editDisabled || roleName.includes('secondaryAdmin')"></dic-select>
+          </tempalte>
           <tempalte slot="year">
-            <el-date-picker v-model="form.year" type="year" placeholder="选择日期" format="yyyy" value-format="yyyy"
-              @change="dicChange('year', $event)">
+            <el-date-picker v-model="form.year" type="year" @input="yearChange" format="yyyy" value-format="yyyy"
+              placeholder="选择年" :disabled="editDisabled">
             </el-date-picker>
           </tempalte>
           <tempalte slot="week">
             <el-input-number style="width: 100%;" v-model="form.week" @change="dicChange('week', $event)"
-              placeholder="请输入 周" size="small" :controls="false"></el-input-number>
+              placeholder="请输入 周" size="small" :controls="false" :disabled="editDisabled"></el-input-number>
           </tempalte>
         </avue-form>
       </trade-card>
-      <trade-card title="箱明细">
-        <avue-crud :option="option" :data="form.boxAdjustmentCostList" id="out-table" ref="crud"
+      <trade-card title="箱明细">
+        <avue-crud :option="option" :data="form.useBoxPlanItemList" id="out-table" ref="crud"
           :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
           :cell-style="{ height: '20px', padding: '0px' }" @selection-change="selectionChange" @select="selectHandle"
-          @row-update="rowUpdate" @resetColumn="resetColumn('crud', 'option', 'optionBack', 483)"
-          @saveColumn="saveColumn('crud', 'option', 'optionBack', 483)">
+          @row-update="rowUpdate" @resetColumn="resetColumn('crud', 'option', 'optionBack', 505)"
+          @saveColumn="saveColumn('crud', 'option', 'optionBack', 505)">
           <template slot="menuLeft">
             <el-button type="info" plain size="small" :disabled="editDisabled || !form.id"
               @click="allClick('一键保存')">一键保存</el-button>
-            <el-button type="info" plain size="small" :disabled="editDisabled || form.boxAdjustmentCostList.length == 0"
+            <el-button type="info" plain size="small" :disabled="editDisabled || form.useBoxPlanItemList.length == 0"
               @click="allClick('一键编辑')">一键编辑</el-button>
             <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
               @click="allClick('批量删除')">批量删除</el-button>
@@ -64,32 +73,12 @@
           <template slot="index" slot-scope="{row,index}">
             <span>{{ index + 1 }}</span>
           </template>
-          <template slot="boxTypeForm" slot-scope="{ row }">
-            <dic-select v-if="row.$cellEdit" v-model="row.boxType" key="id" label="cnName" res="records"
-              url="/blade-los/bcntrtypes/list?status=0&current=1&size=20" :filterable="true" :remote="true"
-              dataName="cnName" @selectChange="rowDicChange('boxType', $event, row)"></dic-select>
-            <span v-else>{{ row.boxType }}</span>
-          </template>
-          <template slot="oceanFreightForm" slot-scope="{ row }">
-            <el-input-number v-if="row.$cellEdit" v-model="row.oceanFreight" :controls="false" placeholder="请输入 海运费"
-              size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
-            <span v-else>{{ row.oceanFreight }}</span>
-          </template>
-          <template slot="inlandFreightForm" slot-scope="{ row }">
-            <el-input-number v-if="row.$cellEdit" v-model="row.inlandFreight" :controls="false" placeholder="请输入 陆运费"
-              size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
-            <span v-else>{{ row.inlandFreight }}</span>
-          </template>
-          <template slot="loloForm" slot-scope="{ row }">
-            <el-input-number v-if="row.$cellEdit" v-model="row.lolo" :controls="false" placeholder="请输入 LOLO"
-              size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
-            <span v-else>{{ row.lolo }}</span>
-          </template>
-          <template slot="otherAmountForm" slot-scope="{ row }">
-            <el-input-number v-if="row.$cellEdit" v-model="row.otherAmount" :controls="false" placeholder="请输入 其他金额"
-              size="small" style="width: 100%;" :precision="2" @change="countChange(row)"></el-input-number>
-            <span v-else>{{ row.otherAmount }}</span>
-          </template>
+          <tempalte slot="podCname" slot-scope="{ row }">
+            <dic-select v-if="row.$cellEdit" v-model="row.podCname" placeholder="港口" label="cnName" res="records"
+              url="/blade-los/bports/list?status=0&current=1&size=5" :filterable="true" :remote="true" dataName="cnName"
+              @selectChange="rowDicChange('podCname', $event, row)"></dic-select>
+            <span v-else>{{ row.podCname }}</span>
+          </tempalte>
         </avue-crud>
       </trade-card>
       <trade-card title="操作记录">
@@ -129,26 +118,35 @@ import {
   submit,
   pleaseCheck,
   repealCancel,
-  tradingBoxFees,
-  submitFeeList,
   copyAgent,
-  confirm,
-  revoke,
-  submitJustmenttList,
-  justmentRemove
-} from "@/api/boxManagement/buyContainer/index.js";
+  submitItemList,
+  itemRemove,
+  submitUseBoxPlan
+} from "@/api/iosBasicData/businessCenter/customerLetter.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReports.vue";
 import reports from "@/components/tradeAgency/reports.vue";
 import { getToken } from "@/util/auth";
-import { getWeekNumber, getWeeksInYear, getYearDate } from "@/util/date";
+import { getWeekNumber, getWeeksInYear, getYearDate, getWeekRange } from "@/util/date";
 import _ from "lodash";
 import { Header } from "element-ui";
 export default {
   name: "detailsPage",
   data() {
     return {
+      years: [
+        {
+          value: '2024',
+          label: '2024'
+        }, {
+          value: '2025',
+          label: '2025'
+        }, {
+          value: '2026',
+          label: '2026'
+        }
+      ],
       weekMax: 1,
       boxSelectionList: [],
       rulesList: [],
@@ -191,8 +189,10 @@ export default {
       editButton: false,
       editDisabled: false,
       form: {
-        boxAdjustmentCostList: [],
-        year: getWeekNumber().year,
+        useBoxPlanItemList: [],
+        branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
+        branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
+        year: getYearDate().toString(),
         week: getWeekNumber().weekNumber,
         startDate: getWeekNumber().mondayDate,
         endDate: getWeekNumber().sundayDate
@@ -309,84 +309,26 @@ export default {
             headerslot: true,
           },
           {
-            label: '箱型',
-            prop: 'boxType',
-            cell: true,
-            slot: true,
-            formslot: true,
-            overHidden: true,
-            rules: [{
-              required: true,
-              message: "请选择箱型",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: '币别',
-            prop: 'curCode',
-            cell: true,
-            type: 'select',
-            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
-            props: {
-              label: "dictValue",
-              value: "dictValue"
-            },
-            rules: [{
-              required: true,
-              message: "请选择币别",
-              trigger: "blur"
-            }]
-          },
-          {
-            label: '海运费',
-            prop: 'oceanFreight',
-            cell: true,
-            type: 'number',
-            controls: false,
+            label: '目的港',
+            prop: 'podCname',
             overHidden: true,
-            rules: [{
-              required: true,
-              message: "请输入海运费",
-              trigger: "blur"
-            }]
           },
           {
-            label: '陆运费',
-            prop: 'inlandFreight',
+            label: '20GP',
+            prop: 'price20gp',
             cell: true,
-            type: 'number',
-            controls: false,
             overHidden: true,
-            rules: [{
-              required: true,
-              message: "请输入陆运费",
-              trigger: "blur"
-            }]
           },
           {
-            label: 'LOLO',
-            prop: 'lolo',
+            label: '40GP',
+            prop: 'price40gp',
             cell: true,
-            type: 'number',
-            controls: false,
             overHidden: true,
-            rules: [{
-              required: true,
-              message: "请输入LOLO",
-              trigger: "blur"
-            }]
           },
           {
-            label: '其他金额',
-            prop: 'otherAmount',
+            label: '40HC',
+            prop: 'price40hc',
             cell: true,
-            type: 'number',
-            controls: false,
-            overHidden: true,
-          },
-          {
-            label: "合计金额",
-            prop: "totalAmount",
             overHidden: true,
           },
           {
@@ -886,8 +828,9 @@ export default {
     detailData: Object
   },
   async created() {
+
     this.roleName = localStorage.getItem('roleName').split(',')
-    this.option = await this.getColumnData(this.getColumnName(483), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(505), this.optionBack);
     this.weekMax = getWeeksInYear(getYearDate())
     if (this.detailData && this.detailData.id) {
       // this.editButton = true
@@ -903,6 +846,14 @@ export default {
     }
   },
   methods: {
+    yearChange(val) {
+      if (val) {
+        this.weekMax = getWeeksInYear(val)
+        this.form.week = 0
+      } else {
+        this.form.week = 0
+      }
+    },
     countChange(row) {
       row.totalAmount = _.round(_.add(_.add(Number(row.oceanFreight ? row.oceanFreight : 0), Number(row.inlandFreight ? row.inlandFreight : 0)), _.add(Number(row.lolo ? row.lolo : 0), Number(row.otherAmount ? row.otherAmount : 0))), 2)
     },
@@ -928,26 +879,42 @@ export default {
       );
     },
     dicChange(name, row) {
-      if (name == 'year') {
+      if (name == 'branchName') {
         if (row) {
-          this.weekMax = getWeeksInYear(row)
-          this.form.week =0 
-          console.log(this.form)
+          this.form.branchId = row.id
         } else {
-          this.form.week =0
+          this.form.branchId = null
+          this.form.branchName = null
         }
       }
-      if(name=='week'){
-        
+      if (name == 'week') {
+        if (row) {
+          if (row > this.weekMax) {
+            this.form.week = 0
+            this.form.startDate = null
+            this.form.endDate = null
+            return this.$message.error(this.form.year + '年最多有' + this.weekMax + '周');
+          } else {
+            this.form.startDate = getWeekRange(this.form.year, this.form.week).start
+            this.form.endDate = getWeekRange(this.form.year, this.form.week).end
+          }
+        } else {
+          this.form.startDate = null
+          this.form.endDate = null
+        }
       }
     },
     rowDicChange(name, row, el, index) {
-      if (name == 'boxType') {
+      if (name == 'podCname') {
         if (row) {
-          el.boxTypeId = row.id
+          el.podId = row.id
+          el.podCode = row.code
+          el.podEname = row.enName
         } else {
-          el.boxTypeId = null
-          el.boxType = null
+          el.podId = null
+          el.podCode = null
+          el.podEname = null
+          el.podCname = null
         }
 
       }
@@ -971,71 +938,15 @@ export default {
       if (!this.form.id) {
         return this.$message.error("请保存数据");
       }
-
       this.$refs.crud.dicInit();
-      this.form.boxAdjustmentCostList.push({
-        pid: this.form.id,
-        $cellEdit: true
-      })
-    },
-    feedAddRow() {
-      if (!this.form.id) {
-        return this.$message.error("请保存数据");
-      }
-      this.feeCenterListD.push({
+      this.form.useBoxPlanItemList.push({
         pid: this.form.id,
-        feesType: 1,
-        dc: 'D',
-        billType: '箱东',
-        curCode: 'CNY',
-        exrate: 1,
-        $cellEdit: true
-      })
-    },
-    feecAddRow() {
-      if (!this.form.id) {
-        return this.$message.error("请保存数据");
-      }
-      this.feeCenterListC.push({
-        pid: this.form.id,
-        feesType: 1,
-        dc: 'C',
-        billType: '箱东',
-        curCode: 'CNY',
-        exrate: 1,
         $cellEdit: true
       })
     },
     selectionChange(list) {
       this.selectionList = list;
     },
-    boxSelectionChange(list) {
-      this.boxSelectionList = list;
-    },
-    feedChange(list) {
-      let ids = []
-      list.forEach(e => {
-        ids.push(e.id)
-      })
-      if (ids.length) {
-        this.itemCIds = ids.join(',')
-      } else {
-        this.itemCIds = null
-      }
-      this.selectionfeedList = list;
-    },
-    feecChange(list) {
-      let ids = []
-      list.forEach(e => {
-        ids.push(e.id)
-      })
-      if (ids.length) {
-        this.itemCIds = ids.join(',')
-      } else {
-        this.itemCIds = null
-      }
-      this.selectionfeecList = list;
-    },
     getDetail(id) {
       const loading = this.$loading({
         lock: true,
@@ -1044,6 +955,13 @@ export default {
         background: 'rgba(255,255,255,0.7)'
       });
       detail({ id: id }).then(res => {
+        if (res.data.data.status > 0) {
+          this.editDisabled = true
+          this.optionForm.disabled = true
+        } else {
+          this.editDisabled = false
+          this.optionForm.disabled = false
+        }
         this.form = res.data.data
       }).finally(() => {
         loading.close()
@@ -1069,48 +987,15 @@ export default {
         this.optionForm.disabled = false
       }
     },
-    polRowDel(row, index) {
-      this.$confirm("确定删除数据?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        if (row.id) {
-          tradingBoxFees({ ids: row.id }).then(res => {
-            this.form.feeCenterList.splice(index, 1);
-            this.$message.success("成功删除");
-          })
-        } else {
-          this.form.feeCenterList.splice(index, 1);
-        }
-      });
-    },
-    podRowDel(row, index) {
-      this.$confirm("确定删除数据?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        if (row.id) {
-          tradingBoxFees({ ids: row.id }).then(res => {
-            this.podFeeList.splice(index, 1);
-            this.$message.success("成功删除");
-          })
-        } else {
-          this.podFeeList.splice(index, 1);
-        }
-
-      });
-    },
     allClick(name) {
       if (name == '一键保存') {
-        if (!this.form.boxAdjustmentCostList.length) {
+        if (!this.form.useBoxPlanItemList.length) {
           return this.$message.error("请添加数据");
         }
-        for (let row of this.form.boxAdjustmentCostList) {
-          if (!row.boxType || !row.curCode || !row.oceanFreight || !row.inlandFreight || !row.lolo) {
-            this.$refs.crud.rowCell(row, row.$index)
-            return this.$message.error("请完善箱明细信息");
+        for (let row of this.form.useBoxPlanItemList) {
+          if (!row.podCname) {
+            // this.$refs.crud.rowCell(row, row.$index)
+            return this.$message.error("明细信息的目的港必填");
           }
         }
         const loading = this.$loading({
@@ -1119,15 +1004,15 @@ export default {
           spinner: 'el-icon-loading',
           background: 'rgba(255,255,255,0.7)'
         });
-        submitJustmenttList(this.form.boxAdjustmentCostList).then(res => {
+        submitItemList(this.form.useBoxPlanItemList).then(res => {
           this.$message.success("保存成功");
-          this.form.boxAdjustmentCostList = res.data.data
+          this.form.useBoxPlanItemList = res.data.data
         }).finally(() => {
           loading.close();
         })
       }
       if (name == '一键编辑') {
-        for (let row of this.form.boxAdjustmentCostList) {
+        for (let row of this.form.useBoxPlanItemList) {
           this.$set(row, "$cellEdit", true);
         }
         this.$refs.crud.dicInit();
@@ -1146,7 +1031,7 @@ export default {
           type: "warning"
         }).then(() => {
           multiList = this.selectionList
-          arr = this.form.boxAdjustmentCostList
+          arr = this.form.useBoxPlanItemList
           // 获取有id 的数据
           const itemsWithId = multiList.filter(item => item.id != null);
           let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
@@ -1165,7 +1050,7 @@ export default {
               spinner: 'el-icon-loading',
               background: 'rgba(255,255,255,0.7)'
             });
-            justmentRemove({ ids: arrIds.join(',') }).then(res => {
+            itemRemove({ ids: arrIds.join(',') }).then(res => {
               this.$message.success("删除成功");
             }).finally(() => {
               loading.close();
@@ -1212,176 +1097,15 @@ export default {
         this.activationForm = {}
         this.activationDialog = true
       }
-
-      if (name == 'D费用一键保存') {
-        if (!this.feeCenterListD.length) {
-          return this.$message.error("请添加数据");
-        }
-        for (let row of this.feeCenterListD) {
-          row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
-          if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
-            this.$refs.crud2.rowCell(row, row.$index)
-            return this.$message.error("请完善费用明细");
-          }
-        }
-        const loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          spinner: 'el-icon-loading',
-          background: 'rgba(255,255,255,0.7)'
-        });
-        submitFeeList(this.feeCenterListD).then(res => {
-          this.$message.success("保存成功");
-          res.data.data.forEach(row => {
-            if (row.curCode == this.getLocalCurrency()) {
-              row.amountCNY = row.amount
-              row.amountUSD = 0
-            }
-            if (row.curCode != this.getLocalCurrency()) {
-              row.amountUSD = row.amount
-              row.amountCNY = 0
-            }
-          })
-          this.feeCenterListD = res.data.data
-        }).finally(() => {
-          loading.close();
-        })
-      }
-      if (name == 'D费用一键编辑') {
-        for (let row of this.feeCenterListD) {
-          this.$set(row, "$cellEdit", true);
-        }
-      }
-      if (name == 'D费用批量删除') {
-        for (let row of this.selectionfeedList) {
-          if (row.automaticGenerated == 1) {
-            return this.$message.error("系统自动生成的费用不允许删除");
-          }
-        }
-        let multiList = []
-        let arr = []
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          multiList = this.selectionfeedList
-          arr = this.feeCenterListD
-          // 获取有id 的数据
-          const itemsWithId = multiList.filter(item => item.id != null);
-          let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
-          // 把选中的删除掉
-          multiList.forEach((item) => {
-            for (let index in arr) {
-              if (JSON.stringify(item) == JSON.stringify(arr[index])) {
-                arr.splice(Number(index), 1)
-              }
-            }
-          })
-          if (itemsWithId.length != 0) {
-            const loading = this.$loading({
-              lock: true,
-              text: '加载中',
-              spinner: 'el-icon-loading',
-              background: 'rgba(255,255,255,0.7)'
-            });
-            tradingBoxFees({ ids: arrIds.join(',') }).then(res => {
-              this.$message.success("删除成功");
-            }).finally(() => {
-              loading.close();
-            })
-          }
-        })
-      }
-      if (name == 'C费用一键保存') {
-        if (!this.feeCenterListC.length) {
-          return this.$message.error("请添加数据");
-        }
-        for (let row of this.feeCenterListC) {
-          row.amount = row.curCode == this.getLocalCurrency() ? row.amountCNY : row.amountUSD
-          if (!row.billType || !row.corpCnName || !row.feeCnName || !row.curCode || !row.price || !row.quantity) {
-            this.$refs.crud2.rowCell(row, row.$index)
-            return this.$message.error("请完善费用明细");
-          }
-        }
-        const loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          spinner: 'el-icon-loading',
-          background: 'rgba(255,255,255,0.7)'
-        });
-        submitFeeList(this.feeCenterListC).then(res => {
-          this.$message.success("保存成功");
-          res.data.data.forEach(row => {
-            if (row.curCode == this.getLocalCurrency()) {
-              row.amountCNY = row.amount
-              row.amountUSD = 0
-            }
-            if (row.curCode != this.getLocalCurrency()) {
-              row.amountUSD = row.amount
-              row.amountCNY = 0
-            }
-          })
-          this.feeCenterListC = res.data.data
-        }).finally(() => {
-          loading.close();
-        })
-      }
-      if (name == 'C费用一键编辑') {
-        for (let row of this.feeCenterListC) {
-          this.$set(row, "$cellEdit", true);
-        }
-      }
-      if (name == 'C费用批量删除') {
-        for (let row of this.selectionfeecList) {
-          if (row.automaticGenerated == 1) {
-            return this.$message.error("系统自动生成的费用不允许删除");
-          }
-        }
-        let multiList = []
-        let arr = []
-        this.$confirm("确定将选择数据删除?", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(() => {
-          multiList = this.selectionfeecList
-          arr = this.feeCenterListC
-          // 获取有id 的数据
-          const itemsWithId = multiList.filter(item => item.id != null);
-          let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
-          // 把选中的删除掉
-          multiList.forEach((item) => {
-            for (let index in arr) {
-              if (JSON.stringify(item) == JSON.stringify(arr[index])) {
-                arr.splice(Number(index), 1)
-              }
-            }
-          })
-          if (itemsWithId.length != 0) {
-            const loading = this.$loading({
-              lock: true,
-              text: '加载中',
-              spinner: 'el-icon-loading',
-              background: 'rgba(255,255,255,0.7)'
-            });
-            tradingBoxFees({ ids: arrIds.join(',') }).then(res => {
-              this.$message.success("删除成功");
-            }).finally(() => {
-              loading.close();
-            })
-          }
-        })
-      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          for (let row of this.form.boxAdjustmentCostList) {
-            if (!row.boxType || !row.curCode || !row.oceanFreight || !row.inlandFreight || !row.lolo) {
-              this.$refs.crud.rowCell(row, row.$index)
-              return this.$message.error("请完善箱明细信息");
+          for (let row of this.form.useBoxPlanItemList) {
+            if (!row.podCname) {
+              // this.$refs.crud.rowCell(row, row.$index)
+              return this.$message.error("明细信息的目的港必填");
             }
           }
           const loading = this.$loading({
@@ -1402,28 +1126,8 @@ export default {
         }
       });
     },
-    confirm() {
-      this.$confirm("确定调箱?", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
-      }).then(() => {
-        const loading = this.$loading({
-          lock: true,
-          text: '加载中',
-          spinner: 'el-icon-loading',
-          background: 'rgba(255,255,255,0.7)'
-        });
-        confirm(this.form).then(res => {
-          this.$message.success("操作成功");
-          this.getDetail(res.data.data.id)
-        }).finally(() => {
-          loading.close();
-        })
-      });
-    },
-    revoke() {
-      this.$confirm("确定撤销调箱?", {
+    submitUseBoxPlan() {
+      this.$confirm("确定提交用箱计划?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
@@ -1434,7 +1138,7 @@ export default {
           spinner: 'el-icon-loading',
           background: 'rgba(255,255,255,0.7)'
         });
-        revoke(this.form).then(res => {
+        submitUseBoxPlan(this.form).then(res => {
           this.$message.success("操作成功");
           this.getDetail(res.data.data.id)
         }).finally(() => {

+ 9 - 8
src/views/iosBasicData/boxPlan/index.vue

@@ -5,8 +5,8 @@
         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', 482)"
-        @saveColumn="saveColumn('crud', 'option', 'optionBack', 482)" @on-load="onLoad">
+        @resetColumn="resetColumn('crud', 'option', 'optionBack', 504)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 504)" @on-load="onLoad">
         <template slot="menuLeft">
           <el-button type="primary" size="small" icon="el-icon-plus" @click="addButton">创建单据
           </el-button>
@@ -18,7 +18,7 @@
         <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)"
-            :disabled="row.count > 0">删 除</el-button>
+            :disabled="row.status > 0">删 除</el-button>
         </template>
         <template slot="sysNo" slot-scope="{ row }">
           <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">{{ row.sysNo }}</span>
@@ -30,7 +30,7 @@
 </template>
 
 <script>
-import { getList, remove } from "@/api/boxManagement/buyContainer/index.js";
+import { getList, remove } from "@/api/iosBasicData/businessCenter/customerLetter.js";
 import { getWorkDicts } from "@/api/system/dictbiz";
 import detailsPage from "./detailsPage";
 import { getToken } from "@/util/auth";
@@ -40,9 +40,7 @@ export default {
     return {
       isShow: true,
       form: {},
-      query: {
-        type: "DXCB",
-      },
+      query: {},
       loading: false,
       page: {
         pageSize: 10,
@@ -87,6 +85,9 @@ export default {
             prop: "year",
             overHidden: true,
             search: true,
+            type: "year",
+            format: "yyyy",
+            valueFormat: "yyyy",
           },
           {
             label: "WEEK",
@@ -146,7 +147,7 @@ export default {
     detailsPage
   },
   async created() {
-    this.option = await this.getColumnData(this.getColumnName(482), this.optionBack);
+    this.option = await this.getColumnData(this.getColumnName(504), this.optionBack);
   },
   activated() {
     setTimeout(() => {

+ 18 - 0
src/views/iosBasicData/businessCenter/bookingCabin/detailsPage.vue

@@ -179,6 +179,7 @@ import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReports.vue";
 import reports from "@/components/tradeAgency/reports.vue";
+import { deptGetDetailPol } from '@/api/iosBasicData/bills'
 import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import { getDicinit } from "@/api/dicSelect/index";
 import { dateFormat } from "@/util/date";
@@ -255,6 +256,13 @@ export default {
         businessType: 'YDC',
         billNoFormat: 'YDC',
         businessTypeCode: 'YDC',
+        polId: null,
+        polCode: null,
+        polEnName: null,
+        polCnName: null,
+        polNamePrint: null,
+        serviceTerms: 'CY-CY',
+        mpaymode: 'PP',
         preContainersList: [],
       },
       polFeeList: [],
@@ -586,6 +594,16 @@ export default {
     if (this.detailData.copyId) {
       this.getCopydate(this.detailData.copyId)
     }
+    if (this.detailData.type == 'new') {
+      deptGetDetailPol(this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
+        // 装货港
+        this.form.polCnName = res.data.data.polCnName ? res.data.data.polCnName.split(",")[0] : null
+        this.form.polEnName = res.data.data.polEnName ? res.data.data.polEnName.split(",")[0] : null
+        this.form.polId = res.data.data.polId ? res.data.data.polId.split(",")[0] : null
+        this.form.polCode = res.data.data.polCode ? res.data.data.polCode.split(",")[0] : null
+        this.form.polNamePrint = res.data.data.polEnName ? res.data.data.polEnName.split(",")[0] : null
+      })
+    }
   },
   methods: {
     rowDicChange(name, row, el, index) {

+ 4 - 1
src/views/iosBasicData/businessCenter/bookingCabin/index.vue

@@ -51,7 +51,7 @@ export default {
             isShow: true,
             form: {},
             query: {
-                businessType:'YDC'
+                businessType: 'YDC'
             },
             loading: false,
             page: {
@@ -353,6 +353,9 @@ export default {
     methods: {
         addButton() {
             this.isShow = false
+            this.detailData = {
+                type: 'new'
+            }
         },
         copyButton() {
             this.isShow = false

+ 169 - 57
src/views/iosBasicData/businessCenter/customerLetter/detailsPage.vue

@@ -27,7 +27,7 @@
           :disabled="form.issueStatus == 1" @click="allClick('生成订单')">生成订单
         </el-button>
         <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
-          :disabled="form.status != 0" @click="application">运费申请
+          :disabled="form.status != 0 || form.issueStatus == 1" @click="application">运费申请
         </el-button>
         <el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
           size="small" @click="revokeApplication">撤销单据请核
@@ -50,44 +50,57 @@
           <trade-card title="基础信息">
             <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm" :disabled="editDisabled">
               <el-row>
-                <el-col span="6">
-                  <el-row>
-                    <el-form-item label="发货人" prop="hshipperDetails">
-                      <el-input type="textarea" style="width: 100%;" v-model="form.detail.hshipperDetails" size="small"
-                        autocomplete="off" :disabled="editDisabled" :rows="5" clearable placeholder="请输入发货人提单描述"
-                        @change="textareaBlur('hshipperDetails', $event)"></el-input>
-                    </el-form-item>
-                  </el-row>
-                  <el-row>
-                    <el-form-item label="收货人" prop="hconsigneeDetails">
-                      <el-input type="textarea" style="width: 100%;" v-model="form.detail.hconsigneeDetails"
-                        size="small" autocomplete="off" :disabled="editDisabled" :rows="5" clearable
-                        placeholder="请输入收货人提单描述" @change="textareaBlur('hconsigneeDetails', $event)"></el-input>
-                    </el-form-item>
-                  </el-row>
-                  <el-row>
-                    <el-form-item label="通知人" prop="hnotifyDetails">
-                      <el-input type="textarea" style="width: 100%;" v-model="form.detail.hnotifyDetails" size="small"
-                        autocomplete="off" :disabled="editDisabled" :rows="5" clearable placeholder="请输入通知人提单描述"
-                        @change="textareaBlur('hnotifyDetails', $event)"></el-input>
-                    </el-form-item>
-                  </el-row>
-                </el-col>
-                <el-col span="6">
+                <el-col span="12">
                   <el-row>
-                    <el-form-item label="唛头" prop="marks" :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
-                      <el-input type="textarea" style="width: 100%;" v-model="form.marks" size="small"
-                        autocomplete="off" :disabled="editDisabled" :rows="7" clearable placeholder="请输入唛头"
-                        @change="textareaBlur2('marks', $event)"></el-input>
+                    <el-form-item label="客户" prop="corpCnName">
+                      <dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
+                        url="/blade-los/bcorps/selectList?status=0&current=1&size=20" :filterable="true" :remote="true"
+                        dataName="cnName" @selectChange="dicChange('corpCnName', $event)" :disabled="editDisabled"
+                        :searchShow="true" :slotRight="true" rightLabel="shortName"></dic-select>
                     </el-form-item>
                   </el-row>
                   <el-row>
-                    <el-form-item label="货物" prop="commodityDescr"
-                      :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
-                      <el-input type="textarea" style="width: 100%;" v-model="form.commodityDescr" size="small"
-                        autocomplete="off" :disabled="editDisabled" :rows="9" clearable placeholder="请输入提单上货物描述"
-                        @change="textareaBlur2('commodityDescr', $event)"></el-input>
-                    </el-form-item>
+                    <el-col span="12">
+                      <el-row>
+                        <el-form-item label="发货人" prop="hshipperDetails">
+                          <el-input type="textarea" style="width: 100%;" v-model="form.detail.hshipperDetails"
+                            size="small" autocomplete="off" :disabled="editDisabled" :rows="5" clearable
+                            placeholder="请输入发货人提单描述" @change="textareaBlur('hshipperDetails', $event)"></el-input>
+                        </el-form-item>
+                      </el-row>
+                      <el-row>
+                        <el-form-item label="收货人" prop="hconsigneeDetails">
+                          <el-input type="textarea" style="width: 100%;" v-model="form.detail.hconsigneeDetails"
+                            size="small" autocomplete="off" :disabled="editDisabled" :rows="5" clearable
+                            placeholder="请输入收货人提单描述" @change="textareaBlur('hconsigneeDetails', $event)"></el-input>
+                        </el-form-item>
+                      </el-row>
+                      <el-row>
+                        <el-form-item label="通知人" prop="hnotifyDetails">
+                          <el-input type="textarea" style="width: 100%;" v-model="form.detail.hnotifyDetails"
+                            size="small" autocomplete="off" :disabled="editDisabled" :rows="5" clearable
+                            placeholder="请输入通知人提单描述" @change="textareaBlur('hnotifyDetails', $event)"></el-input>
+                        </el-form-item>
+                      </el-row>
+                    </el-col>
+                    <el-col span="12">
+                      <el-row>
+                        <el-form-item label="唛头" prop="marks"
+                          :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
+                          <el-input type="textarea" style="width: 100%;" v-model="form.marks" size="small"
+                            autocomplete="off" :disabled="editDisabled" :rows="7" clearable placeholder="请输入唛头"
+                            @change="textareaBlur2('marks', $event)"></el-input>
+                        </el-form-item>
+                      </el-row>
+                      <el-row>
+                        <el-form-item label="货物" prop="commodityDescr"
+                          :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
+                          <el-input type="textarea" style="width: 100%;" v-model="form.commodityDescr" size="small"
+                            autocomplete="off" :disabled="editDisabled" :rows="9" clearable placeholder="请输入提单上货物描述"
+                            @change="textareaBlur2('commodityDescr', $event)"></el-input>
+                        </el-form-item>
+                      </el-row>
+                    </el-col>
                   </el-row>
                 </el-col>
                 <el-col span="12">
@@ -120,11 +133,9 @@
                       </el-form-item>
                     </el-col>
                     <el-col span="12">
-                      <el-form-item label="订舱日期" prop="bookingDate"
-                        :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
-                        <el-date-picker v-model="form.bookingDate" type="date" placeholder="请选择 订舱日期"
-                          :disabled="true" size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
-                          style="width: 100%;">
+                      <el-form-item label="订舱日期" prop="bookingDate">
+                        <el-date-picker v-model="form.bookingDate" type="date" placeholder="请选择 订舱日期" :disabled="true"
+                          size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
                         </el-date-picker>
                       </el-form-item>
                     </el-col>
@@ -143,8 +154,7 @@
                         :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
                         <dic-select v-model="form.serviceTerms" placeholder="运输条款" key="id" label="cnName" res="records"
                           url="/blade-los/bserviceterms/list?status=0&current=1&size=20" :filterable="true"
-                          :remote="true" dataName="cnName" @selectChange="dicChange('serviceTerms', $event)"
-                          :disabled="editDisabled"></dic-select>
+                          :remote="true" dataName="cnName" :disabled="editDisabled"></dic-select>
                       </el-form-item>
                     </el-col>
                   </el-row>
@@ -187,6 +197,14 @@
                   </el-row>
                   <el-row>
                     <el-col span="12">
+                      <el-form-item label="所属公司" prop="branchName">
+                        <dic-select v-model="form.branchName" placeholder="所属公司" key="id" label="deptName"
+                          url="/blade-system/dept/top-list" :filterable="true" :remote="true" dataName="deptName"
+                          @selectChange="dicChange('branchName', $event)" :default="true"
+                          :disabled="editDisabled || roleName.includes('secondaryAdmin')"></dic-select>
+                      </el-form-item>
+                    </el-col>
+                    <el-col span="12">
                       <el-form-item label="OP" prop="operatorName">
                         <dic-select v-model="form.operatorName" placeholder="OP" :key="form.branchId" label="realName"
                           :url="'/blade-user/userListAll?roleAlias=操作员&deptId=' + form.branchId" :filterable="true"
@@ -195,6 +213,16 @@
                     </el-col>
                   </el-row>
                   <el-row>
+                    <el-col span="12">
+                      <el-form-item label="客服" prop="customerServiceName">
+                        <dic-select v-model="form.customerServiceName" placeholder="客服" :key="form.branchId"
+                          label="realName" :url="'/blade-user/userListAll?roleAlias=客服&deptId=' + form.branchId"
+                          :filterable="true" @selectChange="dicChange('customerServiceName', $event)"
+                          :disabled="editDisabled"></dic-select>
+                      </el-form-item>
+                    </el-col>
+                  </el-row>
+                  <el-row>
                     <el-form-item label="订舱备注" prop="cyRemarks">
                       <el-input type="textarea" style="width: 100%;" v-model="form.cyRemarks" size="small"
                         autocomplete="off" :disabled="editDisabled" :rows="2" clearable placeholder="请输入场站备注"
@@ -213,13 +241,13 @@
               @resetColumn="resetColumn('crud', 'option', 'optionBack', 502)"
               @saveColumn="saveColumn('crud', 'option', 'optionBack', 502)">
               <template slot="menuLeft">
-                <el-button type="info" plain size="small" :disabled="editDisabled"
+                <el-button type="info" plain size="small" :disabled="editDisabled || !form.id"
                   @click="allClick('一键保存')">一键保存</el-button>
                 <el-button type="info" plain size="small" :disabled="editDisabled"
                   @click="allClick('一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
                   @click="allClick('批量删除')">批量删除</el-button>
-                <el-button type="success" plain size="small" :disabled="editDisabled"
+                <el-button type="success" plain size="small" :disabled="editDisabled || !form.id"
                   @click="allClick('物流报价')">物流报价</el-button>
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -372,6 +400,7 @@ import checkSchedule from "@/components/checkH/checkSchedule.vue";
 import businessReports from "@/components/tradeAgency/businessReports.vue";
 import reports from "@/components/tradeAgency/reports.vue";
 import freightRate from "./components/freightRate.vue";
+import { deptGetDetailPol } from '@/api/iosBasicData/bills'
 import { getDicinit } from "@/api/dicSelect/index";
 import _ from "lodash";
 import { Header } from "element-ui";
@@ -448,7 +477,14 @@ export default {
         businessType: 'KHTS',
         billNoFormat: 'KHTS',
         businessTypeCode: 'KHTS',
-        bookingDate:dateFormat(new Date()),
+        bookingDate: dateFormat(new Date()),
+        polId: null,
+        polCode: null,
+        polEnName: null,
+        polCnName: null,
+        polNamePrint: null,
+        serviceTerms: 'CY-CY',
+        mpaymode: 'PP',
         detail: {},
         preContainersList: [],
         feeCenterList: [],
@@ -464,8 +500,13 @@ export default {
         labelWidth: 100,
         column: [
           {
-            label: 'MB/L NO',
-            prop: "mblno",
+            label: '系统号',
+            prop: "billNo",
+            disabled: true,
+          },
+          {
+            label: 'HB/L NO',
+            prop: "hblno",
             disabled: true,
           },
           {
@@ -483,7 +524,7 @@ export default {
             prop: "cyTrailerTime",
             disabled: true,
             type: "date",
-            format: "yyyy-MM-dd",
+            format: "yyyy-MM-dd HH:mm:ss",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
           },
           {
@@ -491,7 +532,7 @@ export default {
             prop: "cyReturnTime",
             disabled: true,
             type: "date",
-            format: "yyyy-MM-dd",
+            format: "yyyy-MM-dd HH:mm:ss",
             valueFormat: "yyyy-MM-dd HH:mm:ss",
           },
           // {
@@ -887,7 +928,8 @@ export default {
         ]
       },
       roleName: [],
-      saberUserInfo: null
+      saberUserInfo: null,
+      deptId: JSON.parse(localStorage.getItem('sysitemData')).deptId
     }
   },
   components: {
@@ -906,18 +948,28 @@ export default {
     this.option = await this.getColumnData(this.getColumnName(502), this.optionBack);
     this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
     this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
+    console.log(this.detailData)
     if (this.detailData && this.detailData.id) {
-      // this.editButton = true
-      // this.editDisabled = true
-      // this.optionForm.disabled = true
       this.getDetails(this.detailData.id)
     }
-    if (this.$route.query.params) {
-      this.getDetails(this.$route.query.params)
+    if (this.$route.query.billId) {
+      this.getDetails(this.$route.query.billId)
     }
     if (this.detailData && this.detailData.copyId) {
       this.getCopydate(this.detailData.copyId)
     }
+    if (this.detailData.type == 'new') {
+      deptGetDetailPol(this.saberUserInfo.dept_pid.split(',')[0]).then(res => {
+        // 装货港
+        this.form.polCnName = res.data.data.polCnName ? res.data.data.polCnName.split(",")[0] : null
+        this.form.polEnName = res.data.data.polEnName ? res.data.data.polEnName.split(",")[0] : null
+        this.form.polId = res.data.data.polId ? res.data.data.polId.split(",")[0] : null
+        this.form.polCode = res.data.data.polCode ? res.data.data.polCode.split(",")[0] : null
+        this.form.polNamePrint = res.data.data.polEnName ? res.data.data.polEnName.split(",")[0] : null
+      })
+    }
+
+    this.saveLocalCurrency(this.deptId)
   },
   methods: {
     importData(row) {
@@ -925,12 +977,15 @@ export default {
       this.form.preContainersList.forEach(item => {
         if (item.cntrTypeCode == '20GP') {
           item.salesPrice = row.gp20
+          item.costPrice = row.gp20Cost
         }
         if (item.cntrTypeCode == '40GP') {
           item.salesPrice = row.gp40
+          item.costPrice = row.gp40Cost
         }
         if (item.cntrTypeCode == '40HC') {
           item.salesPrice = row.hc40
+          item.costPrice = row.hc40Cost
         }
       })
       console.log(this.form.preContainersList)
@@ -954,7 +1009,29 @@ export default {
       }
     }
     ,
-    dicChange(name, row) {
+    async dicChange(name, row) {
+      if (name == 'branchName') {
+        if (row) {
+          this.form.branchId = row.id
+        } else {
+          this.form.branchId = null
+          this.form.branchName = null
+        }
+      }
+      if (name == 'corpCnName') {
+        if (row) {
+          this.form.corpId = row.id
+          this.form.corpCode = row.code
+          this.form.corpEnName = row.enName
+          this.form.shortName = row.shortName
+        } else {
+          this.form.corpId = null
+          this.form.corpCode = null
+          this.form.corpCnName = null
+          this.form.corpEnName = null
+          this.form.shortName = null
+        }
+      }
       if (name == 'operatorName') {
         if (row) {
           this.form.operatorName = row.realName
@@ -964,6 +1041,14 @@ export default {
           this.form.operatorId = null
         }
       }
+      if (name == 'customerServiceName') {
+        if (row) {
+          this.form.customerServiceId = row.id
+        } else {
+          this.form.customerServiceName = null
+          this.form.customerServiceId = null
+        }
+      }
       if (name == 'polCnName') {
         if (row) {
           this.form.polId = row.id
@@ -1004,6 +1089,24 @@ export default {
         $cellEdit: true
       })
     },
+    async feecAddRow() {
+      if (!this.form.id) {
+        return this.$message.error("请保存数据");
+      }
+      await this.checkRate(null, this.form.purchaseDate, null, 1, this.deptId)
+      this.form.feeCenterList.push({
+        pid: this.form.id,
+        feesType: 1,
+        dc: 'C',
+        billType: '箱东',
+        corpId: this.form.purchaseCompanyId,
+        shortName: this.form.purchaseCompanyName,
+        corpCnName: this.form.purchaseCompanyName,
+        curCode: this.getLocalCurrency(),
+        exrate: this.getExchangeRate(this.getLocalCurrency(), 'C', 1),
+        $cellEdit: true
+      })
+    },
     templateChange(list) {
       this.selectionTemplateList = list;
     },
@@ -1079,6 +1182,9 @@ export default {
         });
       }
       if (name == '生成订单') {
+        if (!this.form.preContainersList.length) {
+          return this.$message.error("集装箱明细不能为空");
+        }
         if (this.form.status != 3) {
           for (let item of this.form.preContainersList) {
             if (Number(item.oceanFreight) < Number(item.salesPrice)) {
@@ -1086,7 +1192,6 @@ export default {
             }
           }
         }
-
         this.$confirm("是否生成订单?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -1206,6 +1311,9 @@ export default {
       });
     },
     application() {
+      if (!this.form.preContainersList.length) {
+        return this.$message.error("集装箱明细不能为空");
+      }
       this.$confirm("确定运费申请?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -1356,6 +1464,10 @@ export default {
   padding: 4px !important;
 }
 
+::v-deep .el-form-item__content {
+  line-height: 32px !important;
+}
+
 .disabledBox {
   display: flex;
   align-items: center;

+ 95 - 38
src/views/iosBasicData/businessCenter/customerLetter/index.vue

@@ -16,9 +16,9 @@
                     <el-button type="warning" size="small" @click="outExport">导 出</el-button>
                     <div style="margin-top: 10px">
                         <el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
-                            <el-tab-pane label="录入" name="1"></el-tab-pane>
+                            <!-- <el-tab-pane label="录入" name="1"></el-tab-pane>
                             <el-tab-pane label="提交" name="2"></el-tab-pane>
-                            <el-tab-pane label="受理" name="3"></el-tab-pane>
+                            <el-tab-pane label="受理" name="3"></el-tab-pane> -->
                             <el-tab-pane label="待确认" name="4"></el-tab-pane>
                             <el-tab-pane label="已审核" name="5"></el-tab-pane>
                             <el-tab-pane label="全部" name="0"></el-tab-pane>
@@ -58,7 +58,7 @@ export default {
             form: {},
             query: {
                 businessType: 'KHTS',
-                billStatus: '1'
+                billStatus: '4'
             },
             loading: false,
             page: {
@@ -87,40 +87,100 @@ export default {
                 searchIndex: 3,
                 column: [
                     {
-                        label: 'MB/L NO',
-                        prop: "mblno",
-                        width: "100",
+                        label: '系统号',
+                        prop: "billNo",
+                        width: "120",
                         search: true,
                         overHidden: true,
                     },
                     {
-                        label: "订单状态",
-                        prop: "billStatus",
-                        width: "120",
+                        label: 'HB/L NO',
+                        prop: "hblno",
+                        width: "100",
+                        search: true,
                         overHidden: true,
+                    },
+                    {
+                        label: '所属公司',
+                        prop: "branchName",
+                        width: "100",
                         // search: true,
-                        // type: 'select',
-                        // dicData: [{
-                        //     label: '全部',
-                        //     value: '0',
-                        // }, {
-                        //     label: '录入',
-                        //     value: '1',
-                        // }, {
-                        //     label: '提交',
-                        //     value: '2',
-                        // }, {
-                        //     label: '受理',
-                        //     value: '3',
-                        // }, {
-                        //     label: '待确认',
-                        //     value: '4',
-                        // }, {
-                        //     label: '已审核',
-                        //     value: '5',
-                        // }],
+                        // type: "select",
+                        // filterable: true,
+                        // dicUrl: "/api/blade-system/dept/lazy-list",
+                        // props: {
+                        //     label: "deptName",
+                        //     value: "deptName",
+                        // },
+                        overHidden: true,
+                    },
+                    {
+                        label: '所属公司',
+                        prop: "branchId",
+                        width: "100",
+                        search: true,
+                        type: "select",
+                        filterable: true,
+                        dicUrl: "/api/blade-system/dept/lazy-list",
+                        props: {
+                            label: "deptName",
+                            value: "id",
+                        },
+                        hide: true,
+                        showColumn: false,
+                        overHidden: true,
                     },
                     {
+                        label: '客户',
+                        prop: "corpCnName",
+                        width: "100",
+                        search: true,
+                        type: 'select',
+                        filterable: true,
+                        remote: true,
+                        dicUrl: "/api/blade-los/bcorps/selectList?status=0&current=1&size=20&cnName={{key}}",
+                        props: {
+                            label: 'cnName',
+                            value: 'cnName',
+                            res: 'data.records'
+                        },
+                        overHidden: true,
+                    },
+                    {
+                        label: 'HB/L NO',
+                        prop: "hblno",
+                        width: "100",
+                        search: true,
+                        overHidden: true,
+                    },
+                    // {
+                    //     label: "订单状态",
+                    //     prop: "billStatus",
+                    //     width: "120",
+                    //     overHidden: true,
+                    //     // search: true,
+                    //     type: 'select',
+                    //     dicData: [{
+                    //         label: '全部',
+                    //         value: 0,
+                    //     }, {
+                    //         label: '录入',
+                    //         value: 1,
+                    //     }, {
+                    //         label: '提交',
+                    //         value: 2,
+                    //     }, {
+                    //         label: '受理',
+                    //         value: 3,
+                    //     }, {
+                    //         label: '待确认',
+                    //         value: 4,
+                    //     }, {
+                    //         label: '已审核',
+                    //         value: 5,
+                    //     }],
+                    // },
+                    {
                         label: "起运港",
                         prop: "polCnName",
                         width: "80",
@@ -234,12 +294,6 @@ export default {
                         overHidden: true,
                     },
                     {
-                        label: '船名',
-                        prop: "vesselCnName",
-                        width: "100",
-                        overHidden: true,
-                    },
-                    {
                         label: '唛头',
                         prop: "marks",
                         width: "100",
@@ -289,7 +343,7 @@ export default {
                     },
                     {
                         label: "备注",
-                        prop: "remarks",
+                        prop: "cyRemarks",
                         width: "100",
                         overHidden: true
                     },
@@ -306,8 +360,8 @@ export default {
     },
     activated() {
         setTimeout(() => {
-            if (this.$route.query.home) {
-                this.addButton();
+            if (this.$route.query.billId) {
+               this.isShow = false
             }
             this.$refs.crud.doLayout();
         }, 100);
@@ -321,6 +375,9 @@ export default {
         },
         addButton() {
             this.isShow = false
+            this.detailData = {
+                type: 'new'
+            }
         },
         copyButton() {
             this.isShow = false

+ 24 - 7
src/views/iosBasicData/costcenter/rt&fd/index.vue

@@ -41,23 +41,32 @@ export default {
         menuWidth: 140,
         menu: false,
         tip: false,
-        // searchShow: true,
-        searchMenuSpan: 12,
+        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: 'boxType',
             overHidden: true,
+            search: true,
+            searchOrder: 4,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcntrtypes/list?status=0&current=1&size=5&cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              desc: 'code',
+              res: "data.records"
+            }
+
           },
           {
             label: 'POL',
@@ -69,6 +78,7 @@ export default {
             prop: 'polId',
             overHidden: true,
             search: true,
+            searchOrder: 1,
             hide: true,
             showColumn: false,
             type: "select",
@@ -102,6 +112,7 @@ export default {
             prop: 'podLId',
             overHidden: true,
             search: true,
+            searchOrder: 2,
             hide: true,
             showColumn: false,
             type: "select",
@@ -130,6 +141,7 @@ export default {
             prop: 'podCname',
             overHidden: true,
             search: true,
+            searchOrder: 3,
             searchSpan: 12
           },
           {
@@ -145,6 +157,7 @@ export default {
             hide: true,
             showColumn: false,
             search: true,
+            searchOrder: 5,
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 00:00:00",
@@ -158,6 +171,7 @@ export default {
             hide: true,
             showColumn: false,
             search: true,
+            searchOrder: 6,
             type: "date",
             format: "yyyy-MM-dd",
             valueFormat: "yyyy-MM-dd 23:59:59",
@@ -165,6 +179,7 @@ export default {
         ]
       },
       data: [],
+      firstStatus: false
     };
   },
   components: {
@@ -221,7 +236,7 @@ export default {
       //     delete this.query[item]
       //   }
       // }
-      if (this.query.polId && this.query.podLId && this.query.podId) {
+      if (this.firstStatus) {
         obj = {
           ...Object.assign(this.query),
         }
@@ -235,6 +250,8 @@ export default {
         }).finally(() => {
           this.loading = false;
         })
+      } else {
+        this.firstStatus = true
       }
 
     },
@@ -255,7 +272,7 @@ export default {
         }
       }
       const routeData = this.$router.resolve({
-        path: '/api/blade-los/UpdatePodStation/listExport',      //跳转目标窗口的地址
+        path: '/api/blade-los/routeCostProfit/exportRTFDProfit',      //跳转目标窗口的地址
         query: {
           ...config.params,    //括号内是要传递给新窗口的参数
           identification: this.url