|
|
@@ -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>
|