diff --git a/src/api/eam/equipmentManufacturer/index.ts b/src/api/eam/equipmentManufacturer/index.ts index d735e38e4..6efa2cbb2 100644 --- a/src/api/eam/equipmentManufacturer/index.ts +++ b/src/api/eam/equipmentManufacturer/index.ts @@ -54,7 +54,12 @@ export const deleteEquipmentManufacturer = async (id: number) => { // 导出设备制造商 Excel export const exportEquipmentManufacturer = async (params) => { - return await request.download({ url: `/eam/basic/equipment-manufacturer/export-excel`, params }) + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/equipment-manufacturer/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/equipment-manufacturer/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/eam/equipmentSupplier/index.ts b/src/api/eam/equipmentSupplier/index.ts index 3026e600c..b6a38dc40 100644 --- a/src/api/eam/equipmentSupplier/index.ts +++ b/src/api/eam/equipmentSupplier/index.ts @@ -54,7 +54,12 @@ export const deleteEquipmentSupplier = async (id: number) => { // 导出供应商 Excel export const exportEquipmentSupplier = async (params) => { - return await request.download({ url: `/eam/basic/equipment-supplier/export-excel`, params }) + if (params.isSearch) { + const data = { ...params } + return await request.downloadPost({ url: `/eam/basic/equipment-supplier/export-excel-senior`, data }) + } else { + return await request.download({ url: `/eam/basic/equipment-supplier/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/qms/inspectionJob/inspectionJobMain/index.ts b/src/api/qms/inspectionJob/inspectionJobMain/index.ts index aca7fd268..3346beae4 100644 --- a/src/api/qms/inspectionJob/inspectionJobMain/index.ts +++ b/src/api/qms/inspectionJob/inspectionJobMain/index.ts @@ -51,12 +51,14 @@ export const abandonInspectionJobMain = async (id) => { export const closeInspectionJobMain = async (id) => { return await request.put({ url: `/qms/inspection-job-main/close?id=` + id }) } - +// 发布检验任务 +export const releaseInspectionJobMain = async (id) => { + return await request.put({ url: `/qms/inspection-job-main/release?id=` + id }) +} // 导出检验申请 Excel export const exportInspectionJobMain = async (params) => { return await request.download({ url: `/qms/inspection-job-main/export-excel`, params }) } - // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/qms/inspection-job-main/get-import-template' }) diff --git a/src/components/Annex/src/Annex.vue b/src/components/Annex/src/Annex.vue index 7d5f0e142..5f5f144d6 100644 --- a/src/components/Annex/src/Annex.vue +++ b/src/components/Annex/src/Annex.vue @@ -3,7 +3,7 @@
-
diff --git a/src/components/Descriptions/src/Descriptions.vue b/src/components/Descriptions/src/Descriptions.vue index 6f00f10c2..f81f8f35a 100644 --- a/src/components/Descriptions/src/Descriptions.vue +++ b/src/components/Descriptions/src/Descriptions.vue @@ -5,6 +5,7 @@ import { useDesign } from '@/hooks/web/useDesign' import { propTypes } from '@/utils/propTypes' import { useAppStore } from '@/store/modules/app' import { DescriptionsSchema } from '@/types/descriptions' +const { t } = useI18n() // 国际化 defineOptions({ name: 'Descriptions' }) @@ -99,7 +100,7 @@ const showAll = () =>{ >
- {{ title }} + {{ t(`ts.${title}`).replace('ts.', '') }} @@ -119,7 +120,7 @@ const showAll = () =>{ - { :row="{ label: item.label }" - >{{ item.label }} + >{{ t(`ts.${item.label}`).replace('ts.', '') }} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 3ebe261c5..af528c603 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -2,14 +2,14 @@
diff --git a/src/components/DictTag/src/DictTag.vue b/src/components/DictTag/src/DictTag.vue index b72b2b9ec..35920d91e 100644 --- a/src/components/DictTag/src/DictTag.vue +++ b/src/components/DictTag/src/DictTag.vue @@ -3,6 +3,7 @@ import { defineComponent, PropType, ref } from 'vue' import { isHexColor } from '@/utils/color' import { ElTag } from 'element-plus' import { DictDataType, getDictOptions } from '@/utils/dict' +const { t } = useI18n() // 国际化 export default defineComponent({ name: 'DictTag', @@ -55,7 +56,7 @@ export default defineComponent({ } disableTransitions={true} > - {dictData.value?.label} + {t(`ts.${dictData.value?.label}`).replace('ts.', '')} ) } else { @@ -71,7 +72,7 @@ export default defineComponent({ } disableTransitions={true} > - {item?.label} + {t(`ts.${item?.label}`).replace('ts.', '')} }) ) diff --git a/src/components/Remarks/src/Remarks.vue b/src/components/Remarks/src/Remarks.vue index 35423c454..857d91027 100644 --- a/src/components/Remarks/src/Remarks.vue +++ b/src/components/Remarks/src/Remarks.vue @@ -20,9 +20,9 @@
- + - 确定 + {{t('ts.确定')}}
@@ -32,6 +32,7 @@ const message = useMessage() // 消息弹窗 import * as RemarkApi from '@/api/wms/remark' import { formatDate } from '@/utils/formatTime' +const { t } = useI18n() // 国际化 defineComponent({ name: 'Annex' diff --git a/src/components/Tabs/src/Tabs.vue b/src/components/Tabs/src/Tabs.vue index 8c66168a9..8c22163f6 100644 --- a/src/components/Tabs/src/Tabs.vue +++ b/src/components/Tabs/src/Tabs.vue @@ -1,7 +1,7 @@ @@ -9,6 +9,7 @@ // const message = useMessage() // 消息弹窗 import { emit } from "process"; +const { t } = useI18n() // 国际化 // const { t } = useI18n() // 国际化 defineComponent({ diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 05ce5f239..bf3cc4895 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -42,6 +42,7 @@ import { PropType } from 'vue' import { propTypes } from '@/utils/propTypes' import { getAccessToken, getTenantId } from '@/utils/auth' import type { UploadInstance, UploadUserFile, UploadProps, UploadRawFile } from 'element-plus' +const { t } = useI18n() // 国际化 defineOptions({ name: 'UploadFile' }) @@ -78,7 +79,7 @@ const uploadHeaders = ref({ // 文件上传之前判断 const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { if (fileList.value.length >= props.limit) { - message.error(`上传文件数量不能超过${props.limit}个!`) + message.error(`${t('ts.上传文件数量不能超过')}${props.limit}!`) return false } let fileExtension = '' @@ -91,14 +92,14 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { }) const isLimit = file.size < props.fileSize * 1024 * 1024 if (!isImg) { - message.error(`文件格式不正确, 请上传${props.fileType.join('/')}格式!`) + message.error(`${t(`ts.${'文件格式不正确, 请上传'}`)}${props.fileType.join('/')}${t('ts.格式')}!`) return false } if (!isLimit) { - message.error(`上传文件大小不能超过${props.fileSize}MB!`) + message.error(`${t('ts.上传文件大小不能超过')}${props.fileSize}MB!`) return false } - message.success('正在上传文件,请稍候...') + message.success(t(`ts.${'正在上传文件,请稍候'}`)) uploadNumber.value++ } // 处理上传的文件发生变化 @@ -107,7 +108,7 @@ const beforeUpload: UploadProps['beforeUpload'] = (file: UploadRawFile) => { // } // 文件上传成功 const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): void => { - message.success('上传成功') + message.success(t('ts.上传成功')) const fileListNew = fileList.value fileListNew.pop() fileList.value = fileListNew @@ -121,11 +122,11 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any,uploadFile: any): } // 文件数超出提示 const handleExceed: UploadProps['onExceed'] = (): void => { - message.error(`上传文件数量不能超过${props.limit}个!`) + message.error(`${t('ts.上传文件数量不能过')}${props.limit}!`) } // 上传错误提示 const excelUploadError: UploadProps['onError'] = (): void => { - message.error('导入数据失败,请您重新上传!') + message.error(t(`ts.导入数据失败,请您重新上传`)) } // 删除上传文件 const handleRemove = (file) => { diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index d426530a5..c8a4ee393 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1063,6 +1063,30 @@ export default { 采购价格审批人:'Purchasing price approver', 供应商发货单号:'Supplier\'s invoice number', 加载中:'loading', + 请输入备注:'Please enter remarks', + '正在上传文件,请稍候':'Please wait while uploading files', + 上传成功:'upload successful', + 上传文件数量不能超过:'The number of uploaded files cannot exceed', + '导入数据失败,请您重新上传':'Failed to import data, please upload again!', + 上传文件大小不能超过:'The size of the uploaded file cannot exceed', + '文件格式不正确, 请上传':'The file format is incorrect. Please upload it in', + 格式:'format', + 收货人:'consignee', + 联系电话:'phone', + 送达日期:'delivery date', + 月台代码:'Platform code', + 截止日期:'Deadline', + 仓库代码:'Warehouse code', + 'ERP单据号(无用)':'ERP document number (useless)', + 供应商审批人:'Supplier approver', + 供应商审批时间:'Supplier approval time', + 快递单号:'courier number', + 开票日历管理:'Invoicing calendar management', + 描述:'description' + + + + }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 73699f76a..65f4ded05 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1063,6 +1063,30 @@ export default { 采购价格审批人:'采购价格审批人', 供应商发货单号:'供应商发货单号', 加载中:'加载中', + 请输入备注:'请输入备注', + '正在上传文件,请稍候':'正在上传文件,请稍候...', + 上传成功:'上传成功', + 上传文件数量不能超过:'上传文件数量不能超过', + '导入数据失败,请您重新上传':'导入数据失败,请您重新上传!', + 上传文件大小不能超过:'上传文件大小不能超过', + '文件格式不正确, 请上传':'文件格式不正确, 请上传', + 格式:'格式', + 收货人:'收货人', + 联系电话:'联系电话', + 送达日期:'送达日期', + 月台代码:'月台代码', + 截止日期:'截止日期', + 仓库代码:'仓库代码', + 'ERP单据号(无用)':'ERP单据号(无用)', + 供应商审批人:'供应商审批人', + 供应商审批时间:'供应商审批时间', + 快递单号:'快递单号', + 开票日历管理:'开票日历管理', + 描述:'描述' + + + + }, diff --git a/src/views/home/components/supplierIndex.vue b/src/views/home/components/supplierIndex.vue index 5e8a679c1..af6faa6f0 100644 --- a/src/views/home/components/supplierIndex.vue +++ b/src/views/home/components/supplierIndex.vue @@ -231,7 +231,8 @@ import { set } from 'lodash-es' import { EChartsOption } from 'echarts' import { lineOptions, pieOptions } from '../echarts-data' -import { formatDate } from '@/utils/formatTime' +import { formatDate,dateFormatter } from '@/utils/formatTime' + import * as NotifyMessageApi from '@/api/system/notify/message' import * as IndexApi from '@/api/home' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' diff --git a/src/views/mes/orderDay/components/schedule.vue b/src/views/mes/orderDay/components/schedule.vue index 9ac9b269e..eccbefcd7 100644 --- a/src/views/mes/orderDay/components/schedule.vue +++ b/src/views/mes/orderDay/components/schedule.vue @@ -201,7 +201,7 @@ @@ -471,20 +471,23 @@ const opensearchTable = ( ) } -const handleClose=()=>{ - dialogVisible.value = false, - emit('close') +const handleClose=(val)=>{ + dialogVisible.value = false + emit('close',val) } const publishPlan=()=>{ - message.confirm("确认发布当前计划?","question").then(async () => { + message.confirm("确认发布当前计划?","提示").then( () => { //isPublish.value=true //loading.value = true, - try{formLoading.value=true - doPublishPlan() }finally{ + try{ + formLoading.value=true + let promise = doPublishPlan(); + handleClose(promise) + }finally{ formLoading.value=false; - handleClose() + } - + }).catch(() => { message.info("已取消发布") }) @@ -517,12 +520,14 @@ const doPublishPlan= ()=>{ let res = OrderDayApi.publishPlan(data) - res.then(()=>{ - message.success("计划发布成功") - }).catch(()=>{ - //console.log("---doPublishPlan-- 458--",res.msg) - message.error("计划发布失败!") - }) + return res + + // res.then(()=>{ + // message.success("计划发布成功") + // }).catch(()=>{ + // //console.log("---doPublishPlan-- 458--",res.msg) + // message.error("计划发布失败!") + // }) } diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue index edcb14390..98a405c6f 100644 --- a/src/views/mes/orderDay/index.vue +++ b/src/views/mes/orderDay/index.vue @@ -57,7 +57,7 @@ :isBusiness="false" :isSearchFilterButtonHide="true" @onChange="valueChange" - + /> @@ -142,7 +142,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { if(formField=='workroomCode'){ getProductlines(val[0][searchField]) } - + }) } @@ -156,9 +156,9 @@ const valueChange=(filed,cur)=>{ //item.componentProps.required = cur==='ENABLE'?false:true } }) - + } - + } // 字段设置 更新主列表字段 @@ -199,10 +199,12 @@ const buttonBaseClick = (val, item) => { console.log('其他按钮', item) } } -const publishClosed=()=>{ - //console.log('orderday-publishClosed-200') - getList() - +const publishClosed=(val)=>{ + console.log('orderday-publishClosed-200',val) + nextTick?.(()=>{ + getList() + }) + } // 根据状态返回该按钮是否显示 const isShowMainButton = (row,val) => { @@ -227,7 +229,7 @@ const butttondata = (row) => { type: 'warning', icon: '', color: '', - hasPermi: 'mes:orderDay:update'}), // + hasPermi: 'mes:orderDay:update'}), // // defaultButtons.mainListHandleBtn({label: '发布', // name: 'publish', // hide: isShowMainButton(row,['2']), @@ -268,25 +270,24 @@ const openForm = (type: string, row?: any) => { // form表单提交 const formsSuccess = async (formType,data) => { - + if (formType === 'create') { - let ret= OrderDayApi.createOrderDay(data) - if(ret===undefined || ret===null){ - message.error(t('common.networkError')) - }else{ - message.success(t('common.createSuccess')) - } - + await OrderDayApi.createOrderDay(data) + // if(ret===undefined || ret===null){ + // message.error(t('common.networkError')) + // }else{ + // message.success(t('common.createSuccess')) + // } + } else { - let ret= OrderDayApi.updateOrderDay(data) - if(ret.code==0){ - message.success(t('common.updateSuccess')) - }else{ - message.error(t('common.networkError')) - } - + await OrderDayApi.updateOrderDay(data) + // if(ret.code==0){ + // message.success(t('common.updateSuccess')) + // }else{ + // message.error(t('common.networkError')) + // } + } - basicFormRef.value.dialogVisible = false await getList() } @@ -301,7 +302,7 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { //console.log('orderDay-openDetail-303',row) sDetailRef.value.open(row, titleName) } - + } /** 发布操作 */ const scheduleDetailRef = ref() @@ -336,9 +337,10 @@ const handleExport = async () => { exportLoading.value = false } } -const stopPlan = (id) => { - OrderDayApi.stopPlan(id) - +const stopPlan = async (id) => { + await OrderDayApi.stopPlan(id) + getList() + } /** 导入 */ const importFormRef = ref() diff --git a/src/views/mes/orderDay/orderDay.data.ts b/src/views/mes/orderDay/orderDay.data.ts index 43bed9d1e..d2d6a1109 100644 --- a/src/views/mes/orderDay/orderDay.data.ts +++ b/src/views/mes/orderDay/orderDay.data.ts @@ -49,6 +49,7 @@ export const OrderDay = useCrudSchemas(reactive([ field: 'id', sort: 'custom', isForm: false, + isTable: false, width: '60px', }, { @@ -365,7 +366,7 @@ export const OrderDay = useCrudSchemas(reactive([ field: 'remark', sort: 'custom', isSearch: false, - isTable:false, + // isTable:false, }, { label: '操作', diff --git a/src/views/mes/workScheduling/components/qualifiedCheck.vue b/src/views/mes/workScheduling/components/qualifiedCheck.vue index bf2d7733e..0ce7768bf 100644 --- a/src/views/mes/workScheduling/components/qualifiedCheck.vue +++ b/src/views/mes/workScheduling/components/qualifiedCheck.vue @@ -11,28 +11,28 @@ - - + + - - + + - + - + - +