pull/1/head
张同海 2 years ago
parent bd89d7d2ba
commit 9285157779

@ -462,6 +462,8 @@
</template> </template>
<script> <script>
import { XCard, setFormModel } from '@/components' import { XCard, setFormModel } from '@/components'
import columnSetting from '@/components/tableColumnSetting'
import formLabel from './modules/formLabel'
import { import {
BookingOrderPage, BookingOrderPage,
SendTrace, SendTrace,
@ -471,7 +473,6 @@ import {
BookingOrderBachUpdate, BookingOrderBachUpdate,
GetCarrierlist, GetCarrierlist,
DjyCustomerSuggest, DjyCustomerSuggest,
getVesselInfoService,
GetYardlist, GetYardlist,
GetSysUserPage, GetSysUserPage,
DjyCustomerpage, DjyCustomerpage,
@ -482,8 +483,7 @@ import {
GetService, GetService,
GetForwarderlist GetForwarderlist
} from '@/api/modular/main/BookingLedger' } from '@/api/modular/main/BookingLedger'
import columnSetting from '@/components/tableColumnSetting'
import formLabel from './modules/formLabel'
import initData from './modules/initData' import initData from './modules/initData'
import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig' import { DjyUserConfigGet, DjyUserConfigAdd } from '@/api/modular/main/DjyUserConfig'
import { mapActions } from 'vuex' import { mapActions } from 'vuex'
@ -755,7 +755,6 @@ export default {
Rdata(res.data) Rdata(res.data)
DjyUserConfigGet({ type: 'booking_memory' }) DjyUserConfigGet({ type: 'booking_memory' })
.then(e => { .then(e => {
console.log(e)
if (e.data) { if (e.data) {
let data = [] let data = []
JSON.parse(e.data.configJson).forEach(item => { JSON.parse(e.data.configJson).forEach(item => {
@ -815,9 +814,11 @@ export default {
if (item.type === 'select') { if (item.type === 'select') {
const fun = this.emnuSelectApi(item.label) const fun = this.emnuSelectApi(item.label)
if (fun) { if (fun) {
this.getFromSelectData(fun).then((data) => { this.getFromSelectData(fun).then(data => {
item.dataList = data item.dataList = data
if (this.$refs[`fromlabel-${item.label}`]) {
this.$refs[`fromlabel-${item.label}`][0].$data.dataList = data this.$refs[`fromlabel-${item.label}`][0].$data.dataList = data
}
}) })
} else if (['NOBILL', 'CARGOID'].includes(item.label)) { } else if (['NOBILL', 'CARGOID'].includes(item.label)) {
item.dataList = item.data item.dataList = item.data
@ -839,7 +840,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
}) })
}, },
emnuSelectApi (type) { emnuSelectApi(type) {
switch (type) { switch (type) {
case 'CARRIER': case 'CARRIER':
return GetCarrierlist return GetCarrierlist
@ -858,15 +859,15 @@ export default {
// debugger // debugger
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// debugger // debugger
func(...args).then((res) => { func(...args).then(res => {
// debugger // debugger
if (res.code === 200) { if (res.code === 200) {
resolve(res.data); resolve(res.data)
} else { } else {
reject(res) reject(res)
} }
}) })
}); })
}, },
// //
getTableList() { getTableList() {
@ -1366,9 +1367,24 @@ export default {
}) })
}, },
// //
getCompleteListFun ({ form, value }) { getCompleteListFun({ form, value }) {
let query = {} let query = {}
if (['VESSEL', 'PORTDISCHARGE', 'PORTLOAD', 'PLACERECEIPT', 'DESTINATION', 'PLACEDELIVERY', 'PAYABLEAT', 'BLFRT', 'ISSUEPLACE', 'PREPARDAT', 'SERVICE', 'SHIPAGENCY'].includes(form.label)) { if (
[
'VESSEL',
'PORTDISCHARGE',
'PORTLOAD',
'PLACERECEIPT',
'DESTINATION',
'PLACEDELIVERY',
'PAYABLEAT',
'BLFRT',
'ISSUEPLACE',
'PREPARDAT',
'SERVICE',
'SHIPAGENCY'
].includes(form.label)
) {
// //
query = { query = {
KeyWord: value KeyWord: value
@ -1409,8 +1425,7 @@ export default {
} }
const fun = this.emnuCompleteApi(form.label) const fun = this.emnuCompleteApi(form.label)
if (fun) { if (fun) {
this.getFromSelectData(this.emnuCompleteApi(form.label), query).then((data) => { this.getFromSelectData(this.emnuCompleteApi(form.label), query).then(data => {
console.log(data)
if (['CUSTOMERNAME', 'FORWARDER', 'CUSTOMSER', 'AGENTID', 'TRUCKER'].includes(form.label)) { if (['CUSTOMERNAME', 'FORWARDER', 'CUSTOMSER', 'AGENTID', 'TRUCKER'].includes(form.label)) {
this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows this.$refs[`fromlabel-${form.label}`][0].$data.dataSourceList = data.rows
} else { } else {
@ -1420,7 +1435,7 @@ export default {
} }
}, },
emnuCompleteApi (type) { emnuCompleteApi(type) {
switch (type) { switch (type) {
case 'VESSEL': case 'VESSEL':
return GetVessellist return GetVessellist
@ -1468,7 +1483,6 @@ export default {
return GetForwarderlist return GetForwarderlist
} }
} }
} }
} }
</script> </script>
@ -2069,15 +2083,15 @@ export default {
margin-top: -4px !important; margin-top: -4px !important;
} }
} }
/deep/ .ant-form-item-control-wrapper{ /deep/ .ant-form-item-control-wrapper {
overflow: hidden !important; overflow: hidden !important;
} }
.no-data{ .no-data {
display: block; display: block;
color: #aaa; color: #aaa;
font-size: 14px; font-size: 14px;
i{ i {
line-height: 120px; line-height: 120px;
font-size: 100px; font-size: 100px;
} }

Loading…
Cancel
Save