diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 59c225a..24a6c09 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -807,7 +807,7 @@ export function selectDeviceBtn(option:any) { export function selectQrCodeBtn(option:any) { return __defaultBtnOption(option,{ label: '二维码', - name: 'selectQrCode', + name: 'qrCode', hide: false, type: 'primary', color: '', @@ -1026,6 +1026,18 @@ export function pictureBtn(option:any) { }) } +// 主列表-二维码 +export function selectQrCodeBatchBtn(option:any) { + return __defaultBtnOption(option,{ + label: '批量生成标签', + name: 'qrCodeBatch', + hide: false, + type: 'primary', + color: '', + link: false, // 文本展现按钮 + hasPermi: '' + }) +} // 默认按钮规则 function __defaultBtnOption(option:any,specific:any){ diff --git a/src/views/eam/basic/fixedAssets/fixedAssets.data.ts b/src/views/eam/basic/fixedAssets/fixedAssets.data.ts index 14fa978..07518cf 100644 --- a/src/views/eam/basic/fixedAssets/fixedAssets.data.ts +++ b/src/views/eam/basic/fixedAssets/fixedAssets.data.ts @@ -15,6 +15,9 @@ export const FixedAssets = useCrudSchemas(reactive([ label: '编号唯一标识', field: 'number', sort: 'custom', + table: { + width: '150', + }, isSearch: true, isForm: false, }, @@ -22,28 +25,43 @@ export const FixedAssets = useCrudSchemas(reactive([ label: '资产名称', field: 'name', sort: 'custom', + table: { + width: '150', + }, isSearch: true, }, { label: '会计单位', field: 'accountingUnit', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '规格型号', field: 'specifications', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '库位编号', field: 'locationNumber', sort: 'custom', + table: { + width: '150', + }, isSearch: true }, { label: '购买时间', field: 'purchaseDate', sort: 'custom', + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -56,17 +74,26 @@ export const FixedAssets = useCrudSchemas(reactive([ { label: '采购部门', field: 'purchaseDept', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '供应商编号', field: 'supplierNumber', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '出厂日期', field: 'productionDate', sort: 'custom', + table: { + width: '150', + }, formatter: dateFormatter, form: { component: 'DatePicker', @@ -79,22 +106,34 @@ export const FixedAssets = useCrudSchemas(reactive([ { label: '购买价格', field: 'purchasePrice', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '管理部门', field: 'manageDept', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '单位', field: 'unit', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '数量', field: 'qty', - sort: 'custom' + sort: 'custom', + table: { + width: '150', + }, }, { label: '操作', diff --git a/src/views/eam/basic/fixedAssets/index.vue b/src/views/eam/basic/fixedAssets/index.vue index 14abf4c..3c28e15 100644 --- a/src/views/eam/basic/fixedAssets/index.vue +++ b/src/views/eam/basic/fixedAssets/index.vue @@ -100,8 +100,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultImportBtn(null), // 导入 - defaultButtons.defaultExportBtn(null), // 导出 + // defaultButtons.defaultImportBtn(null), // 导入 + // defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null), // 设置 @@ -133,8 +133,8 @@ const buttonBaseClick = (val, item) => { // 列表-操作按钮 const butttondata = [ - defaultButtons.mainListEditBtn({hasPermi:'eam:fixedAssets:update'}), // 编辑 - defaultButtons.mainListDeleteBtn({hasPermi:'eam:fixedAssets:delete'}), // 删除 + defaultButtons.mainListEditBtn(null), // 编辑 + defaultButtons.mainListDeleteBtn(null), // 删除 ] // 列表-操作按钮事件 diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index 097e3b0..1d41d95 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -107,6 +107,7 @@ import * as DeviceMaintainOrderMainApi from '@/api/eam/device/deviceMaintainOrde import * as DeviceMaintainOrderDetailApi from '@/api/eam/device/deviceMaintainOrderDetail' import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMain' import * as deviceMaintenanceDetailApi from '@/api/eam/device/deviceMaintenanceDetail' +import { getAccessToken } from '@/utils/auth' import { DeviceMaintainOrderMain, @@ -162,8 +163,9 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultImportBtn(null), // 导入 - defaultButtons.defaultExportBtn(null), // 导出 + defaultButtons.selectQrCodeBatchBtn(null), //批量生成二维码 + // defaultButtons.defaultImportBtn(null), // 导入 + // defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 @@ -185,6 +187,9 @@ const buttonBaseClick = (val, item) => { } else if (val == 'import') { // 导入 handleImport() + } else if (val == 'qrCodeBatch') { + // 批量生成二维码 + qrCodeBatch(val, item) } else if (val == 'export') { // 导出 handleExport() @@ -207,6 +212,10 @@ const butttondata = [ defaultButtons.selectItemBtn(null) //备件 ] +const BASE_URL = import.meta.env.VITE_JMREPORT_BASE_URL +const src = ref(BASE_URL + '/jmreport/view/924818618605031424?token=' + getAccessToken()) + + // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { @@ -217,9 +226,17 @@ const buttonTableClick = async (val, row) => { openQrCode(row.number) } else if (val == 'selectItem') { openItem(row.number) + } else if (val == 'qrCode') { + window.open(src.value + "&number='" + row.number + "'") + } else { + // 其他按钮 + console.log('其他按钮', val, row) } } + + + /** 添加/修改操作 */ const basicFormRef = ref() const openForm = (type: string, row?: any) => { @@ -475,4 +492,9 @@ const getDeviceItemBindData = async (params) => { return response?.data; } +const qrCodeBatch = async (val,item) => { + const qrCodeList = tableObject.tableList.map(item => `'${item?.number}'`).join(', ') + window.open(src.value + "&number=" + qrCodeList) +} + diff --git a/src/views/eam/device/deviceRepair/deviceRepair.data.ts b/src/views/eam/device/deviceRepair/deviceRepair.data.ts index 81add7e..f29e3f9 100644 --- a/src/views/eam/device/deviceRepair/deviceRepair.data.ts +++ b/src/views/eam/device/deviceRepair/deviceRepair.data.ts @@ -41,7 +41,7 @@ export const DeviceRepair = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: false }, { diff --git a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts index ca5ede0..05eb457 100644 --- a/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts +++ b/src/views/eam/device/devicemaintenancejob/deviceMaintenanceMain.data.ts @@ -33,7 +33,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -44,7 +44,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ width: '150', }, isForm: false, - isSearch: true, + isSearch: false, isTable: true, }, @@ -60,8 +60,8 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive([ return deviceList.find((account) => account.number == cellValue)?.name }, search: { - show: true, - component: 'Select', + show: false, + component: 'Input', api: () => deviceList, componentProps: { optionsAlias: { diff --git a/src/views/eam/device/devicemaintenancejob/index.vue b/src/views/eam/device/devicemaintenancejob/index.vue index 129d8a0..80ca9c5 100644 --- a/src/views/eam/device/devicemaintenancejob/index.vue +++ b/src/views/eam/device/devicemaintenancejob/index.vue @@ -257,7 +257,8 @@ const butttondata = (row) => { hide: !(row.status == 'PECEIVED' && row.maintenance == userStore.getUser.id) }), // 完成 defaultButtons.pictureBtn({ - hide: !(row.filePathList != null && row.filePathList.length > 0) + hide: !(row.filePathList != null && row.filePathList.length > 0 && + userStore?.userSelfInfo?.posts?.some((item) => item.code == 'worker')) }) // 预览报修图片 ] } diff --git a/src/views/eam/mold/moldAccounts/index.vue b/src/views/eam/mold/moldAccounts/index.vue index 5f52e04..1c6f966 100644 --- a/src/views/eam/mold/moldAccounts/index.vue +++ b/src/views/eam/mold/moldAccounts/index.vue @@ -174,8 +174,8 @@ const { getList, setSearchParams } = tableMethods // 列表头部按钮 const HeadButttondata = [ defaultButtons.defaultAddBtn(null), // 新增 - defaultButtons.defaultImportBtn(null), // 导入 - defaultButtons.defaultExportBtn(null), // 导出 + // defaultButtons.defaultImportBtn(null), // 导入 + // defaultButtons.defaultExportBtn(null), // 导出 defaultButtons.defaultFreshBtn(null), // 刷新 defaultButtons.defaultFilterBtn(null), // 筛选 defaultButtons.defaultSetBtn(null) // 设置 diff --git a/src/views/eam/mold/moldAccounts/moldAccounts.data.ts b/src/views/eam/mold/moldAccounts/moldAccounts.data.ts index cb17928..9e4f235 100644 --- a/src/views/eam/mold/moldAccounts/moldAccounts.data.ts +++ b/src/views/eam/mold/moldAccounts/moldAccounts.data.ts @@ -37,7 +37,7 @@ export const MoldAccounts = useCrudSchemas(reactive([ label: '模具类型', field: 'type', sort: 'custom', - isSearch: true, + isSearch: false, form: { component: 'Select' } diff --git a/src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts b/src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts index 9e582ec..289b84c 100644 --- a/src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts +++ b/src/views/eam/mold/moldinspectionjob/moldInspectionMain.data.ts @@ -34,7 +34,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -49,7 +49,7 @@ export const MoldInspectionMain = useCrudSchemas(reactive([ // return repairList.find((account) => account.number == cellValue)?.name // }, search: { - show: true, + show: false, component: 'Select', api: () => repairList, componentProps: { diff --git a/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts b/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts index 3d3f1a5..443d5a1 100644 --- a/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts +++ b/src/views/eam/mold/moldmaintainjob/moldMaintainOrderMain.data.ts @@ -25,7 +25,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ label: '保养单号', field: 'number', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: '150', }, @@ -34,7 +34,7 @@ export const MoldMaintainOrderMain = useCrudSchemas(reactive([ label: '保养计划单号', field: 'planNumber', sort: 'custom', - isSearch: true, + isSearch: false, table: { width: '150', }, diff --git a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts index b6068b2..462408d 100644 --- a/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts +++ b/src/views/eam/mold/moldmaintenancejob/moldMaintenanceMain.data.ts @@ -30,7 +30,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, isForm: false, }, { @@ -41,7 +41,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ width: '150', }, isForm: false, - isSearch: true, + isSearch: false, isTable: true, }, @@ -58,14 +58,14 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ }, search: { show: true, - component: 'Select', - api: () => moldList, - componentProps: { - optionsAlias: { - labelField: 'name', - valueField: 'number' - } - } + component: 'Input', + // api: () => moldList, + // componentProps: { + // optionsAlias: { + // labelField: 'name', + // valueField: 'number' + // } + // } }, form: { component: 'Select', @@ -117,6 +117,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, + isSearch: true, form: { component: 'Select', api: () => userList, @@ -137,7 +138,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: false, + isSearch: true, isForm: true, dictType: DICT_TYPE.DEVICE_MOLD_TYPE, dictClass: 'string', @@ -158,7 +159,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, dictType: DICT_TYPE.MAINTENANCE_SHIFT, dictClass: 'number', form: { @@ -172,7 +173,7 @@ export const MoldMaintenanceMain = useCrudSchemas(reactive([ table: { width: '150', }, - isSearch: true, + isSearch: false, dictType: DICT_TYPE.FAULT_TYPE, dictClass: 'string', form: {