Browse Source

新加进出场记录模块 OW费用新加发票申请 和撤销审核

Qukatie 6 months ago
parent
commit
b1ef277b29

+ 45 - 0
src/api/boxManagement/record/index.js

@@ -0,0 +1,45 @@
+import request from '@/router/axios';
+//查询列表
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/blade-los/boxdynamicsrecord/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+//主表保存
+export function submit(data) {
+  return request({
+    url: '/api/blade-los/boxdynamicsrecord/submit',
+    method: 'post',
+    data
+  })
+}
+//查询明细
+export const detail = (params) => {
+  return request({
+    url: '/api/blade-los/boxdynamicsrecorditems/list',
+    method: 'get',
+    params: params
+  })
+}
+//明细保存
+export function itemSubmit(data) {
+  return request({
+    url: '/api/blade-los/boxdynamicsrecorditems/submit',
+    method: 'post',
+    data
+  })
+}
+//同步
+export const synchronous = (params) => {
+  return request({
+    url: '/api/blade-los/boxdynamicsrecord/synchronous',
+    method: 'get',
+    params: params
+  })
+}

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

@@ -2192,6 +2192,18 @@ const columnName = [{
 }, {
   code: 513,
   name: '永发-商务中心-客户订舱列表页'
+}, {
+  code: 514,
+  name: '永发-箱管-出场记录列表页'
+}, {
+  code: 515,
+  name: '永发-箱管-出场纪录明细'
+}, {
+  code: 516,
+  name: '永发-箱管-进场记录列表页'
+}, {
+  code: 517,
+  name: '永发-箱管-进场纪录明细'
 }
 ]
 export const getColumnName = (key) => {

+ 382 - 0
src/views/boxManagement/enterRecord/detailsPage.vue

@@ -0,0 +1,382 @@
+<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"
+          :disabled="selectionList.length == 0" @click="synchronous">箱动态同步
+        </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> -->
+        <!-- <el-dropdown style="line-height: 0">
+          <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
+            size="small">
+            审 批<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown> -->
+      </div>
+    </div>
+    <div style="margin-top: 50px">
+      <!-- <trade-card title="基础信息">
+        <avue-form :option="optionForm" v-model="form" ref="form">
+        </avue-form>
+      </trade-card> -->
+      <trade-card title="基础明细">
+        <avue-crud :option="option" :data="dataList" 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', 515)"
+          @saveColumn="saveColumn('crud', 'option', 'optionBack', 515)">
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button size="small" type="text" @click="rowEdit(row)">
+              {{ row.$cellEdit ? '保存' : '编辑' }}
+            </el-button>
+          </template>
+        </avue-crud>
+      </trade-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import { detail, itemSubmit, synchronous } from "@/api/boxManagement/record/index.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 { dateFormat } from "@/util/date";
+import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
+import { getToken } from "@/util/auth";
+import _ from "lodash";
+import { Header } from "element-ui";
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+      selectionList: [],
+      editButton: false,
+      editDisabled: false,
+      dataList: [],
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: '起运港',
+            prop: 'polCname',
+            disabled: false,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: '目的港',
+            prop: 'podCname',
+            disabled: false,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            type: 'textarea',
+            minRows: 2,
+            span: 12
+          }]
+      },
+      option: {},
+      optionBack: {
+        // height: 'auto',
+        maxHeight: 340,
+        calcHeight: 30,
+        menuWidth: 60,
+        tip: false,
+        border: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        refreshBtn: false,
+        selection: true,
+        index: true,
+        align: 'center',
+        // menu: false,
+        column: [
+          {
+            label: '是否同步',
+            prop: 'whetherSynchronous',
+            type: 'select',
+            dicData: [{
+              label: '否',
+              value: '0'
+            }, {
+              label: '是',
+              value: '1'
+            }],
+            overHidden: true,
+          },
+          {
+            label: '放箱号',
+            prop: 'containerNumber',
+            overHidden: true,
+          },
+          {
+            label: '箱型',
+            prop: 'boxType',
+            overHidden: true,
+          },
+          {
+            label: '港口',
+            prop: 'portCname',
+            overHidden: true,
+          },
+          {
+            label: '场站',
+            prop: 'stationCname',
+            overHidden: true,
+          },
+          {
+            label: '提单号',
+            prop: 'hblno',
+            overHidden: true,
+          },
+          {
+            label: '进场日期',
+            prop: 'approachExitDate',
+            overHidden: true,
+          },
+          {
+            label: '进场目的',
+            prop: 'objective',
+            cell: true,
+            type: 'select',
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=enter_purpose",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            overHidden: true,
+          },
+          {
+            label: '箱好坏',
+            prop: 'boxStatus',
+            overHidden: true,
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            cell: true,
+            width: 150,
+            overHidden: true,
+          }]
+      },
+      roleName: [],
+    }
+  },
+  components: {
+    dicSelect,
+    checkSchedule,
+    businessReports,
+    reports
+  },
+  props: {
+    detailData: Object
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(515), this.optionBack);
+    if (this.detailData.id) {
+      // this.editButton = true
+      // this.editDisabled = true
+      // this.optionForm.disabled = true
+      this.getDetail(this.detailData.id)
+    }
+  },
+  methods: {
+    synchronous() {
+      let ids = []
+      for (let item of this.selectionList) {
+        if (item.whetherSynchronous == 1) {
+          return this.$message.error("请选择未同步的明细");
+        }
+        ids.push(item.id)
+      }
+      let obj = {
+        id: this.detailData.id,
+        ids: ids.join(',')
+      }
+      synchronous(obj).then(res => {
+        this.$message.success("操作成功");
+        this.getDetail(this.detailData.id)
+      })
+    },
+    rowEdit(row) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+        itemSubmit(row).then(res => {
+          this.$message.success("保存成功");
+          this.$set(row, "$cellEdit", false);
+          this.getDetail(this.detailData.id)
+        })
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    getDetail(id) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      detail({ pid: id }).then(res => {
+        this.dataList = res.data.data
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crud.dicInit();
+        });
+      }).finally(() => {
+        loading.close()
+      })
+    },
+    submit(type) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      itemSubmit(this.dataList).then(res => {
+        this.$message.success("保存成功");
+        this.getDetail(this.detailData.id)
+      }).finally(() => {
+        loading.close();
+      })
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    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;
+      }
+    },
+    // 更改表格颜色
+    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;
+    },
+    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 .el-table .cell {
+  padding: 0 2px !important;
+
+  .el-form-item {
+    margin-bottom: 0px !important;
+  }
+
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+
+// ::v-deep#out-table .back-one {
+//     background: #ecf5ff !important;
+// }
+
+// ::v-deep#out-table .back-two {
+//     background: #ecf5ff !important;
+// }
+
+::v-deep #out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+::v-deep #out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+
+::v-deep .el-table--small td,
+.el-table--small th {
+  padding: 2px !important;
+}
+
+::v-deep .el-card__body {
+  padding: 3px 10px;
+}
+
+::v-deep .box-card .el-card__body {
+  padding: 4px !important;
+}
+
+.disabledBox {
+  display: flex;
+  align-items: center;
+}
+
+.meetSize {
+  font-size: 16px;
+  color: #54BCBD;
+}
+
+.fontSize {
+  font-size: 16px;
+  color: #81B337;
+}
+</style>

+ 385 - 0
src/views/boxManagement/enterRecord/index.vue

@@ -0,0 +1,385 @@
+<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', 516)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 516)" @on-load="onLoad">
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-upload" @click="allClick('excel导入')">excel导入
+          </el-button>
+          <el-button type="success" size="small" icon="el-icon-upload" @click="allClick('edi导入')">edi导入
+          </el-button>
+          <!-- <el-button type="warning" size="small"  disabled @click="outExport">导 出
+          </el-button> -->
+        </template>
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button size="small" type="text" @click="rowEdit(row)">{{ row.$cellEdit ? '保存' : '编辑'}}</el-button>
+        </template>
+        <template slot="fileType" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="inDetail(row)">{{ row.fileType }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
+    <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+      v-dialog-drag>
+      <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :table-loading="excelLoading"
+        :upload-before="uploadBefore" :upload-after="onSuccess">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="handleGet">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getList, submit } from "@/api/boxManagement/record/index.js";
+import detailsPage from "./detailsPage";
+import { getToken } from "@/util/auth";
+import _ from "lodash";
+export default {
+  data() {
+    return {
+      excelBox: false,
+      excelForm: {},
+      excelLoading: false,
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-los/boxdynamicsrecord/importExcel?type=JC"
+          }
+        ]
+      },
+      isShow: true,
+      form: {},
+      query: {
+        approachExit: "JC",
+      },
+      loading: false,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 60,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 12,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
+        column: [
+          {
+            label: '文件类型',
+            prop: 'fileType',
+            overHidden: true,
+          },
+          {
+            label: '导入时间',
+            prop: 'importDate',
+            overHidden: true,
+          },
+          {
+            label: '港口',
+            prop: 'portCname',
+            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: 'stationCname',
+            overHidden: true,
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcorps/list?status=0&size=5&current=1&cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              desc: 'code',
+              res: "data.records"
+            },
+          },
+          {
+            label: '放箱号',
+            prop: 'containerNumber',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '提单号',
+            prop: 'mblno',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '箱号',
+            prop: 'boxCode',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '状态',
+            prop: 'boxDynamics',
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            cell: true,
+            overHidden: true,
+          }
+        ]
+      },
+      data: [],
+    };
+  },
+  components: {
+    detailsPage
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(516), this.optionBack);
+  },
+  activated() {
+    setTimeout(() => {
+    }, 100);
+  },
+  methods: {
+    allClick(name) {
+      if (name == 'excel导入') {
+        this.excelBox = true;
+      }
+      if (name == 'edi导入') {
+        this.excelBox = true;
+      }
+    },
+    uploadBefore(file, done, loading) {
+      done();
+      loading = true;
+    },
+    // 上传成功
+    onSuccess(res, done, loading, column) {
+      if (res == '操作成功') {
+        this.$message.success("上传成功!");
+      }
+      this.excelBox = false;
+      // this.$message.success("导入成功!");
+      loading = false;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    // 下载模板
+    handleGet() {
+      window.open(
+        `/api/blade-los/boxdynamicsrecord/exportTemplate?${this.website.tokenHeader
+        }=${getToken()}`
+      );
+    },
+    inDetail(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false
+    },
+    rowEdit(row) {
+      if (row.$cellEdit == true) {
+        submit(row).then(res => {
+          this.$message.success("保存成功!");
+          this.$set(row, "$cellEdit", false);
+          this.onLoad(this.page, this.query);
+        })
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    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() {
+      // 初始化数据
+      this.detailData = {}
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
+    },
+    outExport() {
+      let config = { params: { ...this.query } }
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-los/routecost/exportRouteCost',      //跳转目标窗口的地址
+        query: {
+          ...config.params,    //括号内是要传递给新窗口的参数
+          identification: this.url
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
+    //自定义列保存
+    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>

+ 382 - 0
src/views/boxManagement/exitRecord/detailsPage.vue

@@ -0,0 +1,382 @@
+<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"
+          :disabled="selectionList.length == 0" @click="synchronous">箱动态同步
+        </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> -->
+        <!-- <el-dropdown style="line-height: 0">
+          <el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
+            size="small">
+            审 批<i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown> -->
+      </div>
+    </div>
+    <div style="margin-top: 50px">
+      <!-- <trade-card title="基础信息">
+        <avue-form :option="optionForm" v-model="form" ref="form">
+        </avue-form>
+      </trade-card> -->
+      <trade-card title="基础明细">
+        <avue-crud :option="option" :data="dataList" 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', 515)"
+          @saveColumn="saveColumn('crud', 'option', 'optionBack', 515)">
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button size="small" type="text" @click="rowEdit(row)">
+              {{ row.$cellEdit ? '保存' : '编辑' }}
+            </el-button>
+          </template>
+        </avue-crud>
+      </trade-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import { detail, itemSubmit, synchronous } from "@/api/boxManagement/record/index.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 { dateFormat } from "@/util/date";
+import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
+import { getToken } from "@/util/auth";
+import _ from "lodash";
+import { Header } from "element-ui";
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+      selectionList: [],
+      editButton: false,
+      editDisabled: false,
+      dataList: [],
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: '起运港',
+            prop: 'polCname',
+            disabled: false,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: '目的港',
+            prop: 'podCname',
+            disabled: false,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }],
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            type: 'textarea',
+            minRows: 2,
+            span: 12
+          }]
+      },
+      option: {},
+      optionBack: {
+        // height: 'auto',
+        maxHeight: 340,
+        calcHeight: 30,
+        menuWidth: 60,
+        tip: false,
+        border: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        refreshBtn: false,
+        selection: true,
+        index: true,
+        align: 'center',
+        // menu: false,
+        column: [
+          {
+            label: '是否同步',
+            prop: 'whetherSynchronous',
+            type: 'select',
+            dicData: [{
+              label: '否',
+              value: '0'
+            }, {
+              label: '是',
+              value: '1'
+            }],
+            overHidden: true,
+          },
+          {
+            label: '放箱号',
+            prop: 'containerNumber',
+            overHidden: true,
+          },
+          {
+            label: '箱型',
+            prop: 'boxType',
+            overHidden: true,
+          },
+          {
+            label: '港口',
+            prop: 'portCname',
+            overHidden: true,
+          },
+          {
+            label: '场站',
+            prop: 'stationCname',
+            overHidden: true,
+          },
+          {
+            label: '提单号',
+            prop: 'hblno',
+            overHidden: true,
+          },
+          {
+            label: '出场日期',
+            prop: 'approachExitDate',
+            overHidden: true,
+          },
+          {
+            label: '出场目的',
+            prop: 'objective',
+            cell: true,
+            type: 'select',
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=exit_purpose",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+            overHidden: true,
+          },
+          {
+            label: '箱好坏',
+            prop: 'boxStatus',
+            overHidden: true,
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            cell: true,
+            width: 150,
+            overHidden: true,
+          }]
+      },
+      roleName: [],
+    }
+  },
+  components: {
+    dicSelect,
+    checkSchedule,
+    businessReports,
+    reports
+  },
+  props: {
+    detailData: Object
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(515), this.optionBack);
+    if (this.detailData.id) {
+      // this.editButton = true
+      // this.editDisabled = true
+      // this.optionForm.disabled = true
+      this.getDetail(this.detailData.id)
+    }
+  },
+  methods: {
+    synchronous() {
+      let ids = []
+      for (let item of this.selectionList) {
+        if (item.whetherSynchronous == 1) {
+          return this.$message.error("请选择未同步的明细");
+        }
+        ids.push(item.id)
+      }
+      let obj = {
+        id: this.detailData.id,
+        ids: ids.join(',')
+      }
+      synchronous(obj).then(res => {
+        this.$message.success("操作成功");
+        this.getDetail(this.detailData.id)
+      })
+    },
+    rowEdit(row) {
+      if (row.$cellEdit == true) {
+        this.$set(row, "$cellEdit", false);
+        itemSubmit(row).then(res => {
+          this.$message.success("保存成功");
+          this.$set(row, "$cellEdit", false);
+          this.getDetail(this.detailData.id)
+        })
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    getDetail(id) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      detail({ pid: id }).then(res => {
+        this.dataList = res.data.data
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+          this.$refs.crud.dicInit();
+        });
+      }).finally(() => {
+        loading.close()
+      })
+    },
+    submit(type) {
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      itemSubmit(this.dataList).then(res => {
+        this.$message.success("保存成功");
+        this.getDetail(this.detailData.id)
+      }).finally(() => {
+        loading.close();
+      })
+    },
+    //自定义列保存
+    async saveColumn(ref, option, optionBack, code) {
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    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;
+      }
+    },
+    // 更改表格颜色
+    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;
+    },
+    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 .el-table .cell {
+  padding: 0 2px !important;
+
+  .el-form-item {
+    margin-bottom: 0px !important;
+  }
+
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+
+// ::v-deep#out-table .back-one {
+//     background: #ecf5ff !important;
+// }
+
+// ::v-deep#out-table .back-two {
+//     background: #ecf5ff !important;
+// }
+
+::v-deep #out-table .back-one {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+::v-deep #out-table .back-two {
+  background: #ecf5ff !important;
+  text-align: center;
+  padding: 4px 0;
+}
+
+
+::v-deep .el-table--small td,
+.el-table--small th {
+  padding: 2px !important;
+}
+
+::v-deep .el-card__body {
+  padding: 3px 10px;
+}
+
+::v-deep .box-card .el-card__body {
+  padding: 4px !important;
+}
+
+.disabledBox {
+  display: flex;
+  align-items: center;
+}
+
+.meetSize {
+  font-size: 16px;
+  color: #54BCBD;
+}
+
+.fontSize {
+  font-size: 16px;
+  color: #81B337;
+}
+</style>

+ 385 - 0
src/views/boxManagement/exitRecord/index.vue

@@ -0,0 +1,385 @@
+<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', 514)"
+        @saveColumn="saveColumn('crud', 'option', 'optionBack', 514)" @on-load="onLoad">
+        <template slot="menuLeft">
+          <el-button type="primary" size="small" icon="el-icon-upload" @click="allClick('excel导入')">excel导入
+          </el-button>
+          <el-button type="success" size="small" icon="el-icon-upload" @click="allClick('edi导入')">edi导入
+          </el-button>
+          <!-- <el-button type="warning" size="small"  disabled @click="outExport">导 出
+          </el-button> -->
+        </template>
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button size="small" type="text" @click="rowEdit(row)">{{ row.$cellEdit ? '保存' : '编辑'}}</el-button>
+        </template>
+        <template slot="fileType" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="inDetail(row)">{{ row.fileType }}</span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage v-if="!isShow" :detailData="detailData" @goBack="goBack"></detailsPage>
+    <el-dialog title="导入数据" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+      v-dialog-drag>
+      <avue-form v-if="excelBox" :option="excelOption" v-model="excelForm" :table-loading="excelLoading"
+        :upload-before="uploadBefore" :upload-after="onSuccess">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="handleGet">
+            点击下载<i class="el-icon-download el-icon--right"></i>
+          </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getList, submit } from "@/api/boxManagement/record/index.js";
+import detailsPage from "./detailsPage";
+import { getToken } from "@/util/auth";
+import _ from "lodash";
+export default {
+  data() {
+    return {
+      excelBox: false,
+      excelForm: {},
+      excelLoading: false,
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "模板上传",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "模板上传中,请稍等",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-los/boxdynamicsrecord/importExcel?type=CC"
+          }
+        ]
+      },
+      isShow: true,
+      form: {},
+      query: {
+        approachExit: "CC",
+      },
+      loading: false,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {},
+      optionBack: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 60,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 12,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
+        column: [
+          {
+            label: '文件类型',
+            prop: 'fileType',
+            overHidden: true,
+          },
+          {
+            label: '导入时间',
+            prop: 'importDate',
+            overHidden: true,
+          },
+          {
+            label: '港口',
+            prop: 'portCname',
+            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: 'stationCname',
+            overHidden: true,
+            search: true,
+            type: "select",
+            filterable: true,
+            remote: true,
+            dicUrl: "/api/blade-los/bcorps/list?status=0&size=5&current=1&cnName={{key}}",
+            props: {
+              label: "cnName",
+              value: "cnName",
+              desc: 'code',
+              res: "data.records"
+            },
+          },
+          {
+            label: '放箱号',
+            prop: 'containerNumber',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '提单号',
+            prop: 'mblno',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '箱号',
+            prop: 'boxCode',
+            search: true,
+            hide: true,
+            overHidden: true,
+          },
+          {
+            label: '状态',
+            prop: 'boxDynamics',
+            search: true,
+            overHidden: true,
+          },
+          {
+            label: '备注',
+            prop: 'remarks',
+            cell: true,
+            overHidden: true,
+          }
+        ]
+      },
+      data: [],
+    };
+  },
+  components: {
+    detailsPage
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(514), this.optionBack);
+  },
+  activated() {
+    setTimeout(() => {
+    }, 100);
+  },
+  methods: {
+    allClick(name) {
+      if (name == 'excel导入') {
+        this.excelBox = true;
+      }
+      if (name == 'edi导入') {
+        this.excelBox = true;
+      }
+    },
+    uploadBefore(file, done, loading) {
+      done();
+      loading = true;
+    },
+    // 上传成功
+    onSuccess(res, done, loading, column) {
+      if (res == '操作成功') {
+        this.$message.success("上传成功!");
+      }
+      this.excelBox = false;
+      // this.$message.success("导入成功!");
+      loading = false;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    // 下载模板
+    handleGet() {
+      window.open(
+        `/api/blade-los/boxdynamicsrecord/exportTemplate?${this.website.tokenHeader
+        }=${getToken()}`
+      );
+    },
+    inDetail(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false
+    },
+    rowEdit(row) {
+      if (row.$cellEdit == true) {
+        submit(row).then(res => {
+          this.$message.success("保存成功!");
+          this.$set(row, "$cellEdit", false);
+          this.onLoad(this.page, this.query);
+        })
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+    },
+    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() {
+      // 初始化数据
+      this.detailData = {}
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
+    },
+    outExport() {
+      let config = { params: { ...this.query } }
+      if (config.params) {
+        for (const propName of Object.keys(config.params)) {
+          const value = config.params[propName];
+          if (value !== null && typeof (value) !== "undefined") {
+            if (value instanceof Array) {
+              for (const key of Object.keys(value)) {
+                let params = propName + '[' + key + ']';
+                config.params[params] = value[key]
+              }
+              delete config.params[propName]
+            }
+          }
+        }
+      }
+      const routeData = this.$router.resolve({
+        path: '/api/blade-los/routecost/exportRouteCost',      //跳转目标窗口的地址
+        query: {
+          ...config.params,    //括号内是要传递给新窗口的参数
+          identification: this.url
+        }
+      })
+      window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
+    },
+    //自定义列保存
+    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>

+ 29 - 3
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -52,7 +52,7 @@
                     </el-button>
                     <el-button
                         v-if="isHq == 1 && (roleName.indexOf('admin') >= 0 || roleName.indexOf('应付修改') >= 0 || roleName.indexOf('应付查看') >= 0)"
-                        type="primary" plain size="small" @click="costSubmit"
+                        type="primary" plain size="small" @click="checkSubmit"
                         :disabled="!selectionList.length">提取成本</el-button>
                     <!--                    <el-button type="success" plain size="small" @click="freightRateSubmit"
                         :disabled="!selectionList.length">提取运价</el-button>-->
@@ -1259,6 +1259,19 @@ export default {
                         searchOrder: 19
                     },
                     {
+                        label: "提取成本",
+                        prop: "whetherExtractCost",
+                        type: "select",
+                        dicData: [{
+                            label: '否',
+                            value: 0
+                        }, {
+                            label: '是',
+                            value: 1
+                        }],
+                        overHidden: true,
+                    },
+                    {
                         label: "备注",
                         prop: "remarks",
                         overHidden: true
@@ -1388,7 +1401,7 @@ export default {
             mawbData: [],
             // 业务状态数据
             billStatusData: [],
-            khdcStatus:[],
+            khdcStatus: [],
             // 财务状态
             accountStatusData: [],
             saberUserInfo: {}, // 当前登录人个人信息
@@ -1518,6 +1531,19 @@ export default {
             }
             this.$refs.freightRate.openDialog(obj, ids.join(','))
         },
+        checkSubmit() {
+            if (this.selectionList.filter(item => item.whetherExtractCost==1).length) {
+                this.$confirm('已提取成本,是否再次提取?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.costSubmit()
+                })
+            } else {
+                this.costSubmit()
+            }
+        },
         costSubmit() {
             let podId = []
             let destinationId = []
@@ -1911,7 +1937,7 @@ export default {
             getWorkDicts("bill_status").then(res => {
                 this.billStatusData = res.data.data;
             });
-             getWorkDicts("KHDC_Status").then(res => {
+            getWorkDicts("KHDC_Status").then(res => {
                 this.khdcStatus = res.data.data;
             });
         },

+ 5 - 5
src/views/iosBasicData/fininvoices/fininvoicesDetails.vue

@@ -1129,6 +1129,11 @@ export default {
                     this.form.businessDateEnd = this.form.businessDateEnd.slice(0, 10) + ' 00:00:00'
                 }
                 if (this.form.id) {
+                    for (let item of this.handleSelectionData) {
+                        if (!item.id) {
+                            this.form.finInvoicesItemsList.push(item)
+                        }
+                    }
                     this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {
                             item.currentAmount = item.currentAmountCNY
@@ -1137,11 +1142,6 @@ export default {
                         }
                         return item
                     })
-                    for (let item of this.handleSelectionData) {
-                        if (!item.id) {
-                            this.form.finInvoicesItemsList.push(item)
-                        }
-                    }
                 } else {
                     this.form.finInvoicesItemsList = this.handleSelectionData.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {

+ 1 - 1
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -761,7 +761,7 @@ export default {
             this.form.curCode = this.getLocalCurrency()
             this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc ? this.form.dc : 'D', 2))
         }
-        if (this.$route.query.mblno) {
+        if (this.$route.query.mblno||this.$route.query.corpId) {
             // console.log(111111)
             this.form.mblno = this.$route.query.mblno
             this.form.corpCnName = this.$route.query.corpCnName

+ 1 - 1
src/views/iosBasicData/fininvoicesApplyfor/index.vue

@@ -652,7 +652,7 @@ export default {
     }
   },
   activated() {
-    if (this.$route.query.mblno) {
+    if (this.$route.query.mblno||this.$route.query.corpId) {
       setTimeout(() => {
         this.newbillFun()
       }, 200);

+ 5 - 5
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -1196,6 +1196,11 @@ export default {
                     this.form.businessDateEnd = this.form.businessDateEnd.slice(0, 10) + ' 00:00:00'
                 }
                 if (this.form.id) {
+                    for (let item of this.handleSelectionData) {
+                        if (!item.id) {
+                            this.form.finInvoicesItemsList.push(item)
+                        }
+                    }
                     this.form.finInvoicesItemsList = this.form.finInvoicesItemsList.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {
                             item.currentAmount = item.currentAmountCNY
@@ -1204,11 +1209,6 @@ export default {
                         }
                         return item
                     })
-                    for (let item of this.handleSelectionData) {
-                        if (!item.id) {
-                            this.form.finInvoicesItemsList.push(item)
-                        }
-                    }
                 } else {
                     this.form.finInvoicesItemsList = this.handleSelectionData.map(item => {
                         if (item.currentCurCode == this.getLocalCurrency()) {

+ 118 - 6
src/views/ow/owTask/detailsPage.vue

@@ -240,9 +240,12 @@
                   @click="allClick('D费用批量删除')">批量删除</el-button>
                 <!-- <el-button type="primary" plain size="small" :disabled="editDisabled">计算超期箱使费</el-button> -->
                 <el-button type="warning" plain size="small" @click="allClick('批量导入费用')">批量导入费用</el-button>
-                <el-button type="primary" plain size="small"
-                  :disabled="(selectionfeedList.length == 0 && selectionfeecList.length == 0)"
+                <el-button type="primary" plain size="small" :disabled="selectionfeedList.length == 0"
+                  @click="allClick('D发票申请')">发票申请</el-button>
+                <el-button type="primary" plain size="small" :disabled="selectionfeedList.length"
                   @click="allClick('D费用申请')">请核费用</el-button>
+                <el-button type="danger" plain size="small" :disabled="disabled || selectionfeecList.length == 0"
+                  @click="allClick('D撤销请核')">撤销请核</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -336,6 +339,12 @@
                   :disabled="form.tradingBoxItemsList.length == 0">生成箱使费</el-button>
                 <el-button type="danger" plain size="small" @click="allClick('撤销箱使费')"
                   :disabled="form.tradingBoxItemsList.length == 0">撤销箱使费</el-button>
+                <el-button type="primary" plain size="small" :disabled="selectionfeedList.length == 0"
+                  @click="allClick('C发票申请')">发票申请</el-button>
+                <el-button type="primary" plain size="small" :disabled="selectionfeedList.length"
+                  @click="allClick('C费用申请')">请核费用</el-button>
+                <el-button type="danger" plain size="small" :disabled="disabled || selectionfeecList.length == 0"
+                  @click="allClick('C撤销请核')">撤销请核</el-button>
                 <!-- <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('C费用申请')">请核费用</el-button> -->
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
@@ -605,7 +614,8 @@ import {
   pleaseVerifyCost,
   batchUpdatePodStation,
   getAccurate,
-  synchronousPutBoxData
+  synchronousPutBoxData,
+  revokeCheckPleaseVerifyCost
 } from "@/api/boxManagement/buyContainer";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -3049,9 +3059,31 @@ export default {
           })
         })
       }
+      if (name == 'D发票申请') {
+        if (this.selectionfeedList.length == 0) return this.$message.error("请选择费用");
+        if (this.selectionfeedList.length != this.selectionfeedList.filter(e => e.corpCnName == this.selectionfeedList[0].corpCnName).length) return this.$message.error("请选择相同的结算单位");
+        if (this.selectionfeedList.filter(e => e.auditStatus != 4).length) return this.$message.error("请选择审核通过的费用");
+        if (this.$store.getters.finappStatus) {
+          this.$alert("发票申请(F)页面已存在,请关闭发票申请(F)再进行操作", "温馨提示", {
+            confirmButtonText: "确定",
+            type: 'warning',
+            callback: action => {
+            }
+          });
+        } else {
+          this.$router.push({
+            path: `/iosBasicData/fininvoicesApplyfor/index`,
+            query: {
+              // mblno: this.form.mblno,
+              corpCnName: this.selectionfeedList[0].corpCnName,
+              corpId: this.selectionfeedList[0].corpId
+            }
+          })
+        }
+
+      }
       if (name == 'D费用申请') {
-        let selecList = [...this.selectionfeedList, ...this.selectionfeecList]
-        for (let row of selecList) {
+        for (let row of this.selectionfeedList) {
           if (!row.id) {
             return this.$message.error("请保存费用明细");
           }
@@ -3071,7 +3103,7 @@ export default {
           obj = {
             srcId: this.form.id,
             srcType: this.form.type,
-            feeCenterList: selecList,
+            feeCenterList: this.selectionfeedList,
             url: '/ow/owTask/index',
             pageStatus: '',
             pageLabel: 'OW(拿)',
@@ -3130,6 +3162,86 @@ export default {
           })
         });
       }
+      if (name == 'D撤销请核') {
+        for (let row of this.selectionfeedList) {
+          if (!row.id) {
+            return this.$message.error("请保存费用明细");
+          }
+          if (row.auditStatus == 0) {
+            return this.$message.error("未申请费用,不允许撤销");
+          }
+          if (row.auditStatus > 2) {
+            return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
+          }
+        }
+        this.$confirm("确定撤销请核?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeedList,
+            url: '/ow/owTask/index',
+            pageStatus: '',
+            pageLabel: 'OW(拿)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          revokeCheckPleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
+      if (name == 'C撤销请核') {
+        for (let row of this.selectionfeecList) {
+          if (!row.id) {
+            return this.$message.error("请保存费用明细");
+          }
+          if (row.auditStatus == 0) {
+            return this.$message.error("未申请费用,不允许撤销");
+          }
+          if (row.auditStatus > 2) {
+            return this.$message.error("费用已经审核通过,请使用申请修改和删除功能!");
+          }
+        }
+        this.$confirm("确定撤销请核?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/ow/owTask/index',
+            pageStatus: '',
+            pageLabel: 'OW(拿)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          revokeCheckPleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
       if (name == '批量导入费用') {
         this.checkRate(null, this.form.effectiveDate, null, 1, this.deptId)
         this.$confirm('是否批量导入费用?', '提示', {