szh_zidingyibiaoti
张同海 2 years ago
parent 9accb59d0b
commit ab5540d07d

@ -38,7 +38,13 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select placeholder="请选择船公司" v-decorator="['Carrier']"> <a-select
show-search
option-filter-prop="children"
:filter-option="filterOption"
placeholder="请选择船公司"
v-decorator="['Carrier']"
>
<a-select-option v-for="item in CarrierList" :key="item.code" :value="item.code"> <a-select-option v-for="item in CarrierList" :key="item.code" :value="item.code">
{{ item.cnName }} {{ item.cnName }}
</a-select-option> </a-select-option>
@ -81,6 +87,9 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// //
add(record) { add(record) {
this.data = record this.data = record

@ -39,7 +39,13 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback> <a-form-item label="船公司" :labelCol="labelCol2" :wrapperCol="wrapperCol2" has-feedback>
<a-select placeholder="请选择船公司" v-decorator="['Carrier']"> <a-select
show-search
option-filter-prop="children"
:filter-option="filterOption"
placeholder="请选择船公司"
v-decorator="['Carrier']"
>
<a-select-option v-for="item in CarrierList" :key="item.code" :value="item.code"> <a-select-option v-for="item in CarrierList" :key="item.code" :value="item.code">
{{ item.cnName }} {{ item.cnName }}
</a-select-option> </a-select-option>
@ -82,6 +88,9 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
filterOption(input, option) {
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
// //
edit(record, loadData) { edit(record, loadData) {
console.log(record) console.log(record)

@ -54,6 +54,10 @@
:align="item.align" :align="item.align"
:show-overflow="true" :show-overflow="true"
> >
<template #default="{ row }">
<span v-if="item.dataIndex == 'Carrier'">{{ FnCarrier(row[item.dataIndex]) }}</span>
<span v-else>{{ row[item.dataIndex] }}</span>
</template>
</vxe-column> </vxe-column>
<vxe-column title="操作" fixed="right" width="200" align="center"> <vxe-column title="操作" fixed="right" width="200" align="center">
<template #default="{ row }"> <template #default="{ row }">
@ -77,6 +81,7 @@
import { getDjyTenantConfig, DjyTenantConfigSave } from '@/api/modular/main/DjyTenantConfig' import { getDjyTenantConfig, DjyTenantConfigSave } from '@/api/modular/main/DjyTenantConfig'
import addForm from './addForm.vue' import addForm from './addForm.vue'
import editForm from './editForm.vue' import editForm from './editForm.vue'
import { GetCarrierlist } from '@/api/modular/main/BookingLedger'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
components: { components: {
@ -108,12 +113,18 @@ export default {
title: '说明', title: '说明',
align: 'center', align: 'center',
dataIndex: 'remarks' dataIndex: 'remarks'
},
{
title: '船公司',
align: 'center',
dataIndex: 'Carrier'
} }
], ],
tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' }, tstyle: { 'padding-bottom': '0px', 'margin-bottom': '10px' },
// Promise // Promise
loadData: [], loadData: [],
DisplayLoadData: [] DisplayLoadData: [],
CarrierList: []
} }
}, },
created() {}, created() {},
@ -124,6 +135,15 @@ export default {
...mapGetters(['userInfo']) ...mapGetters(['userInfo'])
}, },
methods: { methods: {
FnCarrier(data) {
let RData = ''
this.CarrierList.forEach(item => {
if (data == item.code) {
RData = item.cnName
}
})
return RData
},
FnQuery() { FnQuery() {
this.loading = true this.loading = true
getDjyTenantConfig({ type: 'booking_default_value' }).then(res => { getDjyTenantConfig({ type: 'booking_default_value' }).then(res => {
@ -213,6 +233,9 @@ export default {
}, },
init() { init() {
this.FnGetData() this.FnGetData()
GetCarrierlist().then(res => {
this.CarrierList = res.data
})
}, },
FnGetData() { FnGetData() {
this.loading = true this.loading = true

@ -654,9 +654,14 @@ export default {
this.spinning = true this.spinning = true
TaskManageTruckPrintTemplateWithHistoryList(Data).then(res => { TaskManageTruckPrintTemplateWithHistoryList(Data).then(res => {
console.log(res.data)
if (res.data.length == 1) {
this.FnCilckTemplateType(res.data[0].id)
} else {
this.templateType = res.data this.templateType = res.data
this.spinning = false this.spinning = false
this.PrintModalVisible = true this.PrintModalVisible = true
}
}) })
}, },
FnPrint() { FnPrint() {

Loading…
Cancel
Save