|
|
@@ -13,13 +13,20 @@
|
|
|
<el-button v-if="roleName.indexOf('admin') != -1" size="small" style="margin-right: 8px"
|
|
|
:disabled="!form.id" @click="$refs.report.openDialog()">报表设计
|
|
|
</el-button> -->
|
|
|
+ <el-button class="el-button--small-yh" style="margin-left: 6px;" type="danger" size="small"
|
|
|
+ @click="allClick('预定订舱')">预定订舱
|
|
|
+ </el-button>
|
|
|
<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" @click="submit">保 存
|
|
|
+ :disabled="isSaveBtn || form.issueStatus == 1" @click="submit">保 存
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
+ :disabled="form.issueStatus == 1" @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>
|
|
|
@@ -81,10 +88,10 @@
|
|
|
:slotRight="true" rightLabel="code"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="actualShippingCompanyCname">
|
|
|
- <dic-select v-model="form.actualShippingCompanyCname" placeholder="承运人" key="id" label="shortName" res="records"
|
|
|
- url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true" :remote="true"
|
|
|
- dataName="shortName" @selectChange="dicChange('actualShippingCompanyCname', $event)" :slotRight="true"
|
|
|
- rightLabel="code" :disabled="editDisabled"></dic-select>
|
|
|
+ <dic-select v-model="form.actualShippingCompanyCname" placeholder="承运人" key="id" label="shortName"
|
|
|
+ res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
|
|
|
+ :remote="true" dataName="shortName" @selectChange="dicChange('actualShippingCompanyCname', $event)"
|
|
|
+ :slotRight="true" rightLabel="code" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="hpaymode">
|
|
|
<dic-select v-model="form.hpaymode" placeholder="付款方式" key="dictKey" label="dictValue" keyValue="dictKey"
|
|
|
@@ -97,15 +104,21 @@
|
|
|
dataName="cnName" @selectChange="dicChange('serviceTerms', $event)" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="packingUnit">
|
|
|
- <dic-select v-model="form.packingUnit" placeholder="目的港" key="id" label="cnName" res="records"
|
|
|
+ <dic-select v-model="form.packingUnit" placeholder="包装" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bpackages/list?current=1&size=5&status=0&whetherDg=0" :filterable="true" :remote="true"
|
|
|
dataName="cnName" @selectChange="dicChange('packingUnit', $event)" :disabled="editDisabled"
|
|
|
:slotRight="true" rightLabel="code"></dic-select>
|
|
|
</tempalte>
|
|
|
- <tempalte slot="vesselCnName">
|
|
|
+ <!-- <tempalte slot="vesselCnName">
|
|
|
<dic-select v-model="form.vesselCnName" placeholder="船名" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bvessels/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
@selectChange="dicChange('vesselCnName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ </tempalte> -->
|
|
|
+ <tempalte slot="bookingAgentCnName">
|
|
|
+ <dic-select v-model="form.bookingAgentCnName" placeholder="订舱代理" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=国外同行及代理" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('bookingAgentCnName', $event)" :slotRight="true"
|
|
|
+ rightLabel="code" :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
@@ -116,12 +129,12 @@
|
|
|
@row-update="rowUpdate" @resetColumn="resetColumn('crud', 'option', 'optionBack', 499)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 499)">
|
|
|
<template slot="menuLeft">
|
|
|
- <!-- <el-button type="info" plain size="small" :disabled="editDisabled"
|
|
|
+ <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 || selectionList.length == 0"
|
|
|
- @click="allClick('批量删除')">批量删除</el-button> -->
|
|
|
+ @click="allClick('批量删除')">批量删除</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()">
|
|
|
@@ -130,6 +143,13 @@
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
|
</template>
|
|
|
+ <tempalte slot="cntrTypeCodeForm" slot-scope="{row,index}">
|
|
|
+ <dic-select v-if="row.$cellEdit" v-model="row.cntrTypeCode" placeholder="箱型" key="id" label="cnName"
|
|
|
+ res="records" url="/blade-los/bcntrtypes/list?current=1&size=5" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="rowDicChange('cntrTypeCode', $event, row)" :slotRight="true"
|
|
|
+ rightLabel="code"></dic-select>
|
|
|
+ <span v-else>{{ row.corpCnName }}</span>
|
|
|
+ </tempalte>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
<trade-card title="操作记录">
|
|
|
@@ -147,7 +167,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, submitItemList, copyAgent, itemRemove, pleaseCheck, repealCancel } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
+import { submit, getDetail, submitBookingCabin, sendMessageBooking, copyAgent, pleaseCheck, repealCancel, submitItemList, itemRemove } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
import { losbfeestemplateGetListTemplate } from "@/api/iosBasicData/bills";
|
|
|
import { losbfeestemplateDetail } from "@/api/iosBasicData/losbfeestemplate";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
@@ -227,6 +247,9 @@ export default {
|
|
|
branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
|
|
|
operatorName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
|
|
|
operatorId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id,
|
|
|
+ businessType: 'YDC',
|
|
|
+ billNoFormat: 'YDC',
|
|
|
+ businessTypeCode: 'YDC',
|
|
|
preContainersList: [],
|
|
|
},
|
|
|
polFeeList: [],
|
|
|
@@ -315,6 +338,11 @@ export default {
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd 00:00:00",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '付费方式',
|
|
|
@@ -324,6 +352,12 @@ export default {
|
|
|
{
|
|
|
label: '箱属',
|
|
|
prop: "boxBelongsTo",
|
|
|
+ type: 'select',
|
|
|
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxBelongsTo",
|
|
|
+ props: {
|
|
|
+ label: "dictValue",
|
|
|
+ value: "dictValue"
|
|
|
+ },
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
@@ -353,6 +387,11 @@ export default {
|
|
|
label: '毛重(KGS)',
|
|
|
prop: "grossWeight",
|
|
|
disabled: false,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: '尺码(CBM)',
|
|
|
@@ -373,24 +412,40 @@ export default {
|
|
|
span: 2
|
|
|
},
|
|
|
{
|
|
|
+ label: '订舱备注',
|
|
|
+ prop: "remarks",
|
|
|
+ type: 'textarea',
|
|
|
+ disabled: false,
|
|
|
+ span: 24,
|
|
|
+ minRows: 2,
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ optionForm2: {
|
|
|
+ menuBtn: false,
|
|
|
+ span: 6,
|
|
|
+ disabled: false,
|
|
|
+ labelWidth: 100,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
label: 'MB/L NO',
|
|
|
prop: "mblno",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
},
|
|
|
{
|
|
|
label: '船名',
|
|
|
prop: "vesselCnName",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
},
|
|
|
{
|
|
|
label: '航次',
|
|
|
prop: "voyageNo",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
},
|
|
|
{
|
|
|
label: '截单日期',
|
|
|
prop: "cyTrailerTime",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
@@ -398,27 +453,11 @@ export default {
|
|
|
{
|
|
|
label: '截港日期',
|
|
|
prop: "cyReturnTime",
|
|
|
- disabled: false,
|
|
|
+ disabled: true,
|
|
|
type: "date",
|
|
|
format: "yyyy-MM-dd",
|
|
|
valueFormat: "yyyy-MM-dd HH:mm:ss",
|
|
|
},
|
|
|
- {
|
|
|
- label: '订舱备注',
|
|
|
- prop: "remarks",
|
|
|
- type: 'textarea',
|
|
|
- disabled: false,
|
|
|
- span: 24,
|
|
|
- minRows: 2,
|
|
|
- },
|
|
|
- ]
|
|
|
- },
|
|
|
- optionForm2: {
|
|
|
- menuBtn: false,
|
|
|
- span: 6,
|
|
|
- disabled: false,
|
|
|
- labelWidth: 100,
|
|
|
- column: [
|
|
|
// {
|
|
|
// label: '系统号',
|
|
|
// prop: "businessNo",
|
|
|
@@ -474,6 +513,8 @@ export default {
|
|
|
prop: "cntrTypeCode",
|
|
|
overHidden: true,
|
|
|
cell: true,
|
|
|
+ slot: true,
|
|
|
+ formslot: true,
|
|
|
rules: [
|
|
|
{
|
|
|
required: true,
|
|
|
@@ -535,7 +576,20 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- dicChange(name, row) {
|
|
|
+ rowDicChange(name, row, el, index) {
|
|
|
+ if (name == 'cntrTypeCode') {
|
|
|
+ if (row) {
|
|
|
+ el.cntrTypeCodeId = row.id
|
|
|
+ el.teu = row.teu
|
|
|
+ } else {
|
|
|
+ el.cntrTypeCodeId = null
|
|
|
+ el.cntrTypeCode = null
|
|
|
+ el.teu = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ,
|
|
|
+ dicChange(name, row) {
|
|
|
if (name == 'branchName') {
|
|
|
if (row) {
|
|
|
this.form.branchId = row.id
|
|
|
@@ -617,14 +671,26 @@ export default {
|
|
|
this.form.actualShippingCompanyAbbreviation = null
|
|
|
}
|
|
|
}
|
|
|
- if (name == 'vesselCnName') {
|
|
|
+ // if (name == 'vesselCnName') {
|
|
|
+ // if (row) {
|
|
|
+ // this.form.vesselId = row.id
|
|
|
+ // this.form.vesselEnName = row.enName
|
|
|
+ // } else {
|
|
|
+ // this.form.vesselId = null
|
|
|
+ // this.form.vesselEnName = null
|
|
|
+ // this.form.vesselCnName = null
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (name == 'bookingAgentCnName') {
|
|
|
if (row) {
|
|
|
- this.form.vesselId = row.id
|
|
|
- this.form.vesselEnName = row.enName
|
|
|
+ this.form.bookingAgentId = row.id
|
|
|
+ this.form.bookingAgentEnName = row.enName
|
|
|
+ this.form.bookingRemarks = row.remarks
|
|
|
} else {
|
|
|
- this.form.vesselId = null
|
|
|
- this.form.vesselEnName = null
|
|
|
- this.form.vesselCnName = null
|
|
|
+ this.form.bookingAgentId = null
|
|
|
+ this.form.bookingAgentEnName = null
|
|
|
+ this.form.bookingAgentCnName = null
|
|
|
+ this.form.bookingRemarks = null
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -654,11 +720,11 @@ export default {
|
|
|
});
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
- // if (res.data.data.status != '录入') {
|
|
|
- // this.editButton = true
|
|
|
- // this.editDisabled = true
|
|
|
- // this.optionForm.disabled = true
|
|
|
- // }
|
|
|
+ if (res.data.data.issueStatus == 1) {
|
|
|
+ // this.editButton = true
|
|
|
+ this.editDisabled = true
|
|
|
+ this.optionForm.disabled = true
|
|
|
+ }
|
|
|
}).finally(() => {
|
|
|
loading.close()
|
|
|
})
|
|
|
@@ -684,6 +750,47 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
allClick(name) {
|
|
|
+ if (name == '预定订舱') {
|
|
|
+ this.$confirm("是否发送消息?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ sendMessageBooking(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (name == '提交') {
|
|
|
+ this.$confirm("是否提交?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitBookingCabin(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
if (name == '一键保存') {
|
|
|
if (!this.form.preContainersList.length) {
|
|
|
return this.$message.error("请添加数据");
|
|
|
@@ -759,22 +866,8 @@ export default {
|
|
|
return this.$message.error("请完善明细信息");
|
|
|
}
|
|
|
}
|
|
|
- for (let row of this.polFeeList) {
|
|
|
- if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
|
|
|
- this.$refs.crud2.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善POL杂费明细");
|
|
|
- }
|
|
|
- }
|
|
|
- for (let row of this.podFeeList) {
|
|
|
- if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
|
|
|
- this.$refs.crud3.rowCell(row, row.$index)
|
|
|
- return this.$message.error("请完善POD杂费明细");
|
|
|
- }
|
|
|
- }
|
|
|
- this.form.costFeeList = [...this.polFeeList, ...this.podFeeList]
|
|
|
-
|
|
|
- this.form.billNoFormat = 'COC'
|
|
|
- this.form.businessTypeCode = 'COC'
|
|
|
+ // this.form.billNoFormat = 'COC'
|
|
|
+ // this.form.businessTypeCode = 'COC'
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|