diff --git a/src/api/dayPlan/LngSettleHdr/index.ts b/src/api/dayPlan/LngSettleHdr/index.ts index d6d4a65..e1cf200 100644 --- a/src/api/dayPlan/LngSettleHdr/index.ts +++ b/src/api/dayPlan/LngSettleHdr/index.ts @@ -3,16 +3,50 @@ import { defHttp } from '/@/utils/http/axios'; import { ErrorMessageMode } from '/#/axios'; enum Api { - Page = '/dayPlan/lngSettleHdr/page', + // Page = '/dayPlan/lngSettleHdr/page', + Page = '/magic-api/dayPlan/lngSettleHdr/page', List = '/dayPlan/lngSettleHdr/list', Info = '/dayPlan/lngSettleHdr/info', LngLngSettleHdr = '/dayPlan/lngSettleHdr', - - + querySettList = '/magic-api/dayPlan/querySettList', + cancel = '/dayPlan/lngSettleHdr/cancel', + getSettMonth = '/magic-api/dayPlan/getSettMonth' } - +export async function cancelLngSettleHdr(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.cancel, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} +export async function getLngLngSettleHdrMonth(params: LngLngSettleHdrPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.getSettMonth, + params + }, + { + errorMessageMode: mode, + }, + ); +} +export async function getLngLngSettleHdrPageAdd(params: LngLngSettleHdrPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.querySettList, + params, + }, + { + errorMessageMode: mode, + }, + ); +} /** * @description: 查询LngLngSettleHdr分页列表 */ diff --git a/src/api/inventory/LngInventoryIn/index.ts b/src/api/inventory/LngInventoryIn/index.ts new file mode 100644 index 0000000..912577d --- /dev/null +++ b/src/api/inventory/LngInventoryIn/index.ts @@ -0,0 +1,90 @@ +import { LngInventoryInPageModel, LngInventoryInPageParams, LngInventoryInPageResult } from './model/LngInventoryInModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/inventory/lngInventoryIn/page', + List = '/inventory/lngInventoryIn/list', + Info = '/inventory/lngInventoryIn/info', + LngInventoryIn = '/inventory/lngInventoryIn', + + + + + DataLog = '/inventory/lngInventoryIn/datalog', +} + +/** + * @description: 查询LngInventoryIn分页列表 + */ +export async function getLngInventoryInPage(params: LngInventoryInPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngInventoryIn信息 + */ +export async function getLngInventoryIn(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngInventoryIn + */ +export async function addLngInventoryIn(lngInventoryIn: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngInventoryIn, + params: lngInventoryIn, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngInventoryIn + */ +export async function updateLngInventoryIn(lngInventoryIn: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngInventoryIn, + params: lngInventoryIn, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngInventoryIn(批量删除) + */ +export async function deleteLngInventoryIn(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngInventoryIn, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/inventory/LngInventoryIn/model/LngInventoryInModel.ts b/src/api/inventory/LngInventoryIn/model/LngInventoryInModel.ts new file mode 100644 index 0000000..eb5a3e8 --- /dev/null +++ b/src/api/inventory/LngInventoryIn/model/LngInventoryInModel.ts @@ -0,0 +1,58 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngInventoryIn分页参数 模型 + */ +export interface LngInventoryInPageParams extends BasicPageParams { + typeCode: string; + + staCode: string; + + dateIn: string; + + suCode: string; + + id: string; + + qtyUnloadMmbtu: string; + + qtyUnloadTon: string; + + qtyUnloadM3L: string; + + qtyUnloadM3: string; + + qtyUnloadGj: string; +} + +/** + * @description: LngInventoryIn分页返回值模型 + */ +export interface LngInventoryInPageModel { + id: string; + + typeCode: string; + + staCode: string; + + dateIn: string; + + qtyUnloadMmbtu: string; + + qtyUnloadTon: string; + + qtyUnloadM3L: string; + + qtyUnloadM3: string; + + qtyUnloadGj: string; + + suCode: string; +} + +0; + +/** + * @description: LngInventoryIn分页返回值结构 + */ +export type LngInventoryInPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/api/inventory/LngInventoryOut/index.ts b/src/api/inventory/LngInventoryOut/index.ts new file mode 100644 index 0000000..be34f44 --- /dev/null +++ b/src/api/inventory/LngInventoryOut/index.ts @@ -0,0 +1,90 @@ +import { LngInventoryOutPageModel, LngInventoryOutPageParams, LngInventoryOutPageResult } from './model/LngInventoryOutModel'; +import { defHttp } from '/@/utils/http/axios'; +import { ErrorMessageMode } from '/#/axios'; + +enum Api { + Page = '/inventory/lngInventoryOut/page', + List = '/inventory/lngInventoryOut/list', + Info = '/inventory/lngInventoryOut/info', + LngInventoryOut = '/inventory/lngInventoryOut', + + + + + DataLog = '/inventory/lngInventoryOut/datalog', +} + +/** + * @description: 查询LngInventoryOut分页列表 + */ +export async function getLngInventoryOutPage(params: LngInventoryOutPageParams, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Page, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 获取LngInventoryOut信息 + */ +export async function getLngInventoryOut(id: String, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params: { id }, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 新增LngInventoryOut + */ +export async function addLngInventoryOut(lngInventoryOut: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.post( + { + url: Api.LngInventoryOut, + params: lngInventoryOut, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 更新LngInventoryOut + */ +export async function updateLngInventoryOut(lngInventoryOut: Recordable, mode: ErrorMessageMode = 'modal') { + return defHttp.put( + { + url: Api.LngInventoryOut, + params: lngInventoryOut, + }, + { + errorMessageMode: mode, + }, + ); +} + +/** + * @description: 删除LngInventoryOut(批量删除) + */ +export async function deleteLngInventoryOut(ids: string[], mode: ErrorMessageMode = 'modal') { + return defHttp.delete( + { + url: Api.LngInventoryOut, + data: ids, + }, + { + errorMessageMode: mode, + }, + ); +} \ No newline at end of file diff --git a/src/api/inventory/LngInventoryOut/model/LngInventoryOutModel.ts b/src/api/inventory/LngInventoryOut/model/LngInventoryOutModel.ts new file mode 100644 index 0000000..f3aaf62 --- /dev/null +++ b/src/api/inventory/LngInventoryOut/model/LngInventoryOutModel.ts @@ -0,0 +1,50 @@ +import { BasicPageParams, BasicFetchResult } from '/@/api/model/baseModel'; + +/** + * @description: LngInventoryOut分页参数 模型 + */ +export interface LngInventoryOutPageParams extends BasicPageParams { + typeCode: string; + + staCode: string; + + dateOut: string; + + id: string; + + qtyGj: string; + + qtyTon: string; + + qtyM3: string; + + amount: string; +} + +/** + * @description: LngInventoryOut分页返回值模型 + */ +export interface LngInventoryOutPageModel { + id: string; + + typeCode: string; + + staCode: string; + + dateOut: string; + + qtyGj: string; + + qtyTon: string; + + qtyM3: string; + + amount: string; +} + +0; + +/** + * @description: LngInventoryOut分页返回值结构 + */ +export type LngInventoryOutPageResult = BasicFetchResult; \ No newline at end of file diff --git a/src/components/common/priceLngHdrListModal.vue b/src/components/common/priceLngHdrListModal.vue index 43cd34c..348f33d 100644 --- a/src/components/common/priceLngHdrListModal.vue +++ b/src/components/common/priceLngHdrListModal.vue @@ -4,16 +4,11 @@ @visible-change="handleVisibleChange" >
仅显示未结算 - +
@@ -27,12 +22,10 @@ import { BasicTable, useTable, FormSchema, BasicColumn, TableAction } from '/@/components/Table'; import { useMessage } from '/@/hooks/web/useMessage'; import { useI18n } from '/@/hooks/web/useI18n'; - import { getLngPngSettleHdrPageAdd} from '/@/api/dayPlan/PngSettleHdr'; - import { getLngPngSettleHdrPageAddPur} from '/@/api/dayPlan/PngSettleHdrPur' - import { parseDownloadUrl} from '/@/api/system/file'; - import { downloadByUrl } from '/@/utils/file/download'; import { DataFormat, FormatOption, DATE_FORMAT, FormatType } from '/@/utils/dataFormat'; - + import { getLngLngSettleHdrPageAdd, } from '/@/api/dayPlan/LngSettleHdr'; + import {formConfig, searchFormSchema, columns } from '/@/views/dayPlan/LngMeasurePur/components/config'; + import { cloneDeep } from 'lodash-es'; const props = defineProps({ selectType: { type: String, default: 'checkbox' }, pageType: String @@ -52,36 +45,12 @@ }, }, ]; - - const columns: BasicColumn[] = [ - { dataIndex: 'datePlan', title: '计划日期', align: 'left', width: 100}, - { dataIndex: 'dateMea', title: '计量日期', align: 'left',width: 100}, - { dataIndex: 'cuSname', title: '客户', align: 'left', }, - { dataIndex: 'pointDelyName', title: '下载点', align: 'left',}, - { dataIndex: 'comName', title: '交易主体', align: 'left',}, - { dataIndex: 'qtyMeaSalesGj', title: '完成量(吉焦)', align: 'left',width: 120}, - { dataIndex: 'qtyMeaPurM3', title: '完成量(方)', align: 'left',width: 120}, - { dataIndex: 'rateM3Gj', title: '比值(方/吉焦)', align: 'left',width: 120}, - { dataIndex: 'ksName', title: '销售合同', align: 'left',}, - { dataIndex: 'file', title: '附件', align: 'left',width: 200}, - { dataIndex: 'settledSign', title: '已结算', align: 'left',width: 100}, - ]; - const columnsPur: BasicColumn[] = [ - { dataIndex: 'datePlan', title: '计划日期', align: 'left', width: 100}, - { dataIndex: 'dateMea', title: '计量日期', align: 'left',width: 100}, - { dataIndex: 'suSname', title: '供应商', align: 'left', }, - { dataIndex: 'pointUpName', title: '上载点', align: 'left',}, - { dataIndex: 'cuSname', title: '客户', align: 'left',}, - { dataIndex: 'pointDelyName', title: '下载点', align: 'left',}, - { dataIndex: 'comName', title: '交易主体', align: 'left',}, - { dataIndex: 'qtyMeaPurGj', title: '完成量(吉焦)', align: 'left',width: 120}, - { dataIndex: 'qtyMeaPurM3', title: '完成量(方)', align: 'left',width: 120}, - { dataIndex: 'rateM3Gj', title: '比值(方/吉焦)', align: 'left',width: 120}, - { dataIndex: 'kpName', title: '采购合同', align: 'left',}, - { dataIndex: 'file', title: '附件', align: 'left',width: 200}, - { dataIndex: 'settledSign', title: '已结算', align: 'left',width: 100}, - ]; - + let columnsNew = cloneDeep(columns) + columnsNew.splice(-5,5) + columnsNew.push( + {dataIndex: 'kName',title: '销售合同',componentType: 'input',align: 'left',width: 180,sorter: true}, + {dataIndex: 'comName',title: '供应商',componentType: 'input',align: 'left',width: 180,sorter: true,}, + { dataIndex: 'settledSign', title: '已结算', align: 'left',width: 100}) const emit = defineEmits(['success', 'register']); const { notification } = useMessage(); @@ -101,9 +70,9 @@ const [registerTable, { getDataSource, setTableData, updateTableDataRecord, reload,clearSelectedRowKeys }] = useTable({ title: t('待结算记录'), - api: props.pageType=='supplier'?getLngPngSettleHdrPageAddPur: getLngPngSettleHdrPageAdd, - rowKey: props.pageType=='supplier' ? 'salesPurId': 'salesId', - columns: props.pageType=='supplier' ? columnsPur: columns, + api: getLngLngSettleHdrPageAdd, + rowKey: 'salesId', + columns: columnsNew, bordered: true, pagination: true, @@ -126,16 +95,6 @@ }, afterFetch: (res) => { tableData.value = res || [] - tableData.value.forEach(v => { - let a = v.attachList ? v.attachList.split(',') : [] - v.lngFileUploadList = [] - a.forEach(k => { - v.lngFileUploadList.push({ - fileOrg: k.split('@')[0], - fileUrl: k.split('@')[1] - }) - }) - }) }, rowSelection: { type: props.selectType, @@ -147,8 +106,8 @@ (val) => { if (val) { let arr = DataFormat.format(val, [ - FormatOption.createQty('qtyMeaGj'), - FormatOption.createQty('qtyMeaM3'), + FormatOption.createQty('qtyMeaGjSales'), + FormatOption.createQty('qtyMeaM3Sales'), ]); if (arr.length) { setTableData(arr) @@ -170,11 +129,6 @@ const checkChange = (val) => { reload(); } - const handleDownload = (info) => { - const url = parseDownloadUrl(info.response ? info.response.data.fileUrl : info.fileUrl); - const fileName = info.response ? info.response.data.fileOrg : info.fileOrg; - downloadByUrl({ url, fileName: fileName}); - }; function onSelectChange(rowKeys: string[], e) { selectedKeys.value = rowKeys; selectedValues.value = e @@ -202,11 +156,11 @@ diff --git a/src/components/common/settleLngHdrList.vue b/src/components/common/settleLngHdrList.vue index 96bf906..f1225f1 100644 --- a/src/components/common/settleLngHdrList.vue +++ b/src/components/common/settleLngHdrList.vue @@ -8,7 +8,7 @@ 结算总量(吉焦):{{ numObj.qtySettleGjAll }} 结算总金额(元):{{ numObj.amount }} -
+
修改价格/吉焦 @@ -24,6 +24,21 @@