This commit is contained in:
‘huanghaiixia’
2026-03-04 16:31:44 +08:00
parent 90fd1c6f98
commit 03dc292d57
20 changed files with 971 additions and 97 deletions

View File

@ -3,17 +3,28 @@ import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios'; import { ErrorMessageMode } from '/#/axios';
enum Api { enum Api {
Page = '/ship/shipSchedule/page', // Page = '/ship/shipSchedule/page',
Page = '/magic-api/ship/shipSchedulePageList',
List = '/ship/shipSchedule/list', List = '/ship/shipSchedule/list',
Info = '/ship/shipSchedule/info', Info = '/ship/shipSchedule/info',
LngShipSchedule = '/ship/shipSchedule', LngShipSchedule = '/ship/shipSchedule',
ContractPageList = '/magic-api/ship/selectSalesContractPageList',
DataLog = '/ship/shipSchedule/datalog', DataLog = '/ship/shipSchedule/datalog',
} }
export async function getContractPageList(params: LngShipSchedulePageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngShipSchedulePageResult>(
{
url: Api.ContractPageList,
params,
},
{
errorMessageMode: mode,
},
);
}
/** /**
* @description: 查询LngShipSchedule分页列表 * @description: 查询LngShipSchedule分页列表
*/ */

View File

@ -0,0 +1,134 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="ContractPurIntListModal"></BasicTable>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getContractPageList} from '/@/api/ship/ShipSchedule';
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
{ field: 'kName', label: '合同号/名称', component: 'Input'},
{
field: 'dateFrom',
label: '有效期',
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
];
const columns: BasicColumn[] = [
{ title: t('合同号'), dataIndex: 'kNo', },
{ title: t('合同名称'), dataIndex: 'kName', },
{ title: t('供应商'), dataIndex: 'suName' ,},
{ title: '有效期开始',dataIndex: 'dateFrom', width: 120,},
{ title: '有效期结束',dataIndex: 'dateTo', width: 120},
{ title: t('合同主体'), dataIndex: 'comName', },
{ title: t('长协/现货'), dataIndex: 'longSpotName'},
{ title: t('气源地'), dataIndex: 'sourceName'},
{ title: t('价格条款'), dataIndex: 'prcTermName'},
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('国际采购合同列表'),
api: getContractPageList,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params,page:params.limit};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = (visible: boolean) => {
if (visible) {
nextTick(() => {
reload();
});
}
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('国际采购合同列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择合同')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.ContractPurIntListModal .basicCol{
position: inherit !important;
top: 0;
}
</style>
<style lang="less" scoped>
:deep( .ant-col-8:nth-child(2)) {
width: 360px !important;
max-width: 360px !important;;
}
:deep(.ant-col-8:nth-child(2) .ant-form-item-label) {
width: 80px !important;
}
</style>

View File

@ -81,7 +81,7 @@
selectedKeys.value = rowKeys; selectedKeys.value = rowKeys;
selectedValues.value = e selectedValues.value = e
} }
const getTitle = computed(() => (!unref(isUpdate) ? t('列表') : t(''))); const getTitle = computed(() => (!unref(isUpdate) ? t('接收站列表') : t('')));
function handleCancel () { function handleCancel () {
emit('cancel',); emit('cancel',);
} }

View File

@ -0,0 +1,118 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="portListModal"></BasicTable>
</BasicModal>
</div>
</template>
<script lang="ts" setup>
import { ref, computed, unref, nextTick } from 'vue';
import { BasicModal, useModalInner, useModal } from '/@/components/Modal';
import { BasicForm, useForm } from '/@/components/Form/index';
import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getLngBPortPage } from '/@/api/mdm/Port';
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
{ field: 'fullName', label: '名称', component: 'Input'},
];
const columns: BasicColumn[] = [
{ title: t('编码'), dataIndex: 'code', },
{ title: t('名称'), dataIndex: 'fullName', },
{ title: t('简称'), dataIndex: 'shortName' ,},
{ title: '所属国家和地区',dataIndex: 'regionCode'},
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'radio' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('港口列表'),
api: getLngBPortPage,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params,page:params.limit, valid:'Y'};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = (visible: boolean) => {
if (visible) {
nextTick(() => {
reload();
});
}
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('港口列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择港口')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.portListModal .basicCol{
position: inherit !important;
top: 0;
}
</style>
<style lang="less" scoped>
:deep( .ant-col-8:nth-child(2)) {
width: 360px !important;
max-width: 360px !important;;
}
:deep(.ant-col-8:nth-child(2) .ant-form-item-label) {
width: 80px !important;
}
</style>

View File

@ -7,7 +7,7 @@
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
> >
<a-table :style="{ padding: '0 5px'}" :columns="columns" :data-source="data" :scroll="{y: 400}" :pagination="false" :row-key="record => record.id"/> <a-table :style="{ padding: '0 5px'}" :loading="loading" :columns="columns" :data-source="data" :scroll="{y: 400}" :pagination="false" :row-key="record => record.id"/>
</a-modal> </a-modal>
</div> </div>
@ -16,6 +16,7 @@
import { defHttp } from '/@/utils/http/axios'; import { defHttp } from '/@/utils/http/axios';
import { ErrorMessageMode } from '/#/axios'; import { ErrorMessageMode } from '/#/axios';
import { watch, defineProps, ref, computed, onMounted, onUnmounted, createVNode, reactive, } from 'vue'; import { watch, defineProps, ref, computed, onMounted, onUnmounted, createVNode, reactive, } from 'vue';
const loading = ref()
const columns = [ const columns = [
{ {
title: '表名', title: '表名',
@ -132,8 +133,6 @@ const handleCancel = () => {
emit('cancel'); emit('cancel');
visible.value = false; visible.value = false;
}; };
console.log(props.logId, 444, props.logPath)
interface DataItem { interface DataItem {
children?: DataItem[]; children?: DataItem[];
} }
@ -163,8 +162,14 @@ console.log(props.logId, 444, props.logPath)
} }
async function getLog() { async function getLog() {
data.value = await getDataLogData(props.logId,props.logPath,{}) loading.value = true
console.log(data.value, 88) try {
data.value = await getDataLogData(props.logId,props.logPath,{})
loading.value = false
} catch (error) {
loading.value = false
}
} }
onMounted( async() => { onMounted( async() => {

View File

@ -103,4 +103,5 @@ span {
.ant-input-affix-wrapper-disabled { .ant-input-affix-wrapper-disabled {
border-color: transparent !important; border-color: transparent !important;
border: 1px solid #fff !important; border: 1px solid #fff !important;
background-color: transparent !important;
} }

View File

@ -309,7 +309,15 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{
meta: { meta: {
title: (route) => ('管道气采购合同详情') title: (route) => ('管道气采购合同详情')
} }
} },
{
path: '/ship/ShipSchedule/createForm',
name: 'ShipSchedule',
component: () => import('/@/views/ship/ShipSchedule/components/createForm.vue'),
meta: {
title: (route) => route.query.formName
}
},
] ]

View File

@ -380,7 +380,7 @@
let res = await getAllCom() || [] let res = await getAllCom() || []
comIdList.value = res.map(v=> { comIdList.value = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -82,7 +82,7 @@
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="接收站" name="staName"> <a-form-item label="接收站" name="staName">
<a-input-search v-model:value="formState.staName" :disabled="isDisable" placeholder="请选择接收站" readonly @search="onSearchDownLoad('up', index)"/> <a-input-search v-model:value="formState.staName" :disabled="isDisable" placeholder="请选择接收站" readonly @search="onSearchStation"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -203,7 +203,7 @@
<deptUserModal @register="register" @success="handleSuccess"/> <deptUserModal @register="register" @success="handleSuccess"/>
<deptListModal @register="registerDept" @success="handleSuccessDept" /> <deptListModal @register="registerDept" @success="handleSuccessDept" />
<contractFactListModal @register="registerContractFact" @success="handleSuccessContractFact" /> <contractFactListModal @register="registerContractFact" @success="handleSuccessContractFact" />
<downloadPointModal @register="registerDownLoad" @success="handleSuccessDownLoad"/> <lngStationModal @register="registerStation" @success="handleSuccessStation"/>
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" /> <supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" />
</a-spin> </a-spin>
</template> </template>
@ -234,7 +234,7 @@
import correlationApproList from '/@/components/common/correlationApproList.vue'; import correlationApproList from '/@/components/common/correlationApproList.vue';
import correlationContractFactList from '/@/components/common/correlationContractFactList.vue'; import correlationContractFactList from '/@/components/common/correlationContractFactList.vue';
import contractFactListModal from '/@/components/common/contractFactListModal.vue'; import contractFactListModal from '/@/components/common/contractFactListModal.vue';
import downloadPointModal from '/@/components/common/downloadPointModal.vue'; import lngStationModal from '/@/components/common/lngStationModal.vue';
import supplierListModal from '/@/components/common/supplierListModal.vue'; import supplierListModal from '/@/components/common/supplierListModal.vue';
import { getAllCurrency } from '/@/api/contract/ContractFact'; import { getAllCurrency } from '/@/api/contract/ContractFact';
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
@ -280,7 +280,7 @@
const [register, { openModal:openModal}] = useModal(); const [register, { openModal:openModal}] = useModal();
const [registerDept, { openModal:openModalDept}] = useModal(); const [registerDept, { openModal:openModalDept}] = useModal();
const [registerContractFact, { openModal:openModalContractFact}] = useModal(); const [registerContractFact, { openModal:openModalContractFact}] = useModal();
const [registerDownLoad, { openModal:openModalDownLoad}] = useModal(); const [registerStation, { openModal:openModalStation}] = useModal();
const [registerSupplier, { openModal:openModalSupplier}] = useModal(); const [registerSupplier, { openModal:openModalSupplier}] = useModal();
const rules= reactive({ const rules= reactive({
kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }], kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
@ -507,8 +507,8 @@
const onContract = (val)=> { const onContract = (val)=> {
openModalContractFact(true,{isUpdate: false}) openModalContractFact(true,{isUpdate: false})
} }
const onSearchDownLoad = (val, index)=> { const onSearchStation = (val)=> {
openModalDownLoad(true,{isUpdate: false, type: val}) openModalStation(true,{isUpdate: false})
} }
const addProc = () => { const addProc = () => {
@ -587,7 +587,7 @@
formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode
} }
} }
const handleSuccessDownLoad = (val) => { const handleSuccessStation = (val) => {
formState.lngContractProcList[0].staCode = val[0].code formState.lngContractProcList[0].staCode = val[0].code
formState.lngContractProcList[0].staName = val[0].fullName formState.lngContractProcList[0].staName = val[0].fullName
formState.staName = val[0].fullName formState.staName = val[0].fullName

View File

@ -35,7 +35,7 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="供应商" name="cpName"> <a-form-item label="供应商" name="cpName">
<a-input-search v-model:value="formState.cpName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchCustomer"/> <a-input-search v-model:value="formState.cpName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchSupplier"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -345,7 +345,7 @@
const [register, { openModal:openModal}] = useModal(); const [register, { openModal:openModal}] = useModal();
const [registerDept, { openModal:openModalDept}] = useModal(); const [registerDept, { openModal:openModalDept}] = useModal();
const [registerContractFact, { openModal:openModalContractFact}] = useModal(); const [registerContractFact, { openModal:openModalContractFact}] = useModal();
const [registerSupplier, { openModal:openModalCustomer}] = useModal(); const [registerSupplier, { openModal:openModalSupplier}] = useModal();
const rules= reactive({ const rules= reactive({
kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }], kNo: [{ required: true, message: "该项为必填项", trigger: 'change' }],
kName: [{ required: true, message: "该项为必填项", trigger: 'change' }], kName: [{ required: true, message: "该项为必填项", trigger: 'change' }],
@ -573,8 +573,8 @@
const onSearch = (val)=> { const onSearch = (val)=> {
openModalDept(true,{isUpdate: false}) openModalDept(true,{isUpdate: false})
} }
const onSearchCustomer = () => { const onSearchSupplier = () => {
openModalCustomer(true,{isUpdate: false}) openModalSupplier(true,{isUpdate: false})
} }
const onSearchUser = (val)=> { const onSearchUser = (val)=> {
openModal(true,{isUpdate: false}) openModal(true,{isUpdate: false})

View File

@ -325,7 +325,7 @@
if (v.field == 'comId') { if (v.field == 'comId') {
v.componentProps.options = res.map(v=> { v.componentProps.options = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -329,7 +329,7 @@
if (v.field == 'comId') { if (v.field == 'comId') {
v.componentProps.options = res.map(v=> { v.componentProps.options = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -327,7 +327,7 @@
if (v.field == 'comId') { if (v.field == 'comId') {
v.componentProps.options = res.map(v=> { v.componentProps.options = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -326,7 +326,7 @@
if (v.field == 'comId') { if (v.field == 'comId') {
v.componentProps.options = res.map(v=> { v.componentProps.options = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -330,7 +330,7 @@
if (v.field == 'comId') { if (v.field == 'comId') {
v.componentProps.options = res.map(v=> { v.componentProps.options = res.map(v=> {
return { return {
label: v.name, label: v.shortName,
value: v.id value: v.id
} }
}) })

View File

@ -28,7 +28,7 @@
<a-form-item label="交易主体" name="comId"> <a-form-item label="交易主体" name="comId">
<a-select v-model:value="formState.comId" :disabled="isDisable || dataList.length" @change="comIdChange" placeholder="请选择" style="width: 100%" allow-clear> <a-select v-model:value="formState.comId" :disabled="isDisable || dataList.length" @change="comIdChange" placeholder="请选择" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.comIdList" :key="item.id" :value="item.id"> <a-select-option v-for="item in optionSelect.comIdList" :key="item.id" :value="item.id">
{{ item.name }} {{ item.shortName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>

View File

@ -28,7 +28,7 @@
<a-form-item label="交易主体" name="comId"> <a-form-item label="交易主体" name="comId">
<a-select v-model:value="formState.comId" :disabled="isDisable || dataList.length" @change="comIdChange" placeholder="请选择" style="width: 100%" allow-clear> <a-select v-model:value="formState.comId" :disabled="isDisable || dataList.length" @change="comIdChange" placeholder="请选择" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.comIdList" :key="item.id" :value="item.id"> <a-select-option v-for="item in optionSelect.comIdList" :key="item.id" :value="item.id">
{{ item.name }} {{ item.shortName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>

View File

@ -29,34 +29,34 @@ export const columns: BasicColumn[] = [
title: '船期编号', title: '船期编号',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'kId', dataIndex: 'kName',
title: '合同', title: '合同',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 150,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'longSpotCode', dataIndex: 'longSpotName',
title: '长协/现货', title: '长协/现货',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 100,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'comId', dataIndex: 'comName',
title: '交易主体', title: '交易主体',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
@ -65,16 +65,16 @@ export const columns: BasicColumn[] = [
title: '卸港ETA', title: '卸港ETA',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'staCode', dataIndex: 'staName',
title: '接收站', title: '接收站',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
@ -83,34 +83,34 @@ export const columns: BasicColumn[] = [
title: '供应商', title: '供应商',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 150,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'ssTypeCode', dataIndex: 'ssTypeName',
title: '业务类型', title: '业务类型',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'opsPurId', dataIndex: 'opsPurName',
title: '采购执行状态', title: '采购执行状态',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
{ {
dataIndex: 'opsSalesId', dataIndex: 'opsSalesName',
title: '销售执行状态', title: '销售执行状态',
componentType: 'input', componentType: 'input',
align: 'left', align: 'left',
width: 120,
sorter: true, sorter: true,
}, },
]; ];

View File

@ -0,0 +1,509 @@
<template>
<a-spin :spinning="spinning" tip="加载中...">
<div class="page-bg-wrap formViewStyle pdcss">
<div class="top-toolbar" >
<a-button style="margin-right: 10px" @click="close">
<slot name="icon"><close-outlined /></slot>关闭
</a-button>
<template v-if="pageType!=='view'">
<a-button style="margin-right: 10px" type="primary" @click="handleSubmit">
<slot name="icon"><save-outlined /></slot>保存
</a-button>
</template>
</div>
<a-form ref="formRef" :model="formState" :rules="rules" v-bind="layout">
<Card title="" :bordered="false" >
<a-row>
<a-col :span="8">
<a-form-item label="船期编号" name="ssNo">
<a-input v-model:value="formState.ssNo" disabled/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否自采" name="ownSign">
<a-select v-model:value="formState.ownSign" :disabled="isDisable" placeholder="请选择是否自采" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.ownSignList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="交易主体" name="comId">
<a-select v-model:value="formState.comId" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.comIdList" :key="item.value" :value="item.value">
{{ item.label }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="长协/现货" name="longSpotCode">
<a-select v-model:value="formState.longSpotCode" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.longSpotCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="合同" name="kName">
<a-input-search v-model:value="formState.kName" :disabled="isDisable" placeholder="请选择合同" readonly @search="onContract"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="供应商" name="suName">
<a-input-search v-model:value="formState.suName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchSupplier"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="价格条款" name="prcTermCode">
<a-select v-model:value="formState.prcTermCode" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear @change="periodTypeCodeChange">
<a-select-option v-for="item in optionSelect.prcTermCodeList" :key="item.code" :value="item.code">
{{ item.fullName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="业务类型" name="ssTypeCode">
<a-select v-model:value="formState.ssTypeCode" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear @change="periodTypeCodeChange">
<a-select-option v-for="item in optionSelect.ssTypeCodeList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="客户" name="cuName">
<a-input-search v-model:value="formState.cuName" :disabled="isDisable" placeholder="请选择客户" readonly @search="onSearchCustomer"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="接收站" name="staName">
<a-input-search v-model:value="formState.staName" :disabled="isDisable" placeholder="请选择接收站" readonly @search="onSearchStation"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="卸港港口" name="portUnloading1Name">
<a-input-search v-model:value="formState.portUnloading1Name" :disabled="isDisable" placeholder="请选择卸港港口" readonly @search="onSearchPort"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否接卸" name="unloadSign">
<a-select v-model:value="formState.unloadSign" :disabled="isDisable" placeholder="请选择" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.ownSignList" :key="item.code" :value="item.code">
{{ item.name }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="船名" name="shipName">
<a-input v-model:value="formState.shipName" :disabled="isDisable" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="船只IMO" name="shipCode">
<a-input v-model:value="formState.shipCode" :disabled="isDisable" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="国际气源地" name="sourceName">
<a-input v-model:value="formState.sourceName" :disabled="isDisable" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="NOR" name="dateNor">
<a-date-picker v-model:value="formState.dateNor" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="最迟交货日" name="dateEnd">
<a-date-picker v-model:value="formState.dateEnd" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="卸港ETA" name="dateEta">
<a-date-picker v-model:value="formState.dateEta" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="卸港ETB" name="dateEtb">
<a-date-picker v-model:value="formState.dateEtb" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="卸港ETC" name="dateEtc">
<a-date-picker v-model:value="formState.dateEtc" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="卸港ETD" name="dateEtd">
<a-date-picker v-model:value="formState.dateEtd" style="width: 100%" :disabled="isDisable" placeholder="请选择日期" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="热值(MMBtu)" name="qtyMmbtu">
<input-number v-model:value="formState.qtyMmbtu" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="热值(GJ)" name="qtyGj">
<input-number v-model:value="formState.qtyGj" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="重量(吨)" name="qtyTon">
<input-number v-model:value="formState.qtyTon" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="体积(标方)" name="qtyM3">
<input-number v-model:value="formState.qtyM3" :disabled="isDisable" :digits="3" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="币种" name="currCode">
<a-select v-model:value="formState.currCode" :disabled="isDisable" placeholder="请选择币种" style="width: 100%" allow-clear>
<a-select-option v-for="item in optionSelect.curCodeList" :key="item.code" :value="item.code">
{{ item.fullName }}
</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="汇率" name="rateEx">
<input-number v-model:value="formState.rateEx" :disabled="isDisable" :digits="6" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="采购价格" name="priceMmbtuPur">
<input-number v-model:value="formState.priceMmbtuPur" :disabled="isDisable" :digits="4" :min="0" style="width: 100%" placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="采购金额" name="amountPur">
<input-number v-model:value="formState.amountPur" :disabled="isDisable" :digits="2" :min="0" style="width: 100%" placeholder="请输入"/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="8">
<a-form-item label="我方联系人" name="empName">
<a-input-search v-model:value="formState.empName" :disabled="isDisable" placeholder="请选择业务联系人" readonly @search="onSearchUser"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="联系人电话" name="empTel">
<a-input-search v-model:value="formState.empTel" :disabled="isDisable" placeholder="请输入" readonly @search="onSearchUser"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="对在港烧气有特别要求" class="formItemWarp" name="request" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.request" :disabled="isDisable" :maxLength="100" placeholder="请输入内容最多100字" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="备注" name="note" :label-col="{ span: 3 }" :wrapper-col="{ span: 24 }">
<a-textarea v-model:value="formState.note" :disabled="isDisable" placeholder="请输入内容最多200字" :maxLength="200" :auto-size="{ minRows: 2, maxRows: 5 }"/>
</a-form-item>
</a-col>
</a-row>
</Card>
<Card title="附件信息" :bordered="false" >
<UploadList :disabled="isDisable" :list="dataFile" :value="formState.filePath" :tableName="tableName" :columnName="columnName" @change="uploadListChange"/>
</Card>
</a-form>
</div>
<deptUserModal @register="register" @success="handleSuccess"/>
<ContractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" />
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" />
<customerListModal @register="registerCustomer" @success="handleSuccessCustomer" selectType="radio" />
<lngStationModal @register="registerStation" @success="handleSuccessStation"/>
<portListModal @register="registerPort" @success="handleSuccessPort"/>
</a-spin>
</template>
<script lang="ts" setup>
import { Card } from 'ant-design-vue';
import { useRouter } from 'vue-router';
import { FromPageType, RecordType } from '/@/enums/workflowEnum';
import { ref, computed, onMounted, onBeforeMount, nextTick, defineAsyncComponent, reactive, defineComponent, watch} from 'vue';
import { SendOutlined, SaveOutlined, CloseOutlined, } from '@ant-design/icons-vue';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
import useEventBus from '/@/hooks/event/useEventBus';
import type { Rule } from 'ant-design-vue/es/form';
import { getDictionary } from '/@/api/sales/Customer';
import { useModal } from '/@/components/Modal';
import { getAllPriceTerm} from '/@/api/contract/ContractPurInt';
import { addLngShipSchedule,updateLngShipSchedule, getLngShipSchedule} from '/@/api/ship/ShipSchedule';
import { getAllCurrency } from '/@/api/contract/ContractFact';
import dayjs from 'dayjs';
import { getAppEnvConfig } from '/@/utils/env';
import { message } from 'ant-design-vue';
import UploadList from '/@/components/Form/src/components/UploadList.vue';
import deptUserModal from '/@/components/common/deptUserModal.vue';
import ContractPurIntListModal from '/@/components/common/ContractPurIntListModal.vue';
import supplierListModal from '/@/components/common/supplierListModal.vue';
import lngStationModal from '/@/components/common/lngStationModal.vue';
import customerListModal from '/@/components/common/customerListModal.vue';
import portListModal from '/@/components/common/portListModal.vue';
import { useUserStore } from '/@/store/modules/user';
import { getAllCom} from '/@/api/contract/ContractPurInt';
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const tableName = 'ShipSchedule';
const columnName = 'ShipSchedule'
const formType = ref('2'); // 0 新建 1 修改 2 查看
const formRef = ref();
const props = defineProps({
disabled: false,
id: ''
});
const { bus, FORM_LIST_MODIFIED } = useEventBus();
const router = useRouter();
const { currentRoute } = router;
const isDisable = ref(false);
const { formPath } = currentRoute.value.query;
const pathArr = [];
const tabStore = useMultipleTabStore();
const formProps = ref(null);
const formId = ref(currentRoute.value?.params?.id);
const pageType = ref(currentRoute.value.query?.type);
const pageId = ref(currentRoute.value.query?.id)
const spinning = ref(false);
const { notification } = useMessage();
const { t } = useI18n()
const formState = reactive({
});
const [register, { openModal:openModal}] = useModal();
const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal();
const [registerSupplier, { openModal:openModalSupplier}] = useModal();
const [registerStation, { openModal:openModalStation}] = useModal();
const [registerCustomer, { openModal:openModalCustomer}] = useModal();
const [registerPort, { openModal:openModalPort}] = useModal();
const rules= reactive({
ownSign: [{ required: true, message: "该项为必填项", trigger: 'change' }],
comId: [{ required: true, message: "该项为必填项", trigger: 'change' }],
ssTypeCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
currCode: [{ required: true, message: "该项为必填项", trigger: 'change' }],
dateEta: [{ required: true, message: "该项为必填项", trigger: 'change' }],
});
const layout = {
labelCol: { span: 8 },
wrapperCol: { span: 16 },
}
const dataFile = ref([]);
let optionSelect= reactive({
ownSignList: [],
comIdList: [],
ssTypeCodeList: [],
longSpotCodeList: [],
curCodeList: [],
prcTermCodeList: [],
});
watch(
() => props.id,
(val) => {
if (val) {
getInfo(val)
}
},
{
immediate: true
}
);
watch(
() => props.disabled,
(val) => {
isDisable.value = val
},
{
immediate: true
}
);
onMounted(() => {
isDisable.value = pageType.value == 'view'
getOption()
if (pageId.value) {
getInfo(pageId.value)
} else {
formState.empName = userInfo.name
formState.empId = userInfo.id
formState.empTel = userInfo.mobile
getOptionParams()
}
});
const uploadListChange = (val) => {
dataFile.value = val
}
async function getInfo(id) {
spinning.value = true
try {
let data = await getLngShipSchedule(id)
spinning.value = false
Object.assign(formState, {...data})
Object.assign(dataFile.value, formState.lngFileUploadList || [])
formState.dateNor = formState.dateNor ? dayjs(formState.dateNor) : null
formState.dateEnd = formState.dateEnd ? dayjs(formState.dateEnd) : null
formState.dateEta = formState.dateEta ? dayjs(formState.dateEta) : null
formState.dateEtb = formState.dateEtb ? dayjs(formState.dateEtb) : null
formState.dateEtc = formState.dateEtc ? dayjs(formState.dateEtc) : null
formState.dateEtd = formState.dateEtd ? dayjs(formState.dateEtd) : null
getOptionParams()
} catch (error) {
spinning.value = false
}
}
async function getOption() {
optionSelect.ownSignList = await getDictionary('LNG_YN')
optionSelect.ssTypeCodeList = await getDictionary('LNG_SHP_S')
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
optionSelect.longSpotCodeList = await getDictionary('LNG_LONG')
let res = await getAllCom() || []
optionSelect.comIdList = res.map(v=> {
return {
label: v.shortName,
value: v.id
}
})
}
async function getOptionParams() {
optionSelect.curCodeList = await getAllCurrency({eid: formState.curCode})
optionSelect.prcTermCodeList = await getAllPriceTerm({eid: formState.prcTermCode})
}
const onSearchPort= () => {
openModalPort(true,{isUpdate: false})
}
const onSearchCustomer = () => {
openModalCustomer(true,{isUpdate: false})
}
const onSearchStation = (val)=> {
openModalStation(true,{isUpdate: false})
}
const onSearchSupplier = () => {
openModalSupplier(true,{isUpdate: false})
}
const onSearchUser = (val)=> {
openModal(true,{isUpdate: false})
}
const onContract = (val)=> {
openModalContractPurInt(true,{isUpdate: false})
}
const handleSuccess = (val, deptId) => {
formState.empName = val[0].name
formState.empId = val[0].id
formState.empTel = val[0].mobile
}
const handleSuccessPort = (val) => {
formState.portUnloading1Code = val[0].code
formState.portUnloading1Name = val[0].fullName
}
const handleSuccessStation = (val) => {
formState.staCode = val[0].code
formState.staName = val[0].fullName
}
const handleSuccessCustomer = (val) => {
formState.cuCode = val[0].cuCode
formState.cuName = val[0].cuName
}
const handleSuccessSupplier = (val) => {
formState.suCode = val[0].suCode
formState.suName = val[0].suName
}
const handleSuccessContractPurInt = (val) => {
formState.kId = val[0].id
formState.kName = val[0].kName
formState.comId = val[0].comId
formState.suCode = val[0].suCode
formState.suName = val[0].suName
formState.longSpotCode = val[0].longSpotCode
formState.prcTermCode = val[0].prcTermCode
formState.sourceName = val[0].sourceName
}
function close() {
tabStore.closeTab(currentRoute.value, router);
}
async function getFormValue() {
return formState
}
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
let obj = {
...formState,
lngFileUploadList: dataFile.value,
}
spinning.value = true;
let request = !formState.id ? addLngShipSchedule :updateLngShipSchedule
try {
const data = await request(obj);
notification.success({
message: '提示',
description: data?.id ? t('新增成功!') : t('修改成功!')
}); //提示消息
setTimeout(() => {
bus.emit(FORM_LIST_MODIFIED, {});
close();
}, 500);
} finally {
spinning.value = false;
}
} catch (errorInfo) {
spinning.value = false;
errorInfo?.errorFields?.length && notification.warning({
message: '提示',
description: '请完善信息'
});
return false
}
}
defineExpose({
handleSubmit,
getFormValue
});
</script>
<style lang="less" scoped>
:deep(.ant-form-item .ant-form-item-label) {
width: 135px !important;
max-width: 135px !important;
}
.page-bg-wrap {
background-color: #fff;
}
.top-toolbar {
min-height: 44px;
margin-bottom: 12px;
border-bottom: 1px solid #eee;
}
.pdcss {
padding:0px 12px 6px 12px !important;
}
:deep(.formItemWarp .ant-form-item-label > label) {
white-space: normal !important;
word-break: break-word !important;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<PageWrapper dense fixedHeight contentFullHeight contentClass="flex"> <PageWrapper dense fixedHeight contentFullHeight contentClass="flex" class="ShipSchedule">
<BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow"> <BasicTable @register="registerTable" ref="tableRef" @row-dbClick="dbClickRow">
<template #toolbar> <template #toolbar>
@ -18,6 +18,12 @@
<template v-if="column.dataIndex === 'action'"> <template v-if="column.dataIndex === 'action'">
<TableAction :actions="getActions(record)" /> <TableAction :actions="getActions(record)" />
</template> </template>
<template v-if="column.dataIndex === 'opsPurName'">
{{ record.opsPurId ? '已执行' : '未执行' }}
</template>
<template v-if="column.dataIndex === 'opsSalesName'">
{{ record.opsSalesId ? '已执行' : '未执行' }}
</template>
</template> </template>
</BasicTable> </BasicTable>
<ShipScheduleModal @register="registerModal" @success="handleSuccess" /> <ShipScheduleModal @register="registerModal" @success="handleSuccess" />
@ -51,7 +57,8 @@
import Icon from '/@/components/Icon/index'; import Icon from '/@/components/Icon/index';
import useEventBus from '/@/hooks/event/useEventBus'; import useEventBus from '/@/hooks/event/useEventBus';
import { cloneDeep } from 'lodash-es'; import { cloneDeep } from 'lodash-es';
import dayjs from 'dayjs';
import { getAllCom } from '/@/api/contract/ContractPurInt';
const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus(); const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus();
const { notification } = useMessage(); const { notification } = useMessage();
@ -81,17 +88,20 @@
return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code));
}); });
const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,delete : handleDelete,} const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,datalog : handleDatalog,delete : handleDelete,send: handleSend, opssales: handleOpssales, opspur: handleOpspur}
const { currentRoute } = useRouter(); const { currentRoute } = useRouter();
const selectedKeys = ref<string[]>([]);
const router = useRouter(); const router = useRouter();
const formIdComputedRef = ref(); const formIdComputedRef = ref();
formIdComputedRef.value = currentRoute.value.meta.formId formIdComputedRef.value = currentRoute.value.meta.formId
const schemaIdComputedRef = ref(); const schemaIdComputedRef = ref();
schemaIdComputedRef.value = currentRoute.value.meta.schemaId schemaIdComputedRef.value = currentRoute.value.meta.schemaId
const [registerModal, { openModal }] = useModal(); const [registerModal, { openModal }] = useModal();
const formName='船期计划排布'; const formName=currentRoute.value.meta?.title;
const [registerTable, { reload, }] = useTable({ const defaultDate = ref([dayjs().startOf('year').format('YYYY-MM-DD'), dayjs().add(1, 'year').endOf('year').format('YYYY-MM-DD')]);
const comIdList = ref([])
const [registerTable, { reload, clearSelectedRowKeys }] = useTable({
title: '' || (formName + '列表'), title: '' || (formName + '列表'),
api: getLngShipSchedulePage, api: getLngShipSchedulePage,
rowKey: 'id', rowKey: 'id',
@ -100,12 +110,64 @@
rowProps: { rowProps: {
gutter: 16, gutter: 16,
}, },
schemas: customSearchFormSchema, schemas: [
fieldMapToTime: [], {
showResetButton: false, field: 'dateEta',
label: '卸港ETA',
component: 'RangePicker',
defaultValue: defaultDate.value,
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
{
field: 'ssNo',
label: '船期编号',
component: 'Input',
},
{
field: 'staName',
label: '接收站',
component: 'Input',
},
{
field: 'comId',
label: '交易主体',
component: 'Select',
componentProps: {
showSearch: true,
optionFilterProp: 'label',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
},
options: comIdList,
placeholder: '请选择',
allowClear: true,
getPopupContainer: () => document.body,
},
}
],
fieldMapToTime: [['dateEta', ['startDate', 'endDate'], 'YYYY-MM-DD']],
showResetButton: true,
submitButtonOptions: {
text: '搜索',
onClick: () => {
clearSelectedRowKeys()
},
},
resetButtonOptions: {
text: '重置',
onClick: () => {
clearSelectedRowKeys()
},
},
}, },
immediate: false,
beforeFetch: (params) => { beforeFetch: (params) => {
return { ...params, FormId: formIdComputedRef.value, PK: 'id' }; return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit };
}, },
afterFetch: (res) => { afterFetch: (res) => {
tableRef.value.setToolBarWidth(); tableRef.value.setToolBarWidth();
@ -116,10 +178,14 @@
striped: false, striped: false,
actionColumn: { actionColumn: {
width: 160, width: 200,
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
slots: { customRender: 'action' }, slots: { customRender: 'action' },
},
rowSelection: {
type: 'checkbox',
onChange: onSelectChange
}, },
tableSetting: { tableSetting: {
size: false, size: false,
@ -127,41 +193,20 @@
}, },
}); });
function onSelectChange(rowKeys: string[]) {
selectedKeys.value = rowKeys;
}
function dbClickRow(record) { function dbClickRow(record) {
if (!actionButtonConfig?.value.some(element => element.code == 'view')) { router.push({
return; path: '/ship/ShipSchedule/createForm',
} query: {
const { processId, taskIds, schemaId } = record.workflowData || {};
if (taskIds && taskIds.length) {
router.push({
path: '/flow/' + schemaId + '/' + (processId || '') + '/approveFlow',
query: {
taskId: taskIds[0],
formName: formName,
formId:currentRoute.value.meta.formId
}
});
} else if (schemaId && !taskIds && processId) {
router.push({
path: '/flow/' + schemaId + '/' + processId + '/approveFlow',
query: {
readonly: 1,
taskId: '',
formName: formName,
formId:currentRoute.value.meta.formId
}
});
} else {
router.push({
path: '/form/ShipSchedule/' + record.id + '/viewForm',
query: {
formPath: 'ship/ShipSchedule', formPath: 'ship/ShipSchedule',
formName: formName, formName: '查看'+ formName,
formId:currentRoute.value.meta.formId formId:currentRoute.value.meta.formId,
} id: record.id,
}); type: 'view'
} }
});
} }
function buttonClick(code) { function buttonClick(code) {
@ -180,10 +225,10 @@
}); });
} else { } else {
router.push({ router.push({
path: '/form/ShipSchedule/0/createForm', path: '/ship/ShipSchedule/createForm',
query: { query: {
formPath: 'ship/ShipSchedule', formPath: 'ship/ShipSchedule',
formName: formName, formName: '新建'+formName,
formId:currentRoute.value.meta.formId formId:currentRoute.value.meta.formId
} }
}); });
@ -193,14 +238,31 @@
function handleEdit(record: Recordable) { function handleEdit(record: Recordable) {
router.push({ router.push({
path: '/form/ShipSchedule/' + record.id + '/updateForm', path: '/ship/ShipSchedule/createForm',
query: { query: {
formPath: 'ship/ShipSchedule', formPath: 'ship/ShipSchedule',
formName: formName, formName: '编辑'+ formName,
formId:currentRoute.value.meta.formId formId:currentRoute.value.meta.formId,
id: record.id,
type: 'edit'
} }
}); });
} }
function handleOpspur () {
}
function handleOpssales () {
}
function handleSend () {
// if (!selectedKeys.value.length) {
// notification.warning({
// message: '提示',
// description: t('请选择需要发送的数据'),
// });
// return;
// }
}
function handleDelete(record: Recordable) { function handleDelete(record: Recordable) {
deleteList([record.id]); deleteList([record.id]);
} }
@ -215,7 +277,7 @@
deleteLngShipSchedule(ids).then((_) => { deleteLngShipSchedule(ids).then((_) => {
handleSuccess(); handleSuccess();
notification.success({ notification.success({
message: 'Tip', message: '提示',
description: t('删除成功!'), description: t('删除成功!'),
}); });
}); });
@ -236,8 +298,15 @@
dbClickRow(record); dbClickRow(record);
} }
onMounted(() => { onMounted(async() => {
reload({ searchInfo: { startDate: defaultDate.value[0], endDate: defaultDate.value[1] }});
let res = await getAllCom() || []
comIdList.value = res.map(v=> {
return {
label: v.shortName,
value: v.id
}
})
if (schemaIdComputedRef.value) { if (schemaIdComputedRef.value) {
bus.on(FLOW_PROCESSED, handleRefresh); bus.on(FLOW_PROCESSED, handleRefresh);
bus.on(CREATE_FLOW, handleRefresh); bus.on(CREATE_FLOW, handleRefresh);
@ -295,6 +364,11 @@
} }
}; };
</script> </script>
<style lang="less">
.ShipSchedule .cusSearchForm .advanceRow> div:nth-of-type(3){
display: none;
}
</style>
<style lang="less" scoped> <style lang="less" scoped>
:deep(.ant-table-selection-col) { :deep(.ant-table-selection-col) {
width: 50px; width: 50px;
@ -305,4 +379,18 @@
.hide{ .hide{
display: none !important; display: none !important;
} }
:deep( .ant-col-8:nth-child(1)) {
width: 320px !important;
max-width: 320px !important;;
}
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
width: 80px !important;
}
:deep( .ant-col-8:nth-child(4)) {
width: 320px !important;
max-width: 320px !important;;
}
:deep(.ant-col-8:nth-child(4) .ant-form-item-label) {
width: 80px !important;
}
</style> </style>