|
|
@@ -0,0 +1,1081 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <div class="customer-head">
|
|
|
+ <div class="customer-back">
|
|
|
+ <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
|
|
|
+ @click="goBack()">返回列表
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="add-customer-btn">
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editButton"
|
|
|
+ :disabled="showLock || !(roleName.indexOf('admin') != -1 || roleName.indexOf('允许修改他人业务') != -1 || saberUserInfo.user_id == form.createUser)"
|
|
|
+ @click="inEdit">编 辑
|
|
|
+ </el-button>
|
|
|
+ <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
+ :disabled="isSaveBtn || editDisabled" @click.stop="submit">保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
+ :disabled="form.billStatus != '录入'" @click="allClick('提交')">提交
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="form.billStatus == '已提交'" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
+ size="small" @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 != '录入'" @click="application">单据请核
|
|
|
+ </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">
|
|
|
+ <tempalte slot="polCnName">
|
|
|
+ <dic-select v-model="form.polCnName" placeholder="港口" key="id" label="cnName" res="records"
|
|
|
+ :disabled="editDisabled" url="/blade-los/bports/list?status=0" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('polCnName', $event)" :slotRight="true"
|
|
|
+ rightLabel="code"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="podCnName">
|
|
|
+ <dic-select v-model="form.podCnName" placeholder="港口" key="id" label="cnName" res="records"
|
|
|
+ :disabled="editDisabled" url="/blade-los/bports/list?status=0" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('podCnName', $event)" :slotRight="true"
|
|
|
+ rightLabel="code"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="lineCnName">
|
|
|
+ <dic-select v-model="form.lineCnName" placeholder="航线" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/blines/list?status=0" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ @selectChange="dicChange('lineCnName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="成本价">
|
|
|
+ <avue-crud :option="option" :data="form.mktSlotItemList" id="out-table" class="xstable" ref="crud"
|
|
|
+ :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
+ :cell-style="{ height: '20px', padding: '0px' }" @selection-change="selectionChange"
|
|
|
+ @resetColumn="resetColumn('crud', 'option', 'optionBack', 496)"
|
|
|
+ @saveColumn="saveColumn('crud', 'option', 'optionBack', 496)" @row-click="handleRowClick">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
+ @click="allClick('批量删除')">批量删除</el-button>
|
|
|
+ <el-button type="success" size="small" :disabled="!form.id || form.mktSlotItemList.length"
|
|
|
+ @click="allClick('提取运价')">提取运价</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="allClick('生成报价')"
|
|
|
+ :disabled="editDisabled || selectionList.length == 0">生成报价</el-button>
|
|
|
+ <el-button type="danger" size="small" @click="allClick('撤销报价')"
|
|
|
+ :disabled="editDisabled || selectionList.length == 0">撤销报价</el-button>
|
|
|
+ <el-button type="success" size="small" @click="allClick('查看报价')"
|
|
|
+ :disabled="editDisabled || selectionList.length == 0">查看报价</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="销售价">
|
|
|
+ <avue-crud :option="option2" :data="mktSlotQuotationList" id="out-table" ref="crud2"
|
|
|
+ :header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
+ :cell-style="{ height: '20px', padding: '0px' }" @selection-change="selectionChange2"
|
|
|
+ @resetColumn="resetColumn('crud2', 'option2', 'optionBack2', 497)"
|
|
|
+ @saveColumn="saveColumn('crud2', 'option2', 'optionBack2', 497)">
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
+ @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 || selectionList2.length == 0"
|
|
|
+ @click="allClick('批量删除2')">批量删除</el-button>
|
|
|
+ </template>
|
|
|
+ <!-- <template slot="indexHeader" slot-scope="{row,index}">
|
|
|
+ <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle @click="addRow()">
|
|
|
+ </el-button>
|
|
|
+ </template> -->
|
|
|
+ <!-- <template slot="index" slot-scope="{row,index}">
|
|
|
+ <span>{{ index + 1 }}</span>
|
|
|
+ </template> -->
|
|
|
+ </avue-crud>
|
|
|
+ </trade-card>
|
|
|
+ <trade-card title="操作记录">
|
|
|
+ <avue-form :option="optionForm2" v-model="form" ref="form2">
|
|
|
+ </avue-form>
|
|
|
+ </trade-card>
|
|
|
+ </div>
|
|
|
+ <reports :id="form.id" :assemblyForm="form" businessValue="MYDL" ref="report"></reports>
|
|
|
+ <!--审核弹窗-->
|
|
|
+ <el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
|
|
|
+ :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
+ <check-schedule :checkId="checkId" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun"></check-schedule>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import {
|
|
|
+ detail,
|
|
|
+ submit,
|
|
|
+ pleaseCheck,
|
|
|
+ repealCancel,
|
|
|
+ itemRemove,
|
|
|
+ generateQuotation,
|
|
|
+ revokeQuotation,
|
|
|
+ MktSlotQuotation,
|
|
|
+ quotationRemove,
|
|
|
+ submitItemList,
|
|
|
+ submitMktSlot,
|
|
|
+ revokeMktSlot,
|
|
|
+ copyAgent
|
|
|
+} from "@/api/iosBasicData/businessCenter/mkt&slot.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 _ from "lodash";
|
|
|
+import { Header } from "element-ui";
|
|
|
+export default {
|
|
|
+ name: "detailsPage",
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ selectionList: [],
|
|
|
+ selectionList2: [],
|
|
|
+ checkId: '', // 审核需要的id
|
|
|
+ batchNo: '',
|
|
|
+ checkScheduleDialog: false, // 审核弹窗
|
|
|
+ editButton: false,
|
|
|
+ editDisabled: false,
|
|
|
+ form: {
|
|
|
+ mktSlotItemList: []
|
|
|
+ },
|
|
|
+ oldForm: {
|
|
|
+ mktSlotItemList: []
|
|
|
+ },
|
|
|
+ mktSlotQuotationList: [],
|
|
|
+ optionForm: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ // labelWidth: 120,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '起运港',
|
|
|
+ prop: 'polCnName',
|
|
|
+ disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '目的港',
|
|
|
+ prop: 'podCnName',
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '有效日期起',
|
|
|
+ prop: 'effectiveStartDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '有效日期止',
|
|
|
+ prop: 'effectiveEndDate',
|
|
|
+ type: "date",
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '航线',
|
|
|
+ prop: "lineCnName",
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ type: 'textarea',
|
|
|
+ minRows: 2,
|
|
|
+ span: 18
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ optionForm2: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '系统号',
|
|
|
+ prop: 'sysNo',
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '制单人',
|
|
|
+ prop: "createUserName",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '制单日期',
|
|
|
+ prop: "createTime",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修改人',
|
|
|
+ prop: "updateUserName",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '修改日期',
|
|
|
+ prop: "updateTime",
|
|
|
+ disabled: true,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ option: {},
|
|
|
+ optionBack: {
|
|
|
+ height: '400px',
|
|
|
+ // calcHeight: 30,
|
|
|
+ menuWidth: 60,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: 'center',
|
|
|
+ menu: false,
|
|
|
+ index: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: '船公司',
|
|
|
+ prop: 'shippingCompanyCname',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '承运人',
|
|
|
+ prop: 'actualShippingCompanyCname',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '20GP',
|
|
|
+ prop: 'gp20',
|
|
|
+ overHidden: true,
|
|
|
+ width: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '40GP',
|
|
|
+ prop: 'gp40',
|
|
|
+ overHidden: true,
|
|
|
+ width: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '40HC',
|
|
|
+ prop: 'hc40',
|
|
|
+ overHidden: true,
|
|
|
+ width: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '重要指示',
|
|
|
+ prop: 'importantInstructions',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '有效期起',
|
|
|
+ prop: 'effectiveStartDate',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '有效期止',
|
|
|
+ prop: 'effectiveEndDate',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '币别',
|
|
|
+ prop: 'curCode',
|
|
|
+ overHidden: true,
|
|
|
+ width: 60,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '起运港',
|
|
|
+ prop: 'polCnName',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '目的港',
|
|
|
+ prop: 'podCnName',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '航线代码',
|
|
|
+ prop: 'lineCode',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '转船/直达',
|
|
|
+ prop: 'flightType',
|
|
|
+ overHidden: true,
|
|
|
+ width: 90,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '中转港',
|
|
|
+ prop: 'transitPortCname',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '舱位类型',
|
|
|
+ prop: 'cabinType',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '舱位数',
|
|
|
+ prop: 'shippingSpaceNumber',
|
|
|
+ overHidden: true,
|
|
|
+ width: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '限重(吨)',
|
|
|
+ prop: 'weightLimit',
|
|
|
+ overHidden: true,
|
|
|
+ width: 70,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '是否合营',
|
|
|
+ prop: 'whetherJointVenture',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '合作伙伴',
|
|
|
+ prop: 'cooperativePartnerName',
|
|
|
+ overHidden: true,
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '箱属',
|
|
|
+ prop: 'boxBelongsTo',
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true,
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改人",
|
|
|
+ prop: "updateUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改日期",
|
|
|
+ prop: "updateTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '备注',
|
|
|
+ prop: 'remarks',
|
|
|
+ cell: true,
|
|
|
+ width: 150,
|
|
|
+ overHidden: true,
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ option2: {},
|
|
|
+ optionBack2: {
|
|
|
+ height: '200px',
|
|
|
+ // height: 'auto',
|
|
|
+ calcHeight: 30,
|
|
|
+ menuWidth: 60,
|
|
|
+ tip: false,
|
|
|
+ border: true,
|
|
|
+ addBtn: false,
|
|
|
+ viewBtn: false,
|
|
|
+ editBtn: false,
|
|
|
+ delBtn: false,
|
|
|
+ refreshBtn: false,
|
|
|
+ selection: true,
|
|
|
+ align: 'center',
|
|
|
+ menu: false,
|
|
|
+ index: true,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: 'ETD',
|
|
|
+ prop: 'etd',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '星期',
|
|
|
+ prop: 'week',
|
|
|
+ width: 100,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '20GP',
|
|
|
+ prop: 'gp20',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '40GP',
|
|
|
+ prop: 'gp40',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '40HC',
|
|
|
+ prop: 'hc40',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '币别',
|
|
|
+ prop: 'curCode',
|
|
|
+ width: 100,
|
|
|
+ cell: true,
|
|
|
+ type: "select",
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单人",
|
|
|
+ prop: "createUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "制单日期",
|
|
|
+ prop: "createTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改人",
|
|
|
+ prop: "updateUserName",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改日期",
|
|
|
+ prop: "updateTime",
|
|
|
+ type: "date",
|
|
|
+ overHidden: true,
|
|
|
+ width: 120,
|
|
|
+ format: "yyyy-MM-dd",
|
|
|
+ valueFormat: "yyyy-MM-dd HH:mm:ss"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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(496), this.optionBack);
|
|
|
+ this.option2 = await this.getColumnData(this.getColumnName(497), this.optionBack2);
|
|
|
+ this.roleName = localStorage.getItem('roleName').split(',')
|
|
|
+
|
|
|
+ if (this.detailData && this.detailData.id) {
|
|
|
+ // this.editButton = true
|
|
|
+ // this.editDisabled = true
|
|
|
+ // this.optionForm.disabled = true
|
|
|
+ this.getDetail(this.detailData.id)
|
|
|
+ }
|
|
|
+ if (this.$route.query.params) {
|
|
|
+ this.getDetail(this.$route.query.params)
|
|
|
+ }
|
|
|
+ if (this.detailData && this.detailData.copyId) {
|
|
|
+ this.getCopydate(this.detailData.copyId)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ dicChange(name, row) {
|
|
|
+ if (name == 'lineCnName') {
|
|
|
+ if (row) {
|
|
|
+ this.form.lineId = row.id
|
|
|
+ this.form.lineCode = row.code
|
|
|
+ this.form.lineEnName = row.enName
|
|
|
+ } else {
|
|
|
+ this.form.lineId = null
|
|
|
+ this.form.lineCode = null
|
|
|
+ this.form.lineEnName = null
|
|
|
+ this.form.lineCnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'polCnName') {
|
|
|
+ if (row) {
|
|
|
+ this.form.polId = row.id
|
|
|
+ this.form.polCode = row.code
|
|
|
+ this.form.polEnName = row.enName
|
|
|
+ } else {
|
|
|
+ this.form.polId = null
|
|
|
+ this.form.polCode = null
|
|
|
+ this.form.polEnName = null
|
|
|
+ this.form.polCnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'podCnName') {
|
|
|
+ if (row) {
|
|
|
+ this.form.podId = row.id
|
|
|
+ this.form.podCode = row.code
|
|
|
+ this.form.podEnName = row.enName
|
|
|
+ } else {
|
|
|
+ this.form.podId = null
|
|
|
+ this.form.podCode = null
|
|
|
+ this.form.podEnName = null
|
|
|
+ this.form.podCnName = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleRowClick(row) {
|
|
|
+ row.mktSlotQuotationList.forEach(row => {
|
|
|
+ row.$cellEdit = true
|
|
|
+ })
|
|
|
+ this.mktSlotQuotationList = row.mktSlotQuotationList
|
|
|
+ this.$refs.crud2.dicInit();
|
|
|
+ },
|
|
|
+ rowDicChange(name, row, el) { },
|
|
|
+ addRow() {
|
|
|
+ // if (!this.form.id) {
|
|
|
+ // return this.$message.error("请保存数据");
|
|
|
+ // }
|
|
|
+ this.$refs.crud.dicInit();
|
|
|
+ this.form.mktSlotItemList.push({
|
|
|
+ pid: this.form.id,
|
|
|
+ boxEastId: this.form.boxEastId,
|
|
|
+ boxEastName: this.form.boxEastName,
|
|
|
+ boxBelongsTo: this.form.boxBelongsTo,
|
|
|
+ boxClass: this.form.boxClass,
|
|
|
+ boxStatus: '好',
|
|
|
+ boxCondition: this.form.boxCondition,
|
|
|
+ activationDate: this.form.purchaseDate,
|
|
|
+ $cellEdit: true
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ selectionChange(list) {
|
|
|
+ this.selectionList = list;
|
|
|
+ },
|
|
|
+ selectionChange2(list) {
|
|
|
+ this.selectionList2 = list;
|
|
|
+ },
|
|
|
+ getDetail(id) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ detail({ id: id }).then(res => {
|
|
|
+ if (res.data.data.billStatus == '已提交') {
|
|
|
+ // this.editButton = true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ } else {
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
+ }
|
|
|
+ this.form = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getCopydate(id) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ copyAgent({ id: id }).then(res => {
|
|
|
+ this.form = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ inEdit() {
|
|
|
+ this.editButton = false
|
|
|
+ if (this.form.status == '录入') {
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ rowDel(row, index) {
|
|
|
+ this.$confirm("确定删除数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ itemRemove({ ids: row.id }).then(res => {
|
|
|
+ this.form.mktSlotItemList.splice(index, 1);
|
|
|
+ this.$message.success("成功删除");
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.form.mktSlotItemList.splice(index, 1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ allClick(name) {
|
|
|
+ if (name == '提取运价') {
|
|
|
+ let obj = {
|
|
|
+ podId: this.form.polId,
|
|
|
+ destinationId: this.form.podId,
|
|
|
+ effectiveStartDate: this.form.effectiveStartDate,
|
|
|
+ effectiveEndDate: this.form.effectiveEndDate,
|
|
|
+ airlineId: this.form.lineId
|
|
|
+ }
|
|
|
+ MktSlotQuotation(obj).then(res => {
|
|
|
+ res.data.data.forEach(row => {
|
|
|
+ row.pid = this.form.id
|
|
|
+ })
|
|
|
+ this.form.mktSlotItemList = res.data.data
|
|
|
+ this.submit()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '生成报价') {
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.whetherQuotation == 1) {
|
|
|
+ return this.$message.error("已生成报价,请重新选择");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm('是否生成报价?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ mktSlotItemList: this.selectionList,
|
|
|
+ }
|
|
|
+ generateQuotation(obj).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.mktSlotQuotationList = []
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '撤销报价') {
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.whetherQuotation == 0) {
|
|
|
+ return this.$message.error("未生成报价,请重新选择");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm('是否撤销报价?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ mktSlotItemList: this.selectionList,
|
|
|
+ }
|
|
|
+ revokeQuotation(obj).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.mktSlotQuotationList = []
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '一键保存') {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitItemList(this.mktSlotQuotationList).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.mktSlotQuotationList = res.data.data
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '一键编辑') {
|
|
|
+ this.$refs.crud2.dicInit();
|
|
|
+ for (let row of this.mktSlotQuotationList) {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == '批量删除') {
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.whetherQuotation == 1) {
|
|
|
+ return this.$message.error("已生成报价,请重新选择");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionList
|
|
|
+ arr = this.form.mktSlotItemList
|
|
|
+ // 获取有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)'
|
|
|
+ });
|
|
|
+ itemRemove({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '批量删除2') {
|
|
|
+ let multiList = []
|
|
|
+ let arr = []
|
|
|
+ this.$confirm("确定将选择数据删除?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ multiList = this.selectionList2
|
|
|
+ arr = this.mktSlotQuotationList
|
|
|
+ // 获取有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)'
|
|
|
+ });
|
|
|
+ quotationRemove({ ids: arrIds.join(',') }).then(res => {
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '提交') {
|
|
|
+ if (this.form.mktSlotItemList.length == 0) {
|
|
|
+ return this.$message.success("成本价没有数据,请勿提交");
|
|
|
+ }
|
|
|
+ this.$confirm('是否提交?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ids: this.form.id,
|
|
|
+ }
|
|
|
+ submitMktSlot(obj).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.mktSlotQuotationList = []
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (name == '撤销提交') {
|
|
|
+ if (this.form.mktSlotItemList.length == 0) {
|
|
|
+ return this.$message.success("成本价没有数据,请勿撤销提交");
|
|
|
+ }
|
|
|
+ this.$confirm('是否撤销提交?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {
|
|
|
+ ids: this.form.id,
|
|
|
+ }
|
|
|
+ revokeMktSlot(obj).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.mktSlotQuotationList = []
|
|
|
+ this.getDetail(this.form.id)
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ submit(type) {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submit(this.form).then(res => {
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+
|
|
|
+ } else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ application() {
|
|
|
+ this.$confirm("确定请核数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {}
|
|
|
+ obj = {
|
|
|
+ id: this.form.id,
|
|
|
+ url: '/iosBasicData/costcenter/coc/index',
|
|
|
+ pageStatus: '',
|
|
|
+ pageLabel: '航线成本(COC)',
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ pleaseCheck(obj).then(res => {
|
|
|
+ this.$message.success("请核成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ revokeApplication() {
|
|
|
+ this.$confirm("确定撤销请核?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ let obj = {}
|
|
|
+ obj = {
|
|
|
+ id: this.form.id,
|
|
|
+ }
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ repealCancel(obj).then(res => {
|
|
|
+ this.$message.success("撤销请核成功");
|
|
|
+ this.getDetail(res.data.data.id)
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //请核关闭
|
|
|
+ choceScheduleFun() {
|
|
|
+ this.checkScheduleDialog = false
|
|
|
+ },
|
|
|
+ //自定义列保存
|
|
|
+ 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");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ // 监听业务类型 如果不是分单 可以编辑分单号
|
|
|
+ 'form.mktSlotItemList': {
|
|
|
+ // 执行方法
|
|
|
+ handler(oldValue, newValue) {
|
|
|
+ if (this.form.mktSlotItemList.length > 0) {
|
|
|
+ this.optionForm.column.forEach(item => {
|
|
|
+ if (item.prop == 'containerNumber' || item.prop == 'boxCondition') {
|
|
|
+ item.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.optionForm.column.forEach(item => {
|
|
|
+ if (item.prop == 'containerNumber' || item.prop == 'boxCondition') {
|
|
|
+ item.disabled = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+ deep: true, // 深度监听
|
|
|
+ immediate: true // 第一次改变就执行
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</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;
|
|
|
+}
|
|
|
+::v-deep .xstable .el-table__body-wrapper{
|
|
|
+ height: 350px
|
|
|
+}
|
|
|
+.disabledBox {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.meetSize {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #54BCBD;
|
|
|
+}
|
|
|
+</style>
|