订舱台账

dev
lilu 2 years ago
parent 80fb2dbc2e
commit 444852c730

@ -0,0 +1,40 @@
import { axios } from '@/utils/request'
/**
* 自定义表单 - 获取已保存数据
* @params type
*/
export function DjyUserConfigGet(parameter) {
return axios({
url: '/DjyUserConfig/get',
method: 'get',
params: parameter
})
}
/**
* 自定义表单 - 分页
* @params type
* @params PageNo
* @params PageSize
*/
export function DjyUserConfigPage(parameter) {
return axios({
url: '/DjyUserConfig/page',
method: 'get',
params: parameter
})
}
/**
* 自定义表单 - 添加
* @params type
* @params configJson
*/
export function DjyUserConfigAdd(parameter) {
return axios({
url: '/DjyUserConfig/add',
method: 'post',
data: parameter
})
}

@ -33,7 +33,7 @@ import Dialog from '@/components/Dialog'
// xn components
import XCard from '@/components/xnComponents/XCard'
import setFromModel from '@/components/setFromModel'
import setFormModel from '@/components/setFormModel'
// import vfd from '@/components/flow/FlowDesigner'
export {
@ -69,6 +69,6 @@ export {
AntdEditor,
Dialog,
XCard,
setFromModel
setFormModel
// vfd
}

@ -56,13 +56,13 @@
import draggable from 'vuedraggable'
export default {
props: {
fromData: {
formData: {
type: Array,
default: () => {
return []
}
},
fromAllData: {
formAllData: {
type: Array,
default: () => {
return []
@ -83,8 +83,8 @@ export default {
},
watch: {},
mounted() {
this.fromLabel = JSON.parse(JSON.stringify(this.fromData))
this.fromAllLabel = JSON.parse(JSON.stringify(this.fromAllData))
this.fromLabel = JSON.parse(JSON.stringify(this.formData))
this.fromAllLabel = JSON.parse(JSON.stringify(this.formAllData))
},
methods: {
open() {

@ -13,99 +13,16 @@
</div>
<x-card>
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline" :form="form">
<a-form layout="inline">
<a-row :gutter="48">
<template v-for="(fromLabel, findex) in fromLabelData">
<template v-for="(formLabel, findex) in formData">
<a-col :md="6" :sm="24" :key="findex" v-if="(findex<2 && !advanced) || advanced">
<a-form-item :label="fromLabel.title">
<fromLabel :labelData="fromLabel"></fromLabel>
<a-form-item :label="formLabel.title">
<formLabel :labelData="formLabel" @change="formChange"></formLabel>
</a-form-item>
</a-col>
</template>
<!-- <a-col :md="6" :sm="24">
<a-form-item label="提单号">
<a-input
placeholder="请输入提单号"
v-decorator="['MBLNO', { rules: [{ required: false, message: '请输入提单号' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="ETD">
<a-range-picker
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
v-decorator="['ETD', { rules: [{ required: false }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24" v-if="advanced">
<a-form-item label="航名">
<a-input
placeholder="请输入航名"
v-decorator="['VESSEL', { rules: [{ required: false, message: '请输入航名' }] }]"
/>
</a-form-item>
</a-col>
<template v-if="advanced">
<a-col :md="6" :sm="24">
<a-form-item label="航次">
<a-input
placeholder="请输入航次"
v-decorator="['VOYNO', { rules: [{ required: false, message: '请输入航次' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="截单状态">
<a-select
style="width: 160px"
placeholder="请选择截单状态"
v-decorator="['CLOSEDOC', { rules: [{ required: false, message: '请选择截单状态!' }] }]"
>
<a-select-option value="1"> 全部 </a-select-option>
<a-select-option value="0"> 已截单 </a-select-option>
<a-select-option value="0"> 未截单 </a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="订舱状态">
<a-select
style="width: 160px"
placeholder="请选择订舱状态"
v-decorator="['FORWARDER', { rules: [{ required: false, message: '请选择订舱状态!' }] }]"
>
<a-select-option value="1"> 未订舱 </a-select-option>
<a-select-option value="0"> 已订舱无BC </a-select-option>
<a-select-option value="0"> 有BC未放舱 </a-select-option>
<a-select-option value="0"> 已放舱 </a-select-option>
<a-select-option value="0"> 无下货纸 </a-select-option>
<a-select-option value="0"> 有下货纸 </a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="VGM状态">
<a-select
style="width: 160px"
placeholder="请选择VGM状态"
v-decorator="['isDebugOutput', { rules: [{ required: false, message: '请选择VGM状态!' }] }]"
>
<a-select-option value="1"> 未提交 </a-select-option>
<a-select-option value="0"> 提交成功 </a-select-option>
<a-select-option value="0"> 成功 </a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item>
<a-checkbox v-decorator="['isDebugOutput']"> 退 </a-checkbox>
</a-form-item>
</a-col>
</template> -->
<a-col :md="(!advanced && 12) || fromBtnCol" :sm="24">
<a-col :md="(!advanced && 12) || formBtnCol" :sm="24">
<span
class="table-page-search-submitButtons"
:style="(advanced && { float: 'right', overflow: 'hidden' }) || {}"
@ -113,8 +30,7 @@
<a-button type="primary" @click="tableRefresh"></a-button>
<a-button style="margin-left: 8px" @click="tableReset"></a-button>
<a-button style="margin-left: 8px" @click="tableMoreRefresh"></a-button>
<span class="tab-btn" @click="fromSetting"
><a-icon type="setting" :style="{ fontSize: '16px' }" />
<span class="tab-btn" @click="formSetting"><a-icon type="setting" :style="{ fontSize: '16px' }" />
</span>
<a @click="toggleAdvanced">
{{ advanced ? '收起' : '展开' }}
@ -169,119 +85,48 @@
</div>
</a-modal>
<setFromModel ref="setFrom" :fromData="fromData" :fromAllData="fromAllData" @ok="submitFrom"></setFromModel>
<setFormModel ref="setForm" :formData="formData" :formAllData="formMoreData" @ok="submitForm" v-if="formMoreData"></setFormModel>
</div>
</template>
<script>
import { XCard, setFromModel } from '@/components'
import { XCard, setFormModel } from '@/components'
import { BookingOrderPage } from '@/api/modular/main/BookingLedger'
import columnSetting from '@/components/tableColumnSetting'
import fromLabel from './modules/fromLabel'
import formLabel from './modules/formLabel'
import initData from './modules/initData'
import condAllData from './modules/initCondData'
import {
DjyCustomerGet,
// DjyCustomerPage,
// DjyCustomerDelete,
// DjyUserConfigAdd
} from '@/api/modular/main/CustomerInformationManagement'
DjyUserConfigGet,
DjyUserConfigPage,
DjyUserConfigAdd
} from '@/api/modular/main/DjyUserConfig'
const fromLabelData = [
{ title: '主题单号', align: 'center', width: '90', label: 'mblno', type: 'input' },
{ title: '分提单号', align: 'center', width: '90', label: 'hblno', type: 'input' },
{ title: '订舱编号', align: 'center', width: '90', label: 'bookingno', type: 'input' },
{ title: '开船日期', align: 'center', width: '90', label: 'etd', type: 'date' },
{ title: '实际开船日期', align: 'center', width: '90', label: 'atd', type: 'date' },
{ title: '船名', align: 'center', width: '90', label: 'vessel', type: 'input' },
const formInitData = [
{ title: '主题单号', align: 'center', width: '90', label: 'MBLNO', type: 'input' },
{ title: '分提单号', align: 'center', width: '90', label: 'HBLNO', type: 'input' },
{ title: '订舱编号', align: 'center', width: '90', label: 'BOOKINGNO', type: 'input' },
{ title: '开船日期', align: 'center', width: '90', label: 'ETD', type: 'date' },
{ title: '实际开船日期', align: 'center', width: '90', label: 'ATD', type: 'date' },
{ title: '船名', align: 'center', width: '90', label: 'VESSEL', type: 'input' }
]
export default {
name: 'BookingLedger',
components: {
XCard,
columnSetting,
setFromModel,
fromLabel,
setFormModel,
formLabel
},
data() {
return {
// ===== 线 strat ======
fromData: [
{
title: '分提单号',
type: 'label',
},
{
title: '订舱编号',
type: 'label',
},
{
title: '合约号',
type: 'label',
},
{
title: '客户合同号',
type: 'label',
},
{
title: '发货人代码',
type: 'label',
},
{
title: '收货人代码',
type: 'label',
},
],
fromAllData: [
{
title: '业务编号',
type: 'label',
},
{
title: '业务状态',
type: 'label',
},
{
title: '业务状态名称',
type: 'label',
},
{
title: '业务日期',
type: 'label',
},
{
title: '主提单号',
type: 'label',
},
{
title: '业务编号',
type: 'label',
},
{
title: '业务状态',
type: 'label',
},
{
title: '业务状态名称',
type: 'label',
},
{
title: '业务日期',
type: 'label',
},
{
title: '主提单号',
type: 'label',
},
],
// ===== 线 end ======
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// /
advanced: false,
//
fromLabelData: fromLabelData,
form: this.$form.createForm(this),
fromBtnCol: 12,
// fromData: [],
formData: formInitData,
formRes: {},
formAllData: null,
formMoreData: null,
formBtnCol: 12,
//
setVisible: false,
showColumns: null,
@ -317,20 +162,18 @@ export default {
radioStyle: {
display: 'block',
height: '30px',
lineHeight: '30px',
lineHeight: '30px'
},
//
moreNumVisible: false,
moreNumVal: '',
moreNumVal: ''
}
},
created() {
this.showColumns = JSON.parse(JSON.stringify(initData.columns))
this.formAllData = JSON.parse(JSON.stringify(initData.condAllData))
this.getList()
this.getFromData()
},
mounted() {
console.log(condAllData, initData)
this.getFormData()
},
methods: {
init(queryParam = {}) {
@ -342,68 +185,56 @@ export default {
}
this.gridOptions.data = []
this.getList(queryParam)
this.getFormData()
},
getFromData() {
DjyCustomerGet({ type: 'booking_list_cond' }).then((res) => {
getFormData() {
DjyUserConfigGet({ type: 'booking_list_cond' }).then((res) => {
if (res.data && JSON.parse(res.data.configJson).length) {
const arr = JSON.parse(res.data.configJson)
const nowData = []
const moreData = []
this.formAllData.map((item, index) => {
if (arr.includes(item.label)) {
nowData.push(item)
} else {
moreData.push(item)
}
})
this.formData = nowData
this.formMoreData = moreData
} else {
const nowData = this.formData.map((item, index) => {
return item.label
})
const moreData = []
this.formAllData.map((item, index) => {
if (!nowData.includes(item.label)) {
moreData.push(item)
}
})
this.formMoreData = moreData
}
this.formData.map((item, index) => {
this.$set(this.formRes, item.label, '')
})
console.log('=== 当前数据 ===', this.formRes, this.formData, this.formMoreData)
this.formBtnCol = 24 - (this.formData.length % 4 * 6)
})
},
handlePageChange({ currentPage, pageSize }) {
console.log(currentPage, pageSize)
this.gridOptions.pagerConfig.currentPage = currentPage
this.gridOptions.pagerConfig.pageSize = pageSize
this.getList()
this.getList(this.formRes)
},
// from
// form
toggleAdvanced() {
this.advanced = !this.advanced
},
tableRefresh() {
const {
form: { validateFields },
} = this
validateFields((err, values) => {
if (!err) {
if (values.genDate) {
const time = values.genDate.map((item, index) => {
const str = this.dateFtt('YYYY-MM-DD', item._d)
return str
})
console.log(time)
values.genDate = time
}
if (values.upDate) {
const _time = values.upDate.map((item, index) => {
const str = this.dateFtt('YYYY-MM-DD', item._d)
return str
})
console.log(_time)
values.upDate = _time
}
if (values.entryDate) {
const _time = values.entryDate.map((item, index) => {
const str = this.dateFtt('YYYY-MM-DD', item._d)
return str
})
console.log(_time)
values.entryDate = _time
}
if (values.publishDate) {
const _time = values.publishDate.map((item, index) => {
const str = this.dateFtt('YYYY-MM-DD', item._d)
return str
})
console.log(_time)
values.publishDate = _time
}
console.log('== 获取到的values == ', values)
this.init(values)
}
})
this.init(this.formRes)
},
tableMoreRefresh() {
const {
@ -446,11 +277,34 @@ export default {
this.init()
},
submitFrom(data) {
this.fromData = data
console.log('获取到已编辑号的fromData', data)
submitForm(data) {
this.formData = data
const arr = data.map((item, index) => {
return item.label
})
DjyUserConfigAdd({
type: 'booking_list_cond',
configJson: JSON.stringify(arr)
}).then(res => {
console.log(res)
this.$message.success('保存成功')
this.$refs.setFrom.handleCancel()
this.$refs.setForm.handleCancel()
this.init()
})
},
formChange (data) {
const { form, value } = data
if (form.type === 'input') {
this.formRes[form.label] = value
} else if (form.type === 'date') {
this.formRes[form.label] = value
} else if (form.type === 'dateRange') {
//
} else if (form.type === 'select') {
//
}
console.log(this.formRes)
},
// table
@ -473,22 +327,13 @@ export default {
},
getList(queryParam = {}) {
const { currentPage, pageSize } = this.gridOptions.pagerConfig
BookingOrderPage({
const query = {
...queryParam,
...{
PageNo: currentPage,
PageSize: pageSize,
sort: '',
order: '', // asc - desc
MBLNO: '',
ETD_START: '',
ETD_END: '',
PORTDISCHARGE: '',
VESSEL: '',
VOYNO: '',
SISTATUS: '',
BusinessStatus: '',
VgmStatus: '',
UnBook: false,
})
PageSize: pageSize
} }
BookingOrderPage(query)
.then((res) => {
const _data = res.data.rows.map((item, index) => {
item.id = (currentPage - 1) * pageSize + index
@ -520,8 +365,8 @@ export default {
},
//
fromSetting() {
this.$refs.setFrom.open()
formSetting() {
this.$refs.setForm.open()
},
//

@ -3,21 +3,21 @@
<template v-if="labelData.type == 'input'">
<a-input
:placeholder="`请输入${labelData.title}`"
v-decorator="['MBLNO', { rules: [{ required: false, message: '请输入提单号' }] }]"
@change="changeInput"
/>
</template>
<template v-else-if="labelData.type == 'date'">
<a-date-picker
format="YYYY-MM-DD"
:placeholder="`请选择${labelData.title}`"
v-decorator="['ETD', { rules: [{ required: false }] }]"
@change="changeDate"
/>
</template>
<template v-else-if="labelData.type == 'dateRange'">
<a-range-picker
format="YYYY-MM-DD"
:placeholder="['开始时间', '结束时间']"
v-decorator="['ETD', { rules: [{ required: false }] }]"
@change="changeRangeDate"
/>
</template>
<template v-else-if="labelData.type == 'select'">
@ -38,15 +38,35 @@ export default {
props: {
labelData: {
type: Object,
required: true
}
required: true,
},
},
data() {
return {}
return {
}
},
watch: {},
mounted() {},
methods: {},
methods: {
changeInput(e) {
this.$emit('change', {
form: this.labelData,
value: e.target.value
})
},
changeDate(e, mode) {
this.$emit('change', {
form: this.labelData,
value: mode
})
},
changeRangeDate (e, mode) {
this.$emit('change', {
form: this.labelData,
value: mode
})
}
},
}
</script>
<style lang="less" scoped>

@ -1,43 +0,0 @@
export default {
condAllData: [
{ title: '业务编号', align: 'center', width: '90', label: 'bsno', type: 'input' },
{ title: '业务状态', align: 'center', width: '90', label: 'bsstatus', type: 'input' },
{ title: '业务状态名称', align: 'center', width: '90', label: 'bsstatusname', type: 'input' },
{ title: '业务日期', align: 'center', width: '90', label: 'bsdate', type: 'date' },
{ title: '主题单号', align: 'center', width: '90', label: 'mblno', type: 'input' },
{ title: '分提单号', align: 'center', width: '90', label: 'hblno', type: 'input' },
{ title: '订舱编号', align: 'center', width: '90', label: 'bookingno', type: 'input' },
{ title: '合约号', align: 'center', width: '90', label: 'contractno', type: 'input' },
{ title: '客户合同号', align: 'center', width: '90', label: 'servicecontractno', type: 'input' },
{ title: '发货人代码', align: 'center', width: '90', label: 'shipperid', type: 'input' },
{ title: '收货人代码', align: 'center', width: '90', label: 'consigneeid', type: 'input' },
{ title: '通知人代码', align: 'center', width: '90', label: 'notifypartyid', type: 'input' },
{ title: '发货人', align: 'center', width: '90', label: 'shipper', type: 'input' },
{ title: '收货人', align: 'center', width: '90', label: 'consignee', type: 'input' },
{ title: '通知人', align: 'center', width: '90', label: 'notifyparty', type: 'input' },
{ title: '第二通知人', align: 'center', width: '90', label: 'notifypartY2', type: 'input' },
{ title: '场站代码', align: 'center', width: '90', label: 'yardid', type: 'input' },
{ title: '场站', align: 'center', width: '90', label: 'yard', type: 'input' },
{ title: '船舶呼号', align: 'center', width: '90', label: 'vesselid', type: 'input' },
{ title: '船名', align: 'center', width: '90', label: 'vessel', type: 'input' },
{ title: '海关航次', align: 'center', width: '90', label: 'voyno', type: 'input' },
{ title: '内部航次', align: 'center', width: '90', label: 'voynoinner', type: 'input' },
{ title: '开船日期', align: 'center', width: '90', label: 'etd', type: 'date' },
{ title: '实际开船日期', align: 'center', width: '90', label: 'atd', type: 'date' },
{ title: '截港日期', align: 'center', width: '90', label: 'closingdate', type: 'date' },
{ title: '截单日期', align: 'center', width: '90', label: 'closedocdate', type: 'date' },
{ title: '截VGM时间', align: 'center', width: '90', label: 'closevgmdate', type: 'date' },
{ title: '预计到港日期', align: 'center', width: '90', label: 'eta', type: 'date' },
{ title: '收货地代码', align: 'center', width: '90', label: 'placereceiptid', type: 'input' },
{ title: '收货地', align: 'center', width: '90', label: 'placereceipt', type: 'input' },
{ title: '起运港代码', align: 'center', width: '90', label: 'portloadid', type: 'input' },
{ title: '起运港', align: 'center', width: '90', label: 'portload', type: 'input' },
{ title: '卸货港代码', align: 'center', width: '90', label: 'portdischargeid', type: 'input' },
{ title: '卸货港', align: 'center', width: '90', label: 'portdischarge', type: 'input' },
{ title: '交货地代码', align: 'center', width: '90', label: 'placedeliveryid', type: 'input' },
{ title: '交货地', align: 'center', width: '90', label: 'placedelivery', type: 'input' },
{ title: '目的地代码', align: 'center', width: '90', label: 'destinationid', type: 'input' },
{ title: '目的地', align: 'center', width: '90', label: 'destination', type: 'input' },
// 此处省略部分数据
]
}

@ -14,5 +14,46 @@ export default {
{ field: 'createdTime', title: '创建时间', showHeaderOverflow: true, sortable: true },
{ field: 'boxType', title: '箱型箱量', showHeaderOverflow: true, sortable: true },
{ title: '操作', width: 80, noDraggable: true, slots: { default: 'operate' }, fixed: 'right' }
],
condAllData: [
{ title: '业务编号', align: 'center', width: '90', label: 'BSNO', type: 'input' },
{ title: '业务状态', align: 'center', width: '90', label: 'BSSTATUS', type: 'input' },
{ title: '业务状态名称', align: 'center', width: '90', label: 'BSSTATUSNAME', type: 'input' },
{ title: '业务日期', align: 'center', width: '90', label: 'BSDATE', type: 'date' },
{ title: '主题单号', align: 'center', width: '90', label: 'MBLNO', type: 'input' },
{ title: '分提单号', align: 'center', width: '90', label: 'HBLNO', type: 'input' },
{ title: '订舱编号', align: 'center', width: '90', label: 'BOOKINGNO', type: 'input' },
{ title: '合约号', align: 'center', width: '90', label: 'CONTRACTNO', type: 'input' },
{ title: '客户合同号', align: 'center', width: '90', label: 'SERVICECONTRACTNO', type: 'input' },
{ title: '发货人代码', align: 'center', width: '90', label: 'SHIPPERID', type: 'input' },
{ title: '收货人代码', align: 'center', width: '90', label: 'CONSIGNEEID', type: 'input' },
{ title: '通知人代码', align: 'center', width: '90', label: 'NOTIFYPARTYID', type: 'input' },
{ title: '发货人', align: 'center', width: '90', label: 'SHIPPER', type: 'input' },
{ title: '收货人', align: 'center', width: '90', label: 'CONSIGNEE', type: 'input' },
{ title: '通知人', align: 'center', width: '90', label: 'NOTIFYPARTY', type: 'input' },
{ title: '第二通知人', align: 'center', width: '90', label: 'NOTIFYPARTY2', type: 'input' },
{ title: '场站代码', align: 'center', width: '90', label: 'YARDID', type: 'input' },
{ title: '场站', align: 'center', width: '90', label: 'YARD', type: 'input' },
{ title: '船舶呼号', align: 'center', width: '90', label: 'VESSELID', type: 'input' },
{ title: '船名', align: 'center', width: '90', label: 'VESSEL', type: 'input' },
{ title: '海关航次', align: 'center', width: '90', label: 'VOYNO', type: 'input' },
{ title: '内部航次', align: 'center', width: '90', label: 'VOYNOINNER', type: 'input' },
{ title: '开船日期', align: 'center', width: '90', label: 'ETD', type: 'dateRange' },
{ title: '实际开船日期', align: 'center', width: '90', label: 'ATD', type: 'date' },
{ title: '截港日期', align: 'center', width: '90', label: 'CLOSINGDATE', type: 'date' },
{ title: '截单日期', align: 'center', width: '90', label: 'CLOSEDOCDATE', type: 'date' },
{ title: '截VGM时间', align: 'center', width: '90', label: 'CLOSEVGMDATE', type: 'date' },
{ title: '预计到港日期', align: 'center', width: '90', label: 'ETA', type: 'date' },
{ title: '收货地代码', align: 'center', width: '90', label: 'PLACERECEIPTID', type: 'input' },
{ title: '收货地', align: 'center', width: '90', label: 'PLACERECEIPT', type: 'input' },
{ title: '起运港代码', align: 'center', width: '90', label: 'PORTLOADID', type: 'input' },
{ title: '起运港', align: 'center', width: '90', label: 'PORTLOAD', type: 'input' },
{ title: '卸货港代码', align: 'center', width: '90', label: 'PORTDISCHARGEID', type: 'input' },
{ title: '卸货港', align: 'center', width: '90', label: 'PORTDISCHARGE', type: 'input' },
{ title: '交货地代码', align: 'center', width: '90', label: 'PLACEDELIVERYID', type: 'input' },
{ title: '交货地', align: 'center', width: '90', label: 'PLACEDELIVERY', type: 'input' },
{ title: '目的地代码', align: 'center', width: '90', label: 'DESTINATIONID', type: 'input' },
{ title: '目的地', align: 'center', width: '90', label: 'DESTINATION', type: 'input' },
// 此处省略部分数据
]
}

Loading…
Cancel
Save