修改BUG

dev
lilu 2 years ago
parent b0a3715762
commit ac1d71de81

@ -289,7 +289,7 @@ export default {
}
let data = JSON.parse(JSON.stringify(this.editDetails))
delete data.isNoSave
data.parentId = this.$route.query.id
data.parentid = this.$route.query.id
data.id = 0
data.ctnInputs.map((item, index) => {
item.id = 0

@ -426,6 +426,9 @@ export default {
this.tabActiveKey = $data.tabActiveKey
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
}
setTimeout(() => {
this.inChildLoading = false
if (!Object.keys(this.needSavePages).includes(this.$route.fullPath)) {
@ -448,6 +451,9 @@ export default {
// console.log('== , ==')
this.bookingDetails.mblno = ''
}
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
}
setTimeout(() => {
this.inChildLoading = false
if (!Object.keys(this.needSavePages).includes(this.$route.fullPath)) {
@ -465,6 +471,9 @@ export default {
this.tabActiveKey = $data.tabActiveKey
this.isCopy = this.$route.query.isCopy
this.inPageLoading = false
if (this.bookingDetails.hbList && this.bookingDetails.hbList.length > 0) {
this.Showtabs = true
}
// console.log('== ==', $data.isCopy, this.$route.query.isCopy, this.isCopy)
if (this.isCopy && !$data.isCopy) {
// console.log('== , ==')
@ -660,7 +669,7 @@ export default {
this.isAdd = false
this.id = res.data
this.$message.success('保存成功')
this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
// this.bookingDetails = JSON.parse(JSON.stringify(initDetail))
this.$router.replace({
name: 'BookingDetail',
query: {
@ -715,7 +724,6 @@ export default {
Object.keys(this.needSavePages).includes(key) &&
(this.needSavePages[key].details || this.needSavePages[key].hbList)
) {
// console.log('== - biu ==')
this.$confirm({
title: '请确认无未保存数据!',
content: '当点击确定按钮时,此页面 将会关闭。',

@ -21,6 +21,7 @@
:columns="columns"
:table-data="tableData"
borderY
style="min-width:970;"
:cell-autofill-option="cellAutofillOption"
:editOption="editOption"
rowKeyFieldName="rowKey"
@ -120,32 +121,30 @@ export default {
renderBodyCell: ({ row, column, rowIndex }, h) => {
return (
// <a-auto-complete
// class="certain-category-search"
// dropdown-class-name="certain-category-search-dropdown"
// dropdown-match-select-width={false}
// size="large"
// style="width: 120px"
// option-label-prop="value"
// >
// {
// <template slot="dataSource">
// <a-select-opt-group>
// {
// this.ctnList.map((item, index) => {
// return <a-select-option>{ item.name }</a-select-option>
// })
// }
// </a-select-opt-group>
// </template>
// }
// {
// <a-input>
// <a-icon slot="suffix" type="search" class="certain-category-icon" />
// </a-input>
// }
// </a-auto-complete>
// allowClear={true}
// value={row['ctnall']}
// class="customer-input"
// >
// {
// <template slot="dataSource">
// <a-select-opt-group>
// {
// this.ctnList.map((item, index) => {
// return <a-select-option>{ item.name }</a-select-option>
// })
// }
// </a-select-opt-group>
// </template>
// }
// {
// <a-input>
// <a-icon slot="suffix" type="search" class="certain-category-icon" />
// </a-input>
// }
// </a-auto-complete>
<a-select
value={row['ctnall']}
showSearch
allow-clear={true}
style="width: 90px"
on-change={val => {
@ -204,6 +203,7 @@ export default {
return (
<a-select
allow-clear={true}
showSearch
defaultValue={row['kindpkgs']}
option-filter-prop="children"
style="width: 120px"

@ -281,7 +281,21 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.yard || '--' }}
<!-- {{ details.yard || '--' }} -->
<a-select
class="customer-input"
style="width:195px;"
:default-value="initCabinFrom.yard"
v-model="initCabinFrom.yard"
@change="handleYardChange"
show-search
:filter-option="filterOption"
:dropdownMatchSelectWidth="false"
>
<a-select-option v-for="(yard, yindex) in yardSelectData" :key="yindex" :value="yindex">
{{ yard.selectShowTab }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
@ -291,7 +305,7 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.yardcontract || '--' }}
<a-input class="box-input" style="width:195px;" :allowClear="true" v-model="initCabinFrom.yardcontract" />
</a-form-item>
</a-col>
<a-col :span="8">
@ -301,7 +315,7 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.yardcontracttel || '--' }}
<a-input class="box-input" style="width:195px;" :allowClear="true" v-model="initCabinFrom.yardcontracttel" />
</a-form-item>
</a-col>
<a-col :span="8">
@ -311,7 +325,16 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.closingdate || '--' }}
<!-- {{ details.closingdate || '--' }} -->
<a-date-picker
show-time
style="width:120px;"
format="YYYY-MM-DD HH:mm:ss"
v-model="initCabinFrom.closingTime"
@change="closingdateChange"
>
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker>
</a-form-item>
</a-col>
<a-col :span="8">
@ -321,7 +344,16 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.closedocdate || '--' }}
<!-- {{ details.closedocdate || '--' }} -->
<a-date-picker
show-time
style="width:120px;"
format="YYYY-MM-DD HH:mm:ss"
v-model="initCabinFrom.closeDocTime"
@change="closedocdateChange"
>
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker>
</a-form-item>
</a-col>
<a-col :span="8">
@ -331,7 +363,16 @@
:wrapperCol="{ xs: { span: 24 }, sm: { span: 15 } }"
has-feedback
>
{{ details.closevgmdate || '--' }}
<!-- {{ details.closevgmdate || '--' }} -->
<a-date-picker
show-time
style="width:120px;"
format="YYYY-MM-DD HH:mm:ss"
v-model="initCabinFrom.vgmTime"
@change="closevgmdateChange"
>
<a-icon slot="suffixIcon" type="time" style="display: none" />
</a-date-picker>
</a-form-item>
</a-col>
</div>
@ -345,6 +386,7 @@
>
<div class="box-flex">
<a-input
class="remark-input"
style="width:1000px !important; text-align: left;"
:allowClear="true"
v-model="initCabinFrom.remark"
@ -652,7 +694,8 @@ import {
DownloadBookingOrClosingEDI,
DeleteLetterYard,
LetterYardPdf,
SendTrace
SendTrace,
GetYardlist
} from '@/api/modular/main/BookingLedger'
export default {
@ -756,6 +799,7 @@ export default {
},
mounted() {
this.BCvData = [...this.CvData]
this.getYardlist()
},
watch: {
scale() {
@ -981,7 +1025,14 @@ export default {
urlVgm: '',
urlVgmSi: ''
},
remark: ''
remark: '',
yard: this.details.yard,
yardid: this.details.yardid,
closeDocTime: this.details.closedocdate,
closingTime: this.details.closingdate,
vgmTime: this.details.closevgmdate,
yardcontract: this.details.yardcontract,
yardcontracttel: this.details.yardcontracttel
}
}
if (type === 'initCabin') {
@ -1322,18 +1373,20 @@ export default {
//
saveBookingLetteryard() {
console.log('=== 放舱 ===', this.initCabinFrom)
// if (!this.id) {
this.initCabinFrom = {
...this.initCabinFrom,
...{
closeDocTime: this.details.closedocdate,
closingTime: this.details.closingdate,
vgmTime: this.details.closevgmdate,
yardcontract: this.details.yardcontract,
yardcontracttel: this.details.yardcontracttel
}
}
// this.initCabinFrom = {
// ...this.initCabinFrom,
// ...{
// closeDocTime: this.details.closedocdate,
// closingTime: this.details.closingdate,
// vgmTime: this.details.closevgmdate,
// yardcontract: this.details.yardcontract,
// yardcontracttel: this.details.yardcontracttel
// }
// }
// }
debugger
SaveBookingLetteryard(this.initCabinFrom)
.then(res => {
if (res.success) {
@ -1514,6 +1567,52 @@ export default {
.catch(err => {
console.log(err)
})
},
getYardlist(name = '') {
GetYardlist({
keyword: name
})
.then(res => {
if (res.code === 200) {
this.yardData = res.data
const arr = []
res.data.map((item, index) => {
arr.push({
...{ selectShowTab: item.name + ' / ' + item.code },
...item
})
})
this.yardSelectData = arr
this.$forceUpdate()
}
})
.catch(err => {
console.log(err)
})
},
yardSelect(value) {
this.details.yard = value
const index = this.yardDataArr.indexOf(value)
this.details.yardid = this.yardData[index].code
},
yardChange(value) {
// this.getYardlist(value)
},
handleYardChange(index) {
this.initCabinFrom.yard = this.yardSelectData[index].name
this.initCabinFrom.yardid = this.yardSelectData[index].code
},
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
closingdateChange (date, dateString) {
this.initCabinFrom.closingTime = dateString
},
closevgmdateChange (date, dateString) {
this.initCabinFrom.vgmTime = dateString
},
closedocdateChange (date, dateString) {
this.initCabinFrom.closeDocTime = dateString
}
}
}
@ -1771,6 +1870,66 @@ export default {
opacity: 0.04;
}
}
/deep/ .ant-select-selection{
position: relative;
z-index: 1;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: @primary-color !important;
opacity: 0.04;
}
}
/deep/ .ant-calendar-picker{
position: relative;
z-index: 1;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: @primary-color !important;
opacity: 0.04;
}
}
/deep/ .ant-input-affix-wrapper, .ant-input-affix-wrapper-textarea-with-clear-btn{
position: relative;
z-index: 1;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: @primary-color !important;
opacity: 0.04;
}
}
.remark-input{
position: relative;
z-index: 1;
&::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: @primary-color !important;
opacity: 0.04;
}
}
/deep/ .ant-modal-body .ant-input {
background: none;
}

@ -14,7 +14,7 @@
<x-card>
<div slot="content" class="table-page-search-wrapper">
<a-form layout="inline">
<a-row :gutter="48">
<a-row :gutter="48" class="booking-from-box">
<template v-for="(formLabel, findex) in formData">
<a-col
:md="6"
@ -392,7 +392,7 @@ export default {
this.getTableList()
},
getFormData() {
getFormData(isReset = false) {
DjyUserConfigGet({ type: 'booking_list_cond' }).then(res => {
if (res.data && JSON.parse(res.data.configJson).length) {
const arr = JSON.parse(res.data.configJson)
@ -427,13 +427,16 @@ export default {
this.formData.map((item, index) => {
this.$set(this.formRes, item.label, this.formRes[item.label] || '')
})
this.getList(this.formRes)
if (!isReset) {
this.getList(this.formRes)
}
const len = this.formData.length % 4
if (this.formData.length === 4 || this.formData.length > 4) {
this.formBtnCol = 8
} else {
this.formBtnCol = 24 - len * 4
}
console.log('== 测试宽度1 ==', this.formBtnCol)
this.$forceUpdate()
})
},
@ -486,8 +489,10 @@ export default {
}
} else {
const len = this.formData.length % 6
this.formBtnCol = 24 - len * 4
// this.formBtnCol = 24 - len * 4
this.formBtnCol = 24 - len * 4 === 4 ? 24 : 24 - len * 4
}
console.log('== 测试宽度2 ==', this.formBtnCol)
},
tableRefresh() {
let data = { ...this.formRes }
@ -532,7 +537,12 @@ export default {
Object.keys(this.formRes).map((item, index) => {
this.formRes[item] = ''
})
this.init()
Object.keys(this.$refs).map((label, index) => {
if (label.includes('fromlabel-') && this.$refs[label].length > 0) {
this.$refs[label][0].$data.value = ''
}
})
this.ResetType = true
},
submitForm(data) {
@ -1429,4 +1439,10 @@ export default {
}
}
}
@media (min-width: 1192px) and (max-width: 1591px) {
.booking-from-box{
padding-right: 24px;
}
}
</style>

Loading…
Cancel
Save