lilu 2 years ago
commit 4e47ba9a55

@ -0,0 +1,107 @@
import { axios } from '@/utils/request'
/**
* 下拉列表
*/
export function DjyTenantConfigPage(parameter) {
return axios({
url: '/DjyTenantConfig/page',
method: 'get',
params: parameter
})
}
/**
* 新增编辑
*/
export function DjyVesselInfoServiceAddOrUpdate(parameter) {
return axios({
url: '/DjyVesselInfoService/AddOrUpdate',
method: 'post',
data: parameter
})
}
/**
* 分页查询租户
*/
export function SysTenantPage(parameter) {
return axios({
url: '/sysTenant/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 999999,
...parameter
}
})
}
/**
* 起始港
*/
export function GetPortloadlist(parameter) {
return axios({
url: '/commondb/portloadlist',
method: 'get',
params: parameter
})
}
/**
* 目的港 (中转)
*/
export function GetPortlist(parameter) {
return axios({
url: '/commondb/portlist',
method: 'get',
params: parameter
})
}
/**
* 获取船公司
* @params CnName
*/
export function GetCarrierlist(parameter) {
return axios({
url: '/commondb/carrierlist',
method: 'get',
params: parameter
})
}
/**
* 分页查询用户
*/
export function SysUserPage(parameter) {
return axios({
url: '/sysUser/page',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 获取订舱打印模板列表带有当前用户打印历史排序
*/
export function BookingPrintTemplatePage(parameter) {
return axios({
url: '/BookingPrintTemplate/page',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 获取订舱打印模板列表带有当前用户打印历史排序
*/
export function BookingPrintTemplateGetPrintTemplateList(parameter) {
return axios({
url: '/BookingPrintTemplate/GetPrintTemplateList',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 删除打印模板权限
*/
export function BookingPrintTemplateDeletePrinttemplateRight(parameter) {
return axios({
url: '/BookingPrintTemplate/DeletePrinttemplateRight',
method: 'get',
params: parameter
})
}

@ -0,0 +1,107 @@
import { axios } from '@/utils/request'
/**
* 下拉列表
*/
export function DjyVesselInfoServiceGetListPage(parameter) {
return axios({
url: '/DjyVesselInfoService/GetListPage',
method: 'get',
params: parameter
})
}
/**
* 新增编辑
*/
export function DjyVesselInfoServiceAddOrUpdate(parameter) {
return axios({
url: '/DjyVesselInfoService/AddOrUpdate',
method: 'post',
data: parameter
})
}
/**
* 分页查询租户
*/
export function SysTenantPage(parameter) {
return axios({
url: '/sysTenant/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 999999,
...parameter
}
})
}
/**
* 起始港
*/
export function GetPortloadlist(parameter) {
return axios({
url: '/commondb/portloadlist',
method: 'get',
params: parameter
})
}
/**
* 目的港 (中转)
*/
export function GetPortlist(parameter) {
return axios({
url: '/commondb/portlist',
method: 'get',
params: parameter
})
}
/**
* 获取船公司
* @params CnName
*/
export function GetCarrierlist(parameter) {
return axios({
url: '/commondb/carrierlist',
method: 'get',
params: parameter
})
}
/**
* 分页查询用户
*/
export function SysUserPage(parameter) {
return axios({
url: '/sysUser/page',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 获取订舱打印模板列表带有当前用户打印历史排序
*/
export function BookingPrintTemplatePage(parameter) {
return axios({
url: '/BookingPrintTemplate/page',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 获取订舱打印模板列表带有当前用户打印历史排序
*/
export function BookingPrintTemplateGetPrintTemplateList(parameter) {
return axios({
url: '/BookingPrintTemplate/GetPrintTemplateList',
method: 'get',
params: { PageNo: 1, PageSize: 999 }
})
}
/**
* 删除打印模板权限
*/
export function DjyVesselInfoServiceDelete(parameter) {
return axios({
url: '/DjyVesselInfoService/Delete',
method: 'get',
params: parameter
})
}

@ -0,0 +1,147 @@
[
{
"title": "基本信息",
"children": [
{ "name": "客户", "code": "customername" },
{ "name": "提单号", "code": "mblno" },
{ "name": "船公司", "code": "carrierid" },
{ "name": "订舱代理", "code": "forwarder" },
{ "name": "PO NO", "code": "pono" },
{ "name": "分提单号", "code": "hblno" },
{ "name": "订舱编号", "code": "bookingno" },
{ "name": "约号/EP号", "code": "contractno" },
{ "name": "船名", "code": "vessel" },
{ "name": "航线代码", "code": "lanecode" },
{ "name": "内部航次", "code": "voynoinner" },
{ "name": "海关航次", "code": "voyno" },
{ "name": "开船日期", "code": "etd" },
{ "name": "实际开船", "code": "atd" },
{ "name": "航线", "code": "lanename" },
{ "name": "船代", "code": "shipagency" },
{ "name": "销售人员", "code": "sale" },
{ "name": "操作人员", "code": "op" },
{ "name": "单证人员", "code": "doc" },
{ "name": "客服人员", "code": "custservice" }
]
},
{
"title": "收发通信息",
"children": [
{ "name": "发货人", "code": "shipper" },
{ "name": "收货人", "code": "consignee" },
{ "name": "通知人", "code": "notifyparty" },
{ "name": "场站", "code": "yard" },
{ "name": "自结", "code": "feeself" },
{ "name": "报关行", "code": "customser" },
{ "name": "车队", "code": "trucker" },
{ "name": "国外代理", "code": "agentid" },
{ "name": "预抵日期", "code": "eta" },
{ "name": "截港时间", "code": "closingdate" },
{ "name": "截单时间", "code": "closedocdate" },
{ "name": "VGM时间", "code": "closevgmdate" },
{ "name": "收货代码", "code": "placereceiptid" },
{ "name": "收货地", "code": "placereceipt" },
{ "name": "装货港代码", "code": "portloadid" },
{ "name": "装货港", "code": "portload" },
{ "name": "中转港代码", "code": "transportid" },
{ "name": "中转港", "code": "transport" },
{ "name": "卸货港代码", "code": "portdischargeid" },
{ "name": "卸货港", "code": "portdischarge" },
{ "name": "目的代码", "code": "destinationid" },
{ "name": "目的地", "code": "destination" },
{ "name": "交货代码", "code": "placedeliveryid" },
{ "name": "交货地", "code": "placedelivery" },
{ "name": "件数", "code": "pkgs" },
{ "name": "包装", "code": "kindpkgs" },
{ "name": "毛重", "code": "kgs" },
{ "name": "尺寸", "code": "cbm" }
]
},
{
"title": "货物信息",
"children": [
{ "name": "封志号", "code": "marks" },
{ "name": "包装种类与货名", "code": "description" },
{ "name": "货物标志", "code": "cargoid" },
{ "name": "HS编码", "code": "hscode" }
]
},
{
"title": "签单信息",
"children": [
{ "name": "签单方式", "code": "issuetype" },
{ "name": "签单日期", "code": "issuedate" },
{ "name": "签单地点", "code": "issueplace" },
{ "name": "签单地代码", "code": "issueplaceid" },
{ "name": "提单份数", "code": "nobill" },
{ "name": "副本份数", "code": "copynobilll" },
{ "name": "预付地点", "code": "prepardat" },
{ "name": "到付地点", "code": "payableat" },
{ "name": "付费方式", "code": "blfrt" },
{ "name": "第三付款地", "code": "thirdpayaddr" },
{ "name": "运输条款", "code": "service" },
{ "name": "冷藏通风量", "code": "reeferf" },
{ "name": "设置温度", "code": "tempset" },
{ "name": "温度单位", "code": "tempid" },
{ "name": "最低温度", "code": "tempmin" },
{ "name": "最高温度", "code": "tempmax" },
{ "name": "湿度", "code": "humidity" },
{ "name": "危险品等级", "code": "dclass" },
{ "name": "危险品编号", "code": "dunno" },
{ "name": "危险品页号", "code": "dpage" },
{ "name": "危险品标签", "code": "dlabel" },
{ "name": "危险品联系人", "code": "linkman" }
]
},
{
"title": "备注信息",
"children": [
{ "name": "订舱备注", "code": "soremark" },
{ "name": "截单备注", "code": "siremark" }
]
},
{
"title": "箱型",
"children": [
{ "name": "箱型", "code": "ctnall" },
{ "name": "箱量", "code": "ctnnum" },
{ "name": "箱号", "code": "cntrno" },
{ "name": "封号", "code": "sealno" },
{ "name": "件数", "code": "pkgs" },
{ "name": "包装", "code": "kindpkgs" },
{ "name": "重量", "code": "kgs" },
{ "name": "尺码", "code": "cbm" },
{ "name": "箱皮重", "code": "tareweight" },
{ "name": "称重方式", "code": "weightype" },
{ "name": "称重重量", "code": "weighkgs" }
]
},
{
"title": "EDI补充信息",
"children": [
{ "name": "发送方EDI代码", "code": "bookingEDIExt.sendCode" },
{ "name": "接收方EDI代码", "code": "bookingEDIExt.receiveCode" },
{ "name": "通知放EDI代码", "code": "bookingEDIExt.notifyCdoe" },
{ "name": "销售EDI代码", "code": "bookingEDIExt.salerCode" },
{ "name": "Master Bol Indicator", "code": "bookingEDIExt.masterBolIndicator" },
{ "name": "EMANIFEST HBL", "code": "bookingEDIExt.emanifestHbl" },
{ "name": "收货人EDI代码", "code": "bookingEDIExt.consigneeEdiCode" },
{ "name": "发货人EDI代码", "code": "bookingEDIExt.shipperEdiCode" },
{ "name": "EDI联系人名称", "code": "bookingEDIExt.ediAttn" },
{ "name": "EDI联系人电话", "code": "bookingEDIExt.ediAttnTel" },
{ "name": "EDI联系人邮箱", "code": "bookingEDIExt.ediAttnMail" },
{ "name": "AMS收货人", "code": "bookingEDIExt.amsConsignee" },
{ "name": "AMS通知人", "code": "bookingEDIExt.amsNotifyParty" },
{ "name": "操作英文名称", "code": "bookingEDIExt.opEName" },
{ "name": "操作电话", "code": "bookingEDIExt.opTel" },
{ "name": "操作邮箱", "code": "bookingEDIExt.opEmail" },
{ "name": "ACI HBL", "code": "bookingEDIExt.acihbl" },
{ "name": "S0C C0C", "code": "bookingEDIExt.s0CC0C" },
{ "name": "商品名称", "code": "bookingEDIExt.goodsName" },
{ "name": "SCAC代码", "code": "bookingEDIExt.scaccode" },
{ "name": "ITN编号", "code": "bookingEDIExt.itncode" },
{ "name": "付款方", "code": "bookingEDIExt.freightpayer" },
{ "name": "委托方", "code": "bookingEDIExt.weiTuoFang" }
]
}
]

@ -0,0 +1,129 @@
<template>
<a-modal
title="新增配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="类型" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择类型"
v-decorator="['type', { rules: [{ required: true, message: '请选择类型!' }] }]"
show-search
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in TypeData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="必填项" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-checkbox-group v-decorator="['WebData']" style="width: 100%">
<a-row v-for="item in Data" :key="item.title">
<a-col :span="6" v-for="item2 in item.children" :key="item2.code">
<a-checkbox :value="item2.code">{{ item2.name }}</a-checkbox>
</a-col>
</a-row>
</a-checkbox-group>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { DjyVesselInfoServiceAddOrUpdate } from '@/api/modular/main/TenantConfig'
import Data from './Data.json'
export default {
data() {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 3 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
Data,
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
TypeData: []
}
},
mounted() {
this.TypeData = this.$options.filters['dictData']('customer_config_type')
console.log(this.TypeData)
},
methods: {
//
add(record) {
this.visible = true
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(values)
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,321 @@
<template>
<a-modal
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="租户" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择租户"
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
show-search
@focus="tenantSearch"
@search="tenantSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in tenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船名" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入船名"
v-decorator="['vessel', { rules: [{ required: true, message: '请输入船名!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入航次"
v-decorator="['voyno', { rules: [{ required: true, message: '请输入航次!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="装货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择装货港"
v-decorator="['portLoadingId', { rules: [{ required: true, message: '请选择装货港!' }] }]"
show-search
@focus="portLoadingSearch"
@search="portLoadingSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portLoadingData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中转港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择中转港"
v-decorator="['portTransitId', { rules: [{ required: true, message: '请选择中转港!' }] }]"
show-search
@focus="portTransitSearch"
@search="portTransitSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portTransitData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="卸货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择卸货港"
v-decorator="['portDischargeId', { rules: [{ required: true, message: '请选择卸货港!' }] }]"
show-search
@focus="portDischargeSearch"
@search="portDischargeSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portDischargeData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择开船日期"
v-decorator="['etd', { rules: [{ required: true, message: '请选择开船日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="截港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择截港日期"
v-decorator="['closingDate', { rules: [{ required: true, message: '请选择截港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta', { rules: [{ required: true, message: '请选择预抵日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="默认码头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入默认码头"
v-decorator="['wharf', { rules: [{ required: true, message: '请输入默认码头!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="实际离港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择实际离港日期"
v-decorator="['atd', { rules: [{ required: true, message: '请选择实际离港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择船公司"
v-decorator="['carrierid', { rules: [{ required: true, message: '请选择船公司!' }] }]"
show-search
@focus="carrierSearch"
@search="carrierSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in carrierData" :key="item.code" :value="item.code">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="内部航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入内部航次"
v-decorator="['voynoInside', { rules: [{ required: true, message: '请输入内部航次!' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import {
DjyVesselInfoServiceAddOrUpdate,
SysTenantPage,
GetPortloadlist,
GetPortlist,
GetCarrierlist
} from '@/api/modular/main/TenantConfig'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
tenantData: [],
portLoadingData: [],
portTransitData: [],
portDischargeData: [],
carrierData: []
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
tenantId: record.tenantId,
vessel: record.vessel,
voyno: record.voyno,
portLoadingId: record.portLoadingId,
portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId,
etd: record.etd,
closingDate: record.closingDate,
eta: record.eta,
wharf: record.wharf,
atd: record.atd,
carrierid: record.carrierid,
voynoInside: record.voynoInside
})
console.log(this.form.getFieldsValue())
}, 100)
},
tenantSearch(data) {
SysTenantPage({ Name: data }).then(res => {
this.tenantData = res.data.rows
})
},
portLoadingSearch(data) {
GetPortloadlist({ KeyWord: data }).then(res => {
this.portLoadingData = res.data
})
},
portTransitSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portTransitData = res.data
})
},
portDischargeSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portDischargeData = res.data
})
},
carrierSearch(data) {
GetCarrierlist({ KeyWord: data }).then(res => {
this.carrierData = res.data
})
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
console.log(this.form, values.gid)
values.id = this.data.id
console.log(values)
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,170 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="关键词:">
<a-input placeholder="请输入关键词" v-model="queryParam.KeyWord" />
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a> -->
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增配置
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
:key="item.dataIndex"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
<a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)">
<vxe-button type="text">删除</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import {
DjyTenantConfigPage,
BookingPrintTemplateDeletePrinttemplateRight,
SysUserPage
} from '@/api/modular/main/TenantConfig'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
components: {
addForm,
editForm
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '租户Id',
align: 'center',
dataIndex: 'type'
},
{
title: '船名',
align: 'center',
dataIndex: 'configJson'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: [],
UserList: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
confirm(e) {
this.FnDel(e)
},
FnDel(data) {
BookingPrintTemplateDeletePrinttemplateRight({ Ids: data.id }).then(res => {
this.$message.success('删除成功')
this.FnGetData()
})
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
SysUserPage().then(res => {
this.UserList = res.data.rows
})
},
FnGetData() {
this.loading = true
DjyTenantConfigPage(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data.rows
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>

@ -0,0 +1,331 @@
<template>
<a-modal
title="新增配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="租户" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择租户"
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
show-search
@focus="tenantSearch"
@search="tenantSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in tenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船名" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入船名"
v-decorator="['vessel', { rules: [{ required: true, message: '请输入船名!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入航次"
v-decorator="['voyno', { rules: [{ required: true, message: '请输入航次!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="装货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择装货港"
v-decorator="['portLoadingId', { rules: [{ required: true, message: '请选择装货港!' }] }]"
show-search
@focus="portLoadingSearch"
@search="portLoadingSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portLoadingData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中转港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择中转港"
v-decorator="['portTransitId', { rules: [{ required: true, message: '请选择中转港!' }] }]"
show-search
@focus="portTransitSearch"
@search="portTransitSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portTransitData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="卸货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择卸货港"
v-decorator="['portDischargeId', { rules: [{ required: true, message: '请选择卸货港!' }] }]"
show-search
@focus="portDischargeSearch"
@search="portDischargeSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portDischargeData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择开船日期"
v-decorator="['etd', { rules: [{ required: true, message: '请选择开船日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="截港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择截港日期"
v-decorator="['closingDate', { rules: [{ required: true, message: '请选择截港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta', { rules: [{ required: true, message: '请选择预抵日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="默认码头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入默认码头"
v-decorator="['wharf', { rules: [{ required: true, message: '请输入默认码头!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="实际离港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择实际离港日期"
v-decorator="['atd', { rules: [{ required: true, message: '请选择实际离港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择船公司"
v-decorator="['carrierid', { rules: [{ required: true, message: '请选择船公司!' }] }]"
show-search
@focus="carrierSearch"
@search="carrierSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in carrierData" :key="item.code" :value="item.code">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="内部航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入内部航次"
v-decorator="['voynoInside', { rules: [{ required: true, message: '请输入内部航次!' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import {
DjyVesselInfoServiceAddOrUpdate,
SysTenantPage,
GetPortloadlist,
GetPortlist,
GetCarrierlist
} from '@/api/modular/main/vesselinfo'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
tenantData: [],
portLoadingData: [],
portTransitData: [],
portDischargeData: [],
carrierData: []
}
},
mounted() {},
methods: {
//
add(record) {
this.visible = true
},
tenantSearch(data) {
SysTenantPage({ Name: data }).then(res => {
this.tenantData = res.data.rows
})
},
portLoadingSearch(data) {
GetPortloadlist({ KeyWord: data }).then(res => {
this.portLoadingData = res.data
})
},
portTransitSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portTransitData = res.data
})
},
portDischargeSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portDischargeData = res.data
})
},
carrierSearch(data) {
GetCarrierlist({ KeyWord: data }).then(res => {
this.carrierData = res.data
})
},
/**
* 提交表单
*/
FnChangeCtnCategory(e) {
console.log(e)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(values)
if (!errors) {
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
if (this.portLoadingData.length) {
this.portLoadingData.forEach(item => {
if (item.code == values.portLoadingId) {
values.portLoading = item.enName
}
})
}
if (this.portTransitData.length) {
this.portTransitData.forEach(item => {
if (item.code == values.portTransitId) {
values.portTransit = item.enName
}
})
}
if (this.portDischargeData.length) {
this.portDischargeData.forEach(item => {
if (item.code == values.portDischargeId) {
values.portDischarge = item.enName
}
})
}
if (this.carrierData.length) {
this.carrierData.forEach(item => {
if (item.code == values.carrierid) {
values.carrier = item.cnName
}
})
}
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,350 @@
<template>
<a-modal
title="编辑配置"
:width="1100"
:visible="visible"
:confirmLoading="confirmLoading"
@ok="handleSubmit"
@cancel="handleCancel"
>
<a-spin :spinning="confirmLoading">
<a-form :form="form">
<a-row>
<a-col :span="12">
<a-form-item label="租户" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择租户"
v-decorator="['tenantId', { rules: [{ required: true, message: '请选择租户!' }] }]"
show-search
@focus="tenantSearch"
@search="tenantSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in tenantData" :key="item.id" :value="item.id">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船名" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入船名"
v-decorator="['vessel', { rules: [{ required: true, message: '请输入船名!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入航次"
v-decorator="['voyno', { rules: [{ required: true, message: '请输入航次!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="装货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择装货港"
v-decorator="['portLoadingId', { rules: [{ required: true, message: '请选择装货港!' }] }]"
show-search
@focus="portLoadingSearch"
@search="portLoadingSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portLoadingData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="中转港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择中转港"
v-decorator="['portTransitId', { rules: [{ required: true, message: '请选择中转港!' }] }]"
show-search
@focus="portTransitSearch"
@search="portTransitSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portTransitData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="卸货港" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择卸货港"
v-decorator="['portDischargeId', { rules: [{ required: true, message: '请选择卸货港!' }] }]"
show-search
@focus="portDischargeSearch"
@search="portDischargeSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in portDischargeData" :key="item.code" :value="item.code">
{{ item.enName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择开船日期"
v-decorator="['etd', { rules: [{ required: true, message: '请选择开船日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="截港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择截港日期"
v-decorator="['closingDate', { rules: [{ required: true, message: '请选择截港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="预抵日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta', { rules: [{ required: true, message: '请选择预抵日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="默认码头" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入默认码头"
v-decorator="['wharf', { rules: [{ required: true, message: '请输入默认码头!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="实际离港日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
show-time
:style="{ width: '100%' }"
placeholder="请选择实际离港日期"
v-decorator="['atd', { rules: [{ required: true, message: '请选择实际离港日期!' }] }]"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select
placeholder="请选择船公司"
v-decorator="['carrierid', { rules: [{ required: true, message: '请选择船公司!' }] }]"
show-search
@focus="carrierSearch"
@search="carrierSearch"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
>
<a-select-option v-for="item in carrierData" :key="item.code" :value="item.code">
{{ item.cnName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="内部航次" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-input
placeholder="请输入内部航次"
v-decorator="['voynoInside', { rules: [{ required: true, message: '请输入内部航次!' }] }]"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import {
DjyVesselInfoServiceAddOrUpdate,
SysTenantPage,
GetPortloadlist,
GetPortlist,
GetCarrierlist
} from '@/api/modular/main/vesselinfo'
export default {
data() {
return {
TypeData: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
labelCol2: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol2: {
xs: { span: 24 },
sm: { span: 18 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
tenantData: [],
portLoadingData: [],
portTransitData: [],
portDischargeData: [],
carrierData: []
}
},
mounted() {},
methods: {
//
edit(record) {
this.data = record
console.log(record)
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
tenantId: record.tenantId,
vessel: record.vessel,
voyno: record.voyno,
portLoadingId: record.portLoadingId,
portTransitId: record.portTransitId,
portDischargeId: record.portDischargeId,
portLoading: record.portLoading,
portTransit: record.portTransit,
portDischarge: record.portDischarge,
etd: record.etd,
closingDate: record.closingDate,
eta: record.eta,
wharf: record.wharf,
atd: record.atd,
carrierid: record.carrierid,
voynoInside: record.voynoInside
})
console.log(this.form.getFieldsValue())
}, 100)
},
tenantSearch(data) {
SysTenantPage({ Name: data }).then(res => {
this.tenantData = res.data.rows
})
},
portLoadingSearch(data) {
GetPortloadlist({ KeyWord: data }).then(res => {
this.portLoadingData = res.data
})
},
portTransitSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portTransitData = res.data
})
},
portDischargeSearch(data) {
GetPortlist({ KeyWord: data }).then(res => {
this.portDischargeData = res.data
})
},
carrierSearch(data) {
GetCarrierlist({ KeyWord: data }).then(res => {
this.carrierData = res.data
})
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
for (const key in values) {
console.log(key, 1)
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
values.id = this.data.id
if (this.portLoadingData.length) {
this.portLoadingData.forEach(item => {
if (item.code == values.portLoadingId) {
values.portLoading = item.enName
}
})
}
if (this.portTransitData.length) {
this.portTransitData.forEach(item => {
if (item.code == values.portTransitId) {
values.portTransit = item.enName
}
})
}
if (this.portDischargeData.length) {
this.portDischargeData.forEach(item => {
if (item.code == values.portDischargeId) {
values.portDischarge = item.enName
}
})
}
if (this.carrierData.length) {
this.carrierData.forEach(item => {
if (item.code == values.carrierid) {
values.carrier = item.cnName
}
})
}
DjyVesselInfoServiceAddOrUpdate(values)
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
})
.finally(res => {
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,221 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div class="table-page-search-wrapper" :class="advanced ? 'Open' : 'Close'">
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="关键词:">
<a-input placeholder="请输入关键词" v-model="queryParam.KeyWord" />
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="6" :sm="24">
<span class="table-page-search-submitButtons">
<a-button type="primary" @click="FnGetData"></a-button>
<a-button style="margin-left: 8px" @click="init"></a-button>
<!-- <a @click="toggleAdvanced" style="margin-left: 8px">
{{ advanced ? '收起' : '展开' }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a> -->
</span>
</a-col>
</a-row>
</a-form>
</div>
</a-card>
<a-card :bordered="false">
<vxe-toolbar>
<template #buttons>
<a-button type="primary" icon="plus" @click="$refs.addForm.add()">
新增配置
</a-button>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" height="600px" empty-text="">
<vxe-column type="seq" width="50" fixed="left"></vxe-column>
<vxe-column
v-for="item in columns"
:key="item.dataIndex"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
:show-overflow="true"
>
</vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }">
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
<a-popconfirm title="是否确认删除?" ok-text="" cancel-text="" @confirm="confirm(row)">
<vxe-button type="text">删除</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
</div>
</template>
<script>
import { DjyVesselInfoServiceGetListPage, DjyVesselInfoServiceDelete, SysUserPage } from '@/api/modular/main/vesselinfo'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
export default {
components: {
addForm,
editForm
},
data() {
return {
TypeData: [],
// /
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
// currentPage: 1,
// pageSize: 10,
// totalResult: 1
},
ColumnsQuery: [],
columns: [
{
title: '租户Id',
align: 'center',
dataIndex: 'tenantId'
},
{
title: '船名',
align: 'center',
dataIndex: 'vessel'
},
{
title: '航次',
align: 'center',
dataIndex: 'voyno'
},
{
title: '装货港',
align: 'center',
dataIndex: 'portLoading'
},
{
title: '中转港',
align: 'center',
dataIndex: 'portTransit'
},
{
title: '卸货港',
align: 'center',
dataIndex: 'portDischarge'
},
{
title: '开船日期',
align: 'center',
dataIndex: 'etd'
},
{
title: '截港日期',
align: 'center',
dataIndex: 'closingDate'
},
{
title: '预抵日期',
align: 'center',
dataIndex: 'eta'
},
{
title: '默认码头',
align: 'center',
dataIndex: 'wharf'
},
{
title: '实际离港日期',
align: 'center',
dataIndex: 'atd'
},
{
title: '船公司',
align: 'center',
dataIndex: 'carrier'
},
{
title: '内部航次',
align: 'center',
dataIndex: 'voynoInside'
}
],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
CodeData: [],
WCodeData: [],
ModulesData: [],
carrierCodeData: [],
UserList: []
}
},
created() {},
mounted() {
this.init()
},
methods: {
confirm(e) {
this.FnDel(e)
},
FnDel(data) {
DjyVesselInfoServiceDelete({ Ids: data.id }).then(res => {
this.$message.success('删除成功')
this.FnGetData()
})
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
this.ColumnsQuery = this.columns
this.FnGetData()
SysUserPage().then(res => {
this.UserList = res.data.rows
})
},
FnGetData() {
this.loading = true
DjyVesselInfoServiceGetListPage(this.queryParam).then(res => {
if (res.code == 200) {
this.loadData = res.data
} else {
this.loadData = []
this.$message.warning(res.message)
}
this.loading = false
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
height: 45px;
overflow: hidden;
}
</style>
Loading…
Cancel
Save