船期 采购销售执行优化

This commit is contained in:
‘huanghaiixia’
2026-03-13 16:08:53 +08:00
parent e297572d7d
commit 5b91afa56a
5 changed files with 27 additions and 13 deletions

View File

@ -9,11 +9,23 @@ enum Api {
Info = '/ship/shipSchedule/info',
LngShipSchedule = '/ship/shipSchedule',
ContractPageList = '/magic-api/ship/selectSalesContractPageList',
ContractPageListSales = '/magic-api/ship/selectSalesIntContractPageList',
DataLog = '/ship/shipSchedule/datalog',
}
export async function getContractPageListSales(params: LngShipSchedulePageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngShipSchedulePageResult>(
{
url: Api.ContractPageListSales,
params,
},
{
errorMessageMode: mode,
},
);
}
export async function getContractPageList(params: LngShipSchedulePageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngShipSchedulePageResult>(
{

View File

@ -13,7 +13,7 @@
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';
import { getContractPageList,getContractPageListSales} from '/@/api/ship/ShipSchedule';
const { t } = useI18n();
const codeFormSchema: FormSchema[] = [
@ -34,12 +34,13 @@
{ 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: 'suSname' ,},
{ title: '有效期开始',dataIndex: 'dateFrom', width: 100,},
{ title: '有效期结束',dataIndex: 'dateTo', width: 100},
{ title: t('合同主体'), dataIndex: 'comName', width: 100},
{ title: t('长协/现货'), dataIndex: 'longSpotName', width: 100},
{ title: t('气源地'), dataIndex: 'sourceName'},
{ title: t('价格条款'), dataIndex: 'prcTermName'},
{ title: t('价格条款'), dataIndex: 'prcTermName', width: 100},
];
@ -52,6 +53,7 @@
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
pageType: { type: String, default: 'pur' },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
@ -63,7 +65,7 @@
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload }] = useTable({
title: t('国际采购合同列表'),
api: getContractPageList,
api: props.pageType=='pur'? getContractPageList : getContractPageListSales,
columns,
bordered: true,
@ -95,7 +97,7 @@
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (!unref(isUpdate) ? t('国际采购合同列表') : t('')));
const getTitle = computed(() => (!unref(isUpdate) ? (props.pageType=='pur'?t('国际采购合同列表'):'国际销售合同列表') : t('')));
async function handleSubmit() {
if (!selectedValues.value.length) {

View File

@ -357,7 +357,7 @@
</a-form>
</div>
<deptUserModal @register="register" @success="handleSuccess"/>
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" />
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" pageType="pur"/>
<lngStationModal @register="registerStation" @success="handleSuccessStation"/>
<portListModal @register="registerPort" @success="handleSuccessPort"/>
<shipScheduleListModal @register="registerShip" @success="handleSuccessShip" />
@ -709,7 +709,7 @@
formState.kName = val[0].kName
formState.comId = val[0].comId
formState.suCode = val[0].suCode
formState.suName = val[0].suName
formState.suName = val[0].suSname
formState.longSpotCode = val[0].longSpotCode
formState.prcTermCode = val[0].prcTermCode
formState.sourceName = val[0].sourceName

View File

@ -326,7 +326,7 @@
</a-form>
</div>
<deptUserModal @register="register" @success="handleSuccess"/>
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" />
<contractPurIntListModal @register="registerContractPurInt" @success="handleSuccessContractPurInt" selectType="radio" pageType="sales"/>
<lngStationModal @register="registerStation" @success="handleSuccessStation"/>
<portListModal @register="registerPort" @success="handleSuccessPort"/>
<shipScheduleListModal @register="registerShip" @success="handleSuccessShip" />

View File

@ -424,14 +424,14 @@
}
const handleSuccessSupplier = (val) => {
formState.suCode = val[0].suCode
formState.suName = val[0].suName
formState.suName = val[0].suSname
}
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.suName = val[0].suSname
formState.longSpotCode = val[0].longSpotCode
formState.prcTermCode = val[0].prcTermCode
formState.sourceName = val[0].sourceName