lilu 2 years ago
commit 921ce8eae7

@ -0,0 +1,138 @@
import { axios } from '@/utils/request'
/**
* 分页查询订舱打印模板
*
* @author Myshipping
*/
export function BookingPrintTemplatePage(parameter) {
return axios({
url: '/BookingPrintTemplate/page',
method: 'get',
params: parameter
})
}
/**
* 增加订舱打印模板
*
* @author Myshipping
*/
export function BookingPrintTemplateAdd(parameter) {
let params = new FormData()
params.append('file', parameter.file)
Object.keys(parameter.data).forEach(item => {
params.append(`${item}`, parameter.data[item])
})
console.log(parameter)
return axios({
url: '/BookingPrintTemplate/add',
method: 'post',
data: params,
headers: { 'Content-type': 'multipart/form-data;charset=utf-8' }
})
}
/**
* 保存订舱打印模板新增或修改
*
* @author Myshipping
*/
export function BookingPrintTemplateSave(parameter) {
let params = new FormData()
params.append('file', parameter.file)
Object.keys(parameter.data).forEach(item => {
params.append(`${item}`, parameter.data[item])
})
console.log(parameter)
return axios({
url: '/BookingPrintTemplate/save',
method: 'post',
data: params,
headers: { 'Content-type': 'multipart/form-data;charset=utf-8' }
})
}
/**
* 更新订舱打印模板
*
* @author Myshipping
*/
export function BookingPrintTemplateEdit(parameter) {
let params = new FormData()
params.append('file', parameter.file)
Object.keys(parameter.data).forEach(item => {
params.append(`${item}`, parameter.data[item])
})
console.log(parameter)
return axios({
url: '/BookingPrintTemplate/edit',
method: 'post',
data: params,
headers: { 'Content-type': 'multipart/form-data;charset=utf-8' }
})
}
/**
* 删除订舱模板
*
* @author Myshipping
*/
export function BookingPrintTemplateDelete(parameter) {
return axios({
url: '/BookingPrintTemplate/delete',
method: 'post',
data: parameter
})
}
/**
* 新增编辑excel模板
*
* @author Myshipping
*/
export function BookingTemplateAddOrUpdateExcelTemplate(parameter) {
return axios({
url: '/BookingTemplate/AddOrUpdateExcelTemplate',
method: 'post',
data: parameter
})
}
/**
* 获取excel模板详情
*
* @author Myshipping
*/
export function BookingTemplateBookingExcelTemplateList(parameter) {
return axios({
url: '/BookingTemplate/BookingExcelTemplateList',
method: 'get',
data: parameter
})
}
/**
* 分页查询租户
*
* @author Myshipping
*/
export function SysTenantPage(parameter) {
return axios({
url: '/sysTenant/page',
method: 'get',
params: {
pageNo: 1,
pageSize: 999999,
...parameter
}
})
}
/**
* 下载模板文件
*
* @author Myshipping
*/
export function BookingPrintTemplateDownload(parameter) {
return axios({
url: '/BookingPrintTemplate/download',
method: 'get',
params: parameter
})
}

@ -0,0 +1,191 @@
<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="8">
<a-form-item label="显示名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入显示名称"
v-decorator="['displayName', { rules: [{ required: true, message: '请输入显示名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="8">
<a-form-item label="模板类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择模板类型"
v-decorator="['type', { rules: [{ required: true, message: '请选择模板类型!' }] }]"
>
<a-select-option value="FastReport">
FastReport
</a-select-option>
<a-select-option value="ExcelTemplate">
Excel模板
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="分类" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
mode="multiple"
placeholder="请选择分类"
v-decorator="['cateCode', { rules: [{ required: true, message: '请选择分类!' }] }]"
>
<a-select-option v-for="item in CateData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请输入租户名称"
v-decorator="['tenantName', { rules: [{ required: true, message: '请输入租户名称!' }] }]"
>
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-upload :file-list="fileList" :multiple="false" :remove="handleRemove" :before-upload="beforeUpload">
<a-button> <a-icon type="upload" /> 文件上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { BookingPrintTemplateSave, SysTenantPage } from '@/api/modular/main/bookingprinttemplateNew'
// booking_template_type
export default {
data() {
return {
CateData: [],
SysTenantData: [],
file: {},
fileList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this)
}
},
mounted() {
SysTenantPage().then(res => {
this.SysTenantData = res.data.rows
})
this.CateData = this.$options.filters['dictData']('booking_template_category')
},
methods: {
handleRemove(file) {
const index = this.fileList.indexOf(file)
const newFileList = this.fileList.slice()
newFileList.splice(index, 1)
this.fileList = newFileList
this.file = {}
},
beforeUpload(file) {
this.form.setFieldsValue({
...this.form.getFieldsValue(),
displayName: file.name.split('.')[0]
})
this.fileList = [file]
this.file = file
return false
},
//
add(record) {
this.visible = true
},
/**
* 提交表单
*/
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
if (!errors) {
this.SysTenantData.forEach(item => {
if (values.tenantName == item.name) {
values.tenantId = item.id
}
})
let cateName = ''
this.CateData.forEach(item => {
values.cateCode.forEach(ele => {
if (ele == item.code) {
cateName ? (cateName = `${cateName},${item.name}`) : (cateName = item.name)
}
})
})
values.cateName = cateName
let cateCode = ''
values.cateCode.forEach(item => {
cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item)
})
values.cateCode = `[${cateCode}]`
for (const key in values) {
if (typeof values[key] === 'object' && !(values[key] === null)) {
values[key] = JSON.stringify(values[key])
}
}
console.log(values, 11111111)
BookingPrintTemplateSave({ file: this.file, data: values })
.then(res => {
if (res.success) {
this.$message.success('新增成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`新增失败,${res.message}`) // + res.message
}
this.file = {}
this.fileList = []
})
.finally(res => {
this.file = {}
this.fileList = []
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.file = {}
this.fileList = []
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,212 @@
<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="8">
<a-form-item label="显示名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-input
placeholder="请输入显示名称"
v-decorator="['displayName', { rules: [{ required: true, message: '请输入显示名称!' }] }]"
/>
</a-form-item>
</a-col>
<a-col :md="8">
<a-form-item label="模板类型" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请选择模板类型"
v-decorator="['type', { rules: [{ required: true, message: '请选择模板类型!' }] }]"
>
<a-select-option value="FastReport">
FastReport
</a-select-option>
<a-select-option value="ExcelTemplate">
Excel模板
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="分类" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
mode="multiple"
placeholder="请选择分类"
v-decorator="['cateCode', { rules: [{ required: true, message: '请选择分类!' }] }]"
>
<a-select-option v-for="item in CateData" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="租户名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-select
placeholder="请输入租户名称"
v-decorator="['tenantName', { rules: [{ required: true, message: '请输入租户名称!' }] }]"
>
<a-select-option v-for="item in SysTenantData" :key="item.id" :value="item.name">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
<a-upload :file-list="fileList" :multiple="false" :remove="handleRemove" :before-upload="beforeUpload">
<a-button> <a-icon type="upload" /> 文件上传 </a-button>
</a-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import { BookingPrintTemplateSave, SysTenantPage } from '@/api/modular/main/bookingprinttemplateNew'
export default {
data() {
return {
CateData: [],
SysTenantData: [],
file: {},
fileList: [],
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 15 }
},
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
data: {},
id: ''
}
},
mounted() {
SysTenantPage().then(res => {
console.log(res.data)
this.SysTenantData = res.data.rows
})
this.CateData = this.$options.filters['dictData']('booking_template_category')
},
methods: {
handleRemove(file) {
const index = this.fileList.indexOf(file)
const newFileList = this.fileList.slice()
newFileList.splice(index, 1)
this.fileList = newFileList
this.file = {}
},
beforeUpload(file) {
this.form.setFieldsValue({
...this.form.getFieldsValue(),
displayName: file.name.split('.')[0]
})
this.fileList = [file]
this.file = file
return false
},
//
edit(record) {
this.data = record
console.log(record)
this.id = record.id
this.visible = true
setTimeout(() => {
this.form.setFieldsValue({
cateCode: record.cateCode
.split('[')[1]
.split(']')[0]
.split(','),
cateName: record.cateName,
displayName: record.displayName,
tenantId: record.tenantId,
tenantName: record.tenantName,
type: record.type
})
console.log(this.form.getFieldsValue())
}, 100)
},
handleSubmit() {
const {
form: { validateFields }
} = this
this.confirmLoading = true
validateFields((errors, values) => {
console.log(errors, values)
if (!errors) {
this.SysTenantData.forEach(item => {
console.log(item)
if (values.tenantName == item.name) {
values.tenantId = item.id
}
})
let cateName = ''
this.CateData.forEach(item => {
values.cateCode.forEach(ele => {
if (ele == item.code) {
cateName ? (cateName = `${cateName},${item.name}`) : (cateName = item.name)
}
})
})
values.cateName = cateName
let cateCode = ''
values.cateCode.forEach(item => {
cateCode ? (cateCode = `${cateCode},${item}`) : (cateCode = item)
})
values.cateCode = `[${cateCode}]`
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(values)
values.id = this.id
BookingPrintTemplateSave({ file: this.file, data: values })
.then(res => {
if (res.success) {
this.$message.success('编辑成功')
this.confirmLoading = false
this.$emit('ok', values)
this.handleCancel()
} else {
this.$message.error(`编辑失败,${res.message}`)
}
this.file = {}
this.fileList = []
})
.finally(res => {
this.file = {}
this.fileList = []
this.confirmLoading = false
})
} else {
this.confirmLoading = false
}
})
},
handleCancel() {
this.file = {}
this.fileList = []
this.form.resetFields()
this.visible = false
}
}
}
</script>

@ -0,0 +1,467 @@
<template>
<div>
<a-card :bordered="false" :bodyStyle="tstyle">
<div
class="table-page-search-wrapper"
v-if="hasPerm('BookingTemplate:page')"
:class="advanced ? 'Open' : 'Close'"
>
<a-form layout="inline">
<a-row :gutter="48">
<a-col :md="18">
<a-row :gutter="48">
<a-col :md="6" :sm="24" v-for="item in ColumnsQuery" :key="`${item.dataIndex}1`" v-show="item.checked">
<a-form-item :label="item.title">
<a-input v-model="queryParam[item.dataIndex]" allow-clear :placeholder="`请输入${item.title}`" />
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="分类">
<a-select
v-model="queryParam.cateCode"
style="width: 100%"
placeholder="请选择分类"
mode="multiple"
allow-clear
>
<a-select-option v-for="item in CateData" :key="item.id" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :md="6" :sm="24">
<a-form-item label="模板类型">
<a-select v-model="queryParam.type" style="width: 100%" placeholder="请选择模板类型" allow-clear>
<a-select-option value="FastReport">
FastReport
</a-select-option>
<a-select-option value="ExcelTemplate">
Excel模板
</a-select-option>
</a-select>
</a-form-item>
</a-col>
</a-row>
</a-col>
<a-col :md="4" :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-col :md="2" :sm="24" class="SetFlex">
<a-popover placement="bottom" v-model="setVisible" trigger="click">
<template #content>
<columnSetting :columns="ColumnsQuery" @columnChange="columnChange"></columnSetting>
</template>
<span class="tab-btn"> <a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置 </span>
</a-popover>
</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>
<template #tools>
<div class="right">
<a-popover placement="bottom" v-model="setVisible1" trigger="click">
<template #content>
<columnSetting :columns="TableColumns" @columnChange="columnChange1"></columnSetting>
</template>
<span class="tab-btn"> <a-icon type="setting" :style="{ fontSize: '16px' }" /> 设置 </span>
</a-popover>
</div>
</template>
</vxe-toolbar>
<vxe-table :data="loadData" border :loading="loading" empty-text="" v-if="!TableType">
<vxe-column type="seq" width="40" fixed="left"></vxe-column>
<vxe-column
v-for="item in TableColumns"
:key="`${item.dataIndex}3`"
:field="item.dataIndex"
:min-width="item.width"
:title="item.title"
:align="item.align"
v-if="item.checked"
>
<template #default="{ row }" v-if="item.title == '文件名称'">
<a @click="FnDFile(row)">{{ row.fileName }}</a>
</template>
</vxe-column>
<vxe-column title="类型" width="200" align="center">
<template #default="{ row }">
{{ row.cateName }}
</template>
</vxe-column>
<vxe-column title="模板类型" width="200" align="center">
<template #default="{ row }">
{{ RMain(row) }}
</template>
</vxe-column>
<vxe-column title="操作" fixed="right" width="250" align="center">
<template #default="{ row }">
<vxe-button type="text" v-if="row.type == 'ExcelTemplate'" @click="FnExcel(row)"></vxe-button>
<vxe-button type="text" @click="$refs.editForm.edit(row)"></vxe-button>
<a-popconfirm
title="请确认删除?"
ok-text="是"
cancel-text="否"
@confirm="
e => {
confirm(e, row)
}
"
>
<vxe-button type="text">删除</vxe-button>
</a-popconfirm>
</template>
</vxe-column>
</vxe-table>
<vxe-pager
:loading="loading"
:current-page="queryParam.currentPage"
:page-size="queryParam.pageSize"
:total="queryParam.totalResult"
:layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
@page-change="handlePageChange"
>
</vxe-pager>
<add-form ref="addForm" @ok="handleOk" />
<edit-form ref="editForm" @ok="handleOk" />
</a-card>
<a-modal v-model="ExcelVisible" width="800px" title="详细设置">
<vxe-toolbar>
<template #buttons>
<vxe-button @click="insertEvent(-1)"></vxe-button>
<vxe-button @click="$refs.xTable.removeCheckboxRow()"></vxe-button>
<vxe-button icon="vxe-icon-save" @click="saveEvent"></vxe-button>
</template>
</vxe-toolbar>
<vxe-table
border
show-overflow
keep-source
ref="xTable"
max-height="600"
:data="tableData"
:edit-config="{ trigger: 'click', mode: 'row', icon: 'vxe-icon-edit', showStatus: true }"
>
<vxe-column type="checkbox" width="60"></vxe-column>
<vxe-column field="field" title="字段名称" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.field" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="row" title="行" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.row" type="number"></vxe-input>
</template>
</vxe-column>
<vxe-column field="column" title="列" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.column" type="number"></vxe-input>
</template>
</vxe-column>
<vxe-column field="describe" title="固定内容" width="300" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="row.describe" type="text"></vxe-input>
</template>
</vxe-column>
</vxe-table>
<template slot="footer"> <span></span> </template>
</a-modal>
</div>
</template>
<script>
import {
BookingPrintTemplatePage,
BookingPrintTemplateDelete,
BookingPrintTemplateDownload,
BookingTemplateAddOrUpdateExcelTemplate,
BookingTemplateBookingExcelTemplateList
} from '@/api/modular/main/bookingprinttemplateNew'
import { DjyCustomerGet, DjyUserConfigAdd } from '@/api/modular/main/CustomerInformationManagement'
import addForm from './addForm.vue'
import editForm from './editForm.vue'
import columnSetting from '@/components/tableColumnSetting'
const columns = [
// {
// title: '',
// align: 'center',
// dataIndex: 'CateName'
// },
{
title: '租户名称',
align: 'center',
dataIndex: 'tenantName'
},
{
title: '文件名称',
align: 'center',
dataIndex: 'fileName'
}
]
export default {
components: {
addForm,
editForm,
columnSetting
},
data() {
return {
tableData: [],
ExcelVisible: false,
// /
TableType: false,
advanced: false,
loading: false,
setVisible: false,
setVisible1: false,
queryParam: {
currentPage: 1,
pageSize: 10,
totalResult: 1
},
ColumnsQuery: [],
TableColumns: [],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise
loadData: [],
ExcelPid: ''
}
},
created() {
this.CateData = this.$options.filters['dictData']('booking_template_category')
console.log(this.CateData, 111111111111)
},
mounted() {
this.init()
},
methods: {
saveEvent() {
const $table = this.$refs.xTable
const { insertRecords } = $table.getRecordset()
BookingTemplateAddOrUpdateExcelTemplate({
pid: this.ExcelPid,
children: insertRecords
}).then(res => {
console.log(res)
})
console.log(insertRecords)
},
async insertEvent(row) {
const $table = this.$refs.xTable
const { row: newRow } = await $table.insertAt({}, row)
await $table.setActiveCell(newRow, 'name')
},
FnExcel(data) {
this.ExcelPid = data.id
BookingTemplateBookingExcelTemplateList({ id: this.ExcelPid }).then(res => {
this.tableData = res.data
})
this.ExcelVisible = true
},
RMain(data) {
let Text = ''
if (data.type == 'FastReport') {
Text = 'FastReport'
} else if (data.type == 'ExcelTemplate') {
Text = 'Excel模板'
} else {
Text = '-'
}
return Text
},
FnDFile(Data) {
BookingPrintTemplateDownload({ id: Data.id }).then(res => {
const blob = res
let link = document.createElement('a')
link.href = URL.createObjectURL(new Blob([blob], { type: 'application/vnd.ms-excel' }))
link.download = Data.fileName
document.body.appendChild(link)
link.click()
URL.revokeObjectURL(link.href)
})
},
columnChange(data) {
this.ColumnsQuery = [...data]
let Data = []
data.forEach(item => {
if (item.checked) {
Data.push(item.dataIndex)
}
})
DjyUserConfigAdd({
type: 'printing_cond_cfg',
configJson: JSON.stringify(Data)
}).then(res => {
console.log(res)
})
},
columnChange1(data) {
this.TableType = true
this.TableColumns = data
this.$nextTick(() => {
this.TableType = false
})
let Data = []
data.forEach(item => {
if (item.checked) {
Data.push(item.dataIndex)
}
})
DjyUserConfigAdd({
type: 'printing_list_col',
configJson: JSON.stringify(Data)
}).then(res => {
console.log(res)
})
},
toggleAdvanced() {
this.advanced = !this.advanced
},
init() {
Object.assign(this.$data, this.$options.data())
columns.forEach(item => {
item.checked = true
})
columns.forEach(item => {
this.ColumnsQuery.push({ ...item, checked: true })
})
DjyCustomerGet({ type: 'printing_list_col' }).then(res => {
if (res.data && JSON.parse(res.data.configJson).length) {
columns.forEach(item => {
item.checked = false
})
let Arr = []
JSON.parse(res.data.configJson).forEach(item => {
columns.forEach(item2 => {
if (item2.dataIndex == item) {
item2.checked = true
Arr.push(item2)
}
})
})
columns.forEach(item => {
let type = true
Arr.forEach(item2 => {
if (item.dataIndex == item2.dataIndex) {
type = false
}
})
if (type) {
Arr.push(item)
}
})
this.TableColumns = Arr
} else {
this.TableColumns = columns
}
this.FnGetData()
this.$forceUpdate()
})
DjyCustomerGet({ type: 'printing_cond_cfg' }).then(res => {
if (JSON.parse(res.data.configJson).length) {
this.ColumnsQuery = []
columns.forEach(item => {
this.ColumnsQuery.push({ ...item, checked: false })
})
let Arr = []
JSON.parse(res.data.configJson).forEach(item => {
this.ColumnsQuery.forEach(item2 => {
if (item == item2.dataIndex) {
item2.checked = true
Arr.push(item2)
}
})
})
this.ColumnsQuery.forEach(item => {
let type = true
Arr.forEach(item2 => {
if (item.dataIndex == item2.dataIndex) {
type = false
}
})
if (type) {
Arr.push(item)
}
})
this.ColumnsQuery = Arr
}
this.$forceUpdate()
})
},
handlePageChange({ currentPage, pageSize }) {
this.queryParam.pageNo = currentPage
this.queryParam.pageSize = pageSize
this.FnGetData()
},
FnGetData() {
this.loading = true
let Data = {}
BookingPrintTemplatePage({ ...this.queryParam, ...Data }).then(res => {
this.loadData = res.data.rows
this.loading = false
this.queryParam.currentPage = res.data.pageNo
this.queryParam.pageSize = res.data.pageSize
this.queryParam.totalResult = res.data.totalRows
})
},
/**
* 查询参数组装
*/
switchingDate() {
const obj = JSON.parse(JSON.stringify(this.queryParam))
return obj
},
confirm(e, data) {
this.BookingPrintTemplateDelete(data)
},
BookingPrintTemplateDelete(record) {
BookingPrintTemplateDelete(record).then(res => {
if (res.success) {
this.$message.success('删除成功')
this.FnGetData()
} else {
this.$message.error(`删除失败,${res.message}`)
}
})
},
handleOk() {
this.FnGetData()
}
}
}
</script>
<style lang="less">
.table-operator {
margin-bottom: 18px;
}
button {
margin-right: 8px;
}
.Open {
}
.Close {
min-height: 45px;
padding-bottom: 8px;
overflow: hidden;
}
.SetFlex {
display: flex;
justify-content: flex-end;
}
</style>

@ -83,6 +83,48 @@
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择开船日期"
v-decorator="['etd', { rules: [{ required: true, message: '请选择开船日期!' }] }]"
valueFormat="YYYY-MM-DD"
/>
</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']"
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
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
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="['atd']"
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
@ -140,37 +182,6 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
:style="{ width: '100%' }"
placeholder="请选择开船日期"
v-decorator="['etd', { rules: [{ required: true, message: '请选择开船日期!' }] }]"
valueFormat="YYYY-MM-DD"
/>
</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']"
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
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
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
@ -194,17 +205,6 @@
</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="['atd']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>

@ -83,6 +83,48 @@
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
: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']"
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
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
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="['atd']"
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
@ -140,37 +182,7 @@
</a-select>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="开船日期" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-date-picker
: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']"
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
:style="{ width: '100%' }"
placeholder="请选择预抵日期"
v-decorator="['eta']"
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
@ -190,17 +202,6 @@
</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="['atd']"
valueFormat="YYYY-MM-DD HH:mm:ss"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>

Loading…
Cancel
Save