lijingjia 2 weeks ago
commit 60ea1db15e

@ -1,97 +1,39 @@
// @ts-ignore
import { request } from '/@/utils/request'
import { DataResult, PageRequest } from '/@/api/model/baseModel'
enum Api {
list = '/containerManagementApi/CM_State_Change/GetCM_State_ChangeList',
edit = '/containerManagementApi/CM_State_Change/EditCM_State_Change',
multiEdit = '/containerManagementApi/CM_State_Change/CM_State_Change_Multi',
Changeinfo = '/containerManagementApi/CM_State_Change/GetCM_State_Change',
Changedel = '/containerManagementApi/CM_State_Change/DeleteCM_State_Change',
info = '/containerManagementApi/CM_CurrentState/GetCM_CurrentStateInfo',
del = '/mainApi/CodeCtn/BatchDelCodeCtn',
BasicsList = '/mainApi/CodeCtn/GetBasicsCodeCtnList',
ExistList = '/mainApi/CodeCtn/GetExistCodeCtnList',
Import = '/mainApi/CodeCtn/ImportCodeCtn',
list = '/containerManagementApi/VW_CM_OfflineAudit/GetCM_OfflineAuditList',
confirm = '/containerManagementApi/VW_CM_OfflineAudit/CM_OfflineAudit_Confirm',
cancel = '/containerManagementApi/VW_CM_OfflineAudit/CM_OfflineAudit_Cancel',
detailList = '/containerManagementApi/CM_SellCtn_Detail/GetCM_SellCtn_DetailList',
}
// 列表 (Auth)
export function ApiChangeList(data: PageRequest) {
export function ApiList(data: PageRequest) {
return request<DataResult>({
url: Api.list,
method: 'post',
data,
})
}
// 批量编辑状态 (Auth)
export function ApiMultiEdit(data: PageRequest) {
// 卖箱_明细 列表 (Auth)
export function ApiDetailList(data: PageRequest) {
return request<DataResult>({
url: Api.multiEdit,
url: Api.detailList,
method: 'post',
data,
})
}
// 编辑 (Auth)
export function ApiEdit(data: PageRequest) {
// 下线审批_确认 (Auth)
export function ApiConfirm(data: PageRequest) {
return request<DataResult>({
url: Api.edit,
url: Api.confirm,
method: 'post',
data,
})
}
// 详情 (Auth)
export function ApiChangeInfo(query) {
// 下线审批_取消 (Auth)
export function ApiCancel(data: PageRequest) {
return request<DataResult>({
url: Api.Changeinfo,
method: 'get',
params: query,
})
}
// 详情 (Auth)
export function ApiInfo(query) {
return request<DataResult>({
url: Api.info,
method: 'get',
params: query,
})
}
// 批量删除 (Auth)
export function ApiChangeDel(data: PageRequest) {
return request<DataResult>({
url: Api.Changedel,
method: 'post',
data,
})
}
// 批量删除 (Auth)
export function ApiDel(data: PageRequest) {
return request<DataResult>({
url: Api.del,
method: 'post',
data,
})
}
// 获取商品类型列表-基础库 (Auth)
export function ApiBasicsList(data: PageRequest) {
return request<DataResult>({
url: Api.BasicsList,
method: 'post',
data,
})
}
// 获取当前租户已有的商品类型 (Auth)
export function ApiExistList() {
return request<DataResult>({
url: Api.ExistList,
method: 'get',
})
}
// 导入商品类型列表-基础库 (Auth)
export function ApiImport(data: PageRequest) {
return request<DataResult>({
url: Api.Import,
url: Api.cancel,
method: 'post',
data,
})

@ -1,175 +1,98 @@
import { ref } from 'vue'
import { BasicColumn, FormSchema } from '/@/components/Table'
import { Tag } from 'ant-design-vue'
import { GetCtnSelectList, GetClientListByCode } from '/@/api/common'
import { GetDeptList } from '/@/views/operation/seaexport/api/BookingLedger'
import { useOptionsStore } from '/@/store/modules/options'
const optionsStore = useOptionsStore()
// 字典
import { getDictOption } from '/@/utils/dictUtil'
// 新旧箱数据
const usedStateList = [
{
label: '',
value: '',
},
{
label: 'USED',
value: 'USED',
},
{
label: 'NEW',
value: 'NEW',
},
]
export const columns: BasicColumn[] = [
{
title: '号',
dataIndex: 'cntrno',
title: '系统业务号',
dataIndex: 'billno',
sorter: true,
width: 150,
},
{
title: '箱型',
dataIndex: 'ctnall',
title: '执行状态',
dataIndex: 'billState',
sorter: true,
width: 150,
customRender: ({ text }) => {
if (text == 1000) {
return <Tag color="default"></Tag>
} else if (text == 1001) {
return <Tag color="processing"></Tag>
} else if (text == 10001) {
return <Tag color="error"></Tag>
} else if (text == 1100) {
return <Tag color="success"></Tag>
} else {
return '-'
}
},
{
title: '序号',
dataIndex: 'index',
width: 50,
},
{
title: '箱状态',
dataIndex: 'ctnState',
sorter: true,
width: 200,
},
{
title: '箱流转状态',
dataIndex: 'ctnFlowState',
sorter: true,
width: 200,
},
{
title: '船名',
dataIndex: 'vessel',
title: '业务日期',
dataIndex: 'bsdate',
sorter: true,
width: 200,
},
{
title: '航次',
dataIndex: 'voyno',
title: '租买箱客户',
dataIndex: 'rentCustomerName',
sorter: true,
width: 200,
},
// {
// title: '原箱主',
// dataIndex: 'OldContainerOwner',
// sorter: true,
// width: 200,
// },
{
title: '提单号',
dataIndex: 'mblno',
title: '箱业务',
dataIndex: 'ctnBizStateId',
sorter: true,
width: 200,
},
{
title: '发生日期',
dataIndex: 'changeTime',
sorter: true,
width: 150,
},
{
title: '空重箱',
dataIndex: 'isHeavy',
sorter: true,
width: 80,
customRender: ({ text }) => {
if (text) {
return <Tag color="success"></Tag>
if (text == 6) {
return '卖箱'
} else if (text == 1) {
return '租入退租'
} else if (text == 2) {
return '租出'
} else {
return <Tag color="error"></Tag>
return '-'
}
return text
},
},
{
title: '始发港',
dataIndex: 'portLoad',
sorter: true,
width: 150,
},
{
title: '目的港',
dataIndex: 'portDelivery',
sorter: true,
width: 150,
},
{
title: '预抵港',
dataIndex: 'portDischarge',
sorter: true,
width: 150,
},
{
title: '码头或场站',
dataIndex: 'depot',
sorter: true,
width: 150,
},
{
title: '关联合同号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 150,
},
{
title: '备注',
dataIndex: 'remark',
title: '全部箱号',
dataIndex: 'cntrnoAll',
sorter: true,
width: 200,
},
{
title: '录入时间',
dataIndex: 'createTime',
title: '箱型',
dataIndex: 'ctntotal',
sorter: true,
width: 200,
},
// {
// title: '当前港口',
// dataIndex: 'port',
// sorter: true,
// width: 150,
// },
// {
// title: '变动来源',
// dataIndex: 'changeSource',
// sorter: true,
// width: 150,
// },
// {
// title: '状态变动',
// dataIndex: 'ctnFlowState',
// sorter: true,
// width: 200,
// },
// {
// title: '新旧箱',
// dataIndex: 'usedState',
// sorter: true,
// width: 200,
// },
// {
// title: '箱状态',
// dataIndex: 'ctnState',
// sorter: true,
// width: 200,
// },
]
export const searchFormSchema: FormSchema[] = [
{
field: 'cntrno',
field: 'billState',
label: '执行状态',
component: 'Select',
colProps: { span: 4 },
defaultValue: 1001,
componentProps: {
options: [
{ label: '录入', value: 1000 },
{ label: '提交审核', value: 1001 },
{ label: '驳回提交', value: 10001 },
{ label: '审核通过', value: 1100 },
],
},
},
{
field: 'cntrnoall',
label: '箱号',
component: 'InputTextArea',
colProps: { span: 8 },
@ -179,600 +102,85 @@ export const searchFormSchema: FormSchema[] = [
rows: 2,
},
},
// {
// field: 'changeTime',
// label: '状态时间',
// component: 'RangePicker',
// required: false,
// dynamicDisabled: false,
// colProps: { span: 4 },
// componentProps: {
// allowClear: true,
// },
// },
// {
// field: 'ctnBizState',
// label: '箱业务状态',
// component: 'ApiSelect',
// colProps: { span: 4 },
// defaultValue: '',
// componentProps: ({ formModel }) => {
// return {
// api: () => {
// return new Promise((resolve) => {
// getDictOption('CM_CtnBizState').then((res) => {
// resolve(res)
// })
// })
// },
// labelField: 'label',
// valueField: 'label',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// }
// },
// },
// {
// field: 'changeSourceId',
// label: '变动来源',
// component: 'ApiSelect',
// colProps: { span: 4 },
// defaultValue: '',
// componentProps: ({ formModel }) => {
// return {
// api: () => {
// return new Promise((resolve) => {
// getDictOption('CM_ChangeSource').then((res) => {
// resolve(res)
// })
// })
// },
// labelField: 'label',
// valueField: 'value',
// resultField: 'data',
// filterOption: (input: string, option: any) => {
// return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
// },
// onChange: (v, obj) => {},
// }
// },
// },
// {
// field: 'etd',
// label: 'ETD',
// component: 'DatePicker',
// colProps: { span: 4 },
// defaultValue: '',
// componentProps: {
// showTime: true,
// style: 'width:100%',
// },
// },
// {
// field: 'Space',
// label: '',
// component: 'Space',
// colProps: { span: 4 },
// defaultValue: '',
// },
// {
// field: 'eta',
// label: 'ETA',
// component: 'DatePicker',
// colProps: { span: 4 },
// defaultValue: '',
// componentProps: {
// showTime: true,
// style: 'width:100%',
// },
// },
]
export const formSchema: FormSchema[] = [
{
label: '',
field: 'id',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'cntrno',
label: '集装箱号',
component: 'InputTextArea',
rules: [
{
required: true,
trigger: 'blur',
message: '请输入集装箱号',
},
],
colProps: { span: 24 },
componentProps: {
validateOnRuleChange: false,
placeholder: '请输入,多个箱号请以“,”逗号间隔',
rows: 3,
},
},
{
field: 'isOnlineId',
label: '是否上线',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_IsOnlineEnum').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
},
{
field: 'changeSourceId',
label: '变动来源',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_ChangeSource').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
},
{
field: 'usedState',
label: '新旧箱',
component: 'Select',
colProps: { span: 6 },
componentProps: {
options: usedStateList,
allowClear: true,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
{
field: 'ctnOwner',
label: '箱主',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
api: GetClientListByCode,
params: { code: 'leasing' },
labelField: 'pinYinCode',
showName: 'shortName',
valueField: 'shortName',
resultField: 'data',
immediate: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
},
{
field: 'ctnSourceId',
label: '箱来源',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_CtnSource').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
},
{
label: '',
field: 'ctnBizState',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'ctnBizStateId',
label: '箱业务状态',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_CtnBizState').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.ctnBizState = obj.label
},
}
},
},
{
field: 'billno',
label: '箱业务编号',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'ctnReleaseNo',
label: '关联合同号',
component: 'Input',
colProps: { span: 6 },
// required: true,
},
{
field: 'ctnStateId',
label: '箱状态',
component: 'ApiSelect',
colProps: { span: 6 },
defaultValue: '',
componentProps: ({ formModel }) => {
return {
api: () => {
return new Promise((resolve) => {
getDictOption('CM_CtnState').then((res) => {
resolve(res)
})
})
},
labelField: 'label',
valueField: 'value',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {},
}
},
},
{
field: 'ctnBreakState',
label: '箱损坏',
component: 'Input',
colProps: { span: 6 },
},
{
field: 'isHeavy',
label: '空重箱',
component: 'Switch',
defaultValue: false,
colProps: { span: 6 },
componentProps: {
checkedChildren: '重箱',
unCheckedChildren: '空箱',
},
},
{
label: '',
field: 'portLoadCode',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'portLoad',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'portLoadid',
label: '始发港',
component: 'ApiSelect',
colProps: { span: 6 },
required: false,
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
console.log(v, obj)
formModel.portLoad = obj?.label || ''
formModel.portLoadCode = obj?.ediCode || ''
},
}
},
},
{
label: '',
field: 'portDeliveryCode',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'portDelivery',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'portDeliveryid',
label: '目的港',
component: 'ApiSelect',
colProps: { span: 6 },
required: false,
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
console.log(v, obj)
formModel.portDelivery = obj?.label || ''
formModel.portDeliveryCode = obj?.ediCode || ''
},
}
},
},
{
label: '',
field: 'portDischargeCode',
component: 'Input',
defaultValue: '',
show: false,
},
{
label: '',
field: 'portDischarge',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'portDischargeid',
label: '预抵港',
component: 'ApiSelect',
colProps: { span: 6 },
required: false,
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
console.log(v, obj)
formModel.portDischarge = obj?.label || ''
formModel.portDischargeCode = obj?.ediCode || ''
},
}
},
},
{
label: '',
field: 'port',
component: 'Input',
defaultValue: '',
show: false,
},
{
field: 'portid',
label: '当前港口',
component: 'ApiSelect',
colProps: { span: 6 },
required: false,
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.port = obj?.label || ''
},
}
},
},
export const detailColumns: BasicColumn[] = [
{
field: 'depot',
label: '码头或场站',
component: 'ApiSelect',
colProps: { span: 6 },
required: false,
componentProps: ({}) => {
return {
option: optionsStore.getOptionsByCode('GetYardClientList'),
labelField: 'shortName',
valueField: 'shortName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
}
},
title: '箱号',
dataIndex: 'cntrno',
sorter: true,
width: 150,
},
{
field: 'vessel',
label: '船名',
component: 'Input',
colProps: { span: 6 },
title: '箱型',
dataIndex: 'ctnall',
sorter: true,
width: 150,
},
{
field: 'Voyno',
label: '航次',
component: 'Input',
colProps: { span: 6 },
title: '合同号',
dataIndex: 'ctnReleaseNo',
sorter: true,
width: 200,
},
{
label: '',
field: 'ctnall',
component: 'Input',
defaultValue: '',
show: false,
title: '提箱日期',
dataIndex: 'pickupDate',
sorter: true,
width: 200,
},
{
field: 'ctnCode',
label: '箱型',
component: 'ApiSelect',
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
api: GetCtnSelectList,
labelField: 'ctnName',
valueField: 'ediCode',
resultField: 'data',
onChange: (e, obj) => {
if (e && obj) {
formModel.ctnall = obj.label
}
if (!e && !obj) {
formModel.ctnall = ''
}
},
}
},
title: '当前状态',
dataIndex: 'ctnFlowState',
sorter: true,
width: 200,
},
{
field: 'mblno',
label: '提单号',
component: 'Input',
colProps: { span: 6 },
title: '箱生产日期',
dataIndex: 'productionDate',
sorter: true,
width: 200,
},
{
label: '',
field: 'customerName',
component: 'Input',
defaultValue: '',
show: false,
title: '箱皮重',
dataIndex: 'ctnWeight',
sorter: true,
width: 200,
},
{
label: '业务委托单位',
field: 'customerId',
component: 'ApiSelect',
required: false,
dynamicDisabled: false,
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
option: optionsStore.getOptionsByCode('GetControllerClientList'),
labelField: 'shortName',
valueField: 'codeName',
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (v, obj) => {
formModel.customerName = obj?.label || ''
},
}
},
title: '原始价格',
dataIndex: 'ctnValue_Base',
sorter: true,
width: 200,
},
{
field: 'etd',
label: 'ETD',
component: 'DatePicker',
colProps: { span: 6 },
defaultValue: '',
componentProps: {
showTime: true,
style: 'width:100%',
},
title: '购入成本',
dataIndex: 'ctnValue_BuyingPrice',
sorter: true,
width: 200,
},
{
field: 'eta',
label: 'ETA',
component: 'DatePicker',
colProps: { span: 6 },
defaultValue: '',
componentProps: {
showTime: true,
style: 'width:100%',
},
title: '卖出价格',
dataIndex: 'ctnValue_SellPrice',
sorter: true,
width: 200,
},
{
field: 'changeTime',
label: '状态时间',
component: 'DatePicker',
colProps: { span: 6 },
defaultValue: '',
componentProps: {
showTime: true,
style: 'width:100%',
},
title: '提箱港口',
dataIndex: 'pickupPort',
sorter: true,
width: 200,
},
{
field: 'ctnWeight',
label: '箱皮重',
component: 'InputNumber',
colProps: { span: 6 },
title: '当前港口',
dataIndex: 'port',
sorter: true,
width: 200,
},
{
field: 'ctnValue_Base',
label: '箱初期成本',
component: 'InputNumber',
colProps: { span: 6 },
title: '备注',
dataIndex: 'remark',
sorter: true,
width: 200,
},
]

@ -1,108 +1,101 @@
<template>
<div class="OfflineAudit">
<div>
<BasicTable class="ds-table" @register="registerTableTop"> </BasicTable>
</div>
<div>
<a-button type="link" @click="FnAudit(true, 'confirm')">
<span class="iconfont icon-yiwancheng2-copy" :style="{ fontSize: '13px' }"></span>
整票审核通过
</a-button>
<a-button type="link" @click="FnAudit(false, 'confirm')">
<span class="iconfont icon-yiwancheng2-copy" :style="{ fontSize: '13px' }"></span>
选中审核通过
</a-button>
<a-button type="link" @click="FnAudit(true, 'cancel')">
<span class="iconfont icon-bohui-01" :style="{ fontSize: '13px' }"></span>
整票驳回
</a-button>
<a-button type="link" @click="FnAudit(false, 'cancel')">
<span class="iconfont icon-bohui-01" :style="{ fontSize: '13px' }"></span>
驳回选中行
</a-button>
</div>
<div>
<BasicTable class="ds-table" @register="registerTableBotton"> </BasicTable>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table'
import { ApiChangeList, ApiChangeDel } from './api'
import { columns, searchFormSchema } from './columns'
import { ApiList, ApiDetailList, ApiConfirm, ApiCancel } from './api'
import { columns, searchFormSchema, detailColumns } from './columns'
import { useMessage } from '/@/hooks/web/useMessage'
const { notification } = useMessage()
//
import { formatParams } from '/@/hooks/web/common'
const [registerTableTop, { reload, getForm, getSelectRows }] = useTable({
const [registerTableTop, { reload, clearSelectedRowKeys, getSelectRows }] = useTable({
title: '',
api: async (p) => {
if (p.queryCondition == '[]') {
notification.warning({ message: '请输入查询条件!', duration: 3 })
} else {
const res: API.DataResult = await ApiChangeList(p)
res.data.forEach((item, index) => {
item.index = index + 1
})
clearSelectedRowKeys()
getSelectRowsBotton()
const res: API.DataResult = await ApiList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
}
},
beforeFetch: (p) => {
let Rdata = formatParams(p)
if (!!p.cntrno) {
let data = JSON.parse(Rdata.queryCondition)
data.forEach((item, index) => {
if (item.FieldName == 'cntrno') {
data.forEach((item) => {
if (item.FieldName == 'cntrnoall') {
item.FieldValue = item.FieldValue.replace(/ {1,}/g, ',')
item.FieldValue = item.FieldValue.replace(/\n/g, ',')
item.ConditionalType = 15
}
})
Rdata.queryCondition = JSON.stringify(data)
}
return Rdata
},
columns,
rowSelection: { type: 'checkbox' },
rowSelection: {
type: 'radio',
onChange: () => {
reloadBotton()
},
},
formConfig: {
labelWidth: 120,
schemas: searchFormSchema,
},
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: true,
showTableSetting: true,
showTableSetting: false,
bordered: true,
showIndexColumn: true,
indexColumnProps: {
width: 60,
},
canResize: true,
resizeHeightOffset: 35,
immediate: false,
resizeHeightOffset: 335,
immediate: true,
})
const [
registerTableBotton,
{ reload: reloadBotton, getForm: getFormBotton, getSelectRows: getSelectRowsBotton },
] = useTable({
const [registerTableBotton, { reload: reloadBotton, getSelectRows: getSelectRowsBotton }] =
useTable({
title: '',
api: async (p) => {
if (p.queryCondition == '[]') {
notification.warning({ message: '请输入查询条件!', duration: 3 })
} else {
const res: API.DataResult = await ApiChangeList(p)
res.data.forEach((item, index) => {
item.index = index + 1
})
const res: API.DataResult = await ApiDetailList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
}
},
beforeFetch: (p) => {
let Rdata = formatParams(p)
if (!!p.cntrno) {
let data = JSON.parse(Rdata.queryCondition)
data.forEach((item, index) => {
if (item.FieldName == 'cntrno') {
item.FieldValue = item.FieldValue.replace(/ {1,}/g, ',')
item.FieldValue = item.FieldValue.replace(/\n/g, ',')
item.ConditionalType = 15
}
})
Rdata.queryCondition = JSON.stringify(data)
}
return Rdata
p['Pid'] = getSelectRows()[0].id
return formatParams(p)
},
columns,
columns: detailColumns,
rowSelection: { type: 'checkbox' },
// formConfig: {
// labelWidth: 120,
// schemas: searchFormSchema,
// },
isTreeTable: false,
pagination: true,
striped: true,
useSearchForm: false,
@ -116,4 +109,51 @@
resizeHeightOffset: 35,
immediate: false,
})
async function FnAudit(type, state) {
let ApiData: any = {
id: '',
ids: [],
}
if (type) {
if (getSelectRows()[0].id) {
ApiData.id = getSelectRows()[0].id
} else {
notification.warning({ message: '请选择一条数据', duration: 3 })
}
} else {
if (getSelectRowsBotton().length) {
getSelectRowsBotton().forEach((item) => {
ApiData.ids.push(item.id)
})
ApiData.id = getSelectRows()[0].id
} else {
notification.warning({ message: '请至少选择一条数据', duration: 3 })
}
}
let res: any = state == 'confirm' ? await ApiConfirm(ApiData) : await ApiCancel(ApiData)
if (res.succeeded) {
notification.success({ message: res.message, duration: 3 })
console.log(type)
if (type) {
reload()
} else {
reloadBotton()
}
}
}
</script>
<style lang="less" scoped>
.OfflineAudit {
height: 100%;
> div {
&:nth-child(1) {
height: 60%;
}
&:nth-child(3) {
height: calc(40% - 32px);
}
}
}
</style>

@ -110,7 +110,8 @@
<!-- 运踪 -->
<template v-if="column.dataIndex == 'bookStatus'">
<div>
<span @click="checkBookStatus(record.id)" style="cursor: pointer; color: rgb(7, 231, 56);" class="iconfont icon-refresh-1-copy"></span>
<span @click="checkBookStatus(record.id)" style="cursor: pointer; color: rgb(7, 231, 56);"
class="iconfont icon-refresh-1-copy"></span>
<span v-for="(item, index) in record.bookingStatus" :key="item.id">
<a-tooltip placement="top" v-if="item.statusTime">
<template #title>{{ item.statusTime }}</template>
@ -127,11 +128,11 @@
<!-- 提箱返场 -->
<template v-if="column.dataIndex == 'statusLog'">
<div v-if="record.statusLog" class="txfc">
<div v-if="record.statusLog.length > 0">
<div >
<div class="billtrace-btn1 txfc" style="display: flex; align-items: center">
<i style="cursor: pointer; color: rgb(7, 231, 56); margin-right: 5px" @click="handleRefshYard(record.id)"
class="iconfont icon-refresh-1-copy"></i>
<a-popover trigger="click">
<i style="cursor: pointer; color: rgb(7, 231, 56); margin-right: 5px"
@click="handleRefshYard(record.id)" class="iconfont icon-refresh-1-copy"></i>
<a-popover v-if="record.statusLog.length > 0">
<template #content>
<div>
<span class="txfcSpan" style="width: 120px">箱号</span>
@ -151,7 +152,7 @@
返场
</span>
</a-popover>
<span style="margin-left: 5px">未提{{ record.txOpNumber }}/{{ record.statusLog.length }}</span>
<span v-if="record.statusLog.length > 0" style="margin-left: 5px">{{ record.txopNumber }}/{{ record.statusLog.length }}</span>
</div>
</div>
</div>
@ -468,6 +469,15 @@ const [registerTable, { reload, getVxeSelectRows, setLoading }] = useTable({
})
})
}
if (item.statusLog.length > 0) {
let num1 = item.statusLog.length
item.statusLog.forEach((item) => {
if (item.txOpTime) {
num1 -= 1
}
})
item.txopNumber = num1
}
item.bookingStatus = bookstatus
})
if (res?.data?.list) {
@ -615,6 +625,8 @@ const handleRefshYard = (id) => {
RefreshYard({ ids: [id], businessType: 1 }).then(res => {
reload()
setLoading(false)
}).catch(()=>{
setLoading(false)
})
}
const isAdvancedQuery = ref(false)

@ -868,3 +868,17 @@ export function GetChildTaskList(data) {
})
}
export function GetCreateTaskConfigList() {
return request<DataResult>({
url: '/taskApi/TaskManage/GetCreateTaskConfigList',
method: 'get',
})
}
export function SaveCreateTaskConfig(data) {
return request<DataResult>({
url: '/taskApi/TaskManage/SaveCreateTaskConfig',
data: data,
method: 'post',
})
}

@ -1,14 +1,23 @@
<template>
<div class="main">
<div class="title">
<a-tabs @change="handleChange" v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="任务分配"></a-tab-pane>
<a-tab-pane key="2" tab="任务生成"></a-tab-pane>
</a-tabs>
</div>
<div v-if="activeKey == '1'">
<a-spin :spinning="loading">
<div style="padding-left: 20px;margin-top: 20px">
<div> 船公司</div>
<a-select size="small" @change="handleChangeSearch" v-model:value="carrierId" style="width: 180px;margin-right: 20px">
<a-select size="small" @change="handleChangeSearch" v-model:value="carrierId"
style="width: 180px;margin-right: 20px">
<a-select-option v-for="item in carrierList" :key="item.carrierId" :value="item.carrierId">{{
item.carrier
}}</a-select-option>
</a-select>
</div>
<a-spin :spinning="loading">
<div class="list">
<div title="操作" class="card">
<div class="left">
@ -51,7 +60,8 @@
class="icon-piliangbianji iconfont"></i>
</div>
<div class="taskTypeList">
<div class="taskType" v-for="(item, index) in roleTaskData.saleTaskTypeList" :key="index">{{
<div class="taskType" v-for="(item, index) in roleTaskData.saleTaskTypeList"
:key="index">{{
item.taskTypeName }}
</div>
</div>
@ -104,6 +114,18 @@
</div> -->
</div>
</a-spin>
</div>
<div v-if="activeKey == '2'">
<a-spin :spinning="loading">
<div class="type-list">
<div class="type" v-for="(item, index) in taskTypeList" :key="index">
<span class="text"> {{ item.taskTypeName }}</span>
<a-switch @change="handleChangeSwitch($event, item)" size="small"
v-model:checked="item.isCreate" />
</div>
</div>
</a-spin>
</div>
@ -133,12 +155,8 @@
</template>
<script lang="ts" setup name="任务分配">
import { ref, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import pdf from '../components/pdf.vue'
import taskData from '../components/taskData.vue'
import taskButton from '../components/taskButton.vue'
import { GetCarrierlist } from '/@/views/operation/seaexport/api/BookingLedger'
import { GetTaskPlatEnumDict, TaskAllocationSave, TaskAllocationGetList, GetContainsCarrierList } from '../api'
import { GetTaskPlatEnumDict, TaskAllocationSave, TaskAllocationGetList, GetContainsCarrierList, GetCreateTaskConfigList, SaveCreateTaskConfig } from '../api'
import { useMessage } from '../../../hooks/web/useMessage'
const { createMessage } = useMessage()
const open = ref(false)
@ -146,6 +164,7 @@ const carrierIdAll = ref('')
const roleType = ref('')
const taskSaveLoad = ref(false)
const loading = ref(false)
const activeKey = ref('1')
function handleEdit(type) {
open.value = true
roleType.value = type
@ -234,6 +253,32 @@ function handleSave() {
})
})
}
const taskTypeList = ref([]) as any
function handleChange(val) {
if (val == 2) {
loading.value = true
GetCreateTaskConfigList().then(res => {
if (res.succeeded) {
taskTypeList.value = res.data
}
loading.value = false
})
}
}
function handleChangeSwitch(e, val) {
const formData = new FormData()
formData.append('taskTypeCode', val.taskTypeCode)
formData.append('isCreate', e)
loading.value = true
SaveCreateTaskConfig(formData).then(res => {
if (res.succeeded) {
createMessage.success('保存成功')
}
loading.value = false
}).catch(() => {
loading.value = false
})
}
function handleChangeSearch() {
searchInfo()
carrierIdAll.value = carrierId.value
@ -293,7 +338,7 @@ function searchInfo() {
.title {
background: rgba(245, 249, 252, 1);
padding: 15px 25px;
padding-left: 20px;
div {
font-size: 12px;
@ -353,4 +398,25 @@ function searchInfo() {
}
}
}
:deep(.ant-tabs-top > .ant-tabs-nav) {
margin: 0px !important;
}
.type-list {
display: flex;
flex-wrap: wrap;
padding: 0 40px;
margin-top: 20px;
.type {
width: 15%;
margin-bottom: 10px;
}
.text {
font-size: 12px;
margin-right: 10px;
}
}
</style>
Loading…
Cancel
Save