123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- import { defHttp } from '/@/utils/http/axios';
- import { useMessage } from '/@/hooks/web/useMessage';
- import { NEED_SHOW_LAYER_POSITION } from './common.data';
- const { createConfirm } = useMessage();
- enum Api {
- list = '/billetHotsendBase/billetHotsendBase/list',
- editCell = '/billetHotsendBase/billetHotsendBase/editDesc',
- deleteOne = '/billetHotsendBase/billetHotsendBase/delete',
- deleteBatch = '/billetHotsendBase/billetHotsendBase/deleteBatch',
- queryBilletNameList = '/actualControl/billetActual/queryBilletNameList',
- // 编辑炉次信息
- editRulerInfo = '/rulerDefaultConfig/rulerDefaultConfig/add',
- // 获取班次基础信息
- getRulerDefaultConfig = '/billetHotsend/billetHotsendChangeShift/queryByCcmNo',
- // 交班
- changeShift = '/billetHotsend/billetHotsendChangeShift/add',
- // 编辑班次
- editShift = '/billetHotsend/billetHotsendChangeShift/edit',
- // 获取定尺信息
- getBilletLength = '/actualControl/billetActual/queryBilletLength',
- // 获取棒线结束根
- queryEndNumByCcmNo = '/billetHotsendBase/billetHotsendBase/queryEndNumByCcmNo',
- // 获取车辆信息
- carList = '/storageBill/queryNoDepartByCastMachine',
- // 棒线保存
- rodLineAdd = '/billetHotsendBase/billetHotsendBase/add',
- // 发车
- depart = '/billetHotsendBase/billetHotsendBase/rodLineDepart',
- // 获取棒线车辆
- rodLineCarList = '/storageBill/queryNoDepartByCcmNo',
- // 明细
- rollcluboneNum = '/rollClubOneDetails/list',
- rollclubtwoNum = '/rollClubTwoDetails/list',
- rollclubthreeNum = '/rollClubThreeDetails/list',
- rollheightNum = '/rollHeightDetails/list',
- rolloutshippNum = '/rollOutShippDetails/list',
- stackNum = '/billet/stackingAndLoadingVehicles/list',
- wasteNum = '/billetHotsend/billetHotsendAbandons/list',
- // 获取堆垛信息
- stackInfo = '/billet/stackingAndLoadingVehicles/getListByTypeConfigId',
- // 上堆垛保存
- stackSave = '/billet/stackingAndLoadingVehicles/addStacking',
- // 堆垛装车保存
- stackLoadSave = '/billet/stackingAndLoadingVehicles/loading',
- // 堆垛装车发车
- stackLoadDepart = '/billet/stackingAndLoadingVehicles/stackDepart',
- // 判废
- deleteJunk = '/billet/stackingAndLoadingVehicles/judgeDiscard',
- // 新增热线基础信息
- addBilletHotsendInfo = '/billetHotsendBase/billetHotsendBase/addBilletHotsendInfo',
- // 查询车辆是否装运过堆垛信息
- queryCarHasStackBillet = '/stackingDownLog/stackingDownLog/queryByStorageBillId',
- // 导出接口
- exportXls = '/billetHotsendBase/billetHotsendBase/exportExcel',
- // 堆垛更换位置
- stackLocationChange = '/billet/stackingAndLoadingVehicles/stackLocationChange',
- }
- /**
- * 导出api
- * @param params
- */
- export const getExportUrl = Api.exportXls;
- /**
- * 列表接口
- * @param params
- */
- export const list = (params) => defHttp.get({ url: Api.list, params });
- export const editCell = (params) => {
- return defHttp.put({ url: Api.editCell, params }, { joinParamsToUrl: true });
- };
- /**
- * 删除单个
- * @param params
- * @param handleSuccess
- */
- export const deleteOne = (params, handleSuccess) => {
- return defHttp.delete({ url: Api.deleteOne, params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- };
- /**
- * 批量删除
- * @param params
- * @param handleSuccess
- */
- export const batchDelete = (params, handleSuccess) => {
- createConfirm({
- iconType: 'warning',
- title: '确认删除',
- content: '是否删除选中数据',
- okText: '确认',
- cancelText: '取消',
- onOk: () => {
- return defHttp.delete({ url: Api.deleteBatch, data: params }, { joinParamsToUrl: true }).then(() => {
- handleSuccess();
- });
- },
- });
- };
- // 根据铸机获取铸机下所属棒线和堆垛
- export const queryBilletNameList = (params) => defHttp.get({ url: Api.queryBilletNameList, params });
- // 获取当前炉次基本配置信息
- export const getRulerDefaultConfig = (params) => defHttp.get({ url: Api.getRulerDefaultConfig, params }, { joinParamsToUrl: true });
- // 编辑炉次信息
- export const editRulerDefaultConfig = (params) => defHttp.post({ url: Api.editRulerInfo, params }, { joinParamsToUrl: true });
- // 获取定尺信息
- export const getBilletLength = (params) => defHttp.get({ url: Api.getBilletLength, params }, { joinParamsToUrl: true });
- // 获取棒线结束根
- export const getEndLine = (params) => defHttp.get({ url: Api.queryEndNumByCcmNo, params }, { joinParamsToUrl: true });
- // 获取车辆信息
- export const getCarList = (params) => defHttp.get({ url: Api.carList, params }, { joinParamsToUrl: true });
- // 棒线保存
- export const rodLineAdd = (params) => defHttp.post({ url: Api.rodLineAdd, params });
- // 交班
- export const changeShift = (params) => defHttp.post({ url: Api.changeShift, params });
- // 编辑班次
- export const editShift = (params) => defHttp.post({ url: Api.editShift, params });
- // 发车
- export const depart = (params) => defHttp.post({ url: Api.depart, params });
- // 明细
- export const getDetails = (params) => {
- const { table } = params;
- const p = { ...params, ...(NEED_SHOW_LAYER_POSITION.includes(table) ? { column: 'createTime' } : {}) };
- delete p.table;
- return defHttp.get({ url: Api[table], params: p });
- };
- // 获取堆垛信息
- export const getStackInfo = (params) => defHttp.get({ url: Api.stackInfo, params });
- // 上堆垛保存
- export const stackSave = (params) => defHttp.post({ url: Api.stackSave, params });
- // 堆垛装车保存
- export const stackLoadSave = (params) => defHttp.post({ url: Api.stackLoadSave, params });
- // 堆垛装车发车
- export const stackLoadDepart = (params) => defHttp.post({ url: Api.stackLoadDepart, params });
- // 获取棒线车辆
- export const getRodLineCarList = (params) => defHttp.get({ url: Api.rodLineCarList, params });
- // 判废
- export const deleteJunk = (params) => defHttp.post({ url: Api.deleteJunk, params });
- // 新增热线基础信息
- export const addBilletHotsendInfo = (params) => defHttp.post({ url: Api.addBilletHotsendInfo, params });
- // 查询车辆是否装运过堆垛信息
- export const getCarHasStackBillet = (params) => defHttp.get({ url: Api.queryCarHasStackBillet, params }, { joinParamsToUrl: true });
- // 堆垛更换位置
- export const stackLocationChange = (params) => defHttp.post({ url: Api.stackLocationChange, params });
|