szh-new
sunzehua 2 months ago
parent 1586db1799
commit eba844b8f7

@ -9,7 +9,7 @@ import { GetClientListByCode } from '/@/api/common'
// 字典
import { getDictOption } from '/@/utils/dictUtil'
import { getOptions } from '/@/hooks/dict'
import { GetCtnSelectList,GetCarrierSelectList } from '/@/api/common'
import { GetCtnSelectList, GetCarrierSelectList } from '/@/api/common'
const FnblType = ref([])
const FncargoId = ref([])
getDictOption('bl_type').then((res) => {
@ -53,23 +53,39 @@ export const searchFormSchema: FormSchema[] = [
}
},
},
{
label: '',
field: 'laneId',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '航线',
field: 'laneCName',
field: 'laneCode',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 5 },
componentProps: () => {
componentProps: ({formModel}) => {
return {
api: GetClientLanesSelectList,
immediate: false,
labelField: 'laneName',
valueField: 'id',
valueField: 'laneCode',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
console.log(obj)
formModel.laneId = obj.id
}
if (!e && !obj) {
formModel.laneId = ''
}
}
}
},
},
@ -100,7 +116,7 @@ export const columns: BasicColumn[] = [
{ dataIndex: 'contractNote', title: '合约号备注', width: 100 },
{ dataIndex: 'carrier', title: '船公司', width: 100 },
{ dataIndex: 'podName', title: '目的港', width: 100 },
{ dataIndex: 'laneCName', title: '航线', width: 100 },
{ dataIndex: 'laneList', title: '航线', width: 150 },
{ dataIndex: 'createUserName', title: '创建者名称', width: 100 },
{ dataIndex: 'createTime', title: '创建时间', width: 100 },
{ dataIndex: 'updateTime', title: '更新时间', width: 100 },
@ -222,9 +238,15 @@ export const formSchema: FormSchema[] = [
component: 'Input',
show: false,
},
{
label: '',
field: 'laneList',
component: 'Input',
show: false,
},
{
label: '航线',
field: 'laneId',
field: 'laneListId',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
@ -232,18 +254,28 @@ export const formSchema: FormSchema[] = [
api: GetClientLanesSelectList,
labelField: 'laneName',
valueField: 'id',
mode: 'multiple',
resultField: 'data',
class: 'NoLimitHeight',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formModel.laneCode = obj.ediCode
formModel.laneCName = obj.label
const arr = [] as any
obj.forEach(item => {
arr.push({
laneCode: item.laneCode,
laneId: item.value,
laneCName: item.label
})
})
formModel.laneList =arr
// formModel.laneCode = obj.ediCode
// formModel.laneCName = obj.label
}
if (!obj && !e) {
formModel.laneCode = ''
formModel.laneCName = ''
formModel.laneList = []
}
},
}

@ -35,6 +35,9 @@ function getInfo(id) {
setModalProps({ confirmLoading: true, loading: true })
GetParaContractNoInfo({id:id}).then(res => {
if (res.succeeded) {
res.data.laneListId = res.data.laneList.map(item => {
return item.laneId
})
setFieldsValue({
...res.data
})

@ -10,24 +10,30 @@
<template v-slot:bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<TableAction :actions="[
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
handleEdit(record)
},
{
icon: 'clarity:note-edit-line',
tooltip: '编辑',
onClick: () => {
handleEdit(record)
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
popConfirm: {
},
{
icon: 'ant-design:delete-outlined',
tooltip: '删除',
popConfirm: {
title: '是否要删除?',
okText: '是',
cancelText: '否',
confirm: handleDelete.bind(null, record),
},
}
]" />
}
]" />
</template>
<template v-if="column.key === 'laneList'">
<span v-for="(item, index) in record.laneList" :key="index">
{{ item.laneCName }}
<span v-if="index < record.laneList.length - 1">/</span>
</span>
</template>
</template>
</BasicTable>
@ -56,7 +62,26 @@ const [registerTable, { reload, getForm, getPaginationRef, getSelectRows, setPro
})
},
beforeFetch: (p) => {
return formatParams(p)
const data = {} as any
const queryData = JSON.parse(formatParams(p).queryCondition)
data.pageCondition = formatParams(p).pageCondition
const obj = {} as any
queryData.forEach(item => {
if (item.FieldName == 'laneCode') {
obj.laneCode = item.FieldValue
}
if (item.FieldName == 'laneId') {
obj.laneId = item.FieldValue
}
})
data.queryCondition = JSON.stringify(queryData)
console.log(data)
data.otherQueryCondition = {}
if (obj.laneCode || obj.laneId) {
data.otherQueryCondition.laneCode = obj.laneCode
data.otherQueryCondition.laneId = obj.laneId
}
return data
},
columns,
formConfig: {

@ -5,11 +5,13 @@
"list":[
{"dataIndex":"tasK_NO","title":"任务流水号","width":150},
{"dataIndex":"tasK_USER_STATUS_NAME","width": 120,"title":"任务个人状态" },
{"dataIndex":"tasK_TYPE_NAME","title":"任务类型","width":100, "sortable": true},
{"dataIndex":"tasK_SOURCE_NAME","title":"任务来源","width":100},
{"dataIndex":"statuS_NAME","title":"任务状态","width":100},
{"dataIndex":"tasK_TITLE","title":"任务标题","width":200,"sortable": true},
{"dataIndex":"tasK_DESP","title":"任务描述","width":100},
{"dataIndex":"customeR_NO","title":"委托编号","width":100},
{"dataIndex":"ouT_BS_NO","title":"外业务主键","width":100},
{"dataIndex":"createUserName","title":"创建人","width":100},
{"dataIndex":"ouT_BUSI_NO","title":"外业务编号","width":120},
{"dataIndex":"ouT_BUSI_TYPE","title":"外业务类型","width":120},
{"dataIndex":"tasK_BASE_TYPE","title":"基础业务类型","width":120},
@ -19,13 +21,11 @@
{"dataIndex":"iS_EXCEPT","title":"是否异常","width":100},
{"dataIndex":"iS_PUBLIC","title":"是否公共","width":100},
{"dataIndex":"iS_COMPLETE","title":"是否完成","width":100},
{"dataIndex":"begiN_DATE","title":"任务启动时间","width":120},
{"dataIndex":"completE_DATE","title":"任务完成时间","width":120},
{"dataIndex":"resulT_NOTE","title":"反馈结果","width":100},
{"dataIndex":"etd","title":"开船日期","width":100, "sortable": true},
{"dataIndex":"completE_DEAL","title":"任务完成方式","width":120},
{"dataIndex":"issuE_TYPE_NAME","title":"签单方式","width":100},
{"dataIndex":"tasK_REQ_USERNAME","title":"操作名称","width":100, "sortable": true},
{"dataIndex":"contA_INFO","title":"箱型箱量","width":150, "sortable": true},
{"dataIndex":"vesseL_VOYNO","title":"船名航次","width":100, "sortable": true},
{"dataIndex":"yarD_NAME","title":"场站","width":150, "sortable": true},

Loading…
Cancel
Save