From b576044b95ffb06de503bbd649f7f3e075a2203a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Tue, 10 Mar 2026 11:21:08 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E9=87=87=E8=B4=AD=E8=AE=A1=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ship/MeaPurInt/index.ts | 3 +- src/components/common/OpsPurIntListModal.vue | 136 +++++++ .../common/shipScheduleListModal.vue | 4 +- src/router/routes/basic.ts | 8 + src/views/ship/MeaPurInt/components/config.ts | 181 +++------ .../ship/MeaPurInt/components/createForm.vue | 353 ++++++++++++++++++ src/views/ship/MeaPurInt/index.vue | 95 ++--- .../ship/OpsPurInt/components/createForm.vue | 2 +- .../OpsSalesInt/components/createForm.vue | 2 +- 9 files changed, 594 insertions(+), 190 deletions(-) create mode 100644 src/components/common/OpsPurIntListModal.vue create mode 100644 src/views/ship/MeaPurInt/components/createForm.vue diff --git a/src/api/ship/MeaPurInt/index.ts b/src/api/ship/MeaPurInt/index.ts index 60295b8..279fdb2 100644 --- a/src/api/ship/MeaPurInt/index.ts +++ b/src/api/ship/MeaPurInt/index.ts @@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/ship/meaPurInt/page', + // Page = '/ship/meaPurInt/page', + Page = '/magic-api/ship/meaPurIntPageList', List = '/ship/meaPurInt/list', Info = '/ship/meaPurInt/info', LngMeaPurInt = '/ship/meaPurInt', diff --git a/src/components/common/OpsPurIntListModal.vue b/src/components/common/OpsPurIntListModal.vue new file mode 100644 index 0000000..f3db0e6 --- /dev/null +++ b/src/components/common/OpsPurIntListModal.vue @@ -0,0 +1,136 @@ + + + + diff --git a/src/components/common/shipScheduleListModal.vue b/src/components/common/shipScheduleListModal.vue index 86f50ae..2b6f106 100644 --- a/src/components/common/shipScheduleListModal.vue +++ b/src/components/common/shipScheduleListModal.vue @@ -49,7 +49,7 @@ const selectedKeys = ref([]); const selectedValues = ref([]); const props = defineProps({ - selectType: { type: String, default: 'checkbox' }, + selectType: { type: String, default: 'radio' }, }); const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { @@ -93,7 +93,7 @@ selectedKeys.value = rowKeys; selectedValues.value = e } - const getTitle = computed(() => (!unref(isUpdate) ? t('船期计划列表列表') : t(''))); + const getTitle = computed(() => (!unref(isUpdate) ? t('船期计划列表') : t(''))); async function handleSubmit() { if (!selectedValues.value.length) { diff --git a/src/router/routes/basic.ts b/src/router/routes/basic.ts index e32005e..a248ab2 100644 --- a/src/router/routes/basic.ts +++ b/src/router/routes/basic.ts @@ -334,6 +334,14 @@ export const PAGE_CUSTOM_ROUTE: AppRouteRecordRaw[] = [{ title: (route) => route.query.formName } }, + { + path: '/ship/MeaPurInt/createForm', + name: 'MeaPurInt', + component: () => import('/@/views/ship/MeaPurInt/components/createForm.vue'), + meta: { + title: (route) => route.query.formName + } + }, ] diff --git a/src/views/ship/MeaPurInt/components/config.ts b/src/views/ship/MeaPurInt/components/config.ts index 52a151b..26cda34 100644 --- a/src/views/ship/MeaPurInt/components/config.ts +++ b/src/views/ship/MeaPurInt/components/config.ts @@ -10,108 +10,65 @@ export const searchFormSchema: FormSchema[] = [ field: 'dateMea', label: '计量时间', component: 'Input', - }, - { - field: 'typeCode', - label: '计量类型', - component: 'Input', - }, - { - field: 'inspName', - label: '商检公司', - component: 'Input', - }, - { - field: 'id', - label: 'id', - component: 'Input', - }, - { - field: 'qtyMmbtu', - label: '热值(MMBtu)', - component: 'Input', - }, - { - field: 'qtyGj', - label: '热值(GJ)', - component: 'Input', - }, - { - field: 'qtyTon', - label: '重量(吨)', - component: 'Input', - }, - { - field: 'qtyM3L', - label: '液态体积(方)', - component: 'Input', - }, - { - field: 'qtyM3', - label: '气态体积(方)', - component: 'Input', - }, - { - field: 'rateTonM3L', - label: '密度(吨/液态方)', - component: 'Input', - }, - { - field: 'rateTonGj', - label: '热值比(吨/GJ)', - component: 'Input', - }, - { - field: 'rateM3Gj', - label: '热值比(气态方/GJ)', - component: 'Input', - }, - { - field: 'rateTonM3', - label: '气化率(吨/气态方)', - component: 'Input', - }, - { - field: 'note', - label: '备注', - component: 'Input', - }, + } ]; export const columns: BasicColumn[] = [ { - dataIndex: 'id', - title: 'id', + dataIndex: 'ssNo', + title: '船期计划编号', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, + { + dataIndex: 'kName', + title: '合同', + componentType: 'input', + align: 'left', + width: 150, + sorter: true, + }, + { + dataIndex: 'suName', + title: '供应商', + componentType: 'input', + align: 'left', + width: 150, + sorter: true, + }, + { + dataIndex: 'staName', + title: '接收站', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + { + dataIndex: 'typeName', + title: '计量类型', + componentType: 'input', + align: 'left', + width: 100, + sorter: true, + }, { dataIndex: 'dateMea', title: '计量时间', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, - - { - dataIndex: 'typeCode', - title: '计量类型', - componentType: 'input', - align: 'left', - - sorter: true, - }, - { dataIndex: 'qtyMmbtu', title: '热值(MMBtu)', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, @@ -120,7 +77,7 @@ export const columns: BasicColumn[] = [ title: '热值(GJ)', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, @@ -129,34 +86,7 @@ export const columns: BasicColumn[] = [ title: '重量(吨)', componentType: 'input', align: 'left', - - sorter: true, - }, - - { - dataIndex: 'qtyM3L', - title: '液态体积(方)', - componentType: 'input', - align: 'left', - - sorter: true, - }, - - { - dataIndex: 'qtyM3', - title: '气态体积(方)', - componentType: 'input', - align: 'left', - - sorter: true, - }, - - { - dataIndex: 'rateTonM3L', - title: '密度(吨/液态方)', - componentType: 'input', - align: 'left', - + width: 120, sorter: true, }, @@ -165,45 +95,20 @@ export const columns: BasicColumn[] = [ title: '热值比(吨/GJ)', componentType: 'input', align: 'left', - + width: 120, sorter: true, }, { dataIndex: 'rateM3Gj', - title: '热值比(气态方/GJ)', + title: '热值比(方/GJ)', componentType: 'input', align: 'left', - sorter: true, + width: 120, }, - { - dataIndex: 'rateTonM3', - title: '气化率(吨/气态方)', - componentType: 'input', - align: 'left', - sorter: true, - }, - - { - dataIndex: 'inspName', - title: '商检公司', - componentType: 'input', - align: 'left', - - sorter: true, - }, - - { - dataIndex: 'note', - title: '备注', - componentType: 'input', - align: 'left', - - sorter: true, - }, ]; //表单事件 export const formEventConfigs = { diff --git a/src/views/ship/MeaPurInt/components/createForm.vue b/src/views/ship/MeaPurInt/components/createForm.vue new file mode 100644 index 0000000..cb0d791 --- /dev/null +++ b/src/views/ship/MeaPurInt/components/createForm.vue @@ -0,0 +1,353 @@ + + + + + diff --git a/src/views/ship/MeaPurInt/index.vue b/src/views/ship/MeaPurInt/index.vue index 74d250e..6c245d9 100644 --- a/src/views/ship/MeaPurInt/index.vue +++ b/src/views/ship/MeaPurInt/index.vue @@ -29,7 +29,7 @@ const logId = ref('') const logPath = ref('/ship/meaPurInt/datalog'); import { DataLog } from '/@/components/pcitc'; - import { ref, computed, onMounted, onUnmounted, createVNode, } from 'vue'; + import { ref, computed, onMounted, onUnmounted, createVNode, watch} from 'vue'; import { Modal } from 'ant-design-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; @@ -50,7 +50,7 @@ import useEventBus from '/@/hooks/event/useEventBus'; import { cloneDeep } from 'lodash-es'; import dayjs from 'dayjs'; - + import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat'; const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus(); const { notification } = useMessage(); @@ -65,7 +65,7 @@ const tableRef = ref(); //所有按钮 - const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true}]); + const buttons = ref([{"name":"新增","code":"add","icon":"ant-design:plus-outlined","isDefault":true,"isUse":true,"type":"primary"},{"name":"编辑","code":"edit","icon":"ant-design:form-outlined","isDefault":true,"isUse":true},{"name":"刷新","code":"refresh","icon":"ant-design:reload-outlined","isDefault":true,"isUse":true},{"name":"查看","code":"view","icon":"ant-design:eye-outlined","isDefault":true,"isUse":true},{"name":"删除","code":"delete","icon":"ant-design:delete-outlined","isDefault":true,"isUse":true},{"isUse":true,"name":"数据日志","code":"datalog","icon":"ant-design:profile-outlined","isDefault":true}]); //展示在列表内的按钮 const actionButtons = ref(['view', 'edit','datalog', 'copyData', 'delete', 'startwork','flowRecord']); const buttonConfigs = computed(()=>{ @@ -80,8 +80,8 @@ return buttonConfigs.value?.filter((x) => actionButtons.value.includes(x.code)); }); - const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,delete : handleDelete,} - + const btnEvent = {add : handleAdd,edit : handleEdit,refresh : handleRefresh,view : handleView,delete : handleDelete,datalog : handleDatalog} + const tableData = ref([]) const { currentRoute } = useRouter(); const router = useRouter(); const formIdComputedRef = ref(); @@ -90,8 +90,8 @@ schemaIdComputedRef.value = currentRoute.value.meta.schemaId const defaultDate = ref([dayjs().startOf('year').format('YYYY-MM-DD'), dayjs().format('YYYY-MM-DD')]); const [registerModal, { openModal }] = useModal(); - const formName='国际采购计量'; - const [registerTable, { reload, }] = useTable({ + const formName=currentRoute.value.meta?.title + const [registerTable, { reload, setTableData }] = useTable({ title: '' || (formName + '列表'), api: getLngMeaPurIntPage, rowKey: 'id', @@ -102,7 +102,7 @@ }, schemas: [ { - field: 'dateEta', + field: 'dateMea', label: '计量日期', component: 'RangePicker', defaultValue: defaultDate.value, @@ -124,14 +124,15 @@ }, ], - fieldMapToTime: [['dateEta', ['startDate', 'endDate'], 'YYYY-MM-DD']], + fieldMapToTime: [['dateMea', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: true, }, immediate: false, beforeFetch: (params) => { - return { ...params, FormId: formIdComputedRef.value, PK: 'id' }; + return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit }; }, afterFetch: (res) => { + tableData.value = res || [] tableRef.value.setToolBarWidth(); }, @@ -140,7 +141,7 @@ striped: false, actionColumn: { - width: 160, + width: 140, title: '操作', dataIndex: 'action', slots: { customRender: 'action' }, @@ -151,41 +152,39 @@ }, }); - - function dbClickRow(record) { - if (!actionButtonConfig?.value.some(element => element.code == 'view')) { - return; + watch( + () => tableData.value, + (val) => { + if (val) { + let arr = DataFormat.format(val, [ + FormatOption.createQty('qtyMmbtu'), + FormatOption.createQty('qtyGj'), + FormatOption.createQty('qtyTon'), + FormatOption.createQty('rateTonGj'), + FormatOption.createQty('rateM3Gj'), + + ]); + if (arr.length) { + setTableData(arr) + } + } + }, + { + immediate: true, + deep: true, } - 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/MeaPurInt/' + record.id + '/viewForm', - query: { + ); + function dbClickRow(record) { + router.push({ + path: '/ship/MeaPurInt/createForm', + query: { formPath: 'ship/MeaPurInt', formName: formName, - formId:currentRoute.value.meta.formId - } - }); - } + formId:currentRoute.value.meta.formId, + id: record.id, + type: 'view' + } + }); } function buttonClick(code) { @@ -204,7 +203,7 @@ }); } else { router.push({ - path: '/form/MeaPurInt/0/createForm', + path: '/ship/MeaPurInt/createForm', query: { formPath: 'ship/MeaPurInt', formName: formName, @@ -217,11 +216,13 @@ function handleEdit(record: Recordable) { router.push({ - path: '/form/MeaPurInt/' + record.id + '/updateForm', + path: '/ship/MeaPurInt/createForm', query: { formPath: 'ship/MeaPurInt', formName: formName, - formId:currentRoute.value.meta.formId + formId:currentRoute.value.meta.formId, + id: record.id, + type: 'edit' } }); } @@ -239,7 +240,7 @@ deleteLngMeaPurInt(ids).then((_) => { handleSuccess(); notification.success({ - message: 'Tip', + message: '提示', description: t('删除成功!'), }); }); diff --git a/src/views/ship/OpsPurInt/components/createForm.vue b/src/views/ship/OpsPurInt/components/createForm.vue index f11a328..be731e8 100644 --- a/src/views/ship/OpsPurInt/components/createForm.vue +++ b/src/views/ship/OpsPurInt/components/createForm.vue @@ -17,7 +17,7 @@ - + diff --git a/src/views/ship/OpsSalesInt/components/createForm.vue b/src/views/ship/OpsSalesInt/components/createForm.vue index 4347456..35236d9 100644 --- a/src/views/ship/OpsSalesInt/components/createForm.vue +++ b/src/views/ship/OpsSalesInt/components/createForm.vue @@ -17,7 +17,7 @@ - + From e8db1b5b7c29c486949e998b1129b79eaba604b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Tue, 10 Mar 2026 15:36:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E9=87=87=E8=B4=ADlng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/ContractPurLng/index.ts | 90 +++ .../model/ContractPurLngModel.ts | 50 ++ .../components/ContractPurLngModal.vue | 110 ++++ .../ContractPurLng/components/Form.vue | 224 ++++++++ .../ContractPurLng/components/config.ts | 486 ++++++++++++++++ .../ContractPurLng/components/createForm.vue | 508 +++++++++++++++++ .../components/workflowPermission.ts | 122 ++++ src/views/contract/ContractPurLng/index.vue | 530 ++++++++++++++++++ 8 files changed, 2120 insertions(+) create mode 100644 src/api/contract/ContractPurLng/index.ts create mode 100644 src/api/contract/ContractPurLng/model/ContractPurLngModel.ts create mode 100644 src/views/contract/ContractPurLng/components/ContractPurLngModal.vue create mode 100644 src/views/contract/ContractPurLng/components/Form.vue create mode 100644 src/views/contract/ContractPurLng/components/config.ts create mode 100644 src/views/contract/ContractPurLng/components/createForm.vue create mode 100644 src/views/contract/ContractPurLng/components/workflowPermission.ts create mode 100644 src/views/contract/ContractPurLng/index.vue diff --git a/src/api/contract/ContractPurLng/index.ts b/src/api/contract/ContractPurLng/index.ts new file mode 100644 index 0000000..14d8af1 --- /dev/null +++ b/src/api/contract/ContractPurLng/index.ts @@ -0,0 +1,90 @@ +import { LngContractPageModel, LngContractPageParams, LngContractPageResult } from './model/ContractPurLngModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/contract/contractPurLng/page', + List = '/contract/contractPurLng/list', + Info = '/contract/contractPurLng/info', + LngContract = '/contract/contractPurLng', + + + + + DataLog = '/contract/contractPurLng/datalog', +} + +/** + * @description: 查询LngContract分页列表 + */ +export async function getLngContractPage(params: LngContractPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngContract信息 + */ +export async function getLngContract(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngContract + */ +export async function addLngContract(lngContract: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngContract, + params: lngContract, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngContract + */ +export async function updateLngContract(lngContract: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngContract, + params: lngContract, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngContract(批量删除) + */ +export async function deleteLngContract(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngContract, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts b/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts new file mode 100644 index 0000000..1ec4aee --- /dev/null +++ b/src/api/contract/ContractPurLng/model/ContractPurLngModel.ts @@ -0,0 +1,50 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngContract分页参数 模型 + */ +export interface LngContractPageParams extends BasicPageParams { + id: string; + + kNo: string; + + kName: string; + + cpName: string; + + dateFrom: string; + + dateTo: string; + + comId: string; + + approCode: string; +} + +/** + * @description: LngContract分页返回值模型 + */ +export interface LngContractPageModel { + id: string; + + kNo: string; + + kName: string; + + cpName: string; + + dateFrom: string; + + dateTo: string; + + comId: string; + + approCode: string; +} + +0; + +/** + * @description: LngContract分页返回值结构 + */ +export type LngContractPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue b/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue new file mode 100644 index 0000000..168dd47 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/ContractPurLngModal.vue @@ -0,0 +1,110 @@ + + \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/Form.vue b/src/views/contract/ContractPurLng/components/Form.vue new file mode 100644 index 0000000..6ccca44 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/Form.vue @@ -0,0 +1,224 @@ + + \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/config.ts b/src/views/contract/ContractPurLng/components/config.ts new file mode 100644 index 0000000..f74d087 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/config.ts @@ -0,0 +1,486 @@ +import { FormProps, FormSchema } from '/@/components/Form'; +import { BasicColumn } from '/@/components/Table'; + +export const formConfig = { + useCustomConfig: false, +}; + +export const searchFormSchema: FormSchema[] = [ + { + field: 'dateFrom', + label: '有效期', + component: 'RangePicker', + componentProps: { + format: 'YYYY-MM-DD', + style: { width: '100%' }, + getPopupContainer: () => document.body, + }, + }, + { + field: 'kName', + label: '合同号/名称', + component: 'Input', + }, + { + field: 'cpName', + 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: [ + // { label: '全部', value: '' }, + ], + placeholder: '请选择', + allowClear: true, + + getPopupContainer: () => document.body, + }, + }, + { + field: 'approCode', + label: '审批状态', + component: 'XjrSelect', + componentProps: { + datasourceType: 'dic', + params: { itemId: '1990669393069129729' }, + labelField: 'name', + valueField: 'value', + + getPopupContainer: () => document.body, + }, + }, +]; + +export const columns: BasicColumn[] = [ + { + dataIndex: 'kNo', + title: '合同号', + componentType: 'input', + align: 'left', + width: 200, + sorter: true, + }, + + { + dataIndex: 'kName', + title: '合同名称', + componentType: 'input', + align: 'left', + width: 250, + sorter: true, + }, + + { + dataIndex: 'cpName', + title: '供应商', + componentType: 'input', + align: 'left', + width: 150, + sorter: true, + }, + + { + dataIndex: 'dateFrom', + title: '有效期开始', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'dateTo', + title: '有效期结束', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'comId', + title: '合同主体', + componentType: 'input', + align: 'left', + width: 120, + sorter: true, + }, + + { + dataIndex: 'approCode', + title: '状态', + componentType: 'select', + align: 'left', + width: 80, + sorter: true, + }, +]; +//表单事件 +export const formEventConfigs = { + 0: [ + { + type: 'circle', + color: '#2774ff', + text: '开始节点', + icon: '#icon-kaishi', + bgcColor: '#D8E5FF', + isUserDefined: false, + }, + { + color: '#F6AB01', + icon: '#icon-chushihua', + text: '初始化表单', + bgcColor: '#f9f5ea', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 1: [ + { + color: '#B36EDB', + icon: '#icon-shujufenxi', + text: '获取表单数据', + detail: '(新增无此操作)', + bgcColor: '#F8F2FC', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 2: [ + { + color: '#F8625C', + icon: '#icon-jiazai', + text: '加载表单', + bgcColor: '#FFF1F1', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 3: [ + { + color: '#6C6AE0', + icon: '#icon-jsontijiao', + text: '提交表单', + bgcColor: '#F5F4FF', + isUserDefined: false, + nodeInfo: { processEvent: [] }, + }, + ], + 4: [ + { + type: 'circle', + color: '#F8625C', + text: '结束节点', + icon: '#icon-jieshuzhiliao', + bgcColor: '#FFD6D6', + isLast: true, + isUserDefined: false, + }, + ], +}; +export const formProps: FormProps = { + labelCol: { span: 3, offset: 0 }, + labelAlign: 'right', + layout: 'horizontal', + size: 'default', + schemas: [ + { + key: '50402ed57f3d4638980b14dc48745da8', + field: 'id', + label: 'id', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入id', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '0690cd799b9a453f887c615e745ecec8', + field: 'kNo', + label: '合同号', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同号', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5caa2a5cf9ae4c799e7059d1fe19a2c1', + field: 'kName', + label: '合同名称', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同名称', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '46253e7e8c6e48fdb1a5b790551e68ac', + field: 'cpName', + label: '供应商', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入供应商', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'be6d87b093f24ef087067bcc8ba8ff3d', + field: 'dateFrom', + label: '有效期开始', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入有效期开始', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '5cdc1bbb995b413f88ad1758157770e8', + field: 'dateTo', + label: '有效期结束', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入有效期结束', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: 'dc2c739a59c348c1b5017af73c86cc88', + field: 'comId', + label: '合同主体', + type: 'input', + component: 'Input', + colProps: { span: 24 }, + defaultValue: '', + componentProps: { + width: '100%', + span: '', + defaultValue: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请输入合同主体', + maxlength: null, + prefix: '', + suffix: '', + addonBefore: '', + addonAfter: '', + disabled: false, + allowClear: false, + showLabel: true, + required: false, + rules: [], + events: {}, + isSave: false, + isShow: true, + scan: false, + style: { width: '100%' }, + }, + }, + { + key: '97ffb13559eb4726bc2cc8436ee5eac5', + field: 'approCode', + label: '审批状态', + type: 'select', + component: 'XjrSelect', + colProps: { span: 24 }, + componentProps: { + width: '100%', + span: '', + labelWidthMode: 'fix', + labelFixWidth: 120, + responsive: false, + respNewRow: false, + placeholder: '请选择下拉选择审批状态', + sepTextField: '', + showLabel: true, + showSearch: false, + clearable: false, + disabled: true, + mode: '', + staticOptions: [ + { key: 1, label: 'Option 1', value: 'Option 1' }, + { key: 2, label: 'Option 2', value: 'Option 2' }, + { key: 3, label: 'Option 3', value: 'Option 3' }, + ], + defaultSelect: 'WTJ', + datasourceType: 'dic', + params: { itemId: '1990669393069129729' }, + labelField: 'name', + valueField: 'value', + apiConfig: { + path: 'CodeGeneration/selection', + method: 'GET', + apiId: '93d735dcb7364a0f8102188ec4d77ac7', + }, + dicOptions: [], + required: false, + rules: [], + events: {}, + isShow: true, + itemId: '1990669393069129729', + style: { width: '100%' }, + }, + }, + ], + showActionButtonGroup: false, + buttonLocation: 'center', + actionColOptions: { span: 24 }, + showResetButton: false, + showSubmitButton: false, + hiddenComponent: [], +}; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/components/createForm.vue b/src/views/contract/ContractPurLng/components/createForm.vue new file mode 100644 index 0000000..1e63c35 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/createForm.vue @@ -0,0 +1,508 @@ + + + + + diff --git a/src/views/contract/ContractPurLng/components/workflowPermission.ts b/src/views/contract/ContractPurLng/components/workflowPermission.ts new file mode 100644 index 0000000..d936a92 --- /dev/null +++ b/src/views/contract/ContractPurLng/components/workflowPermission.ts @@ -0,0 +1,122 @@ +export const permissionList = [ + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: 'id', + fieldId: 'id', + isSubTable: false, + showChildren: true, + type: 'input', + key: '50402ed57f3d4638980b14dc48745da8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同号', + fieldId: 'kNo', + isSubTable: false, + showChildren: true, + type: 'input', + key: '0690cd799b9a453f887c615e745ecec8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同名称', + fieldId: 'kName', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5caa2a5cf9ae4c799e7059d1fe19a2c1', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '供应商', + fieldId: 'cpName', + isSubTable: false, + showChildren: true, + type: 'input', + key: '46253e7e8c6e48fdb1a5b790551e68ac', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效期开始', + fieldId: 'dateFrom', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'be6d87b093f24ef087067bcc8ba8ff3d', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '有效期结束', + fieldId: 'dateTo', + isSubTable: false, + showChildren: true, + type: 'input', + key: '5cdc1bbb995b413f88ad1758157770e8', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '合同主体', + fieldId: 'comId', + isSubTable: false, + showChildren: true, + type: 'input', + key: 'dc2c739a59c348c1b5017af73c86cc88', + children: [], + }, + { + required: true, + view: true, + edit: true, + disabled: false, + isSaveTable: false, + tableName: '', + fieldName: '审批状态', + fieldId: 'approCode', + isSubTable: false, + showChildren: true, + type: 'select', + key: '97ffb13559eb4726bc2cc8436ee5eac5', + children: [], + }, +]; \ No newline at end of file diff --git a/src/views/contract/ContractPurLng/index.vue b/src/views/contract/ContractPurLng/index.vue new file mode 100644 index 0000000..0febf19 --- /dev/null +++ b/src/views/contract/ContractPurLng/index.vue @@ -0,0 +1,530 @@ + + + \ No newline at end of file From bbdca4406f1e262f7c82a9dea191cd6fe433bc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Tue, 10 Mar 2026 17:39:02 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E9=87=87=E8=B4=ADlng?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/contract/ContractPurLng/index.ts | 3 +- .../common/contractPurPngtListModal.vue | 2 +- .../common/correlationContractFactList.vue | 4 +-- src/components/common/priceInfoList.vue | 12 ++++---- .../ContractPurLng/components/config.ts | 4 +-- .../ContractPurLng/components/createForm.vue | 28 +++++++++++-------- src/views/contract/ContractPurLng/index.vue | 4 +-- .../price/PricePurPngApp/components/config.ts | 22 +++++++-------- .../PriceSalesPngApp/components/config.ts | 22 +++++++-------- src/views/secondDev/customFormConfig.ts | 3 +- .../ship/OpsPurInt/components/createForm.vue | 13 +++++---- .../OpsSalesInt/components/createForm.vue | 13 +++++---- src/views/ship/ShipSchedule/index.vue | 10 ++++--- 13 files changed, 78 insertions(+), 62 deletions(-) diff --git a/src/api/contract/ContractPurLng/index.ts b/src/api/contract/ContractPurLng/index.ts index 14d8af1..647426a 100644 --- a/src/api/contract/ContractPurLng/index.ts +++ b/src/api/contract/ContractPurLng/index.ts @@ -3,7 +3,8 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/contract/contractPurLng/page', + // Page = '/contract/contractPurLng/page', + Page = '/magic-api/contract/contractPurLng/page', List = '/contract/contractPurLng/list', Info = '/contract/contractPurLng/info', LngContract = '/contract/contractPurLng', diff --git a/src/components/common/contractPurPngtListModal.vue b/src/components/common/contractPurPngtListModal.vue index 8d74c44..0c28c91 100644 --- a/src/components/common/contractPurPngtListModal.vue +++ b/src/components/common/contractPurPngtListModal.vue @@ -109,7 +109,7 @@ selectedKeys.value = rowKeys; selectedValues.value = e } - const getTitle = computed(() => (!unref(isUpdate) ? t(props.pageType == 'pur'?'管道气采购合同列表': '管道气销售合同列表') : t(''))); + const getTitle = computed(() => (t(props.pageType == 'pur'?'管道气采购合同列表': '管道气销售合同列表'))); async function handleSubmit() { if (!selectedValues.value.length) { diff --git a/src/components/common/correlationContractFactList.vue b/src/components/common/correlationContractFactList.vue index 9d0c22b..ac19a69 100644 --- a/src/components/common/correlationContractFactList.vue +++ b/src/components/common/correlationContractFactList.vue @@ -38,10 +38,10 @@ { title: t('合同名称'), dataIndex: 'kName', width: 300}, { title: t('关联类别'), dataIndex: 'relTypeName', width: 100}, { title: t('合同类别'), dataIndex: 'kTypeName1', width: 100}, - { title: t('合同主体'), dataIndex: 'comName', width: 250}, + { title: t('合同主体'), dataIndex: 'comName', width: 120}, { title: t('我方联系人'), dataIndex: 'empName', width: 140}, { title: t('联系电话'), dataIndex: 'tel', width: 140}, - { title: t('业务部门'), dataIndex: 'bDeptName', width: 140}, + { title: t('业务部门'), dataIndex: 'bDeptName', width: 120}, { title: t('附件'), dataIndex: 'file', width: 140}, { title: t('操作'), dataIndex: 'operation', width: 120, fixed: 'right',align: 'center'}, ]); diff --git a/src/components/common/priceInfoList.vue b/src/components/common/priceInfoList.vue index e5a0940..0127b03 100644 --- a/src/components/common/priceInfoList.vue +++ b/src/components/common/priceInfoList.vue @@ -7,7 +7,7 @@
- 删除 + @@ -114,6 +114,7 @@ import { useModal } from '/@/components/Modal'; import { message } from 'ant-design-vue'; import contractPurPngtListModal from '/@/components/common/contractPurPngtListModal.vue'; + import { DeleteOutlined} from '@ant-design/icons-vue'; const props = defineProps({ isDisable: Boolean, list: Array, @@ -273,9 +274,10 @@ }); diff --git a/src/views/contract/ContractPurLng/components/config.ts b/src/views/contract/ContractPurLng/components/config.ts index f74d087..319aba7 100644 --- a/src/views/contract/ContractPurLng/components/config.ts +++ b/src/views/contract/ContractPurLng/components/config.ts @@ -107,7 +107,7 @@ export const columns: BasicColumn[] = [ }, { - dataIndex: 'comId', + dataIndex: 'comName', title: '合同主体', componentType: 'input', align: 'left', @@ -116,7 +116,7 @@ export const columns: BasicColumn[] = [ }, { - dataIndex: 'approCode', + dataIndex: 'approName', title: '状态', componentType: 'select', align: 'left', diff --git a/src/views/contract/ContractPurLng/components/createForm.vue b/src/views/contract/ContractPurLng/components/createForm.vue index 1e63c35..fd47668 100644 --- a/src/views/contract/ContractPurLng/components/createForm.vue +++ b/src/views/contract/ContractPurLng/components/createForm.vue @@ -33,11 +33,6 @@ - - - - - @@ -60,7 +55,7 @@ - + {{ item.name }} @@ -131,7 +126,7 @@ import type { Rule } from 'ant-design-vue/es/form'; import { getDictionary } from '/@/api/sales/Customer'; import { useModal } from '/@/components/Modal'; - import { addLngContract,updateLngContract, getLngContract, getAllPriceTerm} from '/@/api/contract/ContractPurLng'; + import { addLngContract,updateLngContract, getLngContract} from '/@/api/contract/ContractPurLng'; import { getLngContractFact } from '/@/api/contract/ContractFact'; import { getAllCurrency } from '/@/api/contract/ContractFact'; import { getLngAppro,getCompDept } from '/@/api/approve/Appro'; @@ -288,10 +283,6 @@ } } - async function getOptionParams() { - - optionSelect.prcTermCodeList = await getAllPriceTerm({eid: formState.prcTermCode}) - } const getCompDeptInfo = async (id, deptId)=> { const res = await getCompDept(id, deptId) formState.bDeptName = res?.dept?.name @@ -338,7 +329,20 @@ } return endValue.valueOf() <= startValue.valueOf(); } - + const disabledDateCfmStart = (startValue) => { + const endValue = formState?.dateCfmTo; + if (!startValue || !endValue) { + return false + } + return startValue.valueOf() >= endValue.valueOf(); + } + const disabledDateCfmEnd = (endValue) => { + const startValue = formState?.dateCfmFrom; + if (!endValue || !startValue) { + return false + } + return endValue.valueOf() <= startValue.valueOf(); + } const onSearchSupplier = () => { openModalSupplier(true,{isUpdate: false}) } diff --git a/src/views/contract/ContractPurLng/index.vue b/src/views/contract/ContractPurLng/index.vue index 0febf19..30905a0 100644 --- a/src/views/contract/ContractPurLng/index.vue +++ b/src/views/contract/ContractPurLng/index.vue @@ -127,7 +127,7 @@ showResetButton: false, }, beforeFetch: (params) => { - return { ...params, FormId: formIdComputedRef.value, PK: 'id' }; + return { ...params, FormId: formIdComputedRef.value, PK: 'id',page: params.limit}; }, afterFetch: (res) => { tableRef.value.setToolBarWidth(); @@ -299,7 +299,7 @@ deleteLngContract(ids).then((_) => { handleSuccess(); notification.success({ - message: 'Tip', + message: '提示', description: t('删除成功!'), }); }); diff --git a/src/views/price/PricePurPngApp/components/config.ts b/src/views/price/PricePurPngApp/components/config.ts index 4a6b7b2..0f4ead1 100644 --- a/src/views/price/PricePurPngApp/components/config.ts +++ b/src/views/price/PricePurPngApp/components/config.ts @@ -7,17 +7,17 @@ export const formConfig = { export const searchFormSchema: FormSchema[] = [ - { - field: 'dateFrom', - label: '申请日期', - component: 'RangePicker', - componentProps: { - format: 'YYYY-MM-DD', - style: { width: '100%' }, - allowClear: true, - getPopupContainer: () => document.body, - }, - }, + // { + // field: 'dateFrom', + // label: '申请日期', + // component: 'RangePicker', + // componentProps: { + // format: 'YYYY-MM-DD', + // style: { width: '100%' }, + // allowClear: true, + // getPopupContainer: () => document.body, + // }, + // }, { field: 'priceDesc', label: '申请说明', diff --git a/src/views/price/PriceSalesPngApp/components/config.ts b/src/views/price/PriceSalesPngApp/components/config.ts index 802956c..fa8f6a1 100644 --- a/src/views/price/PriceSalesPngApp/components/config.ts +++ b/src/views/price/PriceSalesPngApp/components/config.ts @@ -6,17 +6,17 @@ export const formConfig = { }; export const searchFormSchema: FormSchema[] = [ - { - field: 'dateFrom', - label: '申请日期', - component: 'RangePicker', - componentProps: { - format: 'YYYY-MM-DD', - style: { width: '100%' }, - allowClear: true, - getPopupContainer: () => document.body, - }, - }, + // { + // field: 'dateFrom', + // label: '申请日期', + // component: 'RangePicker', + // componentProps: { + // format: 'YYYY-MM-DD', + // style: { width: '100%' }, + // allowClear: true, + // getPopupContainer: () => document.body, + // }, + // }, { field: 'priceDesc', label: '申请说明', diff --git a/src/views/secondDev/customFormConfig.ts b/src/views/secondDev/customFormConfig.ts index 6c8c5c9..b8cd91f 100644 --- a/src/views/secondDev/customFormConfig.ts +++ b/src/views/secondDev/customFormConfig.ts @@ -16,6 +16,7 @@ export const customFormConfig = { 'ContractTransPng', 'ContractProc', 'PricePurPngApp', - 'PriceSalesPngApp' + 'PriceSalesPngApp', + 'ContractPurLng' ], }; \ No newline at end of file diff --git a/src/views/ship/OpsPurInt/components/createForm.vue b/src/views/ship/OpsPurInt/components/createForm.vue index be731e8..ffa1b8a 100644 --- a/src/views/ship/OpsPurInt/components/createForm.vue +++ b/src/views/ship/OpsPurInt/components/createForm.vue @@ -400,8 +400,8 @@ const userStore = useUserStore(); const userInfo = userStore.getUserInfo; - const tableName = 'ShipSchedule'; - const columnName = 'ShipSchedule' + const tableName = 'OpsPurInt'; + const columnName = 'OpsPurInt' const formType = ref('2'); // 0 新建 1 修改 2 查看 const formRef = ref(); @@ -423,13 +423,14 @@ const formId = ref(currentRoute.value?.params?.id); const pageType = ref(currentRoute.value.query?.type); const pageId = ref(currentRoute.value.query?.id) - + const pageSource = ref(currentRoute.value.query?.pageSource) const spinning = ref(false); const { notification } = useMessage(); const { t } = useI18n() const formState = reactive({ - approCode: 'WTJ' + approCode: 'WTJ', + frtSign: 'N' }); const [register, { openModal:openModal}] = useModal(); const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal(); @@ -486,7 +487,7 @@ isDisable.value = pageType.value == 'view' getOption() if (pageId.value) { - getInfo(pageId.value) + pageSource.value ? getLngShipInfo(pageId.value) :getInfo(pageId.value) } else { formState.empName = userInfo.name formState.empId = userInfo.id @@ -663,6 +664,8 @@ spinning.value = true let data = await getLngShipSchedule(id) spinning.value = false + formState.ssNo = data.ssNo + formState.ssId = data.id formState.comId = data.comId formState.kId = data.kId formState.kName = data.kName diff --git a/src/views/ship/OpsSalesInt/components/createForm.vue b/src/views/ship/OpsSalesInt/components/createForm.vue index 35236d9..237c009 100644 --- a/src/views/ship/OpsSalesInt/components/createForm.vue +++ b/src/views/ship/OpsSalesInt/components/createForm.vue @@ -369,8 +369,8 @@ const userStore = useUserStore(); const userInfo = userStore.getUserInfo; - const tableName = 'ShipSchedule'; - const columnName = 'ShipSchedule' + const tableName = 'OpsSalesInt'; + const columnName = 'OpsSalesInt' const formType = ref('2'); // 0 新建 1 修改 2 查看 const formRef = ref(); @@ -392,13 +392,14 @@ const formId = ref(currentRoute.value?.params?.id); const pageType = ref(currentRoute.value.query?.type); const pageId = ref(currentRoute.value.query?.id) - + const pageSource = ref(currentRoute.value.query?.pageSource) const spinning = ref(false); const { notification } = useMessage(); const { t } = useI18n() const formState = reactive({ - approCode: 'WTJ' + approCode: 'WTJ', + frtSign: 'N' }); const [register, { openModal:openModal}] = useModal(); const [registerContractPurInt, { openModal:openModalContractPurInt}] = useModal(); @@ -456,7 +457,7 @@ isDisable.value = pageType.value == 'view' getOption() if (pageId.value) { - getInfo(pageId.value) + pageSource.value ? getLngShipInfo(pageId.value) :getInfo(pageId.value) } else { formState.empName = userInfo.name formState.empId = userInfo.id @@ -627,6 +628,8 @@ spinning.value = true let data = await getLngShipSchedule(id) spinning.value = false + formState.ssNo = data.ssNo + formState.ssId = data.id formState.comId = data.comId formState.kId = data.kId formState.kName = data.kName diff --git a/src/views/ship/ShipSchedule/index.vue b/src/views/ship/ShipSchedule/index.vue index 78314bf..b1d131c 100644 --- a/src/views/ship/ShipSchedule/index.vue +++ b/src/views/ship/ShipSchedule/index.vue @@ -255,8 +255,9 @@ formPath: 'ship/OpsPurInt', formName: record.opsPurId ? '编辑采购执行' : '新建采购执行', formId:currentRoute.value.meta.formId, - id: record.opsPurId, - type: record.opsPurId ? 'edit' : '' + id: record.opsPurId ? record.opsPurId : record.id, + type: record.opsPurId ? 'edit' : '', + pageSource: record.opsPurId ? null : 'ship' } }); @@ -268,8 +269,9 @@ formPath: 'ship/OpsSalesInt', formName: record.opsSalesId ? '编辑销售执行' : '新建销售执行', formId:currentRoute.value.meta.formId, - id: record.opsSalesId, - type: record.opsSalesId ? 'edit' : '' + id: record.opsSalesId? record.opsSalesId : record.id, + type: record.opsSalesId ? 'edit' : '', + pageSource: record.opsSalesId ? null : 'ship' } }); } From 68e301ca253c85187a3276223056d349049316f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98huanghaiixia=E2=80=99?= <980486410@.com> Date: Tue, 10 Mar 2026 17:57:57 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=85=B3=E8=81=94=E4=B8=BB=E5=90=88?= =?UTF-8?q?=E5=90=8C=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ContractProc/components/createForm.vue | 26 +++++++++++++++-- .../ContractPurInt/components/createForm.vue | 26 +++++++++++++++-- .../ContractPurLng/components/createForm.vue | 26 +++++++++++++++-- .../ContractPurPng/components/createForm.vue | 26 +++++++++++++++-- .../ContractSales/components/createForm.vue | 26 +++++++++++++++-- .../components/createForm.vue | 26 +++++++++++++++-- .../components/createForm.vue | 26 +++++++++++++++-- .../components/createForm.vue | 28 ++++++++++++++++--- 8 files changed, 185 insertions(+), 25 deletions(-) diff --git a/src/views/contract/ContractProc/components/createForm.vue b/src/views/contract/ContractProc/components/createForm.vue index 7c1de11..37f5a80 100644 --- a/src/views/contract/ContractProc/components/createForm.vue +++ b/src/views/contract/ContractProc/components/createForm.vue @@ -566,7 +566,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -576,15 +578,33 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.curCode = formState.curCode ? formState.curCode : res?.curCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSupplier[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSupplier[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } const handleSuccessStation = (val) => { diff --git a/src/views/contract/ContractPurInt/components/createForm.vue b/src/views/contract/ContractPurInt/components/createForm.vue index 7ff79eb..193b408 100644 --- a/src/views/contract/ContractPurInt/components/createForm.vue +++ b/src/views/contract/ContractPurInt/components/createForm.vue @@ -620,7 +620,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -630,15 +632,33 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.curCode = formState.curCode ? formState.curCode : res?.curCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSupplier[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSupplier[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } function unique(arr, u_key) { diff --git a/src/views/contract/ContractPurLng/components/createForm.vue b/src/views/contract/ContractPurLng/components/createForm.vue index fd47668..d5e3f38 100644 --- a/src/views/contract/ContractPurLng/components/createForm.vue +++ b/src/views/contract/ContractPurLng/components/createForm.vue @@ -383,7 +383,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -393,15 +395,33 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.curCode = formState.curCode ? formState.curCode : res?.curCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSupplier[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSupplier[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } function unique(arr, u_key) { diff --git a/src/views/contract/ContractPurPng/components/createForm.vue b/src/views/contract/ContractPurPng/components/createForm.vue index df194c8..9043599 100644 --- a/src/views/contract/ContractPurPng/components/createForm.vue +++ b/src/views/contract/ContractPurPng/components/createForm.vue @@ -515,7 +515,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -525,14 +527,32 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].id || a[0].idNew) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSupplier[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSupplier[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } const cancel = () => { diff --git a/src/views/contract/ContractSales/components/createForm.vue b/src/views/contract/ContractSales/components/createForm.vue index b58ac10..580fb5b 100644 --- a/src/views/contract/ContractSales/components/createForm.vue +++ b/src/views/contract/ContractSales/components/createForm.vue @@ -545,7 +545,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { @@ -556,14 +558,32 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSales[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSales[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } const handleSuccessDownLoad = async (val, type) => { diff --git a/src/views/contract/ContractSalesInt/components/createForm.vue b/src/views/contract/ContractSalesInt/components/createForm.vue index e088e80..6071d27 100644 --- a/src/views/contract/ContractSalesInt/components/createForm.vue +++ b/src/views/contract/ContractSalesInt/components/createForm.vue @@ -622,7 +622,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -632,15 +634,33 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.curCode = formState.curCode ? formState.curCode : res?.curCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSales[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSales[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } function unique(arr, u_key) { diff --git a/src/views/contract/ContractSalesLng/components/createForm.vue b/src/views/contract/ContractSalesLng/components/createForm.vue index 1c2d423..63fec72 100644 --- a/src/views/contract/ContractSalesLng/components/createForm.vue +++ b/src/views/contract/ContractSalesLng/components/createForm.vue @@ -471,7 +471,9 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } const getContractFact = async () => { let a = [] @@ -481,14 +483,32 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].id || a[0].idNew) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSales[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSales[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } function unique(arr, u_key) { diff --git a/src/views/contract/ContractTransPng/components/createForm.vue b/src/views/contract/ContractTransPng/components/createForm.vue index 2eb0be1..f8f4a26 100644 --- a/src/views/contract/ContractTransPng/components/createForm.vue +++ b/src/views/contract/ContractTransPng/components/createForm.vue @@ -584,9 +584,11 @@ }) }) dataListContractFact.value = unique([...dataListContractFact.value, ...arr], 'kNo') - getContractFact() + setTimeout(() => { + getContractFact() + }); } - const getContractFact = async () => { + const getContractFact = async () => { let a = [] dataListContractFact.value.forEach(v=>{ if (v.relTypeCode == 'M') { @@ -594,15 +596,33 @@ } }) if(a.length == 1) { + spinning.value = true + try { const res = await getLngContractFact(a[0].kFactId) + spinning.value = false formState.kNo = formState.kNo ? formState.kNo : res?.kNo formState.kName = formState.kName ? formState.kName : res?.kName formState.kPeriod = formState.kPeriod ? formState.kPeriod : res?.periodTypeCode formState.curCode = formState.curCode ? formState.curCode : res?.curCode formState.dateFrom = formState.dateFrom ? formState.dateFrom : (res?.dateFrom ? dayjs(res?.dateFrom) : null) formState.dateTo = formState.dateTo ? formState.dateTo : (res?.dateTo ? dayjs(res?.dateTo) : null) - formState.cpName = formState.cpName ? formState.cpName : (res?.lngContractFactCpList || [])[0]?.cpName - formState.cpCode = formState.cpCode ? formState.cpCode : (res?.lngContractFactCpList || [])[0]?.cpCode + let arr = res?.lngContractFactCpList || [] + let arrSales = [] + let arrSupplier = [] + arr.forEach(v=> { + if (v.cpTableName == 'lng_customer') { + arrSales.push(v) + } + if (v.cpTableName == 'lng_supplier') { + arrSupplier.push(v) + } + }) + formState.cpName = formState.cpName ? formState.cpName : arrSupplier[0]?.cpName + formState.cpCode = formState.cpCode ? formState.cpCode : arrSupplier[0]?.cpCode + + } catch (error) { + spinning.value = false + } } } const handleSuccessDownLoad = (val, type) => {