|
|
@@ -0,0 +1,650 @@
|
|
|
+<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', 532)"
|
|
|
+ @saveColumn="saveColumn('crud', 'option', 'optionBack', 532)" @on-load="onLoad">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-tabs v-model="query.changeOrderStatus" type="card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="申请" name="申请"></el-tab-pane>
|
|
|
+ <el-tab-pane label="已换单" name="已换单"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-button type="primary" size="small" @click="allClick('确认设备单')" :disabled="selectionList.length == 0">确认设备单
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success" size="small" @click="allClick('导出')">导出
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" size="small" @click="allClick('收押箱款')" :disabled="selectionList.length == 0">收押箱款
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success" size="small" @click="allClick('退押箱款')" :disabled="selectionList.length == 0">退押箱款
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <template slot="menu" slot-scope="{ row, index }">
|
|
|
+ <el-button v-if="row.changeOrderStatus == '申请'" size="small" type="text"
|
|
|
+ @click="allClick('确认换单', row)">确认换单</el-button>
|
|
|
+ <el-button size="small" type="text" @click="allClick('上传附件', row)">上传附件</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </basic-container>
|
|
|
+ <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>
|
|
|
+ <template slot="corpCnName">
|
|
|
+ <dic-select v-model="excelForm.corpCnName" placeholder="场站" key="id" :slotRight="true" rightLabel="code"
|
|
|
+ label="shortName" res="records" url="/blade-los/bcorps/selectList?status=0¤t=1&size=5&corpTypeName=场站"
|
|
|
+ :filterable="true" :remote="true" dataName="shortName" @selectChange="dicChange('corpCnName', $event)">
|
|
|
+ </dic-select>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </avue-form>
|
|
|
+ <p style="text-align: center;color: #DC0505">
|
|
|
+ 温馨提示 第一次导入时请先下载模板
|
|
|
+ </p>
|
|
|
+ </el-dialog>
|
|
|
+ <file-update ref="file"></file-update>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ getList,
|
|
|
+ confirmExchangeOrder,
|
|
|
+ confirmEquipmentList,
|
|
|
+ confirmPaymentCollection,
|
|
|
+ confirmRefund,
|
|
|
+ changeOrderFile,
|
|
|
+ changeOrderList
|
|
|
+} from "@/api/iosBasicData/ImportExchange.js";
|
|
|
+import dicSelect from "@/components/dicSelect/main";
|
|
|
+import fileUpdate from "./components/fileUpdate.vue"
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
+import _ from "lodash";
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ excelBox: false,
|
|
|
+ excelForm: {},
|
|
|
+ excelLoading: false,
|
|
|
+ excelOption: {
|
|
|
+ submitBtn: false,
|
|
|
+ emptyBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "场站",
|
|
|
+ span: 24,
|
|
|
+ prop: "corpCnName",
|
|
|
+ // type: 'select',
|
|
|
+ // filterable: true,
|
|
|
+ // remote: true,
|
|
|
+ // dicUrl: "/api/blade-los/bcorps/selectList?status=0&corpTypeName=场站&size=5¤t=1&shortName={{key}}",
|
|
|
+ // props: {
|
|
|
+ // label: "shortName",
|
|
|
+ // value: "id",
|
|
|
+ // desc: 'code',
|
|
|
+ // res: "data.records"
|
|
|
+ // },
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "选择场站",
|
|
|
+ trigger: "blur",
|
|
|
+ }],
|
|
|
+ display: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "模板下载",
|
|
|
+ prop: "excelTemplate",
|
|
|
+ formslot: true,
|
|
|
+ span: 24,
|
|
|
+ display: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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: {
|
|
|
+ changeOrderStatus: '申请'
|
|
|
+ },
|
|
|
+ loading: false,
|
|
|
+ page: {
|
|
|
+ pageSize: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ selectionList: [],
|
|
|
+ option: {},
|
|
|
+ optionBack: {
|
|
|
+ height: 'auto',
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 160,
|
|
|
+ tip: false,
|
|
|
+ searchShow: true,
|
|
|
+ searchMenuSpan: 24,
|
|
|
+ border: true,
|
|
|
+ index: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ selection: true,
|
|
|
+ searchIcon: true,
|
|
|
+ align: 'center',
|
|
|
+ searchIndex: 3,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "所属公司",
|
|
|
+ prop: "branchId",
|
|
|
+ width: "120",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ hide: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ dicUrl: "/api/blade-system/dept/lazy-list",
|
|
|
+ props: {
|
|
|
+ label: "deptName",
|
|
|
+ value: "id",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '系统号',
|
|
|
+ prop: 'billNo',
|
|
|
+ width: "120",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '换单状态',
|
|
|
+ prop: 'changeOrderStatus',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '提货单状态',
|
|
|
+ prop: 'deliveryNoteStatus',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '设备单状态',
|
|
|
+ prop: 'equipmentSingleStatus',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '押箱金额',
|
|
|
+ prop: 'boxPackingAmount',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '收押箱款日期',
|
|
|
+ prop: 'harvestBoxPackingDate',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '退押箱款日期',
|
|
|
+ prop: 'retreatBoxPackingDate',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '客户名称',
|
|
|
+ prop: 'corpCnName',
|
|
|
+ width: "100",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ type: "select",
|
|
|
+ filterable: true,
|
|
|
+ remote: true,
|
|
|
+ dicUrl: "/api/blade-los/bcorps/listByType?shortName={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "cnName",
|
|
|
+ value: "cnName",
|
|
|
+ res: "data.records"
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'MB/L NO',
|
|
|
+ prop: 'mblno',
|
|
|
+ width: "100",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'HB/L NO',
|
|
|
+ prop: 'hblno',
|
|
|
+ width: "100",
|
|
|
+ search: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '船名',
|
|
|
+ prop: 'vesselEnName',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '航次',
|
|
|
+ prop: 'voyageNo',
|
|
|
+ width: "60",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'ETA',
|
|
|
+ prop: 'eta',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: 'ATA',
|
|
|
+ prop: 'actualEta',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '箱型/箱量',
|
|
|
+ prop: 'quantityCntrDescr',
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '应收本币',
|
|
|
+ prop: 'amountDr',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '应收外币',
|
|
|
+ prop: 'amountDrUsd',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '实收本币',
|
|
|
+ prop: 'receivedAmountDr',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '实收外币',
|
|
|
+ prop: 'receivedAmountDrUsd',
|
|
|
+ width: "80",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ }, {
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }, {
|
|
|
+ label: "修改人",
|
|
|
+ prop: "updateUserName",
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ }, {
|
|
|
+ label: "修改日期",
|
|
|
+ prop: "updateTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ data: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ dicSelect,
|
|
|
+ fileUpdate
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(532), this.optionBack);
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ setTimeout(() => {
|
|
|
+ }, 100);
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ allClick(name, row) {
|
|
|
+ if (name == '确认设备单') {
|
|
|
+ this.$confirm("是否确认设备单?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let ids = []
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ ids.push(item.id)
|
|
|
+ }
|
|
|
+ let obj = {
|
|
|
+ ids: ids.join(',')
|
|
|
+ }
|
|
|
+ confirmEquipmentList(obj).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.refreshChange();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (name == '收押箱款') {
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '收押箱款',
|
|
|
+ width: '30%',
|
|
|
+ menuPosition: 'right',
|
|
|
+ option: {
|
|
|
+ submitText: '确定',
|
|
|
+ emptyText: '取消',
|
|
|
+ // labelWidth: 130,
|
|
|
+ column: [
|
|
|
+ // {
|
|
|
+ // label: "押箱金额",
|
|
|
+ // span: 24,
|
|
|
+ // prop: "boxPackingAmount",
|
|
|
+ // type: 'number',
|
|
|
+ // controls: false,
|
|
|
+ // rules: [{
|
|
|
+ // required: true,
|
|
|
+ // message: "",
|
|
|
+ // trigger: "blur",
|
|
|
+ // }],
|
|
|
+ // },
|
|
|
+ {
|
|
|
+ label: "日期",
|
|
|
+ span: 24,
|
|
|
+ prop: "harvestBoxPackingDate",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur",
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ let obj = {
|
|
|
+ id: this.selectionList[0].id,
|
|
|
+ ...res.data
|
|
|
+ }
|
|
|
+ confirmPaymentCollection(obj).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.refreshChange();
|
|
|
+ });
|
|
|
+ res.close()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '退押箱款') {
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: '退押箱款',
|
|
|
+ width: '30%',
|
|
|
+ menuPosition: 'right',
|
|
|
+ option: {
|
|
|
+ submitText: '确定',
|
|
|
+ emptyText: '取消',
|
|
|
+ // labelWidth: 130,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "日期",
|
|
|
+ span: 24,
|
|
|
+ prop: "retreatBoxPackingDate",
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "",
|
|
|
+ trigger: "blur",
|
|
|
+ }],
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ beforeClose: (done) => {
|
|
|
+ done()
|
|
|
+ },
|
|
|
+ callback: (res) => {
|
|
|
+ res.done()
|
|
|
+ let obj = {
|
|
|
+ id: this.selectionList[0].id,
|
|
|
+ ...res.data
|
|
|
+ }
|
|
|
+ confirmRefund(obj).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.refreshChange();
|
|
|
+ });
|
|
|
+ res.close()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '确认换单') {
|
|
|
+ this.$confirm("是否确认换单?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ id: row.id
|
|
|
+ }
|
|
|
+ confirmExchangeOrder(obj).then(res => {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.refreshChange();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (name == '上传附件') {
|
|
|
+ this.$refs.file.openDialog(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ uploadBefore(file, done, loading) {
|
|
|
+ done();
|
|
|
+ loading = true;
|
|
|
+ },
|
|
|
+ // 上传成功
|
|
|
+ onSuccess(res, done, loading, column) {
|
|
|
+ if (res == '操作成功' || res.msg == '操作成功') {
|
|
|
+ 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()}`
|
|
|
+ );
|
|
|
+ },
|
|
|
+ rowEdit(row) {
|
|
|
+
|
|
|
+ },
|
|
|
+ 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);
|
|
|
+ },
|
|
|
+ handleClick() {
|
|
|
+ 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>
|