修改问题

master
sunzehua 1 year ago
parent a59eaa3ecd
commit ba487f6417

@ -362,18 +362,18 @@ const booking = {
allData['customernameInitList'] = $data
allData['thirdPayInitList'] = $data
break
case 'service':
allData['serviceInitList'] = $data
break
case 'sTemplate':
allData['shippernameInitList'] = $data
break
case 'fTemplate':
allData['consigneenameInitList'] = $data
break
case 'tTemplate':
allData['notifypartynameInitList'] = $data
break
// case 'service':
// allData['serviceInitList'] = $data
// break
// case 'sTemplate':
// allData['shippernameInitList'] = $data
// break
// case 'fTemplate':
// allData['consigneenameInitList'] = $data
// break
// case 'tTemplate':
// allData['notifypartynameInitList'] = $data
// break
case 't2Template':
allData['notifypartY2nameInitList'] = $data
break

@ -1,7 +1,10 @@
<template>
<div class="main">
<div class="btn-list">
<a-button type="primary" v-if="details.bsstatus=='已接收'" @click="handleAutio"></a-button>
<a-popconfirm v-if="details.bsstatus == '已接收'" title="确定通过吗?" ok-text="是" cancel-text="否" @confirm="handleAccept">
<a-button type="primary">通过</a-button>
</a-popconfirm>
<a-button type="primary" v-if="details.bsstatus == '已接收'" @click="handleAutio"></a-button>
<span v-if="details.bookingno" style="margin: 0 10px;">:</span>
<span v-if="details.bookingno">{{ details.bookingno }}</span>
</div>
@ -227,7 +230,7 @@
<a-row style="margin-top: 40px;">
<a-col :span="12">
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cargoid" label="货物类型">
<span>{{ details.cargoid }}</span>
<span>{{ details.cargoName }}</span>
</a-form-model-item>
</a-col>
<a-col :span="12">
@ -286,9 +289,7 @@
:wrapperCol="wrapperCol"
has-feedback
prop="pkgs">
<div class="line-box">
<span>{{ details.pkgs }}</span>
</div>
<span>{{ details.pkgs }}</span>
</a-form-model-item>
</a-col>
</a-row>
@ -304,7 +305,7 @@
</vxe-column>
<vxe-column field="ctnall" title="箱型">
<template #default="{ row }">
<span>{{ row.ctncode }}</span>
<span>{{ row.ctnall }}</span>
</template>
</vxe-column>
<vxe-column field="ctnnum" title="数量">
@ -414,7 +415,7 @@
</div>
</a-spin>
<a-modal
title="审核"
title="驳回"
:width="600"
:visible="autioFlag"
:maskClosable="false"
@ -422,22 +423,8 @@
@cancel="autioFlag = false">
<a-spin :spinning="autioLoading">
<a-form :form="autioForm" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }" @submit="handleSureAution">
<a-form-item label="是否同意">
<a-select
v-decorator="[
'accept',
{ rules: [{ required: true, message: '请选择' }] },
]">
<a-select-option value="true">
同意
</a-select-option>
<a-select-option value="false">
驳回
</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="审核意见">
<a-textarea v-decorator="['comment']" :rows="4" />
<a-form-item label="驳回原因">
<a-textarea v-decorator="['comment',{ rules: [{ required: true, message: '!' }] }]" :rows="4" />
</a-form-item>
</a-form>
</a-spin>
@ -597,6 +584,25 @@ export default {
}
});
},
handleAccept() {
const data = {
id: this.$route.query.id,
accept: true
}
this.autioLoading = true
BookingCustomerOrderAuditBooking(data).then(res => {
if (res.success) {
this.$message.success('操作成功')
this.autioFlag = false
this.autioForm.resetFields()
this.getDetail()
this.autioLoading = false
} else {
this.$message.error(res.message)
this.autioLoading = false
}
})
},
handleSubimt() {
BookingCustomerOrderSubmit([this.details.id]).then(res => {
this.loading = true
@ -631,6 +637,20 @@ export default {
BookingCustomerOrderGet(data).then(res => {
if (res.success) {
this.loading = false
if (res.data.cargoid) {
if (res.data.cargoid === 'S') {
res.data.cargoName = 'S 普通货'
}
if (res.data.cargoid === 'R') {
res.data.cargoName = 'R 冻柜'
}
if (res.data.cargoid === 'D') {
res.data.cargoName = 'D 危险品'
}
if (res.data.cargoid === 'O') {
res.data.cargoName = 'O 超限箱'
}
}
this.details = res.data
if (Object.keys(this.details.files).length > 0) {
const arr = []

@ -126,7 +126,7 @@
</div>
</template>
<template #bsstatusname="{ row }">
<div @click="handleOpenStatus(row)" style="cursor: pointer;" class="mblno"> {{ row.bsstatus }}</div>
<span @click="handleOpenStatus(row)" style="cursor: pointer;" class="mblno"> {{ row.bsstatus }}</span>
</template>
<template #vessel="{ row }">
<div class="vessel">{{ row.vessel }}</div>
@ -426,12 +426,7 @@ import initData from './modules/initData'
import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig'
import { mapGetters, mapActions } from 'vuex'
const formInitData = [
{ title: '目的港', align: 'center', width: 120, label: 'DESTINATION', type: 'complete', showLabel: 'enName' },
{ title: '开船日期', align: 'center', width: 160, label: 'ETD', type: 'dateRange', resLabel: ['BETD', 'EETD'] },
{ title: '箱型', align: 'center', width: 120, label: 'CNTRTOTAL', type: 'select', showLabel: 'name' },
{ title: '付费方式', align: 'center', width: 160, label: 'BLFRT', type: 'complete', showLabel: 'enName' },
{ title: '船名', align: 'center', width: 120, label: 'VESSEL', type: 'complete', showLabel: 'name' },
{ title: '航次', align: 'center', width: 120, label: 'VOYNO', type: 'input' }
]
export default {
name: 'BookingCustomerOrder',
@ -461,7 +456,7 @@ export default {
ResetType: true,
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
advanced: false,
formData: formInitData,
formData: JSON.parse(JSON.stringify(initData.condAllData)),
formRes: {},
searchData: { multisort: [] },
formAllData: null,
@ -858,9 +853,6 @@ export default {
const $data = {}
res.data.map((item, index) => {
switch (item.type) {
case 'booking_customer_list_cond':
this.$set($data, 'booking_customer_list_cond', item)
break
case 'booking_customer_list_sort':
this.setSort(item)
break
@ -1247,6 +1239,7 @@ export default {
tableReset() {
this.ResetType = false
console.log(this.formRes)
Object.keys(this.formRes).map((item, index) => {
this.formRes[item] = ''
})

@ -5,15 +5,15 @@ export default {
{
field: 'bsstatus',
label: 'bsstatus',
width: 160,
title: '业务状态',
showHeaderOverflow: true,
showOverflow: false,
sortable: true,
slots: { default: 'bsstatusname' }
},
{ field: 'bookingno', label: 'bookingno', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true },
{ field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true },
{ field: 'bookingno', label: 'bookingno', title: '订舱编号', showHeaderOverflow: true, sortable: true },
{ field: 'carrier', title: '船公司', showHeaderOverflow: true, sortable: true },
{ field: 'bookingTenantName', title: '订舱人', showHeaderOverflow: true },
{
field: 'cntrtotal',
label: 'CNTRTOTAL',
@ -22,14 +22,6 @@ export default {
showHeaderOverflow: true,
sortable: true
},
{
field: 'bookstatus',
label: 'BOOKSTATUS',
minWidth: 140,
title: '运踪',
showHeaderOverflow: true,
slots: { default: 'bookstatus' }
},
{
field: 'etd',
label: 'ETD',
@ -39,7 +31,14 @@ export default {
sortable: true,
slots: { default: 'etd' }
},
{ field: 'blfrt', label: 'BLFRT', width: 120, title: '付费方式', showHeaderOverflow: true, sortable: true },
{
field: 'createdTime',
label: 'createdTime',
width: 150,
title: '订舱日期',
showHeaderOverflow: true
},
{ field: 'blfrt', label: 'BLFRT', title: '付费方式', showHeaderOverflow: true, sortable: true },
{ field: 'cargoid', label: 'CARGOID', width: 120, title: '货物标识', showHeaderOverflow: true, sortable: true },
{ field: 'vessel', label: 'VESSEL', width: 120, title: '船名', showHeaderOverflow: true, sortable: true },
{ field: 'voyno', label: 'VOYNO', width: 120, title: '航次', showHeaderOverflow: true },
@ -477,49 +476,23 @@ export default {
],
// ==== 表单部分 ====
condAllData: [
{ title: '订舱编号', align: 'center', width: 160, label: 'bookingno', type: 'input' },
{
title: '船公司',
align: 'center',
width: 120,
label: 'CARRIER',
type: 'select',
showLabel: 'enName',
showLabel2: 'cnName'
},
{
title: '场站',
align: 'center',
width: 120,
label: 'YARDID',
type: 'select',
showLabel: 'code',
showLabel2: 'name'
},
{ title: '目的港', align: 'center', width: 120, label: 'DESTINATION', type: 'complete', showLabel: 'enName' },
{ title: '开船日期', align: 'center', width: 160, label: 'ETD', type: 'dateRange', resLabel: ['etdStart', 'etdEnd'] },
{ title: '订舱日期', align: 'center', width: 160, label: 'time', type: 'dateRange', resLabel: ['createdTimeStart', 'createdTimeEnd'] },
{ title: '船名', align: 'center', width: 120, label: 'VESSEL', type: 'complete', showLabel: 'name' },
{ title: '航次', align: 'center', width: 120, label: 'VOYNO', type: 'input' },
{ title: '订舱公司', align: 'center', width: 120, label: 'bookingTenantName', type: 'input' },
{
title: '业务状态',
align: 'center',
width: 160,
width: 120,
label: 'bsStatusList',
type: 'select',
showLabel: 'name',
data: [
{ name: 'ONE' },
{ name: 'TWO' },
{ name: 'THREE' },
{ name: 'FOUR' },
{ name: 'FIVE' },
{ name: 'SIX' },
{ name: 'SEVEN' },
{ name: 'EIGHT' },
{ name: 'NINE' },
{ name: 'TEN' }
{ name: '已审核' },
{ name: '已驳回' },
{ name: '已提交' },
{ name: '已录入' }
]
}
},
{ title: '订舱日期', align: 'center', width: 160, label: 'time', type: 'dateRange', resLabel: ['createdTimeStart', 'createdTimeEnd'] },
{ title: '开船日期', align: 'center', width: 160, label: 'ETD', type: 'dateRange', resLabel: ['etdStart', 'etdEnd'] },
{ title: '箱型', align: 'center', width: 120, label: 'CNTRTOTAL', type: 'select', showLabel: 'name' }
]
}

@ -508,13 +508,13 @@ export default {
}, 800)
if (e) {
Object.keys(this.searchQuery).map((item, index) => {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem'].includes(item)) {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem', 'TemplateName'].includes(item)) {
this.searchQuery[item] = e
}
})
} else {
Object.keys(this.searchQuery).map((item, index) => {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem'].includes(item)) {
if (['Title', 'KeyWord', 'SearchValue', 'name', 'keyword', 'queryItem', 'TemplateName'].includes(item)) {
this.searchQuery[item] = ''
}
})

@ -642,6 +642,7 @@ export default {
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
console.log('g')
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -688,6 +689,7 @@ export default {
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
console.log('f')
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -755,14 +757,16 @@ export default {
setTimeout(() => {
const key = this.$route.fullPath
const detailsChange = Object.keys(this.needSavePages).includes(key)
setTimeout(() => {
console.log('e')
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
this.checkSaveFun({ type: 'details', hasChange: false })
const hbListChange = !!this.needSavePages[key].hbList
this.checkSaveFun({ type: 'hbList', hasChange: hbListChange })
this.inChildLoading = false
}, 1300);
}, 500)
this.$forceUpdate()
} else {
@ -779,6 +783,7 @@ export default {
const detailsChange = Object.keys(this.needSavePages).includes(key)
? !!this.needSavePages[key].details
: false
console.log('d')
this.checkSaveFun({ type: 'details', hasChange: detailsChange })
const hbListChange = !!this.needSavePages[key].hbList
@ -1152,6 +1157,7 @@ export default {
this.inPageLoading = false
setTimeout(() => {
setTimeout(() => {
console.log('c')
this.checkSaveFun({ type: 'details', hasChange: false })
}, 600)
this.detailsLoadOver = true
@ -1195,6 +1201,7 @@ export default {
changeDetailFun(data) {
const { detail, type } = data
console.log(this.ifCompare(this.bookingDetails, detail), !this.inChildLoading)
if (this.ifCompare(this.bookingDetails, detail) && !this.inChildLoading) {
this.checkSaveFun({ type: 'details', hasChange: true })
}
@ -1344,6 +1351,7 @@ export default {
that.isAdd = false
this.setDeatilsFun(res, true)
that.checkSaveFun({ type: 'hbList', hasChange: false })
console.log('b')
that.checkSaveFun({ type: 'details', hasChange: false })
const newBookingList = JSON.parse(JSON.stringify(this.bookingList))
const newBookingGridOptions = JSON.parse(JSON.stringify(this.bookingGridOptions))
@ -1592,10 +1600,12 @@ export default {
this.$set(this.bookingDetails, 'hbList', data)
this.checkSaveFun({ type: 'hbList', hasChange: true })
} else {
console.log('a')
this.checkSaveFun({ type: 'hbList', hasChange: false })
}
},
checkSaveFun(data) {
console.log(data)
if (this.inGoodsSave) {
return false
}

@ -30,6 +30,7 @@
@cancel="cancelRemove"
> -->
<a-button class="order-btn" size="small" @click="sendOrderFun()"></a-button>
<!-- <a-button class="order-btn" style="margin-right: 0px !important;" size="small" @click="handleRef"></a-button> -->
<!-- </a-popconfirm> -->
</div>
<div class="sec-order">
@ -370,7 +371,7 @@
size="small"
icon="save"
@click="saveModel('consignee')"
>保存</a-button
>保存</a-button
>
</div>
<a-button class="order-btn" size="small" type="primary" @click="CopyConsignee">
@ -502,7 +503,7 @@
size="small"
icon="save"
@click="saveModel('notifyparty')"
>保存</a-button
>保存</a-button
>
</div>
<a-button class="order-btn" size="small" type="primary" @click="CopyNotifyparty">
@ -1889,6 +1890,9 @@ export default {
this.modelVisible = false
this.modelType = ''
this.modelName = ''
},
handleRef() {
},
handleModelSubmit() {
if (!this.modelName) {
@ -1980,7 +1984,7 @@ export default {
},
close() {
this.openPreOrderShow = false
let obj = {
const obj = {
data1: this.orderList,
data2: this.orderDetails ? this.orderDetails.ediCtn : ''
}
@ -2090,7 +2094,6 @@ export default {
// },
]
}
console.log(type, 'type')
if (isHBL || type === 'enter') {
$details.ctnInputs.forEach((item) => {
$data.ediCtn.push({
@ -2152,12 +2155,6 @@ export default {
$data.shippercountry = 'CN'
$data.shippercountryName = 'CN/中国'
}
// if ($data.portdischargeid) {
// GetPortlist({ KeyWord: $data.portdischargeid }).then(res => {
// $data.notifypartycountry = res.data[0].countryCode
// $data.notifypartycountryName = res.data[0].country
// })
// }
if ($data.portdischargeid && !isHBL) {
GetPortlist({ KeyWord: $data.portdischargeid }).then((res) => {
if (res.data) {
@ -2183,11 +2180,6 @@ export default {
$data.notifypartyname = newArr[0]
$data.notifypartyaddR1 = newArr[1]
}
// if ($data.placedeliveryid) {
// $data.consigneecountry = 'CN'
// $data.consigneecountryName = ''
// }
this.orderDetails = $data
this.orderList.push($data)
},
@ -2364,7 +2356,7 @@ export default {
this.orderDetails.carrierid = res.code || ''
this.orderDetails.carrierName = res.enName || ''
} else if (['shipperTemplate', 'notifypartyTemplate', 'consigneeTemplate'].includes(type)) {
let name = type.split('Template')[0]
const name = type.split('Template')[0]
console.log(name, res, `${type}tel`)
this.orderDetails[type] = res.title || ''
this.orderDetails[`${name}name`] = res.name || ''
@ -2414,7 +2406,7 @@ export default {
// console.log('selectionRangeKeys::', selectionRangeKeys)
},
addCtn() {
let $data = {
const $data = {
id: 0,
pId: 0,
ctnall: '',
@ -2484,8 +2476,8 @@ export default {
str1 = num1.toString()
str2 = num2.toString()
//
isExistDot1 = str1.indexOf('.') != -1 ? true : false
isExistDot2 = str2.indexOf('.') != -1 ? true : false
isExistDot1 = str1.indexOf('.') != -1
isExistDot2 = str2.indexOf('.') != -1
//
if (isExistDot1) {
ws1 = str1.split('.')[1].length
@ -2647,7 +2639,7 @@ export default {
}
const sendArr = []
let tempstr = ''
let tempstr1 = ''
const tempstr1 = ''
this.selectArr.map((item, index) => {
if (this.orderList[item].id !== 0) {
// if (this.orderList[item].state === '') {

@ -1,7 +1,9 @@
<template>
<div class="right-box">
<a-card :bodyStyle="tstyle" :bordered="false">
<div class="title"><i class="iconfont icon-ERP_zhuyi"></i><span>注意事项</span></div>
<div class="title"><i class="iconfont icon-ERP_zhuyi"></i><span>注意事项</span>
<a-icon class="rule-icon" @click="handleOpenRule({}, 1)" type="setting" theme="filled" />
</div>
<div class="content">
<div class="tip" v-if="excuteRules.length > 0">
<div class="rules-label" v-for="(rule, rindex) in excuteRules" :key="rindex">
@ -9,7 +11,7 @@
<i class="iconfont icon-xiazaishibai Warning" v-else-if="rule.errorType === 'Warning'"></i>
<i class="iconfont icon-shibai Error" v-else-if="rule.errorType === 'Error'"></i>
<span>{{ rule.resultName }}</span>
<a-icon class="rule-icon" @click="handleOpenRule(rule)" type="setting" theme="filled" />
<a-icon class="rule-icon" @click="handleOpenRule(rule, 2)" type="setting" theme="filled" />
</div>
</div>
<div class="tip" v-else-if="excuteRulesType === 'success'">
@ -334,10 +336,10 @@
@cancel="handleCancel">
<a-spin :spinning="spinningRule">
<a-form :form="ruleForm" :label-col="{ span: 5 }" :wrapper-col="{ span: 19 }" @submit="handleSubimtRole">
<a-form-item label="规则代码">
<a-form-item v-if="roleData.ruleName" label="规则代码">
{{ roleData.ruleName }}
</a-form-item>
<a-form-item label="规则提示">
<a-form-item v-if="roleData.ruleNotice" label="规则提示">
{{ roleData.ruleNotice }}
</a-form-item>
<a-form-item label="意见类型">
@ -354,18 +356,18 @@
<a-select-option value="ADD">
新增
</a-select-option>
<a-select-option value="DELETE">
<a-select-option v-if="type===2" value="DELETE">
删除
</a-select-option>
</a-select>
<span>当前状态:{{ ruleLog.length>0?ruleLog[0].statusName:'' }}</span>
<span>当前状态:{{ ruleLog.length > 0 ? ruleLog[0].statusName : '' }}</span>
</a-form-item>
<a-form-item label="意见内容">
<a-textarea v-decorator="['opinionContent', { rules: [{ required: true, message: '' }] }]" />
<a-textarea style="line-height: 20px;" :row="4" v-decorator="['opinionContent', { rules: [{ required: true, message: '' }] }]" />
</a-form-item>
<a-form-item label="意见日志">
<div style="display: flex;justify-content: space-between;" v-for="(item,index) in ruleLog" :key="index">
<span style="flex-grow:0;flex-shrink:0" > {{ item.genDate }}</span>
<div style="display: flex;justify-content: space-between;" v-for="(item, index) in ruleLog" :key="index">
<span style="flex-grow:0;flex-shrink:0"> {{ item.genDate }}</span>
{{ item.opinionTypeName }}&nbsp;&nbsp;&nbsp;{{ item.opinionContent }}
</div>
</a-form-item>
@ -415,6 +417,7 @@ export default {
return {
delayTime: 500,
roleFlag: false,
type:2,
spinning: false,
ruleLog: [],
spinningRule: false,
@ -513,28 +516,36 @@ export default {
handleCancel() {
this.roleFlag = false
},
handleOpenRule(rule) {
rule.ruleNotice = rule.resultName
this.roleFlag = true
this.roleData = rule
this.spinningRule = true
this.ruleLog = []
this.ruleForm.resetFields()
const data = {
'ruleName': this.roleData.ruleName,
'ruleNotice': this.roleData.ruleNotice
}
GetRuleOpinionLog(data).then(res => {
if (res.data.succ) {
this.spinningRule = false
if (res.data.rows) {
this.ruleLog = res.data.rows
}
} else {
this.$message.error(res.data.msg)
this.spinningRule = false
handleOpenRule(rule, type) {
this.type = type
if (type === 2) {
rule.ruleNotice = rule.resultName
this.spinningRule = true
this.roleFlag = true
this.roleData = rule
this.ruleLog = []
this.ruleForm.resetFields()
const data = {
'ruleName': this.roleData.ruleName,
'ruleNotice': this.roleData.ruleNotice
}
})
GetRuleOpinionLog(data).then(res => {
if (res.data.succ) {
this.spinningRule = false
if (res.data.rows) {
this.ruleLog = res.data.rows
}
} else {
this.$message.error(res.data.msg)
this.spinningRule = false
}
})
} else {
this.roleFlag = true
this.roleData = rule
this.ruleLog = []
this.ruleForm.resetFields()
}
},
handleRefsh() {
this.btnLoading = true

@ -276,10 +276,31 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
handleSelectChange(e) {
this.$emit('change', {
form: this.labelData,
value: this.dataList[e][this.labelData.showLabel]
})
if (e) {
if (this.labelData.label === 'bsStatusList') {
this.$emit('change', {
form: this.labelData,
value: [this.dataList[e][this.labelData.showLabel]]
})
} else {
this.$emit('change', {
form: this.labelData,
value: this.dataList[e][this.labelData.showLabel]
})
}
} else {
if (this.labelData.label === 'bsStatusList') {
this.$emit('change', {
form: this.labelData,
value: []
})
} else {
this.$emit('change', {
form: this.labelData,
value: ''
})
}
}
},
handleSelectChangeTree(e) {
this.$emit('change', {
@ -291,7 +312,6 @@ export default {
this.dataList = this.emnuData(this.labelData.label)
},
getSelectFirst(e) {
console.log(e)
if (!e) {
if (
[
@ -309,7 +329,8 @@ export default {
'taskCategory',
'taskSource',
'taskType',
'OP'
'OP',
'bsStatusList'
].includes(this.labelData.label)
) {
this.dataList = this.emnuData(this.labelData.label)
@ -346,6 +367,8 @@ export default {
return this.bookingInitData.opInitList
case 'status':
return this.labelData.data
case 'bsStatusList':
return this.labelData.data
case 'taskCategory':
return this.labelData.data
case 'taskSource':

@ -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>

Loading…
Cancel
Save