Merge branch 'szh-new' into dev

szh-new
sunzehua 3 months ago
commit 9047606ea5

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

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

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

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

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

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

Loading…
Cancel
Save