|
|
|
@ -8,25 +8,76 @@
|
|
|
|
|
<a-row :gutter="48">
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="合约号编号">
|
|
|
|
|
<a-input placeholder="请输入合约号编号" v-decorator="['contractNo', { rules: [{ required: false, message: '请输入合约号编号' }] }]"/>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入合约号编号"
|
|
|
|
|
v-decorator="['contractNo', { rules: [{ required: false, message: '请输入合约号编号' }] }]" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="合约号名称">
|
|
|
|
|
<a-input placeholder="请输入合约号名称" v-decorator="['contractName', { rules: [{ required: false, message: '请输入合约号名称' }] }]"/>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入合约号名称"
|
|
|
|
|
v-decorator="['contractName', { rules: [{ required: false, message: '请输入合约号名称' }] }]" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="创建者名称">
|
|
|
|
|
<a-input placeholder="请输入创建者名称" v-decorator="['createUserName', { rules: [{ required: false, message: '请输入创建者名称' }] }]"/>
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入创建者名称"
|
|
|
|
|
v-decorator="['createUserName', { rules: [{ required: false, message: '请输入创建者名称' }] }]" />
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="6" :sm="24">
|
|
|
|
|
<a-form-item label="船公司">
|
|
|
|
|
<a-select
|
|
|
|
|
placeholder="请选择船公司"
|
|
|
|
|
v-decorator="['carrierCode']"
|
|
|
|
|
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 :md="6" :sm="24">
|
|
|
|
|
<span
|
|
|
|
|
class="table-page-search-submitButtons"
|
|
|
|
|
style="text-align:right;"
|
|
|
|
|
>
|
|
|
|
|
<a-form-item label="航线" has-feedback>
|
|
|
|
|
<a-select style="width: 300px;" placeholder="请选择航线" v-decorator="['laneCName']">
|
|
|
|
|
<a-select-option
|
|
|
|
|
v-for="item in laneCodeData"
|
|
|
|
|
:key="item.code"
|
|
|
|
|
:value="item.cnName">
|
|
|
|
|
{{ item.cnName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="8" :sm="24">
|
|
|
|
|
<a-form-item label="目的港" has-feedback>
|
|
|
|
|
<a-select
|
|
|
|
|
show-search
|
|
|
|
|
style="width: 300px;"
|
|
|
|
|
placeholder="请选择目的港"
|
|
|
|
|
v-decorator="['podCode']"
|
|
|
|
|
@search="handleSearch"
|
|
|
|
|
:default-active-first-option="false"
|
|
|
|
|
:show-arrow="false"
|
|
|
|
|
:filter-option="false"
|
|
|
|
|
:not-found-content="null"
|
|
|
|
|
>
|
|
|
|
|
<a-select-option v-for="item in CodeData" :key="item.code" :value="item.code">
|
|
|
|
|
{{ item.cnName }}
|
|
|
|
|
</a-select-option>
|
|
|
|
|
</a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :md="8" :sm="24">
|
|
|
|
|
<span class="table-page-search-submitButtons" style="text-align:right;">
|
|
|
|
|
<a-button type="primary" @click="tableRefresh">查询</a-button>
|
|
|
|
|
<a-button style="margin-left: 8px" @click="tableReset">重置</a-button>
|
|
|
|
|
</span>
|
|
|
|
@ -54,20 +105,18 @@
|
|
|
|
|
v-bind="gridOptions"
|
|
|
|
|
row-class-name="line-box"
|
|
|
|
|
@page-change="handlePageChange"
|
|
|
|
|
style="margin-top: 6px"
|
|
|
|
|
>
|
|
|
|
|
style="margin-top: 6px">
|
|
|
|
|
<template #operate="{ row }">
|
|
|
|
|
<vxe-button type="text" icon="vxe-icon-edit" @click="editColumns(row)"></vxe-button>
|
|
|
|
|
<a-popconfirm
|
|
|
|
|
title="请确认删除?"
|
|
|
|
|
ok-text="是"
|
|
|
|
|
cancel-text="否"
|
|
|
|
|
@confirm="
|
|
|
|
|
e => {
|
|
|
|
|
removeColumns(row)
|
|
|
|
|
}
|
|
|
|
|
@confirm="e => {
|
|
|
|
|
removeColumns(row)
|
|
|
|
|
}
|
|
|
|
|
">
|
|
|
|
|
<vxe-button type="text" icon="vxe-icon-delete" ></vxe-button>
|
|
|
|
|
<vxe-button type="text" icon="vxe-icon-delete"></vxe-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
</template>
|
|
|
|
|
</vxe-grid>
|
|
|
|
@ -76,13 +125,16 @@
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
|
|
|
|
|
<add-form ref="addForm" :fromData="addFromData" :type="addFromType" @ok="handleOk"/>
|
|
|
|
|
<add-form ref="addForm" :fromData="addFromData" :type="addFromType" @ok="handleOk" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
<script>
|
|
|
|
|
import { XCard } from '@/components'
|
|
|
|
|
import initData from './modules/initData'
|
|
|
|
|
import columnSetting from '@/components/tableColumnSetting'
|
|
|
|
|
import { GetCarrierlist } from '@/api/modular/main/vesselinfo'
|
|
|
|
|
import { commondbPortlist } from '@/api/modular/main/CommondbPortlist'
|
|
|
|
|
import { CommondbCodeLaneList } from '@/api/modular/main/CommondbCodeLane'
|
|
|
|
|
import addForm from './modules/addFrom'
|
|
|
|
|
import {
|
|
|
|
|
GetParaContractNoPage,
|
|
|
|
@ -124,16 +176,28 @@ export default {
|
|
|
|
|
data: []
|
|
|
|
|
},
|
|
|
|
|
addFromData: {},
|
|
|
|
|
CodeData:[],
|
|
|
|
|
carrierData: [],
|
|
|
|
|
laneCodeData: [],
|
|
|
|
|
addFromType: 'add'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.showColumns = JSON.parse(JSON.stringify(initData.columns))
|
|
|
|
|
this.getList()
|
|
|
|
|
GetCarrierlist().then(res => {
|
|
|
|
|
this.carrierData = res.data
|
|
|
|
|
})
|
|
|
|
|
CommondbCodeLaneList().then(res => {
|
|
|
|
|
this.laneCodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
commondbPortlist({ KeyWord: '' }).then(res => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
mounted() { },
|
|
|
|
|
methods: {
|
|
|
|
|
init (queryParam = {}) {
|
|
|
|
|
init(queryParam = {}) {
|
|
|
|
|
this.gridOptions.pagerConfig = {
|
|
|
|
|
total: 0,
|
|
|
|
|
currentPage: 1,
|
|
|
|
@ -143,7 +207,17 @@ export default {
|
|
|
|
|
this.gridOptions.data = []
|
|
|
|
|
this.getList(queryParam)
|
|
|
|
|
},
|
|
|
|
|
handlePageChange ({ currentPage, pageSize }) {
|
|
|
|
|
handleSearch(data) {
|
|
|
|
|
commondbPortlist({ KeyWord: data }).then(res => {
|
|
|
|
|
this.CodeData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
carrierSearch(data) {
|
|
|
|
|
GetCarrierlist({ KeyWord: data }).then(res => {
|
|
|
|
|
this.carrierData = res.data
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
handlePageChange({ currentPage, pageSize }) {
|
|
|
|
|
console.log(currentPage, pageSize)
|
|
|
|
|
const { form: { validateFields } } = this
|
|
|
|
|
validateFields((err, values) => {
|
|
|
|
@ -170,12 +244,15 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getList (queryParam = {}) {
|
|
|
|
|
getList(queryParam = {}) {
|
|
|
|
|
const { currentPage, pageSize } = this.gridOptions.pagerConfig
|
|
|
|
|
GetParaContractNoPage({
|
|
|
|
|
contractNo: queryParam.contractNo,
|
|
|
|
|
contractName: queryParam.contractName,
|
|
|
|
|
createUserName: queryParam.createUserName,
|
|
|
|
|
carrierCode: queryParam.carrierCode,
|
|
|
|
|
laneCName: queryParam.laneCName,
|
|
|
|
|
podCode: queryParam.podCode,
|
|
|
|
|
pageNo: currentPage,
|
|
|
|
|
pageSize: pageSize
|
|
|
|
|
}).then(res => {
|
|
|
|
@ -191,7 +268,7 @@ export default {
|
|
|
|
|
console.log(err)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
editColumns (data) {
|
|
|
|
|
editColumns(data) {
|
|
|
|
|
this.addFromType = 'edit'
|
|
|
|
|
this.addFromId = data.id
|
|
|
|
|
GetParaContractNoInfo({
|
|
|
|
@ -206,7 +283,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
removeColumns (data) {
|
|
|
|
|
removeColumns(data) {
|
|
|
|
|
DeleteParaContractNoInfo(data.id).then(res => {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
this.$message.success('删除成功')
|
|
|
|
@ -221,13 +298,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
addProject () {
|
|
|
|
|
addProject() {
|
|
|
|
|
this.addFromData = {}
|
|
|
|
|
this.addFromType = 'add'
|
|
|
|
|
this.addFromId = ''
|
|
|
|
|
this.$refs.addForm.add()
|
|
|
|
|
},
|
|
|
|
|
columnChange (data) {
|
|
|
|
|
columnChange(data) {
|
|
|
|
|
const arr = []
|
|
|
|
|
data.map((item, index) => {
|
|
|
|
|
if (item.checked) {
|
|
|
|
@ -239,7 +316,7 @@ export default {
|
|
|
|
|
this.gridOptions.columns = arr
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
},
|
|
|
|
|
confirmRemove (e) {
|
|
|
|
|
confirmRemove(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
const select = this.$refs.xGrid.getCheckboxRecords()
|
|
|
|
|
const pkIdArr = select.map((item, index) => {
|
|
|
|
@ -260,11 +337,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
cancelRemove (e) {
|
|
|
|
|
cancelRemove(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.$message.error('取消操作')
|
|
|
|
|
},
|
|
|
|
|
handleOk () {
|
|
|
|
|
handleOk() {
|
|
|
|
|
const form = this.$refs.addForm.form
|
|
|
|
|
form.validateFields((errors, values) => {
|
|
|
|
|
if (!errors) {
|
|
|
|
@ -300,11 +377,11 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
tableReset () {
|
|
|
|
|
tableReset() {
|
|
|
|
|
this.form.resetFields()
|
|
|
|
|
this.init()
|
|
|
|
|
},
|
|
|
|
|
tableHeaderEdit() {}
|
|
|
|
|
tableHeaderEdit() { }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|