Merge branch 'szh-new' into dev

szh-new
sunzehua 3 months ago
commit 9047606ea5

@ -2,7 +2,7 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetCarrierlist, GetClientPortSelectList } from '/@/views/operation/seaexport/api/BookingLedger'
import { GetCtnSelectList } from '/@/api/common'
import { GetCtnSelectList,GetCarrierSelectList } from '/@/api/common'
import { getDictOption } from '/@/utils/dictUtil'
import { useOptionsStore } from '/@/store/modules/options'
@ -77,14 +77,12 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
api: GetCarrierlist,
immediate: false,
labelField: 'shortName',
valueField: 'id',
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'cnName',
valueField: 'cnName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
immediate: false,
}
},
},

@ -4,7 +4,7 @@ import { useOptionsStore } from '/@/store/modules/options'
import { SlotFlags } from '@vue/shared'
import { getOptions } from '/@/hooks/dict'
import { BookingLabelList, GetSlotUseToConfig } from './api'
import { GetClientListByCode, GetControllerClientList } from '/@/api/common'
import { GetClientListByCode, GetControllerClientList,GetCarrierSelectList } from '/@/api/common'
const optionsStore = useOptionsStore()
import {
GetCarrierlist,
@ -158,7 +158,7 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
},
{
field: 'CARRIER',
field: 'carrier',
label: '船公司',
component: 'ApiSelect',
required: false,
@ -166,11 +166,10 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'ediCode',
valueField: 'ediCode',
resultField: 'data',
immediate: false,
}
@ -861,11 +860,10 @@ export const detialForm: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'cnName',
valueField: 'cnName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {

@ -9,7 +9,7 @@ import { GetClientListByCode } from '/@/api/common'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
import { GetCtnSelectList } from '/@/api/common'
import { GetCtnSelectList,GetCarrierSelectList } from '/@/api/common'
const FnblType = ref([])
const FncargoId = ref([])
getDictOption('bl_type').then((res) => {
@ -44,11 +44,10 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 5 },
componentProps: () => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'cnName',
valueField: 'cnName',
resultField: 'data',
immediate: false,
}
@ -154,11 +153,10 @@ export const formSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'cnName',
valueField: 'cnName',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {

@ -6,7 +6,7 @@ import {
} from '/@/views/operation/seaexport/api/BookingLedger'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { GetClientListByCode } from '/@/api/common'
import { GetClientListByCode,GetCarrierSelectList } from '/@/api/common'
const FnblType = ref([])
const FncargoId = ref([])
getDictOption('bl_type').then(res => {
@ -230,11 +230,10 @@ export const searchFormSchema: FormSchema[] = [
colProps: { span: 4 },
componentProps: () => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'cnName',
valueField: 'cnName',
resultField: 'data',
immediate: false,
}

@ -123,7 +123,7 @@
</BasicForm>
</div>
</div>
<hot-table style="margin-left: 14px;" ref="hotmain" :data="ctnList" :settings="settings">
<hot-table style="margin-left: 14px;" ref="hotpreOrder" :data="ctnList" :settings="settings">
</hot-table>
<div class="table-calc">
合计
@ -271,7 +271,7 @@ watch(() => ctnList.value, (val) => {
onMounted(() => {
})
function initTable() {
const hot = hotmain.value.hotInstance
const hot = hotpreOrder.value.hotInstance
hot.addHook('beforeKeyDown', function (event) {
if (event.key === 'ArrowDown') {
if (hot.getSelected()[0][0] == ctnList.value.length - 1 && !hot.getActiveEditor()?._opened) {
@ -353,6 +353,7 @@ function FngetPageESeaeEdi() {
if (!res.data) {
res.data = []
}
//
if (res.data.length > 0) {
res.data.map((item, index) => {
item.checked = false
@ -369,7 +370,7 @@ function FngetPageESeaeEdi() {
setFieldsValueMail(item)
setFieldsValueYard(item)
ctnList.value = item.ctnInfo ? item.ctnInfo : []
hotmain.value.hotInstance.loadData(ctnList.value)
hotpreOrder.value.hotInstance.loadData(ctnList.value)
editIndex.value = index
}
})
@ -377,14 +378,15 @@ function FngetPageESeaeEdi() {
console.log(orderList.value);
} else {
//
props.details.id = '0'
props.details.isPart = false
const propsDetail = JSON.parse(JSON.stringify(props.details))
propsDetail.id = '0'
propsDetail.isPart = false
//
setFieldsValueBase(props.details)
setFieldsValueBase(propsDetail)
//
const arr = props.details.shipperContent ? props.details.shipperContent.split('\n') : []
const arr1 = props.details.consigneeContent ? props.details.consigneeContent.split('\n') : []
const arr2 = props.details.notifyPartyContent ? props.details.notifyPartyContent.split('\n') : []
const arr = propsDetail.shipperContent ? propsDetail.shipperContent.split('\n') : []
const arr1 = propsDetail.consigneeContent ? propsDetail.consigneeContent.split('\n') : []
const arr2 = propsDetail.notifyPartyContent ? propsDetail.notifyPartyContent.split('\n') : []
setFieldsValueMail({
shipperName: arr[0],
shipperAddress: arr[1],
@ -395,7 +397,7 @@ function FngetPageESeaeEdi() {
shipperCountryName: '中国(CHINA)',
shipperCountry: 'CN'
})
GetClientPortInfoByCode({ queryKey: props.details.dischargePortCode }).then(res => {
GetClientPortInfoByCode({ queryKey: propsDetail.dischargePortCode }).then(res => {
const arr = localStorage.getItem('ds-country') ? JSON.parse(localStorage.getItem('ds-country')) : []
if (res.data) {
arr.forEach(item => {
@ -411,24 +413,24 @@ function FngetPageESeaeEdi() {
}
})
//
if (!props.details.cargoId) {
props.details.cargoId = 'S'
if (!propsDetail.cargoId) {
propsDetail.cargoId = 'S'
}
RefcargoInfo.value.preOrderInit(props.details)
RefcargoInfo.value.preOrderInit(propsDetail)
//
setFieldsValueYard({
yardId: props.details.yardId,
yard: props.details.yard
yardId: propsDetail.yardId,
yard: propsDetail.yard
})
//
ctnList.value = props.details.ctnInfo ? props.details.ctnInfo : []
ctnList.value = propsDetail.ctnInfo ? propsDetail.ctnInfo : []
ctnList.value.forEach(item => {
delete item.id
})
hotmain.value.hotInstance.loadData(ctnList.value)
console.log(props.details,111111);
const data = JSON.parse(JSON.stringify(props.details))
data.mblno = props.details.mblno
hotpreOrder.value.hotInstance.loadData(ctnList.value)
console.log(propsDetail,111111);
const data = JSON.parse(JSON.stringify(propsDetail))
data.mblno = propsDetail.mblno
data.isPart = false
data.checked = false
orderList.value[0] = data
@ -536,7 +538,7 @@ function calcCtnInfo(mblData, hblList) {
setFieldsValueMail(mblData)
setFieldsValueYard(mblData)
ctnList.value = mblData.ctnInfo ? mblData.ctnInfo : []
hotmain.value.hotInstance.loadData(ctnList.value)
hotpreOrder.value.hotInstance.loadData(ctnList.value)
mblData.isPart = true
orderList.value.push({ checked: true, isPart: true, ...mblData })
editIndex.value = orderList.value.length - 1
@ -624,7 +626,7 @@ function delboxLine() {
ctnList.value.splice(i, 1)
}
}
hotmain.value.hotInstance.loadData(ctnList.value)
hotpreOrder.value.hotInstance.loadData(ctnList.value)
}
function copyboxLine() {
const arr = [] as any
@ -639,7 +641,7 @@ function copyboxLine() {
}
if (arr.length == 1) {
ctnList.value.push(JSON.parse(JSON.stringify(arr[0])))
hotmain.value.hotInstance.loadData(ctnList.value)
hotpreOrder.value.hotInstance.loadData(ctnList.value)
}
console.log(arr);
}
@ -716,7 +718,7 @@ function editOrder(index) {
notifyPartyId: '',
})
ctnList.value = data.ctnInfo ? data.ctnInfo : []
hotmain.value.hotInstance.loadData(ctnList.value)
hotpreOrder.value.hotInstance.loadData(ctnList.value)
}
@ -724,7 +726,7 @@ function editOrder(index) {
const list = ref<any>([])
const ctnDict = ref([])
const kindPkgsDict = ref([])
const hotmain = ref(null) as any
const hotpreOrder = ref(null) as any
const mainPkgs = ref([]) as any
const totalPkgs = ref(0)
const totalKgs = ref(0)
@ -817,7 +819,7 @@ const settings = {
//
afterValidate: function (isValid, value, row, prop, source) {
if (!isValid) {
hotmain.value.hotInstance.setDataAtRowProp(row, prop, '')
hotpreOrder.value.hotInstance.setDataAtRowProp(row, prop, '')
}
},
columns: columns,

@ -2,7 +2,7 @@
import { ref, onMounted } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { GetTaskPlatEnumDict } from './api'
import { GetClientListByCode } from '/@/api/common'
import { GetClientListByCode,GetCarrierSelectList } from '/@/api/common'
export const searchFormSchema: FormSchema[] = [
{
@ -290,11 +290,10 @@ export const fileForm: FormSchema[] = [
colProps: { span: 24 },
componentProps: ({ formModel }) => {
return {
api: GetClientListByCode,
params: { code: 'carrier' },
api: GetCarrierSelectList,
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
showName: 'ediCode',
valueField: 'ediCode',
resultField: 'data',
immediate: false,
onChange: (e, obj) => {
@ -311,6 +310,7 @@ export const fileForm: FormSchema[] = [
},
},
]

Loading…
Cancel
Save