修改问题

master
sunzehua 1 year ago
parent b3d01a7b61
commit ac4adae874

@ -1,7 +1,10 @@
<template> <template>
<div class="main"> <div class="main">
<div class="btn-list"> <div class="btn-list">
<a-button type="primary" v-if="details.bsstatus=='' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'" @click="handleSave"></a-button> <a-button
type="primary"
v-if="details.bsstatus == '' || !details.bsstatus || details.bsstatus == '已录入' || details.bsstatus == '已驳回'"
@click="handleSave">保存</a-button>
<a-button type="primary" @click="handleCopy"></a-button> <a-button type="primary" @click="handleCopy"></a-button>
<a-button type="primary">存为模板</a-button> <a-button type="primary">存为模板</a-button>
<a-button type="primary" v-if="details.bsstatus" @click="handleOpenStatus"></a-button> <a-button type="primary" v-if="details.bsstatus" @click="handleOpenStatus"></a-button>
@ -382,7 +385,7 @@
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cargoid" label="货物类型"> <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="cargoid" label="货物类型">
<selectView <selectView
type="cargoid" type="cargoid"
:defaultVal="details.cargoid" :defaultVal="details.cargoName"
searchApi="cargoData" searchApi="cargoData"
:searchQuery="{ name: '' }" :searchQuery="{ name: '' }"
:showLabel="['name']" :showLabel="['name']"
@ -393,7 +396,14 @@
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hscode" label="HS编码"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hscode" label="HS编码">
<a-input v-model="details.hscode" size="small" allow-clear placeholder="请输入HS编码" /> <a-input-number
:precision="1"
style="width: 115px;"
decimalSeparator="1"
v-model="details.hscode"
size="small"
allow-clear
placeholder="请输入HS编码" />
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -407,7 +417,7 @@
has-feedback has-feedback
prop="kgs"> prop="kgs">
<div class="line-box"> <div class="line-box">
<a-input size="small" :allowClear="true" v-model="details.kgs" /> <a-input-number size="small" :allowClear="true" v-model="details.kgs" />
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('kgs')"></i> <i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('kgs')"></i>
<span class="unit">KGS</span> <span class="unit">KGS</span>
</div> </div>
@ -422,7 +432,7 @@
has-feedback has-feedback
prop="cbm"> prop="cbm">
<div class="line-box"> <div class="line-box">
<a-input size="small" :allowClear="true" v-model="details.cbm" /> <a-input-number size="small" :allowClear="true" v-model="details.cbm" />
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('cbm')"></i> <i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('cbm')"></i>
<span class="unit">CBM</span> <span class="unit">CBM</span>
</div> </div>
@ -458,7 +468,14 @@
has-feedback has-feedback
prop="pkgs"> prop="pkgs">
<div class="line-box"> <div class="line-box">
<a-input :allowClear="true" size="small" v-model="details.pkgs" type="number" /> <a-input-number
:precision="1"
style="width: 115px;"
decimalSeparator="1"
:allowClear="true"
size="small"
v-model="details.pkgs"
type="number" />
<i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i> <i class="iconfont icon-bianji1 edit-icon" @click="editTextEntryModel('pkgs')"></i>
</div> </div>
</a-form-model-item> </a-form-model-item>
@ -511,12 +528,7 @@
has-feedback has-feedback
prop="tempset"> prop="tempset">
<div class="line-box"> <div class="line-box">
<inputView <a-input size="small" v-model="details.tempset" />
type="tempset"
:ishd="details.cargoid !== 'R'"
size="small"
:parentVal="details.tempset"
@getInputChange="inputChange" />
</div> </div>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
@ -542,7 +554,7 @@
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
has-feedback has-feedback
prop="reeferf"> prop="reeferf">
<inputView type="reeferf" size="small" :parentVal="details.reeferf" @getInputChange="inputChange" /> <a-input size="small" v-model="details.reeferf" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
@ -592,7 +604,42 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row style="display: flex;" > <a-row v-if="details.cargoid == 'O'">
<a-col :span="6">
<a-form-model-item
class="from-label"
label="长"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="dunno">
<a-input size="small" v-model="details.dunno" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item
class="from-label"
label="宽"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="dclass">
<a-input size="small" v-model="details.dclass" />
</a-form-model-item>
</a-col>
<a-col :span="6">
<a-form-model-item
class="from-label"
label="高"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
has-feedback
prop="linkman">
<a-input size="small" v-model="details.linkman" />
</a-form-model-item>
</a-col>
</a-row>
<a-row style="display: flex;">
<a-upload <a-upload
:customRequest="customRequest" :customRequest="customRequest"
:showUploadList="false" :showUploadList="false"
@ -720,12 +767,7 @@
</div> </div>
</div> </div>
</a-modal> </a-modal>
<a-modal <a-modal title="状态历史" :maskClosable="false" :width="800" :visible="statusFlag" @cancel="statusFlag = false">
title="状态历史"
:maskClosable="false"
:width="800"
:visible="statusFlag"
@cancel="statusFlag=false">
<div> <div>
<vxe-table border ref="xTable" :data="statusList"> <vxe-table border ref="xTable" :data="statusList">
<vxe-column field="status" title="业务状态"> <vxe-column field="status" title="业务状态">
@ -754,6 +796,19 @@ import {
BookingCustomerOrderDelete, BookingCustomerOrderSubmit, BookingCustomerOrderCancelSubmit BookingCustomerOrderDelete, BookingCustomerOrderSubmit, BookingCustomerOrderCancelSubmit
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
const startDetails = {
shipper: '',
serviceList: [],
service: 'CY-CY',
portloadid: 'CNTAO',
portload: 'QINGDAO',
blfrt: 'FREIGHT PREPAID',
notifyparty: '',
consignee: '',
cargoid: '',
ctnList: [],
tempid: 'C'
}
export default { export default {
components: { components: {
XCard, XCard,
@ -835,6 +890,7 @@ export default {
modelconfirm: false, modelconfirm: false,
modelVisible: false, modelVisible: false,
statusFlag: false, statusFlag: false,
saveFlag: false,
textEntryModalVisible: false, textEntryModalVisible: false,
textEntryModalTitle: '', textEntryModalTitle: '',
historyData: {}, historyData: {},
@ -869,30 +925,16 @@ export default {
details: { details: {
shipper: '', shipper: '',
serviceList: [], serviceList: [],
service: 'CY-CY',
portloadid: 'CNTAO',
portload: 'QINGDAO',
blfrt: 'FREIGHT PREPAID',
notifyparty: '', notifyparty: '',
consignee: '', consignee: '',
cargoid: '', cargoid: '',
ctnList: [] ctnList: []
}, },
rules: { rules: {
linkman: [
{ required: true, message: '请输入', trigger: 'blur' }
],
dclass: [
{ required: true, message: '请输入', trigger: 'blur' }
],
dunno: [
{ required: true, message: '请输入', trigger: 'blur' }
],
tempset: [
{ required: true, message: '请输入', trigger: 'blur' }
],
tempid: [
{ required: true, message: '请选择', trigger: 'blur' }
],
reeferf: [
{ required: true, message: '请输入', trigger: 'blur' }
]
}, },
loading: false loading: false
@ -990,13 +1032,7 @@ export default {
this.getDetail() this.getDetail()
} else { } else {
this.isAdd = true this.isAdd = true
this.details = { this.details = JSON.parse(JSON.stringify(startDetails))
shipper: '',
serviceList: [],
notifyparty: '',
consignee: '',
ctnList: []
}
this.fileList = [] this.fileList = []
} }
}, },
@ -1043,6 +1079,20 @@ export default {
BookingCustomerOrderGet(data).then(res => { BookingCustomerOrderGet(data).then(res => {
if (res.success) { if (res.success) {
this.loading = false 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 this.details = res.data
if (this.details.serviceItemList && this.details.serviceItemList.length > 0) { if (this.details.serviceItemList && this.details.serviceItemList.length > 0) {
this.details.serviceList = this.details.serviceItemList.map(item => { this.details.serviceList = this.details.serviceItemList.map(item => {
@ -1074,97 +1124,104 @@ export default {
}) })
}, },
handleSave() { handleSave() {
this.$refs.basicFrom.validate(valid => { if (!this.saveFlag) {
if (valid) { this.$refs.basicFrom.validate(valid => {
const data = { if (valid) {
...this.details const data = {
} ...this.details
if (!this.details.serviceList) {
this.details.serviceList = []
}
if (this.details.serviceList.length > 0) {
const arr = []
this.options.forEach(item => {
this.details.serviceList.forEach(ite => {
if (item.code === ite) {
arr.push({
code: item.code,
value: item.name
})
}
})
})
data.serviceItemList = arr
} else {
data.serviceItemList = []
}
if (!this.isCopy) {
const filesArr = []
const tempFileNamesArr = []
if (this.fileList.length > 0) {
this.fileList.forEach(item => {
if (item.id.indexOf('\\') != -1) {
tempFileNamesArr.push(item.id)
} else {
filesArr.push(item.id)
}
})
} }
data.files = filesArr if (!this.details.serviceList) {
data.tempFileNames = tempFileNamesArr this.details.serviceList = []
} }
if (data.ctnList.length > 0) { if (this.details.serviceList.length > 0) {
data.ctnList.forEach(item => { const arr = []
delete item._X_ROW_KEY this.options.forEach(item => {
delete item.oper this.details.serviceList.forEach(ite => {
this.ctnallList.forEach(ite => { if (item.code === ite) {
if (ite.code === item.ctncode) { arr.push({
item.ctnall = ite.name code: item.code,
} value: item.name
})
}
})
}) })
if (this.isCopy) { data.serviceItemList = arr
delete item.id } else {
data.serviceItemList = []
}
if (!this.isCopy) {
const filesArr = []
const tempFileNamesArr = []
if (this.fileList.length > 0) {
this.fileList.forEach(item => {
if (item.id.indexOf('\\') != -1) {
tempFileNamesArr.push(item.id)
} else {
filesArr.push(item.id)
}
})
} }
}) data.files = filesArr
} data.tempFileNames = tempFileNamesArr
if (data.files && Object.values(data.files).length === 0) { }
delete data.files if (data.ctnList.length > 0) {
} data.ctnList.forEach(item => {
if (!data.id && !this.isCopy) { delete item._X_ROW_KEY
data.id = this.id delete item.oper
} this.ctnallList.forEach(ite => {
if (ite.code === item.ctncode) {
this.loading = true item.ctnall = ite.name
BookingCustomerOrderSave(data).then(res => {
if (res.success) {
this.$message.success('保存成功')
this.loading = false
this.id = res.data.id
this.getDetail()
setTimeout(() => {
if (this.isCopy || this.isAdd) {
this.$router.replace({
name: 'BookingCustomerDetail',
query: {
id: res.data.id,
noOpenTab: true
} }
}) })
if (this.isCopy) { if (this.isCopy) {
this.isCopy = false delete item.id
} }
} })
}, 500);
} else {
this.loading = false
this.$message.error(res.message)
} }
}) if (data.files && Object.values(data.files).length === 0) {
} else { delete data.files
this.$message.warning('请检查必填项') }
} if (!data.id && !this.isCopy) {
console.log(valid) data.id = this.id
}) }
this.loading = true
this.saveFlag = true
BookingCustomerOrderSave(data).then(res => {
if (res.success) {
this.$message.success('保存成功')
setTimeout(() => {
this.saveFlag = false
}, 5000);
this.loading = false
this.id = res.data.id
this.getDetail()
setTimeout(() => {
if (this.isCopy || this.isAdd) {
this.$router.replace({
name: 'BookingCustomerDetail',
query: {
id: res.data.id,
noOpenTab: true
}
})
if (this.isCopy) {
this.isCopy = false
}
}
}, 500);
} else {
this.loading = false
this.saveFlag = false
this.$message.error(res.message)
}
})
} else {
this.$message.warning('请检查必填项')
this.saveFlag = false
}
})
}
}, },
handleDelete() { handleDelete() {
BookingCustomerOrderDelete([this.id]).then(res => { BookingCustomerOrderDelete([this.id]).then(res => {
@ -1321,7 +1378,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}, },
handlePushCtn() { handlePushCtn() {
const data = { oper: '' } const data = { oper: '', ctnnum: 1 }
this.details.ctnList.push(data) this.details.ctnList.push(data)
}, },
filterOption1(input, option) { filterOption1(input, option) {
@ -1406,7 +1463,34 @@ export default {
this.details.goodsname = res.goodsNameEN || '' this.details.goodsname = res.goodsNameEN || ''
} else if (type === 'cargoid') { } else if (type === 'cargoid') {
this.details.cargoid = res.code || '' this.details.cargoid = res.code || ''
console.log(res) this.details.cargoName = res.name || ''
if (this.details.cargoid === 'D') {
this.rules = {
linkman: [
{ required: true, message: '请输入', trigger: 'blur' }
],
dclass: [
{ required: true, message: '请输入', trigger: 'blur' }
],
dunno: [
{ required: true, message: '请输入', trigger: 'blur' }
]
}
}
if (this.details.cargoid === 'R') {
this.rules = {
tempset: [
{ required: true, message: '请输入', trigger: 'blur' }
],
tempid: [
{ required: true, message: '请选择', trigger: 'blur' }
],
reeferf: [
{ required: true, message: '请输入', trigger: 'blur' }
]
}
}
this.$refs.basicFrom.clearValidate()
this.$forceUpdate() this.$forceUpdate()
} else if (type === 'carrierid') { } else if (type === 'carrierid') {
this.details.carrier = res.enName || '' this.details.carrier = res.enName || ''

@ -488,7 +488,7 @@ export default {
ResetType: true, ResetType: true,
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
advanced: false, advanced: false,
formData: formInitData, formData: JSON.parse(JSON.stringify(initData.condAllData)),
formRes: {}, formRes: {},
searchData: { multisort: [] }, searchData: { multisort: [] },
formAllData: null, formAllData: null,
@ -885,9 +885,6 @@ export default {
const $data = {} const $data = {}
res.data.map((item, index) => { res.data.map((item, index) => {
switch (item.type) { switch (item.type) {
case 'booking_customer_list_cond':
this.$set($data, 'booking_customer_list_cond', item)
break
case 'booking_customer_list_sort': case 'booking_customer_list_sort':
this.setSort(item) this.setSort(item)
break break

@ -5,41 +5,30 @@ export default {
{ {
field: 'bsstatus', field: 'bsstatus',
label: 'bsstatus', label: 'bsstatus',
width: 160,
title: '业务状态', title: '业务状态',
showHeaderOverflow: true, showHeaderOverflow: true,
showOverflow: false, showOverflow: false,
sortable: true, sortable: true,
slots: { default: 'bsstatusname' } slots: { default: 'bsstatusname' }
}, },
{ field: 'bookingno', label: 'bookingno', width: 160, title: '订舱编号', showHeaderOverflow: true, sortable: true }, { field: 'bookingno', label: 'bookingno', title: '订舱编号', showHeaderOverflow: true, sortable: true },
{ field: 'carrier', width: 120, title: '船公司', showHeaderOverflow: true, sortable: true }, { field: 'carrier', title: '船公司', showHeaderOverflow: true, sortable: true },
{ {
field: 'cntrtotal', field: 'cntrtotal',
label: 'CNTRTOTAL', label: 'CNTRTOTAL',
width: 120,
title: '箱型*箱量', title: '箱型*箱量',
showHeaderOverflow: true, showHeaderOverflow: true,
sortable: true sortable: true
}, },
{
field: 'bookstatus',
label: 'BOOKSTATUS',
minWidth: 140,
title: '运踪',
showHeaderOverflow: true,
slots: { default: 'bookstatus' }
},
{ {
field: 'etd', field: 'etd',
label: 'ETD', label: 'ETD',
width: 110,
title: '开船日期', title: '开船日期',
showHeaderOverflow: true, showHeaderOverflow: true,
sortable: true, sortable: true,
slots: { default: 'etd' } slots: { default: 'etd' }
}, },
{ field: 'blfrt', label: 'BLFRT', width: 120, title: '付费方式', showHeaderOverflow: true, sortable: true }, { field: 'blfrt', label: 'BLFRT', title: '付费方式', showHeaderOverflow: true, sortable: true },
{ field: 'cargoid', label: 'CARGOID', width: 120, 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: 'vessel', label: 'VESSEL', width: 120, title: '船名', showHeaderOverflow: true, sortable: true },
{ field: 'voyno', label: 'VOYNO', width: 120, title: '航次', showHeaderOverflow: true }, { field: 'voyno', label: 'VOYNO', width: 120, title: '航次', showHeaderOverflow: true },
@ -477,49 +466,23 @@ export default {
], ],
// ==== 表单部分 ==== // ==== 表单部分 ====
condAllData: [ condAllData: [
{ title: '订舱编号', align: 'center', width: 160, label: 'bookingno', type: 'input' }, { title: '订舱公司', align: 'center', width: 120, label: 'bookingTenantName', 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: '业务状态', title: '业务状态',
align: 'center', align: 'center',
width: 160, width: 120,
label: 'bsStatusList', label: 'bsStatusList',
type: 'select', type: 'select',
showLabel: 'name', showLabel: 'name',
data: [ data: [
{ name: 'ONE' }, { name: '已审核' },
{ name: 'TWO' }, { name: '已驳回' },
{ name: 'THREE' }, { name: '已提交' },
{ name: 'FOUR' }, { name: '已录入' }
{ name: 'FIVE' },
{ name: 'SIX' },
{ name: 'SEVEN' },
{ name: 'EIGHT' },
{ name: 'NINE' },
{ name: 'TEN' }
] ]
} },
{ 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' }
] ]
} }

@ -275,10 +275,31 @@ export default {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
handleSelectChange(e) { handleSelectChange(e) {
this.$emit('change', { if (e) {
form: this.labelData, if (this.labelData.label === 'bsStatusList') {
value: this.dataList[e][this.labelData.showLabel] 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) { handleSelectChangeTree(e) {
this.$emit('change', { this.$emit('change', {
@ -308,7 +329,8 @@ export default {
'taskCategory', 'taskCategory',
'taskSource', 'taskSource',
'taskType', 'taskType',
'OP' 'OP',
'bsStatusList'
].includes(this.labelData.label) ].includes(this.labelData.label)
) { ) {
this.dataList = this.emnuData(this.labelData.label) this.dataList = this.emnuData(this.labelData.label)
@ -347,6 +369,8 @@ export default {
return this.labelData.data return this.labelData.data
case 'taskCategory': case 'taskCategory':
return this.labelData.data return this.labelData.data
case 'bsStatusList':
return this.labelData.data
case 'taskSource': case 'taskSource':
return this.labelData.data return this.labelData.data
case 'OrgSale': case 'OrgSale':

Loading…
Cancel
Save