采运销接口

This commit is contained in:
‘huanghaiixia’
2026-04-03 17:38:03 +08:00
parent 7fc6678499
commit aa421c34b7
7 changed files with 313 additions and 61 deletions

View File

@ -10,6 +10,7 @@ enum Api {
LngContractSalesPngPoint = '/contract/contractSalesPngPur',
selectPcPageList = '/magic-api/contract/contractSalesPngPoint/selectPcPageList',
selectScPageList = '/magic-api/contract/contractSalesPngPoint/selectScPageList',
selectTcPageList = '/magic-api/contract/contractSalesPngPoint/selectTcPageList',
DataLog = '/contract/contractSalesPngPur/datalog',
@ -26,6 +27,19 @@ export async function getContractScPageList(ksppId: String, mode: ErrorMessageMo
},
);
}
// 管输合同
export async function getContractSalesPngPointTc(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractSalesPngPointPageResult>(
{
url: Api.selectTcPageList,
params,
},
{
errorMessageMode: mode,
},
);
}
// 采购合同
export async function getContractSalesPngPoint(params: LngContractSalesPngPointPageParams, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractSalesPngPointPageResult>(
{
@ -55,11 +69,11 @@ export async function getLngContractSalesPngPointPage(params: LngContractSalesPn
/**
* @description: 获取LngContractSalesPngPoint信息
*/
export async function getLngContractSalesPngPoint(ksppId: String, mode: ErrorMessageMode = 'modal') {
export async function getLngContractSalesPngPoint(id: String, mode: ErrorMessageMode = 'modal') {
return defHttp.get<LngContractSalesPngPointPageModel>(
{
url: Api.Info,
params: { ksppId },
params: { id },
},
{
errorMessageMode: mode,

View File

@ -2,7 +2,7 @@
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="ContractPurIntListModal" v-if="showTable"></BasicTable>
<BasicTable @register="registerTable" class="contractSalesPngPurPointModal" v-if="showTable"></BasicTable>
</BasicModal>
</div>
</template>
@ -14,19 +14,12 @@
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import { getContractSalesPngPoint } from '/@/api/contract/contractSalesPngPur';
import { getContractSalesPngPointTc } from '/@/api/contract/contractSalesPngPur';
const { t } = useI18n();
const comId = ref('')
const dateArr = ref([])
const codeFormSchema: FormSchema[] = [
{
field: 'dateFrom',
label: '有效期',
component: 'RangePicker',
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
},
];
@ -41,9 +34,10 @@
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
pageType: String
pageType: String,
defaultDate: { type: Array, default: [] },
});
dateArr.value = props.defaultDate || []
let columns: BasicColumn[] = [
{ title: t('合同号'), dataIndex: 'kpNo', },
{ title: t('合同名称'), dataIndex: 'kpName', },
@ -55,7 +49,7 @@
];
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
dateArr.value = props.defaultDate || []
showTable.value = true
comId.value = data.comId
setModalProps({ confirmLoading: false });
@ -72,8 +66,20 @@
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9, offSet:10},
schemas: codeFormSchema,
labelCol:{span: 9},
schemas: [
{
field: 'dateFrom',
label: '有效期',
component: 'RangePicker',
defaultValue: props.defaultDate || [],
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
}
],
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
showResetButton: true,
},
@ -94,7 +100,7 @@
await nextTick();
nextTick(() => {
reload({searchInfo:{'limit':1,'size':10,'page':1}});
reload({searchInfo:{'limit':1,'size':10,'page':1, startDate: props.defaultDate[0], endDate: props.defaultDate[1] }});
});
}
};
@ -124,7 +130,7 @@
</script>
<style >
.ContractPurIntListModal .basicCol{
.contractSalesPngPurPointModal .basicCol{
position: inherit !important;
top: 0;
}

View File

@ -0,0 +1,147 @@
<template>
<div>
<BasicModal v-bind="$attrs" @register="registerModal" width="60%" :title="getTitle" @ok="handleSubmit"
@visible-change="handleVisibleChange" >
<BasicTable @register="registerTable" class="contractSalesPngPurPointModal" v-if="showTable"></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 { getContractSalesPngPoint } from '/@/api/contract/contractSalesPngPur';
import { getContractSalesPngPointTc } from '/@/api/contract/contractSalesPngPur';
const { t } = useI18n();
const comId = ref('')
const dateArr = ref([])
const codeFormSchema: FormSchema[] = [
];
const emit = defineEmits(['success', 'register']);
const { notification } = useMessage();
const isUpdate = ref(true);
const rowId = ref('');
const showTable = ref(false)
const selectedKeys = ref<string[]>([]);
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
pageType: String,
defaultDate: { type: Array, default: [] },
});
dateArr.value = props.defaultDate || []
let columns: BasicColumn[] = [
{ title: t('合同号'), dataIndex: 'kpNo', },
{ title: t('合同名称'), dataIndex: 'kpName', },
{ title: '供应商', dataIndex: 'suName',},
{ title: '有效期开始',dataIndex: 'dateFrom', width: 120,},
{ title: '有效期结束',dataIndex: 'dateTo', width: 120},
{ title: t('合同主体'), dataIndex: 'comName', },
{ title: t('上载点'), dataIndex: 'pointUpName'},
{ title: t('下载点'), dataIndex: 'pointDelyName'},
];
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
dateArr.value = props.defaultDate || []
showTable.value = true
comId.value = data.comId
setModalProps({ confirmLoading: false });
setPagination({'limit': 1,'size': 10,'page': 1});
isUpdate.value = !!data?.isUpdate;
});
const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload,setPagination }] = useTable({
title: t('管道气管输合同列表'),
api: getContractSalesPngPointTc,
columns,
bordered: true,
pagination: true,
canResize: false,
formConfig: {
labelCol:{span: 9},
schemas: [
{
field: 'dateFrom',
label: '有效期',
component: 'RangePicker',
defaultValue: props.defaultDate,
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
getPopupContainer: () => document.body,
},
}
],
fieldMapToTime: [['dateFrom', ['startDate', 'endDate'], 'YYYY-MM-DD']],
showResetButton: true,
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params,page:params.limit, comId: comId.value};
},
rowSelection: {
type: props.selectType,
onChange: onSelectChange
},
});
const handleVisibleChange = async (visible: boolean) => {
if (visible) {
showTable.value = false
await nextTick();
await nextTick();
await nextTick();
nextTick(() => {
reload({searchInfo:{'limit':1,'size':10,'page':1, startDate: props.defaultDate[0], endDate: props.defaultDate[1] }});
});
}
};
function onSelectChange(rowKeys: string[], e) {
selectedKeys.value = rowKeys;
selectedValues.value = e
}
const getTitle = computed(() => (t('管道气管输合同列表')));
async function handleSubmit() {
if (!selectedValues.value.length) {
notification.warning({
message: t('提示'),
description: t('请选择合同')
});
return
}
closeModal();
emit('success', selectedValues.value);
}
</script>
<style >
.contractSalesPngPurPointModal .basicCol{
position: inherit !important;
top: 0;
}
</style>
<style lang="less" scoped>
:deep( .ant-col-8:nth-child(1)) {
width: 360px !important;
max-width: 360px !important;;
}
:deep(.ant-col-8:nth-child(1) .ant-form-item-label) {
width: 80px !important;
}
</style>

View File

@ -37,7 +37,7 @@
const selectedValues = ref([]);
const props = defineProps({
selectType: { type: String, default: 'checkbox' },
paramsObj: { type: Object, default: {} },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
@ -61,7 +61,7 @@
},
immediate: false, // 设置为不立即调用
beforeFetch: (params) => {
return { ...params, valid: 'Y',approCode: 'YSP',page:params.limit};
return { ...params, valid: 'Y',approCode: 'YSP',page:params.limit, ...props.paramsObj};
},
rowSelection: {
type: props.selectType,

View File

@ -17,7 +17,7 @@ export const searchFormSchema: FormSchema[] = [
},
},
{
field: 'ksName',
field: 'kpName',
label: '销售合同号/名称',
component: 'Input',
},
@ -119,7 +119,7 @@ export const columns: BasicColumn[] = [
sorter: true,
},
{
dataIndex: 'ktpName',
dataIndex: 'ktName',
title: '运输合同',
componentType: 'input',
align: 'left',
@ -131,7 +131,7 @@ export const columns: BasicColumn[] = [
title: '合同主体',
componentType: 'input',
align: 'left',
width: 120,
sorter: true,
},

View File

@ -60,7 +60,7 @@
<a-row>
<a-col :span="8">
<a-form-item label="采购合同" name="kpName">
<a-input-search v-model:value="item.kpName" :disabled="isDisable" placeholder="请选择合同" readonly @search="onContract(idx)"/>
<a-input-search v-model:value="item.kpName" :disabled="isDisable||item.id" placeholder="请选择合同" readonly @search="onContract(idx)"/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -68,7 +68,7 @@
<template #label>
<span><span style="color:red">*</span>供应商</span>
</template>
<a-input-search v-model:value="item.suName" :disabled="isDisable" placeholder="请选择供应商" readonly @search="onSearchSupplier(idx)"/>
<a-input-search v-model:value="item.suName" :disabled="isDisable||item.kpId" placeholder="请选择供应商" readonly @search="onSearchSupplier(idx)"/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -76,7 +76,7 @@
<template #label>
<span><span style="color:red">*</span>上载点</span>
</template>
<a-input-search v-model:value="item.pointUpName" :disabled="isDisable" placeholder="请选择上载点" readonly @search="onSearchDownLoad(idx)"/>
<a-input-search v-model:value="item.pointUpName" :disabled="isDisable||item.kpId" placeholder="请选择上载点" readonly @search="onSearchDownLoad(idx)"/>
</a-form-item>
</a-col>
<a-col :span="8">
@ -112,7 +112,8 @@
<template #label>
<span><span style="color:red">*</span>顺序</span>
</template>
<input-number v-model:value="item.sort" :disabled="isDisable" :digits="0" :min="1" style="width: 100%" />
<a-input-number v-model:value="item.sort" :disabled="isDisable" :precision="0" :min="1" style="width: 100%" />
</a-form-item>
</a-col>
@ -128,19 +129,19 @@
<template v-if="column.dataIndex == 'dateTo'">
<span><span style="color: red">*</span>结束日期</span>
</template>
<template v-if="column.dataIndex == 'ktpName'">
<template v-if="column.dataIndex == 'ktName'">
<span><span style="color: red">*</span>管输合同</span>
</template>
</template>
<template #bodyCell="{ column, record, index }">
<template v-if="column.dataIndex === 'dateFrom'">
<a-date-picker :inputReadOnly="true" v-model:value="record.dateFrom" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" @focus="dateFocusTb(idx, index)" :disabled-date="disabledDateStartTb" :disabled="disabled" style="width: 100%" />
<a-date-picker :inputReadOnly="true" :disabled="isDisable" v-model:value="record.dateFrom" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" @focus="dateFocusTb(idx, index)" :disabled-date="disabledDateStartTb" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'dateTo'">
<a-date-picker :inputReadOnly="true" v-model:value="record.dateTo" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" @focus="dateFocusTb(idx, index)" :disabled-date="disabledDateEndTb" :disabled="disabled" style="width: 100%" />
<a-date-picker :inputReadOnly="true" :disabled="isDisable" v-model:value="record.dateTo" format="YYYY-MM-DD" :value-format="'YYYY-MM-DD'" @focus="dateFocusTb(idx, index)" :disabled-date="disabledDateEndTb" style="width: 100%" />
</template>
<template v-if="column.dataIndex === 'ktpName'">
<template v-if="column.dataIndex === 'ktName'">
<a-input-search v-model:value="record.ktName" :disabled="isDisable || record.id" placeholder="请选择管输合同" readonly @search="onContractTc(idx, index)"/>
</template>
<template v-if="column.dataIndex === 'operation'">
<a v-if="!isDisable" @click="deleteRow(idx,index)">删除</a>
@ -152,9 +153,10 @@
</Card>
</a-form>
</div>
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" />
<supplierListModal @register="registerSupplier" @success="handleSuccessSupplier" selectType="radio" :paramsObj="{suCode: formState.suCode}" />
<downloadPointModal @register="registerDownLoad" @success="handleSuccessDownLoad"/>
<contractSalesPngPurPointModal @register="registerPur" @success="handleSuccessPur" selectType="radio" />
<contractSalesPngPurPointModal @register="registerPur" @success="handleSuccessPur" selectType="radio" :defaultDate="[formState.dateFrom, formState.dateTo]"/>
<contractSalesPngPurPointTcModal @register="registerTc" @success="handleSuccessTc" selectType="radio" :defaultDate="[formState.dateFrom, formState.dateTo]"/>
</a-spin>
</template>
@ -178,8 +180,9 @@
import supplierListModal from '/@/components/common/supplierListModal.vue';
import downloadPointModal from '/@/components/common/downloadPointModal.vue';
import contractSalesPngPurPointModal from '/@/components/common/contractSalesPngPurPointModal.vue';
import contractSalesPngPurPointTcModal from '/@/components/common/contractSalesPngPurPointTcModal.vue';
import { useUserStore } from '/@/store/modules/user';
import { getLngOpsPurInt} from '/@/api/ship/OpsPurInt';
import { cloneDeep } from 'lodash-es';
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
@ -206,35 +209,34 @@
const dataList = ref([])
const curIdx = ref(null)
const curIndex = ref(null)
const spinning = ref(false);
const { notification } = useMessage();
const { t } = useI18n()
const formState = reactive({
approCode: 'WTJ'
});
const formStateContract = reactive({})
const [registerSupplier, { openModal:openModalSupplier}] = useModal();
const [registerDownLoad, { openModal:openModalDownLoad}] = useModal();
const [registerPur, { openModal:openModalPur}] = useModal();
const [registerTc, { openModal:openModalTc}] = useModal();
const rules= reactive({
});
const columns= ref([
{ title: t('序号'), dataIndex: 'index', key: 'index', customRender: (column) => `${column.index + 1}` ,width: 50},
{ title: t('托运商'), dataIndex: 'suName', width: 150},
{ title: t('管输上载点'), dataIndex: 'pointUpTransName', width: 150},
{ title: t('管输下载点'), dataIndex: 'pointDelyTransName', width: 150},
{ title: t('开始日期'), dataIndex: 'dateFrom', width: 150},
{ title: t('结束日期'), dataIndex: 'dateTo', width: 150},
{ title: t('管输合同'), dataIndex: 'ktpName', width: 150},
{ title: t('操作'), dataIndex: 'operation', width: 80, fixed: 'right',align: 'center'},
{ title: t('托运商'), dataIndex: 'suYsName', width: 130},
{ title: t('管输上载点'), dataIndex: 'pointUpTransName', width: 130},
{ title: t('管输下载点'), dataIndex: 'pointDelyTransName', width: 130},
{ title: t('开始日期'), dataIndex: 'dateFrom', width: 140},
{ title: t('结束日期'), dataIndex: 'dateTo', width: 140},
{ title: t('管输合同'), dataIndex: 'ktName'},
{ title: t('操作'), dataIndex: 'operation', width: 60, fixed: 'right',align: 'center'},
]);
const layout = {
labelCol: { span: 8 },
wrapperCol: { span: 16 },
}
const dataFile = ref([]);
let optionSelect= reactive({
transSignList: [],
});
@ -253,6 +255,10 @@
() => props.disabled,
(val) => {
isDisable.value = val
if ( isDisable.value ) {
let idx = columns.value.findIndex(v=>v.dataIndex=='operation')
idx>-1&&columns.value.splice(idx, 1)
}
},
{
immediate: true
@ -269,9 +275,21 @@
spinning.value = true
try {
let data = await getContractScPageList(id)
Object.assign(formState, {...data?.list[0]})
let res = await getLngContractSalesPngPoint(id)
spinning.value = false
// Object.assign(formState, {...data?.list[0]})
dataList.value = res?.lngContractSalesPngPointPurList || []
dataList.value.forEach(v=> {
v.dateFrom = v.dateFrom ? dayjs(v.dateFrom) : null
v.dateTo = v.dateTo ? dayjs(v.dateTo) : null
(v.lngContractSalesPngPointTransList||[]).forEach(i=> {
i.dateFrom = i.dateFrom ? dayjs(i.dateFrom) : null
i.dateTo = i.dateTo ? dayjs(i.dateTo) : null
})
})
Object.assign(formStateContract, {...res})
} catch (error) {
spinning.value = false
}
@ -316,8 +334,12 @@
lngContractSalesPngPointTransList: []
})
}
const handleDelete= (index) => {
dataList.value.splice(index, 1)
const handleDelete= (idx) => {
if ((dataList.value[idx].lngContractSalesPngPointTransList || []).length) {
message.warn('请先删除运输合同')
return
}
dataList.value.splice(idx, 1)
}
const addRow = (idx) => {
dataList.value[idx].lngContractSalesPngPointTransList.push({dateFrom: null, dateTo: null})
@ -329,9 +351,14 @@
optionSelect.transSignList = await getDictionary('LNG_YN')
}
const onContractTc = (idx, index) => {
curIdx.value = idx
curIndex.value = index
openModalTc(true,{isUpdate: false, comId: formState.comId})
}
const onContract = (idx) => {
curIdx.value = idx
openModalPur(true,{isUpdate: false})
openModalPur(true,{isUpdate: false, comId: formState.comId})
}
const onSearchDownLoad = (idx)=> {
curIdx.value = idx
@ -342,8 +369,8 @@
openModalSupplier(true,{isUpdate: false})
}
const handleSuccessDownLoad = (val) => {
dataList.value[curIdx.value].pointUpCode = val[0].code
dataList.value[curIdx.value].pointUpName = val[0].fullName
dataList.value[curIdx.value].pointUpCode = val[0].code
dataList.value[curIdx.value].pointUpName = val[0].fullName
}
const handleSuccessSupplier = (val) => {
@ -362,6 +389,20 @@
dataList.value[curIdx.value].transSign = val[0].transSign
}
const handleSuccessTc = (val) => {
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].ktId = val[0].ktId
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].ktpId = val[0].ktpId
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].ktName = val[0].kpName
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].suYsCode = val[0].suCode
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].suCode = val[0].suCode
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].suYsName = val[0].suName
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].pointUpTransCode = val[0].pointUpCode
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].pointUpTransName = val[0].pointUpName
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].pointDelyTransCode = val[0].pointDelyCode
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].pointDelyTransName = val[0].pointDelyName
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].dateFrom = val[0].dateFrom ? dayjs(val[0].dateFrom) : null
dataList.value[curIdx.value].lngContractSalesPngPointTransList[curIndex.value].dateTo = val[0].dateTo ? dayjs(val[0].dateTo) : null
}
function close() {
tabStore.closeTab(currentRoute.value, router);
}
@ -371,17 +412,61 @@
async function handleSubmit(type) {
try {
await formRef.value.validateFields();
let tipNum = 0
let list = cloneDeep(dataList.value)
for(let i=0;i<list.length;i++) {
list[i].lngContractSalesPngPointTransList = list[i].lngContractSalesPngPointTransList || []
list[i].dateFrom = list[i].dateFrom ? dayjs(list[i].dateFrom).format('YYYY-MM-DD HH:mm:ss') : null
list[i].dateTo = list[i].dateTo ? dayjs(list[i].dateTo).format('YYYY-MM-DD HH:mm:ss') : null
let isFalg = (!list[i].kpId) && (!list[i].suCode || !list[i].pointUpCode)
if (isFalg || !list[i].transSign || !list[i].dateFrom || !list[i].dateTo || !list[i].sort) {
message.warn('请完善关联采购信息必选项')
return
}
// 激发提示条件采购合同非空自主托运为否提示请确认是否需要关联运输合同
// 采购合同为空自主托运为是管输合同若未填写则提示请确认是否需要关联运输合同
let isTip = list[i].kpId && list[i].transSign=='N' && list[i].lngContractSalesPngPointTransList.length
let isTipNew = !list[i].kpId && list[i].transSign=='Y' && !list[i].lngContractSalesPngPointTransList.length
if (isTip || isTipNew) {
tipNum++
}
if (!list[i].id) {
list[i].ksppId = formState.ksppId
list[i].pointDelyCode = formState.pointDelyCode
list[i].ksId = formStateContract.kId
}
for(let j = 0; j<list[i].lngContractSalesPngPointTransList.length;j++) {
list[i].lngContractSalesPngPointTransList[j].dateFrom = list[i].lngContractSalesPngPointTransList[j].dateFrom ? dayjs(list[i].lngContractSalesPngPointTransList[j].dateFrom).format('YYYY-MM-DD HH:mm:ss') : null
list[i].lngContractSalesPngPointTransList[j].dateTo = list[i].lngContractSalesPngPointTransList[j].dateTo ? dayjs(list[i].lngContractSalesPngPointTransList[j].dateTo).format('YYYY-MM-DD HH:mm:ss') : null
if (!list[i].lngContractSalesPngPointTransList[j].ktId || !list[i].lngContractSalesPngPointTransList[j].dateFrom || !list[i].lngContractSalesPngPointTransList[j].dateTo) {
message.warn('请完善运输合同表格必选项')
return
}
if (!list[i].lngContractSalesPngPointTransList[j].id) {
list[i].lngContractSalesPngPointTransList[j].kspppId = list[i].id
list[i].lngContractSalesPngPointTransList[j].ksId = list[i].ksId
list[i].lngContractSalesPngPointTransList[j].ksppId = list[i].ksppId
list[i].lngContractSalesPngPointTransList[j].pointDelyCode = list[i].pointDelyCode
list[i].lngContractSalesPngPointTransList[j].pointUpCode = list[i].pointUpCode
list[i].lngContractSalesPngPointTransList[j].transSign = list[i].transSign
}
}
}
let obj = {
...formState,
...formStateContract,
lngContractSalesPngPointPurList: list
}
if (tipNum) {
message.warn('请确认是否需要关联运输合同')
}
spinning.value = true;
let request = !formState.id ? addLngContractSalesPngPoint :updateLngContractSalesPngPoint
try {
const data = await request(obj);
const data = await updateLngContractSalesPngPoint(obj);
notification.success({
message: '提示',
description: data?.id ? t('新增成功!') : t('修改成功!')
description: t('修改成功')
}); //提示消息
setTimeout(() => {

View File

@ -105,7 +105,7 @@
field: 'dateFrom',
label: '销售合同有效期',
component: 'RangePicker',
// defaultValue: defaultDate.value,
defaultValue: defaultDate.value,
componentProps: {
format: 'YYYY-MM-DD',
style: { width: '100%' },
@ -113,7 +113,7 @@
},
},
{
field: 'ksName',
field: 'kpName',
label: '销售合同号/名称',
component: 'Input',
},
@ -139,7 +139,7 @@
striped: false,
actionColumn: {
width: 160,
width: 100,
title: '操作',
dataIndex: 'action',
slots: { customRender: 'action' },