| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360 |
- <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="backToList(0)">返回列表
- </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="form.id && editButton" :disabled="form.issueStatus != 'I'" @click="inEdit">编 辑
- </el-button>
- <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
- v-if="!editButton" @click="submit">保 存
- </el-button>
- <el-button type="success" size="small" v-if="form.id && form.issueStatus == 'I'"
- @click="subApplication">放单完成</el-button>
- </div>
- </div>
- <div style="margin-top: 50px">
- <trade-card title="基础信息">
- <avue-form :option="optionForm" v-model="form" ref="form">
- <tempalte slot="corpCnName" slot-scope="{ row }">
- <search-query :datalist="corpData" :selectValue="form.corpCnName" :clearable="true"
- :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择客户"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpFocus="getRemote($event, 'corpCnName')" @remoteMethod="getRemote($event, 'corpCnName')"
- @corpChange="selectChange($event, 'corpCnName')">
- </search-query>
- </tempalte>
- <tempalte slot="carrierCnName" slot-scope="{ row }">
- <search-query :datalist="carrierData" :selectValue="form.carrierCnName" :clearable="true"
- :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择船公司"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpFocus="getRemote($event, 'carrierCnName')"
- @remoteMethod="getRemote($event, 'carrierCnName')"
- @corpChange="selectChange($event, 'carrierCnName')">
- </search-query>
- </tempalte>
- <tempalte slot="vesselCnName" slot-scope="{ row }">
- <search-query :datalist="vesselData" :selectValue="form.vesselCnName" :clearable="true"
- :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择船名"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpFocus="getRemote($event, 'vesselCnName')" @remoteMethod="getRemote($event, 'vesselCnName')"
- @corpChange="selectChange($event, 'vesselCnName')">
- </search-query>
- </tempalte>
- <tempalte slot="polCnName" slot-scope="{ row }">
- <search-query :datalist="polData" :selectValue="form.polCnName" :clearable="true" :buttonIf="false"
- :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择起运港"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpFocus="getRemote($event, 'polCnName')" @remoteMethod="getRemote($event, 'polCnName')"
- @corpChange="selectChange($event, 'polCnName')">
- </search-query>
- </tempalte>
- <tempalte slot="podCnName" slot-scope="{ row }">
- <search-query :datalist="podData" :selectValue="form.podCnName" :clearable="true" :buttonIf="false"
- :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择目的港"
- :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
- @corpFocus="getRemote($event, 'podCnName')" @remoteMethod="getRemote($event, 'podCnName')"
- @corpChange="selectChange($event, 'podCnName')">
- </search-query>
- </tempalte>
- <tempalte slot="runnerName" slot-scope="{ row }">
- <search-query :datalist="runnerData" :selectValue="form.runnerName" :clearable="true"
- :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择跑单"
- :forParameter="{ key: 'id', label: 'name', value: 'name' }"
- @corpFocus="getRemote($event, 'runnerName')" @remoteMethod="getRemote($event, 'runnerName')"
- @corpChange="selectChange($event, 'runnerName')">
- </search-query>
- </tempalte>
- <template slot="unreleaseBillsLabel">
- <el-button type="primary" size="small" plain
- :disabled="!form.id || form.issueStatus != 'I' || editButton"
- @click="subsequentAb">后续有货</el-button>
- </template>
- </avue-form>
- <div style="display: flex;justify-content: flex-end;">
- <el-button type="primary" size="small" :disabled="editButton || form.releaseBillList.length > 0"
- @click="queryDetails">检索</el-button>
- <el-button plain size="small" :disabled="editButton || form.id" @click="reset">重置</el-button>
- <el-button type="danger" size="small" :disabled="editButton || selectionList.length == 0"
- @click="del">删除</el-button>
- </div>
- </trade-card>
- <trade-card title="明细信息">
- <avue-crud :option="optionContacts" :data="form.releaseBillList" v-model="formContacts"
- @selection-change="selectionChange"></avue-crud>
- </trade-card>
- </div>
- </div>
- </template>
- <script>
- import {
- getDetails,
- submit,
- releaseApplication,
- getListByType,
- getBvessels,
- getBports,
- getRunner,
- itemsRemove,
- application,
- revokeApplication,
- signcomplete,
- revokeSigncomplete,
- subsequentAvailability
- } from "@/api/iosBasicData/release/releaseManagement";
- import reportDialog from "@/components/report-dialog/main";
- import { dateFormat } from "@/util/date";
- import checkSchedule from "@/components/checkL/checkSchedule";
- import check from "@/components/checkL/check";
- // import commodityxsho from '../../configuration/commodityxsho.json'
- import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
- import _ from "lodash";
- export default {
- name: "detailsPage",
- data() {
- return {
- selectionList: [],
- runnerData: [],
- podData: [],
- polData: [],
- vesselData: [],
- carrierData: [],
- corpData: [],
- reportName: '轮胎商城-销售退货', // 打印传的名字
- SelectSearch: {}, // 添加商品检索
- // 编辑还是保存
- mingxibaocun: true,
- // 批次号请求到的数据
- picihaolist: [],
- // 添加商品弹窗
- dialogVisible: false,
- // 弹窗高度
- rowHeight: '',
- // 左侧选择搜索
- treeDataGoods: [],
- treeDeptId: '',
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- pageSizes: [10, 50, 100, 300, 500]
- },
- // 表格需要的配置
- // optionTwo: commodityxsho,
- loading: false,
- // 商品列表数据合计
- goodsListShow: [],
- // 商品列表暂存
- goodsListSave: [],
- saveLoading: false,
- commodityData: false,
- surplusRouteQuantityOption: [],
- tableData: [],
- // tabs切换
- activeNameTabs: 'searchList',
- data: [],
- inventory: 0,
- isStatus: 1,
- goodsIdoptions: [],
- dataList: [],
- dicUrlWithCustomId: '',
- sharedCompanyId: 0,
- isAddBtn: true, // 添加商品的是否禁用
- isSaveBtn: false, // 大保存的是否禁用
- viewDisabled: false, // 大审批的是否禁用
- isAdd: false, // 表格按钮的是否点击
- editButton: false, // 大编辑大隐藏显示
- isEditButton: false, // 大编辑是否禁用
- goods: [],
- isDisabled: false, // 表格删除的是否禁用
- isDisabledTask: false, // 撤销任务和生成任务的是否禁用
- contactsOption: [],
- isContacts: false, // 表单的联系人是否禁用
- checkData: {},
- buttonText: '生成任务', // 生成任务和撤销任务文本
- buttonColor: 'success', // 初始颜色为success 生成任务和撤销任务颜色状态
- checkScheduleDialog: false, // 审批进度的弹窗开启关闭
- isApplySettlement: true, // 申请退款的是否禁用
- isConfirmRefundBtn: true, // 确认退款的是否禁用
- isExamineBtn: true, // 审批是否禁用
- isRevocationRequest: true, // 撤销审核是否禁用
- checkDialog: false, // 审核弹窗的开启关闭
- checkId: '',
- batchNo: '',
- switchDialog: false, // 打印弹窗的开启和关闭
- activeName: "sale_detail",
- disabled: false, // 表格按钮的禁用
- key: 0,
- form: {
- createUser: JSON.parse(localStorage.getItem("saber-userInfo")) ? JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id : null,
- createUserName: JSON.parse(localStorage.getItem("saber-userInfo")) ? JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name : null,
- corpCnName: null,
- carrierCnName: null,
- vesselCnNam: null,
- polCnName: null,
- podCnName: null,
- runnerName: null,
- workType: 'RELEASE',
- businessType: 'SE',
- // issueStatus: 'N',
- isSwtich: 0,
- releaseBillList: []
- },
- customerData: [], // 客户数据
- optionForm: {
- menuBtn: false,
- span: 6,
- labelWidth: 120,
- disabled: false,
- column: [
- {
- label: '单据编号',
- prop: "billNo",
- disabled: true,
- span: 5
- },
- {
- label: '单据日期',
- prop: "billDate",
- disabled: true,
- type: "datetime",
- value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- span: 5
- },
- {
- label: "制单人",
- prop: "createUserName",
- disabled: true,
- span: 5
- },
- {
- label: '放单时间',
- prop: "releaseTime",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm",
- valueFormat: "yyyy-MM-dd HH:mm",
- span: 5
- },
- {
- label: '工作类型',
- prop: "workType",
- type: "select",
- disabled: true,
- dicData: [{
- id: "RELEASE",
- name: "放单",
- }],
- props: {
- label: "name",
- value: "id",
- },
- span: 4
- },
- // {
- // label: '状态',
- // prop: "issueStatus",
- // type: "select",
- // disabled: true,
- // dicData: [{
- // id: 'N',
- // name: "新建",
- // }, {
- // id: 'S',
- // name: "提交",
- // }, {
- // id: 'I',
- // name: "跑单中",
- // }, {
- // id: 'O',
- // name: "操作确认",
- // }, {
- // id: 'D',
- // name: "调度确认",
- // }, {
- // id: 'T',
- // name: "放单",
- // }, {
- // id: 'B',
- // name: "退回",
- // }],
- // props: {
- // label: "name",
- // value: "id",
- // },
- // span: 4
- // },
- {
- label: '客户',
- prop: "corpCnName",
- overHidden: true,
- formslot: true,
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- span: 6
- },
- {
- label: '是否VIP',
- prop: "vip",
- type: 'select',
- disabled: true,
- filterable: true,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- props: {
- label: 'label',
- value: 'value',
- },
- span: 6
- },
- {
- label: '业务类型',
- prop: "businessType",
- type: "select",
- dicData: [{
- id: "SE",
- name: "海运出口",
- }, {
- id: "SI",
- name: "海运进口",
- }],
- props: {
- label: "name",
- value: "id",
- },
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- span: 6
- },
- {
- label: '提单号',
- prop: "mblno",
- },
- {
- label: '信誉等级',
- prop: "vipLevel",
- type: 'select',
- disabled: true,
- filterable: true,
- remote: true,
- props: {
- label: 'dictValue',
- value: 'dictKey',
- res: 'data'
- },
- dicUrl: '/api/blade-system/dict-biz/dictionary?code=bcorps-credit-level',
- span: 6
- },
- {
- label: '结算方式',
- prop: "stlMode",
- type: "select",
- dicData: [{
- id: 0,
- name: "票结",
- }, {
- id: 1,
- name: "月结",
- }],
- props: {
- label: "name",
- value: "id",
- },
- span: 6
- },
- {
- label: '船公司',
- prop: "carrierCnName",
- overHidden: true,
- formslot: true,
- disabled: false,
- span: 12
- // type: 'select',
- // filterable: true,
- // remote: true,
- // dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
- // props: {
- // label: 'cnName',
- // value: 'id',
- // res: 'data.records'
- // },
- },
- {
- label: '协议生效日期',
- prop: "effectiveDate",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm",
- valueFormat: "yyyy-MM-dd HH:mm",
- span: 6
- },
- {
- label: '协议失效期限',
- prop: "expiringDate",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm",
- valueFormat: "yyyy-MM-dd HH:mm",
- span: 6
- },
- {
- label: 'ETD开始日期',
- prop: "dateFrom",
- type: "datetime",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 00:00",
- span: 4
- },
- {
- label: 'ETD结束日期',
- prop: "dateTo",
- type: "datetime",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd 23:59",
- span: 6
- },
- {
- label: 'RMB限额',
- prop: "amountCny",
- span: 6
- },
- {
- label: 'USD限额',
- prop: "amountUsd",
- span: 6
- },
- {
- label: '船名',
- prop: "vesselCnName",
- overHidden: true,
- formslot: true,
- disabled: false,
- // type: 'select',
- // filterable: true,
- // remote: true,
- // dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
- // props: {
- // label: 'cnName',
- // value: 'id',
- // res: 'data.records'
- // },
- },
- {
- label: '船次',
- prop: "voyageNo",
- span: 6
- },
- {
- label: 'RMB未收',
- prop: "unstlDrCny",
- span: 6
- },
- {
- label: 'USD未收',
- prop: "unstlDrUsd",
- span: 6
- },
- {
- label: '起运港',
- prop: "polCnName",
- overHidden: true,
- formslot: true,
- disabled: false,
- // type: 'select',
- // filterable: true,
- // remote: true,
- // dicUrl: "/api/blade-los/bports/list?enName?cnName={{key}}",
- // props: {
- // label: 'cnName',
- // value: 'id',
- // res: 'data.records'
- // },
- },
- {
- label: '目的港',
- prop: "podCnName",
- overHidden: true,
- formslot: true,
- disabled: false,
- // filterable: true,
- // remote: true,
- // dicUrl: "/api/blade-los/bports/list?enName?cnName={{key}}",
- // props: {
- // label: 'cnName',
- // value: 'id',
- // res: 'data.records'
- // }
- },
- {
- label: '限额合计',
- prop: "amountTotal",
- span: 6
- },
- {
- label: '合计未收',
- prop: "unstlDrTotal",
- span: 6
- },
- {
- label: '已生成账单未放单',
- prop: "unplacedOrders",
- type: 'select',
- disabled: true,
- filterable: true,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- props: {
- label: 'label',
- value: 'value',
- },
- span: 6
- },
- {
- label: '换签',
- prop: "isSwtich",
- type: 'select',
- disabled: false,
- filterable: true,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- props: {
- label: 'label',
- value: 'value',
- },
- },
- {
- label: '协议编号',
- prop: "agreementNo",
- span: 6
- },
- {
- label: '款已到账',
- prop: "isAmountReceived",
- type: 'select',
- disabled: false,
- filterable: true,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- props: {
- label: 'label',
- value: 'value',
- },
- },
- {
- label: '单票限额',
- prop: "limitAmountPerBill",
- span: 6
- },
- {
- label: '放单方式',
- prop: "releaseType",
- type: 'select',
- disabled: false,
- filterable: true,
- dicData: [{
- label: '自取',
- value: 0
- }, {
- label: '送单',
- value: 1
- }, {
- label: '寄送,',
- value: 2
- }],
- props: {
- label: 'label',
- value: 'value',
- },
- },
- {
- label: '单票超额业务',
- prop: "overLimitBills",
- type: 'textarea',
- disabled: false,
- span: 12,
- minRows: 2
- },
- {
- label: '后续有货',
- prop: "unreleaseBills",
- type: 'textarea',
- disabled: false,
- span: 12,
- minRows: 2
- }]
- },
- formContacts: {},
- optionContacts: {
- disabled: false,
- border: true,
- align: 'center',
- index: true,
- refreshBtn: false,
- addBtn: false,
- // 航编辑开启
- cellBtn: true,
- span: 8,
- height: 500,
- addRowBtn: false,
- editBtn: false,
- delBtn: false,
- menuWidth: 120,
- menu: false,
- tip: false,
- showSummary: true,
- selection: true,
- column: [
- {
- label: '放单信息',
- overHidden: true,
- disabled: false,
- children: [{
- label: '业务编号',
- prop: 'billNo',
- overHidden: true,
- display: false
- }, {
- label: 'MBL NO',
- prop: 'mblno',
- overHidden: true,
- display: false
- }, {
- label: 'HBL NO',
- prop: 'hblno',
- overHidden: true,
- display: false
- },
- {
- label: '提单份数',
- prop: 'numberOfObl',
- overHidden: true,
- display: false
- }, {
- label: '签单',
- prop: '',
- overHidden: true,
- display: false
- }, {
- label: '放单',
- prop: '',
- overHidden: true,
- display: false
- }]
- },
- {
- label: '有船公司账单',
- prop: '',
- width: 160,
- disabled: false,
- remote: true,
- overHidden: true,
- },
- {
- label: '产生账单',
- prop: 'isAccbill',
- width: 120,
- disabled: false,
- remote: true,
- overHidden: true,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- },
- {
- label: 'RMB',
- overHidden: true,
- disabled: false,
- children: [{
- label: '应收',
- prop: 'amountDrCny',
- overHidden: true,
- display: false
- }, {
- label: '签收',
- prop: 'signForCny',
- overHidden: true,
- display: false
- }, {
- label: '未收',
- prop: 'unstlDrCny',
- overHidden: true,
- display: false
- }]
- },
- {
- label: 'USD',
- overHidden: true,
- disabled: false,
- children: [{
- label: '应收',
- prop: 'amountDrUsd',
- overHidden: true,
- display: false
- }, {
- label: '签收',
- prop: 'signForUsd',
- overHidden: true,
- display: false
- }, {
- label: '未收',
- prop: 'unstlDrUsd',
- overHidden: true,
- display: false
- }]
- },
- {
- label: '合计',
- overHidden: true,
- disabled: false,
- children: [{
- label: '应收',
- prop: 'amountDrTotal',
- overHidden: true,
- display: false
- }, {
- label: '未收',
- prop: 'unstlDrTotal',
- overHidden: true,
- display: false
- }]
- },
- // {
- // label: '发票号*',
- // prop: '',
- // disabled: false,
- // remote: true,
- // overHidden: true,
- // },
- {
- label: '单票超额费用',
- overHidden: true,
- disabled: false,
- children: [{
- label: '是否',
- prop: 'isOverLimit',
- overHidden: true,
- display: false,
- dicData: [{
- label: '否',
- value: 0
- }, {
- label: '是',
- value: 1
- }],
- }, {
- label: '金额',
- prop: 'overAmountDr',
- overHidden: true,
- display: false
- }]
- },
- {
- label: '业务信息',
- overHidden: true,
- disabled: false,
- children: [
- {
- label: '客户简称',
- prop: 'corpCnName',
- overHidden: true,
- }, {
- label: '船公司',
- prop: 'carrierCnName',
- overHidden: true,
- display: false
- }, {
- label: 'ETD',
- prop: 'etd',
- overHidden: true,
- display: false
- }, {
- label: 'VSL',
- prop: 'vesselCnName',
- overHidden: true,
- display: false
- }, {
- label: 'VOY',
- prop: 'voyageNo',
- overHidden: true,
- display: false
- }]
- },
- {
- label: '备注',
- prop: 'remarks',
- width: 100,
- disabled: false,
- remote: true,
- overHidden: true,
- },
- {
- label: '签单信息',
- overHidden: true,
- disabled: false,
- children: [{
- label: '要求时间',
- prop: 'requireTime',
- overHidden: true,
- display: false
- }, {
- label: '完成时间',
- prop: 'releaseTime',
- overHidden: true,
- display: false
- }, {
- label: '紧急程度',
- prop: 'itemLevel',
- overHidden: true,
- width: 120,
- dicData: [{
- label: '普通',
- value: 0
- }, {
- label: '一级',
- value: 1
- }, {
- label: '二级',
- value: 2
- }, {
- label: '三级',
- value: 3
- }],
- }]
- },
- {
- label: '换签次数',
- prop: 'swtichCount',
- width: 100,
- disabled: false,
- remote: true,
- overHidden: true,
- },
- {
- label: '换签原因',
- prop: 'swtichReason',
- width: 100,
- disabled: false,
- remote: true,
- overHidden: true,
- },
- {
- label: '单据类型',
- prop: 'billType',
- width: 100,
- disabled: false,
- remote: true,
- overHidden: true,
- dicData: [{
- label: '直单',
- value: 'DD'
- }, {
- label: '主单',
- value: 'MM'
- }, {
- label: '主分单',
- value: 'MH'
- }, {
- label: '从分单',
- value: 'HH'
- }],
- },
- ]
- },
- selectionMultilist: [], // 多选数据
- }
- },
- components: { SearchQuery, reportDialog, check, checkSchedule },
- props: {
- onLoad: Object,
- detailData: Object
- },
- async created() {
- if (this.detailData.id) {
- this.editButton = true
- this.optionForm.disabled = true
- this.getDetail(this.detailData.id)
- }
- },
- methods: {
- selectionChange(list) {
- this.selectionList = list
- },
- selectChange(val, name) {
- console.log(val, name)
- if (val) {
- if (name == 'corpCnName') {
- this.corpData.forEach(e => {
- if (e.cnName == val) {
- this.form.corpId = e.id
- this.form.corpCnName = e.cnName
- this.form.corpEnName = e.enName
- this.form.vip = e.vip
- this.form.vipLevel = e.creditLevel
- }
- })
- }
- if (name == 'carrierCnName') {
- this.carrierData.forEach(e => {
- if (e.cnName == val) {
- this.form.carrierId = e.id
- this.form.carrierCnName = e.cnName
- this.form.carrierEnName = e.enName
- }
- })
- }
- if (name == 'vesselCnName') {
- this.vesselData.forEach(e => {
- if (e.cnName == val) {
- this.form.vesselId = e.id
- this.form.vesselCnName = e.cnName
- this.form.vesselEnName = e.enName
- }
- })
- }
- if (name == 'polCnName') {
- this.polData.forEach(e => {
- if (e.cnName == val) {
- this.form.polId = e.id
- this.form.polCnName = e.cnName
- this.form.polEnName = e.enName
- }
- })
- }
- if (name == 'podCnName') {
- this.podData.forEach(e => {
- if (e.cnName == val) {
- this.form.podId = e.id
- this.form.podCnName = e.cnName
- this.form.podEnName = e.enName
- }
- })
- }
- if (name == 'runnerName') {
- this.runnerData.forEach(e => {
- if (e.name == val) {
- this.form.runnerId = e.id
- this.form.runnerName = e.name
- }
- })
- }
- } else {
- if (name == 'corpCnName') {
- this.form.corpId = null
- this.form.corpCnName = null
- this.form.corpEnName = null
- this.form.vip = null
- this.form.vipLevel = null
- }
- if (name == 'carrierCnName') {
- this.form.carrierId = null
- this.form.carrierCnName = null
- this.form.carrierEnName = null
- }
- if (name == 'vesselCnName') {
- this.form.vesselId = null
- this.form.vesselCnName = null
- this.form.vesselEnName = null
- }
- if (name == 'polCnName') {
- this.form.polId = null
- this.form.polCnName = null
- this.form.polEnName = null
- }
- if (name == 'podCnName') {
- this.form.podId = null
- this.form.podCnName = null
- this.form.podEnName = null
- }
- if (name == 'runnerName') {
- this.form.runnerId = null
- this.form.runnerName = null
- }
- }
- },
- getRemote(val, name) {
- if (name == 'corpCnName') {
- getListByType({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
- this.corpData = res.data.data.records
- })
- }
- if (name == 'carrierCnName') {
- getListByType({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
- this.carrierData = res.data.data.records
- })
- }
- if (name == 'vesselCnName') {
- getBvessels({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
- this.vesselData = res.data.data.records
- })
- }
- if (name == 'polCnName') {
- getBports({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
- this.polData = res.data.data.records
- })
- }
- if (name == 'podCnName') {
- getBports({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
- this.podData = res.data.data.records
- })
- }
- if (name == 'runnerName') {
- getRunner({ roles: '跑单员', name: val ? val : null }).then(res => {
- this.runnerData = res.data.data
- })
- }
- },
- queryDetails() {
- 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)'
- });
- let obj = {}
- this.form.releaseBillList = []
- if (this.form.businessType == 'SE') {
- obj = {
- businessType: this.form.businessType,
- mblno: this.form.mblno,
- carrierId: this.form.carrierId,
- vesselId: this.form.vesselId,
- voyageNo: this.form.voyageNo,
- polId: this.form.polId,
- podId: this.form.podId,
- corpId: this.form.corpId,
- bookingNo: this.form.bookingNo,
- dateFrom: this.form.dateFrom,
- dateTo: this.form.dateTo,
- isSwtich: this.form.isSwtich
- }
- } else if (this.form.businessType == 'SI') {
- obj = {
- businessType: this.form.businessType,
- mblno: this.form.mblno,
- carrierId: this.form.carrierId,
- vesselId: this.form.vesselId,
- voyageNo: this.form.voyageNo,
- polId: this.form.polId,
- podId: this.form.podId,
- corpId: this.form.corpId,
- bookingNo: this.form.bookingNo,
- dateFrom: this.form.dateFrom,
- dateTo: this.form.dateTo,
- isSwtich: this.form.isSwtich
- }
- }
- releaseApplication(obj).then(res => {
- this.form.releaseBillList = res.data.data
- this.$message.success("查询成功");
- }).finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- reset() {
- this.form = this.$options.data().form
- },
- del() {
- if (this.form.id) {
- let ids = []
- this.selectionList.forEach(e => {
- ids.push(e.id)
- })
- console.log(ids.join(','))
- itemsRemove({ ids: ids.join(',') }).then(res => {
- this.form.releaseBillList = this.form.releaseBillList.filter(e => !this.selectionList.includes(e))
- this.selectionList = []
- this.$message.success("删除成功");
- })
- } else {
- this.form.releaseBillList = this.form.releaseBillList.filter(e => !this.selectionList.includes(e))
- this.selectionList = []
- this.$message.success("删除成功");
- }
- },
- //表头编辑
- inEdit() {
- this.editButton = false
- this.optionForm.disabled = false
- },
- subsequentAb() {
- this.$confirm('是否继续操作?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- subsequentAvailability(this.form).then(res => {
- if (Object.keys(res.data.data).length) {
- this.form.unreleaseBills = '票数:' + res.data.data.number + '\n' + res.data.data.text
- }
- })
- }).catch(() => {
- });
- },
- //修改提交触发
- submit() {
- 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)'
- });
- let obj = {}
- let val = 0
- val = this.form.releaseBillList.filter(e => e.preleaseId)
- if (val.length > 0) {
- obj = {
- billNoFormat: 'FD',
- businessTypeCode: 'FD',
- ...this.form,
- billType: "R"
- }
- submit(obj).then(res => {
- this.form = res.data.data
- this.$message.success("保存成功");
- this.editButton = true;
- this.optionForm.disabled = true
- }).finally(() => {
- loading.close();
- });
- } else {
- if (this.selectionList.length > 0) {
- if (this.selectionList.length > 0) {
- this.form.releaseBillList = this.selectionList
- obj = {
- billNoFormat: 'FD',
- businessTypeCode: 'FD',
- ...this.form,
- billType: "R"
- }
- submit(obj).then(res => {
- this.form = res.data.data
- this.$message.success("保存成功");
- this.editButton = true;
- this.optionForm.disabled = true
- }).finally(() => {
- loading.close();
- });
- } else {
- loading.close();
- this.$message.error("请选择明细");
- }
- } else {
- obj = {
- billNoFormat: 'FD',
- businessTypeCode: 'FD',
- ...this.form,
- billType: "R"
- }
- submit(obj).then(res => {
- this.form = res.data.data
- this.$message.success("保存成功");
- }).finally(() => {
- loading.close();
- });
- }
- }
- } else {
- return false;
- }
- });
- },
- subApplication() {
- 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)'
- });
- application(this.form).then(res => {
- this.form = res.data.data
- this.$message.success("提交成功");
- this.editButton = true;
- this.optionForm.disabled = true
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- revokeApp() {
- 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)'
- });
- revokeApplication(this.form).then(res => {
- this.form = res.data.data
- this.$message.success("撤销成功");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- submitSign() {
- 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)'
- });
- signcomplete(this.form).then(res => {
- this.form = res.data.data
- this.$message.success("签单成功");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- revokeSign() {
- 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)'
- });
- revokeSigncomplete(this.form).then(res => {
- this.form = res.data.data
- this.$message.success("取消成功");
- this.getDetail(this.form.id)
- }).finally(() => {
- loading.close();
- });
- } else {
- return false;
- }
- });
- },
- getDetail(id, type) {
- const loading = this.$loading({
- lock: true,
- text: '加载中',
- spinner: 'el-icon-loading',
- background: 'rgba(255,255,255,0.7)'
- })
- getDetails({ id: id }).then(res => {
- this.form = res.data.data
- loading.close();
- }).catch(() => {
- loading.close();
- })
- },
- //自定义列保存
- async saveColumnTwo(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;
- }
- },
- //自定义列重置
- async resetColumnTwo(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;
- }
- },
- backToList(type) {
- this.$emit("backToList", type);
- },
- // 弹框的重置
- resetCrud() {
- this.$message.success("重置成功");
- },
- // 弹窗的保存
- saveCrud() {
- this.$message.success("保存成功");
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep .el-form-item {
- margin-bottom: 8px !important;
- }
- </style>
|