diff --git a/src/api/dayPlan/LngDemand/index.ts b/src/api/dayPlan/LngDemand/index.ts index 6cab818..814f519 100644 --- a/src/api/dayPlan/LngDemand/index.ts +++ b/src/api/dayPlan/LngDemand/index.ts @@ -8,14 +8,35 @@ enum Api { List = '/dayPlan/lngDemand/list', Info = '/dayPlan/lngDemand/info', LngLngDemand = '/dayPlan/lngDemand', - - + ContractList ='/magic-api/dayPlan/queryContractList', + StationList ='/magic-api/dayPlan/queryStationList', Export = '/dayPlan/lngDemand/export', DataLog = '/dayPlan/lngDemand/datalog', } - +export async function getLngLngDemandStationList(params, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.StationList, + params: params, + }, + { + errorMessageMode: mode, + }, + ); +} +export async function getLngLngDemandContractList(params, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.ContractList, + params: params, + }, + { + errorMessageMode: mode, + }, + ); +} /** * @description: 查询LngLngDemand分页列表 */ diff --git a/src/api/dayPlan/LngMeasureSales/index.ts b/src/api/dayPlan/LngMeasureSales/index.ts index 81066b1..ce15fd2 100644 --- a/src/api/dayPlan/LngMeasureSales/index.ts +++ b/src/api/dayPlan/LngMeasureSales/index.ts @@ -3,17 +3,39 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/dayPlan/lngMeasureSales/page', + // Page = '/dayPlan/lngMeasureSales/page', + Page = '/magic-api/dayPlan/lngMeasureSalesPageList', List = '/dayPlan/lngMeasureSales/list', Info = '/dayPlan/lngMeasureSales/info', LngLngMeasure = '/dayPlan/lngMeasureSales', - - + PageAdd = '/magic-api/dayPlan/dayPlanLngSelectList', + Cancel = '/dayPlan/lngMeasureSales/cancel', DataLog = '/dayPlan/lngMeasureSales/datalog', } - +export async function cancelLngLngMeasure(lngLngMeasure: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.Cancel, + params: lngLngMeasure, + }, + { + errorMessageMode: mode, + }, + ); +} +export async function getLngLngMeasurePageAdd(params: LngLngMeasurePageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.PageAdd, + params, + }, + { + errorMessageMode: mode, + }, + ); +} /** * @description: 查询LngLngMeasure分页列表 */ diff --git a/src/components/common/priceLngHdrListModal.vue b/src/components/common/priceLngHdrListModal.vue new file mode 100644 index 0000000..43cd34c --- /dev/null +++ b/src/components/common/priceLngHdrListModal.vue @@ -0,0 +1,230 @@ + + + + diff --git a/src/components/common/settleLngHdrList.vue b/src/components/common/settleLngHdrList.vue new file mode 100644 index 0000000..b326529 --- /dev/null +++ b/src/components/common/settleLngHdrList.vue @@ -0,0 +1,268 @@ + + + diff --git a/src/views/dayPlan/LngDemand/components/basicForm.vue b/src/views/dayPlan/LngDemand/components/basicForm.vue index 3c63a3b..abfa7b9 100644 --- a/src/views/dayPlan/LngDemand/components/basicForm.vue +++ b/src/views/dayPlan/LngDemand/components/basicForm.vue @@ -144,7 +144,7 @@ import { getCompDept } from '/@/api/approve/Appro'; import { useUserStore } from '/@/store/modules/user'; import { getDictionary } from '/@/api/sales/Customer'; - import { getLngPngDemandContractList, getLngPngDemandPointDely, getLngPngDemandContractQty, getLngPngDemandPurList, getLngPngDemandRate } from '/@/api/dayPlan/Demand'; + import { getLngLngDemandContractList, getLngLngDemandStationList } from '/@/api/dayPlan/LngDemand'; const userStore = useUserStore(); const userInfo = userStore.getUserInfo; @@ -203,7 +203,7 @@ cuCode:formState.value.cuCode, datePlan: dayjs(formState.value.datePlan).format('YYYY-MM-DD') } - let res = await getLngPngDemandContractList(obj) + let res = await getLngLngDemandContractList(obj) contractList.value = res || [] if (contractList.value.length == 1) { formState.value.kName = contractList.value[0].kName @@ -240,7 +240,7 @@ getPurList() } const getPointDely = async () => { - let res = await getLngPngDemandPointDely({kId: formState.value.ksId}) + let res = await getLngLngDemandStationList({kId: formState.value.ksId}) pointDelyList.value = res || [] if (pointDelyList.value.length == 1) { formState.value.pointDelyName = pointDelyList.value[0].pointDelyName diff --git a/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue b/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue index 9b56b1d..8364dcd 100644 --- a/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue +++ b/src/views/dayPlan/LngMeasureSales/components/createFormModal.vue @@ -22,7 +22,7 @@ import { message } from 'ant-design-vue'; import { useUserStore } from '/@/store/modules/user'; import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table'; - import { getLngPngMeasureSalesPurPageAdd, addLngPngMeasureSalesPur } from '/@/api/dayPlan/PngMeasureSalesPur'; + import { getLngLngMeasurePageAdd, addLngLngMeasure } from '/@/api/dayPlan/LngMeasureSales'; import NP from 'number-precision'; const userStore = useUserStore(); @@ -172,7 +172,7 @@ const selectedValues = ref([]); const [registerTable, { reload,setPagination }] = useTable({ title: t('LNG计量(客户)新增列表'), - api: getLngPngMeasureSalesPurPageAdd, + api: getLngLngMeasurePageAdd, columns: columns, pagination: true, @@ -219,7 +219,7 @@ spinning.value = true; try { - await addLngPngMeasureSalesPur(selectedValues.value); + await addLngLngMeasure(selectedValues.value); spinning.value = false; notification.success({ message: '提示', diff --git a/src/views/dayPlan/LngMeasureSales/index.vue b/src/views/dayPlan/LngMeasureSales/index.vue index 78fb8fc..5c637e9 100644 --- a/src/views/dayPlan/LngMeasureSales/index.vue +++ b/src/views/dayPlan/LngMeasureSales/index.vue @@ -62,7 +62,7 @@ import { Modal } from 'ant-design-vue'; import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; - import { getLngLngMeasurePage, deleteLngLngMeasure} from '/@/api/dayPlan/LngMeasureSales'; + import { getLngLngMeasurePage, deleteLngLngMeasure,addLngLngMeasure, updateLngLngMeasure,cancelLngLngMeasure} from '/@/api/dayPlan/LngMeasureSales'; import { PageWrapper } from '/@/components/Page'; import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; @@ -70,7 +70,6 @@ import { useFormConfig } from '/@/hooks/web/useFormConfig'; import { useRouter } from 'vue-router'; import { setIndexFlowStatus } from '/@/utils/flow/index' - import { getLngLngMeasure } from '/@/api/dayPlan/LngMeasureSales'; import { useModal } from '/@/components/Modal'; import LngMeasureSalesModal from './components/LngMeasureSalesModal.vue'; import {formConfig, searchFormSchema, columns } from './components/config'; @@ -81,7 +80,11 @@ import { parseDownloadUrl} from '/@/api/system/file'; import { downloadByUrl } from '/@/utils/file/download'; import { DeleteOutlined } from '@ant-design/icons-vue'; - + import { getCompDept } from '/@/api/approve/Appro'; + import { useUserStore } from '/@/store/modules/user'; + const userStore = useUserStore(); + const userInfo = userStore.getUserInfo; + const curCuCode = ref('') const { bus, CREATE_FLOW, FLOW_PROCESSED, FORM_LIST_MODIFIED } = useEventBus(); const { notification } = useMessage(); @@ -95,7 +98,6 @@ const customSearchFormSchema =ref(searchFormSchema); const selectedKeys = ref([]); const selectedRowsData = ref([]); - const curCuCode = ref('') const tableRef = ref(); const curIdx = ref('') //所有按钮 @@ -149,8 +151,9 @@ fieldMapToTime: [['datePlan', ['startDate', 'endDate'], 'YYYY-MM-DD']], showResetButton: false, }, + immediate: false, beforeFetch: (params) => { - return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit }; + return { ...params, FormId: formIdComputedRef.value, PK: 'id',page:params.limit,cuCode:curCuCode.value }; }, afterFetch: (res) => { tableRef.value.setToolBarWidth(); @@ -233,7 +236,7 @@ } else { selectedRowsData.value= [{...val}] } - await cancelLngPngMeasureSalesPur(selectedRowsData.value) + await cancelLngLngMeasure(selectedRowsData.value) handleSuccess(); notification.success({ message: '提示', @@ -254,7 +257,7 @@ selectedRowsData.value= [{...val}] } - await updateLngPngMeasureSalesPur(selectedRowsData.value) + await updateLngLngMeasure(selectedRowsData.value) handleSuccess(); notification.success({ message: '提示', @@ -274,7 +277,7 @@ } else { selectedRowsData.value= [{...val}] } - await addLngPngMeasureSalesPur(selectedRowsData.value) + await addLngLngMeasure(selectedRowsData.value) handleSuccess(); notification.success({ message: '提示', @@ -312,8 +315,10 @@ reload(); } - onMounted(() => { - + onMounted(async() => { + const res = await getCompDept(userInfo.id) + curCuCode.value = res?.comp?.cuCode + reload({searchInfo:{'limit':1,'size':10,'page':1}}); if (schemaIdComputedRef.value) { bus.on(FLOW_PROCESSED, handleRefresh); bus.on(CREATE_FLOW, handleRefresh); diff --git a/src/views/dayPlan/LngSettleHdr/components/createForm.vue b/src/views/dayPlan/LngSettleHdr/components/createForm.vue index 5dd5079..4471018 100644 --- a/src/views/dayPlan/LngSettleHdr/components/createForm.vue +++ b/src/views/dayPlan/LngSettleHdr/components/createForm.vue @@ -34,9 +34,9 @@ - - - + + + {{ item.name }} @@ -57,15 +57,6 @@ - - - - - {{ item.name }} - - - - @@ -78,15 +69,16 @@ - - - + + + + @@ -112,7 +104,7 @@ import { message } from 'ant-design-vue'; import UploadList from '/@/components/Form/src/components/UploadList.vue'; import customerListModal from '/@/components/common/customerListModal.vue'; - import settleSalesPurList from '/@/components/common/settleSalesPurList.vue'; + import settleLngHdrList from '/@/components/common/settleLngHdrList.vue'; import { getAllCom} from '/@/api/contract/ContractPurInt'; import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat'; diff --git a/src/views/dayPlan/LngSettleHdr/index.vue b/src/views/dayPlan/LngSettleHdr/index.vue index 60b3bab..3c95036 100644 --- a/src/views/dayPlan/LngSettleHdr/index.vue +++ b/src/views/dayPlan/LngSettleHdr/index.vue @@ -110,7 +110,7 @@ const taskIdRef = ref(''); const visibleFlowRecordModal = ref(false); const [registerModal, { openModal }] = useModal(); - const formName='LNG销售结算'; + const formName=currentRoute.value.meta?.title; const [registerTable, { reload, }] = useTable({ title: '' || (formName + '列表'), api: getLngLngSettleHdrPage,